Class TooltipPluginBase
Base class for tooltip provide plugins. This class contains some useful helper functions, and implements the Template Method pattern. Derived classes need to implement the InnerGetTooltip() method, and can use the TryGetIntHint(String, out Int32) and similar methods to obtain values from the tooltip hint.
Inheritance
Namespace: SuperOffice.CRM.Tooltips
Assembly: SoDataBase.dll
Syntax
public abstract class TooltipPluginBase : Object, ITooltipProviderPlugin, IPlugin
Remarks
The tooltip hints are accessible through the Hints property, but clients should usually find the provided access methods sufficient. TryGetIntHint(String, out Int32), TryGetStringHint(String, out String) and TryGetBoolHint(String, out Boolean) look for and parse the given type of key, and return a bool value that specifies whether the given key was found.
WantImages and WantSimple are boolean properties that give the result of a search for 'images=true' and 'simple=true', to promote a common way of specifying these two properties. The class implements the SuperOffice.CRM.Tooltips.ITooltipProviderPlugin and thereby also theConstructors
TooltipPluginBase()
Base class for tooltip provide plugins. This class contains some useful helper functions, and implements the Template Method pattern. Derived classes need to implement the InnerGetTooltip() method, and can use the TryGetIntHint(String, out Int32) and similar methods to obtain values from the tooltip hint.
Declaration
protected TooltipPluginBase()
Remarks
The tooltip hints are accessible through the Hints property, but clients should usually find the provided access methods sufficient. TryGetIntHint(String, out Int32), TryGetStringHint(String, out String) and TryGetBoolHint(String, out Boolean) look for and parse the given type of key, and return a bool value that specifies whether the given key was found.
WantImages and WantSimple are boolean properties that give the result of a search for 'images=true' and 'simple=true', to promote a common way of specifying these two properties. The class implements the SuperOffice.CRM.Tooltips.ITooltipProviderPlugin and thereby also theFields
ImageHint
Base class for tooltip provide plugins. This class contains some useful helper functions, and implements the Template Method pattern. Derived classes need to implement the InnerGetTooltip() method, and can use the TryGetIntHint(String, out Int32) and similar methods to obtain values from the tooltip hint.
Declaration
public const string ImageHint = "images"
Field Value
Type | Description |
---|---|
String |
Remarks
The tooltip hints are accessible through the Hints property, but clients should usually find the provided access methods sufficient. TryGetIntHint(String, out Int32), TryGetStringHint(String, out String) and TryGetBoolHint(String, out Boolean) look for and parse the given type of key, and return a bool value that specifies whether the given key was found.
WantImages and WantSimple are boolean properties that give the result of a search for 'images=true' and 'simple=true', to promote a common way of specifying these two properties. The class implements the SuperOffice.CRM.Tooltips.ITooltipProviderPlugin and thereby also theSimpleHint
Base class for tooltip provide plugins. This class contains some useful helper functions, and implements the Template Method pattern. Derived classes need to implement the InnerGetTooltip() method, and can use the TryGetIntHint(String, out Int32) and similar methods to obtain values from the tooltip hint.
Declaration
public const string SimpleHint = "simple"
Field Value
Type | Description |
---|---|
String |
Remarks
The tooltip hints are accessible through the Hints property, but clients should usually find the provided access methods sufficient. TryGetIntHint(String, out Int32), TryGetStringHint(String, out String) and TryGetBoolHint(String, out Boolean) look for and parse the given type of key, and return a bool value that specifies whether the given key was found.
WantImages and WantSimple are boolean properties that give the result of a search for 'images=true' and 'simple=true', to promote a common way of specifying these two properties. The class implements the SuperOffice.CRM.Tooltips.ITooltipProviderPlugin and thereby also theUpdatedHint
Base class for tooltip provide plugins. This class contains some useful helper functions, and implements the Template Method pattern. Derived classes need to implement the InnerGetTooltip() method, and can use the TryGetIntHint(String, out Int32) and similar methods to obtain values from the tooltip hint.
Declaration
public const string UpdatedHint = "updated"
Field Value
Type | Description |
---|---|
String |
Remarks
The tooltip hints are accessible through the Hints property, but clients should usually find the provided access methods sufficient. TryGetIntHint(String, out Int32), TryGetStringHint(String, out String) and TryGetBoolHint(String, out Boolean) look for and parse the given type of key, and return a bool value that specifies whether the given key was found.
WantImages and WantSimple are boolean properties that give the result of a search for 'images=true' and 'simple=true', to promote a common way of specifying these two properties. The class implements the SuperOffice.CRM.Tooltips.ITooltipProviderPlugin and thereby also theProperties
Hints
The raw hints dictionary
Declaration
protected Dictionary<string, List<string>> Hints { get; }
Property Value
Type | Description |
---|---|
Dictionary<String, List<String>> |
Remarks
The tooltip hints are accessible through the Hints property, but clients should usually find the provided access methods sufficient. TryGetIntHint(String, out Int32), TryGetStringHint(String, out String) and TryGetBoolHint(String, out Boolean) look for and parse the given type of key, and return a bool value that specifies whether the given key was found.
WantImages and WantSimple are boolean properties that give the result of a search for 'images=true' and 'simple=true', to promote a common way of specifying these two properties. The class implements the SuperOffice.CRM.Tooltips.ITooltipProviderPlugin and thereby also theWantImages
True if the hints dictionary contains the property 'images=true', or if there is no images property in the hint
Declaration
protected bool WantImages { get; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
The tooltip hints are accessible through the Hints property, but clients should usually find the provided access methods sufficient. TryGetIntHint(String, out Int32), TryGetStringHint(String, out String) and TryGetBoolHint(String, out Boolean) look for and parse the given type of key, and return a bool value that specifies whether the given key was found.
WantImages and WantSimple are boolean properties that give the result of a search for 'images=true' and 'simple=true', to promote a common way of specifying these two properties. The class implements the SuperOffice.CRM.Tooltips.ITooltipProviderPlugin and thereby also theWantSimple
True if the hints dictionary contains the property 'simple=true'
Declaration
protected bool WantSimple { get; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
The tooltip hints are accessible through the Hints property, but clients should usually find the provided access methods sufficient. TryGetIntHint(String, out Int32), TryGetStringHint(String, out String) and TryGetBoolHint(String, out Boolean) look for and parse the given type of key, and return a bool value that specifies whether the given key was found.
WantImages and WantSimple are boolean properties that give the result of a search for 'images=true' and 'simple=true', to promote a common way of specifying these two properties. The class implements the SuperOffice.CRM.Tooltips.ITooltipProviderPlugin and thereby also theWantUpdated
True if the hints dictionary contains the property 'updated=true', or if the property is missing. False if the hints dictionary contains the property 'updated=false'
Declaration
protected bool WantUpdated { get; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
The tooltip hints are accessible through the Hints property, but clients should usually find the provided access methods sufficient. TryGetIntHint(String, out Int32), TryGetStringHint(String, out String) and TryGetBoolHint(String, out Boolean) look for and parse the given type of key, and return a bool value that specifies whether the given key was found.
WantImages and WantSimple are boolean properties that give the result of a search for 'images=true' and 'simple=true', to promote a common way of specifying these two properties. The class implements the SuperOffice.CRM.Tooltips.ITooltipProviderPlugin and thereby also theMethods
FormatDescriptionText(String)
Remove blank lines from a string and make sure the length of the string does not exceed 256 characters. This method should be used to format the Text property of an entity like Appointment, Sale and Project, because the length of the text property is unlimited.
Declaration
protected static string FormatDescriptionText(string text)
Parameters
Type | Name | Description |
---|---|---|
String | text | String to process |
Returns
Type | Description |
---|---|
String | Result with no blank lines and maximum 256 characters long |
Remarks
The tooltip hints are accessible through the Hints property, but clients should usually find the provided access methods sufficient. TryGetIntHint(String, out Int32), TryGetStringHint(String, out String) and TryGetBoolHint(String, out Boolean) look for and parse the given type of key, and return a bool value that specifies whether the given key was found.
WantImages and WantSimple are boolean properties that give the result of a search for 'images=true' and 'simple=true', to promote a common way of specifying these two properties. The class implements the SuperOffice.CRM.Tooltips.ITooltipProviderPlugin and thereby also theGetRawValues(String)
Get raw hint values, based on the hint name
Declaration
protected List<string> GetRawValues(string hintName)
Parameters
Type | Name | Description |
---|---|---|
String | hintName | Hint key to look for |
Returns
Type | Description |
---|---|
List<String> | List of raw values, or null if the hint did not exist |
Remarks
The tooltip hints are accessible through the Hints property, but clients should usually find the provided access methods sufficient. TryGetIntHint(String, out Int32), TryGetStringHint(String, out String) and TryGetBoolHint(String, out Boolean) look for and parse the given type of key, and return a bool value that specifies whether the given key was found.
WantImages and WantSimple are boolean properties that give the result of a search for 'images=true' and 'simple=true', to promote a common way of specifying these two properties. The class implements the SuperOffice.CRM.Tooltips.ITooltipProviderPlugin and thereby also theGetTooltip(Dictionary<String, List<String>>)
Implements the interface method; caches this hints and calls the inner method
Declaration
public string GetTooltip(Dictionary<string, List<string>> hints)
Parameters
Type | Name | Description |
---|---|---|
Dictionary<String, List<String>> | hints | Tooltip hints |
Returns
Type | Description |
---|---|
String | Tooltip text, or string.Empty |
Remarks
The tooltip hints are accessible through the Hints property, but clients should usually find the provided access methods sufficient. TryGetIntHint(String, out Int32), TryGetStringHint(String, out String) and TryGetBoolHint(String, out Boolean) look for and parse the given type of key, and return a bool value that specifies whether the given key was found.
WantImages and WantSimple are boolean properties that give the result of a search for 'images=true' and 'simple=true', to promote a common way of specifying these two properties. The class implements the SuperOffice.CRM.Tooltips.ITooltipProviderPlugin and thereby also theInnerGetTooltip()
Subclass contract: derived class must implement their tooltip logicin this method.
Declaration
protected abstract string InnerGetTooltip()
Returns
Type | Description |
---|---|
String | Tooltip text, or an empty string |
Remarks
The tooltip hints are accessible through the Hints property, but clients should usually find the provided access methods sufficient. TryGetIntHint(String, out Int32), TryGetStringHint(String, out String) and TryGetBoolHint(String, out Boolean) look for and parse the given type of key, and return a bool value that specifies whether the given key was found.
MakeImageHint(String, Int32)
Utility method for creating an image hint with the correct syntax, from a key and id combination. This method will automatically take into account the WantImages property of the current instance.
Declaration
protected string MakeImageHint(string key, int id)
Parameters
Type | Name | Description |
---|---|---|
String | key | Key name, for instance person_id. This key must be something that is recognized by the image streaming service. |
Int32 | id | ID for the given key |
Returns
Type | Description |
---|---|
String | Image hint |
Remarks
The tooltip hints are accessible through the Hints property, but clients should usually find the provided access methods sufficient. TryGetIntHint(String, out Int32), TryGetStringHint(String, out String) and TryGetBoolHint(String, out Boolean) look for and parse the given type of key, and return a bool value that specifies whether the given key was found.
WantImages and WantSimple are boolean properties that give the result of a search for 'images=true' and 'simple=true', to promote a common way of specifying these two properties. The class implements the SuperOffice.CRM.Tooltips.ITooltipProviderPlugin and thereby also theRemoveBlankLines(String)
Remove blank lines from a string, and convert \r\n to just \n. If the remainder of the string after processing is just \n, an empty string will be returned as the final result; otherwise we just remove single or multiple blank lines.
Declaration
protected static string RemoveBlankLines(string text)
Parameters
Type | Name | Description |
---|---|---|
String | text | String to process |
Returns
Type | Description |
---|---|
String | Result with no blank lines |
Remarks
The tooltip hints are accessible through the Hints property, but clients should usually find the provided access methods sufficient. TryGetIntHint(String, out Int32), TryGetStringHint(String, out String) and TryGetBoolHint(String, out Boolean) look for and parse the given type of key, and return a bool value that specifies whether the given key was found.
WantImages and WantSimple are boolean properties that give the result of a search for 'images=true' and 'simple=true', to promote a common way of specifying these two properties. The class implements the SuperOffice.CRM.Tooltips.ITooltipProviderPlugin and thereby also theTryGetBoolHint(String, out Boolean)
Search the hints dictionary (this is an O(1) operation) for the given hint, and try to parse it as a bool. False is the result if the key is not found or has an invalid format. The return value is true if the hint is found and is parseable as a bool. Strings accepted are as for TryParse(String, Boolean). If more than one hint of the same name exists, the value of the first one will be used.
Declaration
protected bool TryGetBoolHint(string hintName, out bool result)
Parameters
Type | Name | Description |
---|---|---|
String | hintName | Hint key to look for |
Boolean | result | Out: found value, or false |
Returns
Type | Description |
---|---|
Boolean | True if the hint is found and is valid |
Remarks
The tooltip hints are accessible through the Hints property, but clients should usually find the provided access methods sufficient. TryGetIntHint(String, out Int32), TryGetStringHint(String, out String) and TryGetBoolHint(String, out Boolean) look for and parse the given type of key, and return a bool value that specifies whether the given key was found.
WantImages and WantSimple are boolean properties that give the result of a search for 'images=true' and 'simple=true', to promote a common way of specifying these two properties. The class implements the SuperOffice.CRM.Tooltips.ITooltipProviderPlugin and thereby also theTryGetDateHint(String, out DateTime)
Search the hints dictionary (this is an O(1) operation) for the given hint, and try to parse it as a datetime. DateTime.MinValue is the result if the key is not found or has an invalid format. The return value is true iff the hint is found and is parseable as a datetime. Both the invariant and current cultures are used, in that order. If more than one hint of the same name exists, the value of the first one will be used.
Declaration
protected bool TryGetDateHint(string hintName, out DateTime result)
Parameters
Type | Name | Description |
---|---|---|
String | hintName | Hint key to look for |
DateTime | result | Out: found value, or false |
Returns
Type | Description |
---|---|
Boolean | True if the hint is found and is valid |
Remarks
The tooltip hints are accessible through the Hints property, but clients should usually find the provided access methods sufficient. TryGetIntHint(String, out Int32), TryGetStringHint(String, out String) and TryGetBoolHint(String, out Boolean) look for and parse the given type of key, and return a bool value that specifies whether the given key was found.
WantImages and WantSimple are boolean properties that give the result of a search for 'images=true' and 'simple=true', to promote a common way of specifying these two properties. The class implements the SuperOffice.CRM.Tooltips.ITooltipProviderPlugin and thereby also theTryGetIntHint(String, out Int32)
Search the hints dictionary (this is an O(1) operation) for the given hint, and try to parse it as an int.
Zero is the result if the key is not found or has an invalid format. The return value is true iff the hint
is found and is parseable as an int. Formats accepted are as for
Declaration
protected bool TryGetIntHint(string hintName, out int result)
Parameters
Type | Name | Description |
---|---|---|
String | hintName | Hint key to look for |
Int32 | result | Out: found value, or 0 |
Returns
Type | Description |
---|---|
Boolean | True if the hint is found and is valid |
Remarks
The tooltip hints are accessible through the Hints property, but clients should usually find the provided access methods sufficient. TryGetIntHint(String, out Int32), TryGetStringHint(String, out String) and TryGetBoolHint(String, out Boolean) look for and parse the given type of key, and return a bool value that specifies whether the given key was found.
WantImages and WantSimple are boolean properties that give the result of a search for 'images=true' and 'simple=true', to promote a common way of specifying these two properties. The class implements the SuperOffice.CRM.Tooltips.ITooltipProviderPlugin and thereby also theTryGetStringHint(String, out String)
Search the hints dictionary (this is an O(1) operation) for the given hint. The return value is true iff the hint is found. If more than one hint of the same name exists, the value of the first one will be used.
Declaration
protected bool TryGetStringHint(string hintName, out string result)
Parameters
Type | Name | Description |
---|---|---|
String | hintName | Hint key to look for |
String | result | Out: found value, or null |
Returns
Type | Description |
---|---|
Boolean | True if the hint is found and is valid |
Remarks
The tooltip hints are accessible through the Hints property, but clients should usually find the provided access methods sufficient. TryGetIntHint(String, out Int32), TryGetStringHint(String, out String) and TryGetBoolHint(String, out Boolean) look for and parse the given type of key, and return a bool value that specifies whether the given key was found.
WantImages and WantSimple are boolean properties that give the result of a search for 'images=true' and 'simple=true', to promote a common way of specifying these two properties. The class implements the SuperOffice.CRM.Tooltips.ITooltipProviderPlugin and thereby also the