C# Class Nexus.Client.UI.Controls.GameModeListView

A list view of game modes.
Inheritance: System.Windows.Forms.UserControl
Exibir arquivo Open project: NexusMods/NexusModManager-4.5

Private Properties

Property Type Description
GameModeListView_Click void
GameModeListView_GotFocus void
GameModeListView_KeyDown void
GameModeListView_LostFocus void
GameModeListView_MouseDoubleClick void
GameModeListView_PreviewKeyDown void
Panel_ControlAdded void

Public Methods

Method Description
GameModeListView ( ) : System

The default constructor.

Protected Methods

Method Description
OnControlAdded ( System.Windows.Forms.ControlEventArgs e ) : void

Raises the Control.ControlAdded event.

This wires up the required events for GameModeListViewItemBase view items, so that we can track focus, and perform required formatting.

OnGotFocus ( EventArgs e ) : void

Raises the Control.GotFocus event.

This focuses the last focussed list view item.

OnSelectedItemChanged ( GameModeListViewItemBase p_lviSelected ) : void

Raises the SelectedItemChanged event.

OnSelectedItemChanged ( Nexus.Client.UI.Controls.SelectedItemEventArgs e ) : void

Raises the SelectedItemChanged event.

Private Methods

Method Description
GameModeListView_Click ( object sender, EventArgs e ) : void

Handles the Control.Click event of list view items.

This selects the clicked item.

GameModeListView_GotFocus ( object sender, EventArgs e ) : void

Handles the Control.GotFocus event of list view items.

This tracks the currently focussed item, and decorates the item to look focussed.

GameModeListView_KeyDown ( object sender, KeyEventArgs e ) : void

Handles the Control.KeyDown event of list view items.

This enables the use of the Enter key to select items.

GameModeListView_LostFocus ( object sender, EventArgs e ) : void

Handles the Control.LostFocus event of list view items.

This tracks the currently focussed item, and decorates the item to look unfocussed.

GameModeListView_MouseDoubleClick ( object sender, MouseEventArgs e ) : void

Handles the Control.MouseDoubleClick event of list view items.

This selects the clicked item.

GameModeListView_PreviewKeyDown ( object sender, PreviewKeyDownEventArgs e ) : void

Handles the Control.PreviewKeyDown event of list view items.

This enables the use of the Enter key to select items.

Panel_ControlAdded ( object sender, System.Windows.Forms.ControlEventArgs e ) : void

Handles the Control.ControlAdded event of flow layout panel.

This ensures only GameModeListViewItemBase controls are added, and formats the items to fit into the list.

Method Details

GameModeListView() public method

The default constructor.
public GameModeListView ( ) : System
return System

OnControlAdded() protected method

Raises the Control.ControlAdded event.
This wires up the required events for GameModeListViewItemBase view items, so that we can track focus, and perform required formatting.
protected OnControlAdded ( System.Windows.Forms.ControlEventArgs e ) : void
e System.Windows.Forms.ControlEventArgs The describing the event arguments.
return void

OnGotFocus() protected method

Raises the Control.GotFocus event.
This focuses the last focussed list view item.
protected OnGotFocus ( EventArgs e ) : void
e System.EventArgs The describing the event arguments.
return void

OnSelectedItemChanged() protected method

Raises the SelectedItemChanged event.
protected OnSelectedItemChanged ( GameModeListViewItemBase p_lviSelected ) : void
p_lviSelected GameModeListViewItemBase The newly selected list view item.
return void

OnSelectedItemChanged() protected method

Raises the SelectedItemChanged event.
protected OnSelectedItemChanged ( Nexus.Client.UI.Controls.SelectedItemEventArgs e ) : void
e Nexus.Client.UI.Controls.SelectedItemEventArgs The describing the event arguments.
return void