CommandIDAttribute class

This class works together with CommandEventAttribute to associate a function to a command.

Examples

using LinsUI;

 

// when the Color dropdown is created, this event will be fired and only fired once.

// The user can use this event to do initialization

// The command ID

[CommandIDAttribute(LinsResource.m_nColorsDropDownID),

// The event type, here is an initialize event    

 CommandEventAttribute(CUSTOM_TI_EVENT.INITIALIZE)]

void ColorsInitialize(object sender, System.EventArgs e)

{

// Add all possible colors into the Color dropdown list

foreach (Color_Name pair in DemoManager.m_lsColorName)

{

this.m_Colors.DropDownItems.Add(pair.m_csName);

}

}