C# Class Nexus.Client.ModManagement.UI.ModTaggerForm

A view that allows editing of mod tags.
Inheritance: Nexus.Client.UI.ManagedFontForm
Show file Open project: NexusMods/NexusModManager-4.5

Private Properties

Property Type Description
ColumnSizer_Tick void
InitializeComponent void
ModTaggerForm_FormClosing void
butOK_Click void
lvwTagCandidates_ColumnWidthChanging void
lvwTagCandidates_Resize void
lvwTagCandidates_SelectedIndexChanged void

Public Methods

Method Description
ModTaggerForm ( ModTaggerVM p_mtgTaggerVM ) : System

A simple constructor that initializes the object with the given dependencies.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

OnLoad ( EventArgs e ) : void

Raises the UserControl.Load event of the control.

This loads any saved control metrics.

SizeColumnsToFit ( ) : void

This resizes the columns to fill the list view. The index column is fixed width.

Private Methods

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

Handles the Timer.Tick event of the column sizer timer.

We use a timer to autosize the columns in the list view. This is because there is a bug in the control such that if we reszize the columns continuously while the list view is being resized, the item will sometimes disappear. To work around this, the list view resize event continually resets the timer. This means the timer will only fire occasionally during the resize, and avoid the disappearing items issue.

InitializeComponent ( ) : void

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

ModTaggerForm_FormClosing ( object sender, FormClosingEventArgs e ) : void

Handles the Form.Closing event of the parent form.

This save the control's metrics.

butOK_Click ( object sender, EventArgs e ) : void

Handles the Control.Click event of the OK button.

This save the edited tags.

lvwTagCandidates_ColumnWidthChanging ( object sender, System.Windows.Forms.ColumnWidthChangingEventArgs e ) : void

Handles the ListView.ColumnWidthChanging event of the plugin list.

This resizes the column next to the column being resized to resize as well, so that the columns keep the list view filled.

lvwTagCandidates_Resize ( object sender, EventArgs e ) : void

Handles the Control.Resize event of the plugin list.

This resizes the columns to fill the list view. The index column is fixed width.

lvwTagCandidates_SelectedIndexChanged ( object sender, EventArgs e ) : void

Handles the ListView.SelectedIndexChanged event of the list of tag candidates.

This loads the selected candidate into the tag editor.

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

ModTaggerForm() public method

A simple constructor that initializes the object with the given dependencies.
public ModTaggerForm ( ModTaggerVM p_mtgTaggerVM ) : System
p_mtgTaggerVM ModTaggerVM The view model that provides the data and operations for this view.
return System

OnLoad() protected method

Raises the UserControl.Load event of the control.
This loads any saved control metrics.
protected OnLoad ( EventArgs e ) : void
e System.EventArgs An describing the event arguments.
return void

SizeColumnsToFit() protected method

This resizes the columns to fill the list view. The index column is fixed width.
protected SizeColumnsToFit ( ) : void
return void