ToolStripDropDownManager ClassCleanCode C# Libraries v1.2.03 API
Enhances a plain status label in a OnlineToolStrip to support history, include a time stamp, include a category, and differentiate errors and warnings.
Inheritance Hierarchy

OnlineSystem Object
  CleanCode.Forms AbstractMsgManager
    CleanCode.Forms ToolStripDropDownManager

Namespace: CleanCode.Forms
Assembly: CleanCode (in CleanCode.dll) Version: (1.2.03)

public class ToolStripDropDownManager : AbstractMsgManager

First create an instance of a ToolStripDropDownManager as in:
dropDownMgr = new ToolStripDropDownManager(msgDropDown,myToolStripItem);
The first parameter is a drop-down button on a ToolStrip where your status messages are displayed. The latest message is displayed in the Text property of the button, with the previous message being shifted into the list of drop-down elements that represent the historical message list. The second (optional) parameter is a user control that lets you specify a category which will be incorporated into the message. To display and stack messages, then, simply invoke any of the three primary methods:
A standard status message.
A warning status message.
An error status message.
To facilitate displaying errors, warnings, or unusual conditions, the plain Message(String) method (i.e. without a prefix argument) updates the visible portion of the status (the Text property) but does not add the message to the history list (the drop-down portion). The two-argument form of Message(String, String) -- as well as both Warning(String) and Error(String) methods -- update the visible status and add to the history list.

This subclass of AbstractMsgManager does not require defining the Refresher property.

Since CleanCode 0.9.07.

See Also