SmartTipsManager ClassCleanCode C# Libraries v1.2.03 API
Manages a collection of SmartTips in conjunction with a dedicated SmartTips form.
Inheritance Hierarchy

OnlineSystem Object
  CleanCode.Forms SmartTipsManager

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

public class SmartTipsManager

You must create and supply to a SmartTipsManager a dedicated SmartTips form. The form must have:
  • A OnlineTabControl containing a collection of OnlineTabPages. Each TabPage details one SmartTip; the name of the TabPage must be xxxTabPage, where xxx is the unique identifier of the SmartTip.
  • A common OnlineCheckBox for suppressing the current SmartTip.
  • A common OnlineCheckBox for disabling all SmartTips.
Include this code in the Load event handler for your form. The first line is a suggestion for persisting settings from previous invocations. You could just pass an empty string if persistence is not required.
string initialPackedDictionary = Properties.Settings.Default.SmartTipsDict;
smartTipsManager = new SmartTipsManager(this, smartTrace,
    initialPackedDictionary, tabControl, defaultTabPage,
    suppressCheckBox, disableCheckBox);
Include this in the FormClosing event handler for form. The first line provides for proper closing or hiding of the SmartTips form. The second line is a suggestion on how to persist the settings for subsequent invocations.
Properties.Settings.Default.SmartTipsDict = smartTipsManager.GetDictionary();
Include this in the Enter event handler for every TabPage on your SmartTips form.
smartTipsManager.ResetAllTabs(); // To re-enable all suppressed tabs.
smartTipsManager.SetSuppressed(); // To suppress or allow current tab.
smartTipsManager.ShowTip(attribute); // To show a tip
The remaining methods should be connected as needed to controls on your form as appropriate:

Since CleanCode 0.9.07.

See Also