C# Class Nexus.Client.ModManagement.Scripting.XmlScript.UI.Controls.NodeEditors.ConditionalTypeEditor

Show file Open project: NexusMods/NexusModManager-4.5

Private Properties

Property Type Description
EditCommand_Executed void
GetSelectedConditionalTypePattern Nexus.Client.ModManagement.Scripting.XmlScript.ConditionalOptionTypeResolver.ConditionalTypePattern
PatternAdded void
PatternDeleted void
PatternEdited void
lvwConditionalTypes_Resize void
lvwConditionalTypes_SelectedIndexChanged void

Public Methods

Method Description
ConditionalTypeEditor ( ) : System

The default constructor.

ConditionalTypeEditor ( Nexus.Client.ModManagement.Scripting.XmlScript.UI.Controls.NodeEditors.ConditionalTypeEditorVM p_vmlViewModel ) : System

A simple constructor that initializes the view with its dependencies.

GetViewModel ( ) : IViewModel

Gets the view model of the editor.

Protected Methods

Method Description
AddConditionalTypePattern ( Nexus.Client.ModManagement.Scripting.XmlScript.ConditionalOptionTypeResolver.ConditionalTypePattern p_ctpPattern ) : void

Binds a ConditionalTypePattern to the list displaying the ConditionalOptionTypeResolver's patterns.

AdjustColumnWidths ( ) : void

This resizes the columns of the pattern list.

This sizes the type column to its content, and then resizes the remaining columns to take up the rest of the space.

BindTypeResolver ( ConditionalOptionTypeResolver p_ctpTypeResolver ) : void

Binds the ConditionalOptionTypeResolver being edited to the UI.

Private Methods

Method Description
EditCommand_Executed ( object p_objCommand, EventArgs p_eeaArguments ) : void

Handles the Command{ConditionalTypePattern}.Executed event of the edit command.

This passes focus to the pattern editor control.

GetSelectedConditionalTypePattern ( ) : Nexus.Client.ModManagement.Scripting.XmlScript.ConditionalOptionTypeResolver.ConditionalTypePattern

The retrieves the ConditionalTypePattern currently selected in the list of patterns.

PatternAdded ( object sender, EventArgs e ) : void

Handles the NodeEditors.ConditionalTypeEditorVM.PatternAdded event of the view model.

This binds the new ConditionalTypePattern to the list of patterns.

PatternDeleted ( object sender, EventArgs e ) : void

Handles the NodeEditors.ConditionalTypeEditorVM.PatternDeleted event of the view model.

This removes the deleted ConditionalTypePattern from the list of patterns.

PatternEdited ( object sender, EventArgs e ) : void

Handles the NodeEditors.ConditionalTypeEditorVM.PatternEdited event of the view model.

This updates the binding to the list of patterns of the edited ConditionalTypePattern.

lvwConditionalTypes_Resize ( object sender, EventArgs e ) : void

Hanldes the Control.Resize event of the pattern list view.

This adjusts the column widths.

lvwConditionalTypes_SelectedIndexChanged ( object sender, EventArgs e ) : void

Handles the ListView.SelectedIndexChanged of the pattern list view.

This updates the executable status based on whether a pattern is selected.

Method Details

AddConditionalTypePattern() protected method

Binds a ConditionalTypePattern to the list displaying the ConditionalOptionTypeResolver's patterns.
protected AddConditionalTypePattern ( Nexus.Client.ModManagement.Scripting.XmlScript.ConditionalOptionTypeResolver.ConditionalTypePattern p_ctpPattern ) : void
p_ctpPattern Nexus.Client.ModManagement.Scripting.XmlScript.ConditionalOptionTypeResolver.ConditionalTypePattern The to bind.
return void

AdjustColumnWidths() protected method

This resizes the columns of the pattern list.
This sizes the type column to its content, and then resizes the remaining columns to take up the rest of the space.
protected AdjustColumnWidths ( ) : void
return void

BindTypeResolver() protected method

Binds the ConditionalOptionTypeResolver being edited to the UI.
protected BindTypeResolver ( ConditionalOptionTypeResolver p_ctpTypeResolver ) : void
p_ctpTypeResolver ConditionalOptionTypeResolver The being edited.
return void

ConditionalTypeEditor() public method

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

ConditionalTypeEditor() public method

A simple constructor that initializes the view with its dependencies.
public ConditionalTypeEditor ( Nexus.Client.ModManagement.Scripting.XmlScript.UI.Controls.NodeEditors.ConditionalTypeEditorVM p_vmlViewModel ) : System
p_vmlViewModel Nexus.Client.ModManagement.Scripting.XmlScript.UI.Controls.NodeEditors.ConditionalTypeEditorVM The view model that provides the data and operations for this view.
return System

GetViewModel() public method

Gets the view model of the editor.
public GetViewModel ( ) : IViewModel
return IViewModel