C# Class SIL.SilSidePane.SidePane

SidePane is the main class for clients to use of the SilSidePane library. SidePane is intended to be placed on the side of an application, and allows buttons to be grouped by category, which are shown by clicking different tabs. It is similar to the Navigation Pane in Outlook. An example of its usage is in SilSidePaneTestApp.
Inheritance: System.Windows.Forms.Panel
显示文件 Open project: sillsdev/FieldWorks Class Usage Examples

Private Properties

Property Type Description
ContainsTab bool
HandleClickFromItemArea void
HandleTabAreaButtonClicked void
Init void
ShowOnlyCertainItemArea void
TabContainsItem bool
TabContainsItemWithName bool

Public Methods

Method Description
AddItem ( SIL.SilSidePane.Tab targetTab, Item item ) : void

Add item to targetTab

AddTab ( SIL.SilSidePane.Tab tab ) : void Cannot add the same tab more than once. Cannot add a tab with the same name as an existing tab.
GetTabByName ( string tabName ) : SIL.SilSidePane.Tab
SelectItem ( SIL.SilSidePane.Tab tab, string itemName ) : bool

Select item on tab, by item name

SelectTab ( SIL.SilSidePane.Tab tab ) : bool

Select a tab and an item on that tab

SelectTab ( SIL.SilSidePane.Tab tab, bool andSelectAnItemOnThatTab ) : bool

Select a tab.

SidePane ( Control containingControl ) : System

Constructor. containingControl is the control, such as a SplitContainer.Panel1, upon which the tabs and items of this SidePane will be shown. Defaults to ItemAreaStyle of Buttons.

SidePane ( Control containingControl, SidePaneItemAreaStyle itemAreaStyle ) : System

Protected Methods

Method Description
Dispose ( bool disposing ) : void
InvokeItemClicked ( Item itemClicked ) : void

Notify clients that an item was selected.

InvokeTabClicked ( SIL.SilSidePane.Tab tabClicked ) : void

Notify clients that a tab was selected.

Private Methods

Method Description
ContainsTab ( SIL.SilSidePane.Tab tab ) : bool

Whether this sidepane contains tab.

HandleClickFromItemArea ( Item itemClicked ) : void

Handles when an item in an item area is clicked. An item area calls this method. We notify the client which is using SidePane that an Item was clicked.

HandleTabAreaButtonClicked ( object sender, SIL.SilSidePane.OutlookBarButton tabButton ) : void

Handles a click on an OutlookBarButton widget representing a tab

Init ( Control containingControl ) : void

Set up this SidePane for use, adding its components to containingControl.

ShowOnlyCertainItemArea ( SIL.SilSidePane.Tab tab ) : void

Show a specific Tab's item area, and hide others.

TabContainsItem ( SIL.SilSidePane.Tab tab, Item item ) : bool tab must be a tab in this sidepane
TabContainsItemWithName ( SIL.SilSidePane.Tab tab, string itemName ) : bool tab must be a tab in this sidepane

Method Details

AddItem() public method

Add item to targetTab
public AddItem ( SIL.SilSidePane.Tab targetTab, Item item ) : void
targetTab SIL.SilSidePane.Tab
item Item
return void

AddTab() public method

Cannot add the same tab more than once. Cannot add a tab with the same name as an existing tab.
public AddTab ( SIL.SilSidePane.Tab tab ) : void
tab SIL.SilSidePane.Tab
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

GetTabByName() public method

public GetTabByName ( string tabName ) : SIL.SilSidePane.Tab
tabName string
return SIL.SilSidePane.Tab

InvokeItemClicked() protected method

Notify clients that an item was selected.
protected InvokeItemClicked ( Item itemClicked ) : void
itemClicked Item
return void

InvokeTabClicked() protected method

Notify clients that a tab was selected.
protected InvokeTabClicked ( SIL.SilSidePane.Tab tabClicked ) : void
tabClicked SIL.SilSidePane.Tab
return void

SelectItem() public method

Select item on tab, by item name
public SelectItem ( SIL.SilSidePane.Tab tab, string itemName ) : bool
tab SIL.SilSidePane.Tab
itemName string
return bool

SelectTab() public method

Select a tab and an item on that tab
public SelectTab ( SIL.SilSidePane.Tab tab ) : bool
tab SIL.SilSidePane.Tab
return bool

SelectTab() public method

Select a tab.
public SelectTab ( SIL.SilSidePane.Tab tab, bool andSelectAnItemOnThatTab ) : bool
tab SIL.SilSidePane.Tab
andSelectAnItemOnThatTab bool
return bool

SidePane() public method

Constructor. containingControl is the control, such as a SplitContainer.Panel1, upon which the tabs and items of this SidePane will be shown. Defaults to ItemAreaStyle of Buttons.
public SidePane ( Control containingControl ) : System
containingControl System.Windows.Forms.Control
return System

SidePane() public method

public SidePane ( Control containingControl, SidePaneItemAreaStyle itemAreaStyle ) : System
containingControl System.Windows.Forms.Control
itemAreaStyle SidePaneItemAreaStyle /// SidePaneItemAreaStyle to use for this sidepane's item area ///
return System