C# Class Smrf.NodeXL.ApplicationUtil.LayoutManagerForToolStripSplitButton

Helper class for managing graph layouts.
This class is meant for use in applications that allow the user to select a graph layout via a ToolStripSplitButton that has one item per available layout. It provides methods for populating the ToolStripSplitButton and for creating a layout of the selected type.

Call AddItems during application initialization. When the user clicks one of the items added by this method, the event fires. In the event handler, call LayoutManager.CreateLayout to create a layout of the selected type.

The ToolStripSplitButton object used with this class ends up behaving like a ToolStripComboBox with a DropDownStyle of DropDownList. It improves on the ToolStripComboBox, however, in that its drop-down list can contain other clickable items, whereas the ToolStripComboBox can contain nothing but items that display text. If the caller has added drop-down items to the ToolStripSplitButton object before calling AddItems, this class will preserve those items.

Inheritance: LayoutManager
显示文件 Open project: 2014-sed-team3/term-project Class Usage Examples

Protected Properties

Property Type Description
m_oToolStripSplitButton System.Windows.Forms.ToolStripSplitButton

Public Methods

Method Description
AddItems ( ToolStripSplitButton toolStripSplitButton ) : void
AssertValid ( ) : void
LayoutManagerForToolStripSplitButton ( ) : System

Initializes a new instance of the class.

Protected Methods

Method Description
OnLayoutMenuItemClick ( object sender, EventArgs e ) : void
m_oToolStripSplitButton_ButtonClick ( object sender, EventArgs e ) : void

Method Details

AddItems() public method

public AddItems ( ToolStripSplitButton toolStripSplitButton ) : void
toolStripSplitButton System.Windows.Forms.ToolStripSplitButton
return void

AssertValid() public method

public AssertValid ( ) : void
return void

LayoutManagerForToolStripSplitButton() public method

Initializes a new instance of the class.
public LayoutManagerForToolStripSplitButton ( ) : System
return System

OnLayoutMenuItemClick() protected method

protected OnLayoutMenuItemClick ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void

m_oToolStripSplitButton_ButtonClick() protected method

protected m_oToolStripSplitButton_ButtonClick ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void

Property Details

m_oToolStripSplitButton protected_oe property

protected ToolStripSplitButton,System.Windows.Forms m_oToolStripSplitButton
return System.Windows.Forms.ToolStripSplitButton