C# Class SystemMenuExtension, code

Extends the system menu of a window with additional commands. Adapted from: https://github.com/dg9ngf/FieldLog/blob/master/LogSubmit/Unclassified/UI/SystemMenu.cs
Afficher le fichier Open project: shendongnian/code

Méthodes publiques

Méthode Description
AddCommand ( string text, Action, action, bool separatorBeforeCommand ) : void

Adds a command to the system menu.

SystemMenuExtension ( Window, window )

Initialises a new instance of the SystemMenu class for the specified Form.

Private Methods

Méthode Description
AppendMenu ( IntPtr, hMenu, int uFlags, int uIDNewItem, string lpNewItem ) : bool
GetSystemMenu ( IntPtr, hWnd, bool bRevert ) : IntPtr,
WindowLoaded ( object sender, RoutedEventArgs e ) : void
WndProc ( IntPtr, hwnd, int msg, IntPtr, wParam, IntPtr, lParam, bool &handled ) : IntPtr,

Method Details

AddCommand() public méthode

Adds a command to the system menu.
public AddCommand ( string text, Action, action, bool separatorBeforeCommand ) : void
text string The displayed command text.
action Action, The action that is executed when the user clicks on the command.
separatorBeforeCommand bool Indicates whether a separator is inserted before the command.
Résultat void

SystemMenuExtension() public méthode

Initialises a new instance of the SystemMenu class for the specified Form.
public SystemMenuExtension ( Window, window )
window Window, The window for which the system menu is expanded.