LinsResource class

If users want to assign unique identifiers for commands, then they should define this class. Also users can define all attributes for commands inside this class.

Examples

using LinsUI;

 

public static class LinsResource

{

[CommandGroupNameAttribute("Shapes and Pictures"), // The Category name

 // Command name

 CommandNameAttribute("Color"),

 // The Button Icon

 CommandImageAttribute("ColorFill.ico"),

 // Button display style                                      

 CommandAppearanceAttribute(ToolStripItemDisplayStyle.ImageAndText),

 // The Text and Icon relation

 CommandImageAndTextRelationAttribute(TextImageRelation.TextBeforeImage),

 // Tell the application, it is a combobox 

 CommandTypeAttribute(TSITEM_TYPEID.COMBOBOX),  

 // Tooltip for the combobox  

 ToolTipAttribute("Select a color"),   

 // The rich text file format help file, it will be open when user click at the 

 // Help button on the tooltip         

 CommandHelpFileAttribute("ColorHelp.rtf")]              

public const long m_nColorID =  FlexConstants.m_nUserDefinedControlStartID + 1;

 

 

[CommandGroupNameAttribute("Main"),                 // The Category name

 // Tell the application, it is a menu item

 CommandTypeAttribute(TSITEM_TYPEID.MENUITEM),  

 // Tooltip for the menu item  

 ToolTipAttribute("Save layout"),

 // The detail description                  

 DetailDescriptionAttribute("Save Layout.")]       

public const long m_nSaveLayoutID = FlexConstants.m_nUserDefinedControlStartID + 2;

 

[CommandGroupNameAttribute("Main"),                 // The Category name

 // The Menu item Icon

 CommandImageAttribute("import2.ico"),  

 // Menu item display style          

 CommandAppearanceAttribute(ToolStripItemDisplayStyle.ImageAndText),  

 // The Text and Icon relation

 CommandImageAndTextRelationAttribute(TextImageRelation.TextBeforeImage),

 // Tell the application, it is a menu item 

 CommandTypeAttribute(TSITEM_TYPEID.MENUITEM),     

 // Tooltip for the menu item

 ToolTipAttribute("Import layout"),      

 // The detail description        

 DetailDescriptionAttribute("Import Layout.")]     

public const long m_nImportLayoutID = FlexConstants.m_nUserDefinedControlStartID + 3;

 

 

[CommandGroupNameAttribute("Shapes"),               // The Category name

 // Tell the application, it is a menu item

 CommandTypeAttribute(TSITEM_TYPEID.MENUITEM),   

 // Tooltip for the menu item 

 ToolTipAttribute("Selecte a shape"),          

 // The detail description   

 DetailDescriptionAttribute("Select a shape.")]    

public const long m_nShapesDropDownID = FlexConstants.m_nUserDefinedControlStartID + 4;

 

[CommandGroupNameAttribute("Colors"),               // The Category name

 // Tell the application, it is a dropdown button

 CommandTypeAttribute(TSITEM_TYPEID.DROPDOWNBUTTON),  

 // Tooltip for the menu item  

 ToolTipAttribute("Select a color"),   

 // The detail description           

 DetailDescriptionAttribute("Select a color.")]    

public const long m_nColorsDropDownID = FlexConstants.m_nUserDefinedControlStartID + 5;

}