C# Class ThoNohT.NohBoard.Forms.MainForm

Datei anzeigen Open project: ThoNohT/NohBoard

Public Methods

Method Description
GetLatestVersion ( ) : Task

Attempts to retrieve the latest version from the update site.

MainForm ( ) : System

Initializes a new instance of the MainForm class.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

OnPaint ( PaintEventArgs e ) : void

Paints the keyboard on the screen.

Private Methods

Method Description
ApplySettings ( ) : void

Applies the currently stored settings.

InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

KeyCheckTimer_Tick ( object sender, EventArgs e ) : void

Periodically checks that no keys got stuck.

LoadKeyboard ( ) : void

Loads the keyboard currently defined in the settings.

MainForm_FormClosing ( object sender, FormClosingEventArgs e ) : void

Handles the closing of the form. Hooks are disabled and the current position is stored before closing.

MainForm_Load ( object sender, EventArgs e ) : void

Handles the loading of the form, all settings are read, hooks are created and the keyboard is initialized.

MainMenu_Opening ( object sender, System e ) : void

Populates the main menu. Elements are visible based on which definitions and styles are loaded, and whether actions on a specifically pointed element are possible.

ResetBackBrushes ( ) : void

Redraws the back-brushes. These back-brushes are drawn for all possible states of the keys when none of them are pressed. This prevents having to render each of these keys every time. However, every time anything about the definition or style changes, the back-brushes have to be re-rendered.

UpdateTimer_Tick ( object sender, EventArgs e ) : void

Forces an update if any of the key or mouse states have changed.

mnuEditElementStyle_Click ( object sender, EventArgs e ) : void

Opens the edit element style form for the element currently under the cursor.

mnuEditKeyboardStyle_Click ( object sender, EventArgs e ) : void

Opens the edit keyboard style form.

mnuExit_Click ( object sender, EventArgs e ) : void

Exits the application.

mnuLoadKeyboard_Click ( object sender, EventArgs e ) : void

Opens the load keyboard form.

mnuSaveDefinitionAsName_Click ( object sender, EventArgs e ) : void

Saves the current definition under its default name.

mnuSaveDefinitionAs_Click ( object sender, EventArgs e ) : void

Opens a form the save the current definition under a custom name.

mnuSaveStyleAs_Click ( object sender, EventArgs e ) : void

Opens the save style as form to save the style under a custom name.

mnuSaveStyleToName_Click ( object sender, EventArgs e ) : void

Saves the current style to its default name.

mnuSaveToGlobalStyleName_Click ( object sender, EventArgs e ) : void

Saves the current style as a global style to its default name.

mnuSettings_Click ( object sender, EventArgs e ) : void

Opens the settings form.

Method Details

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

GetLatestVersion() public method

Attempts to retrieve the latest version from the update site.
public GetLatestVersion ( ) : Task
return Task

MainForm() public method

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

OnPaint() protected method

Paints the keyboard on the screen.
protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs
return void