C# Class DroidExplorer.ActiveButtons.ActiveMenuImpl

The menu for handling the render of buttons over the title bar.
Inheritance: System.Windows.Forms.Form, IActiveMenu
Datei anzeigen Open project: camalot/droidexplorer Class Usage Examples

Public Methods

Method Description
GetInstance ( Form form ) : IActiveMenu

Creates or returns the menu instance for a given form.

Protected Methods

Method Description
AttachHandlers ( ) : void

Setup the handlers to reposition and resize the buttons when the parent is resized or styles are changed.

Dispose ( bool disposing ) : void

Clean up any resources being used.

OnLoad ( EventArgs e ) : void

Raises the event.

ParentRefresh ( object sender, EventArgs e ) : void

Handle changes to the parent, and make sure the menu is aligned to match.

Private Methods

Method Description
ActiveMenuImpl ( ) : System
ActiveMenuImpl ( Form form ) : System

Constructor sets up the menu and sets the required properties in order thay this may be displayed over the top of it's parent form.

CalcSize ( ) : void

Work out the buttons sizes based of sys diamensions. This doesn't work quite as expected as the buttons seem to have larger borders, which change per theme.

InitializeComponent ( ) : void

The standard properties of the menu. Changing properties or when they are set can effect the ability to attach to a parent, and leave the menu flaoting on the desktop.

ItemsCollectionModified ( object sender, ListModificationEventArgs e ) : void

Handles the CollectionModified event of the items control.

OnPosition ( ) : void

Position the menu into the correct location, this varies per theme.

ParentFormActivated ( object sender, EventArgs e ) : void

Enabled the tooltip control when the parent form is active. This is necessary because the menu form is never active.

ParentFormDeactivate ( object sender, EventArgs e ) : void

Disables the tootips when the parent is activated.

ParentFormDisposed ( object sender, EventArgs e ) : void

Remove the parent from the hashtable when disposed.

TitleButtonSystemColorsChanged ( object sender, EventArgs e ) : void

When the style is changed we need to re-calc button sizes as well as positions.

Method Details

AttachHandlers() protected method

Setup the handlers to reposition and resize the buttons when the parent is resized or styles are changed.
protected AttachHandlers ( ) : void
return void

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void

GetInstance() public static method

Creates or returns the menu instance for a given form.
public static GetInstance ( Form form ) : IActiveMenu
form System.Windows.Forms.Form
return IActiveMenu

OnLoad() protected method

Raises the event.
protected OnLoad ( EventArgs e ) : void
e System.EventArgs An that contains the event data.
return void

ParentRefresh() protected method

Handle changes to the parent, and make sure the menu is aligned to match.
protected ParentRefresh ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void