C# Class Nexus.Client.ModAuthoring.Project

Encapsulates the properties of a mod creation project.
Inheritance: ObservableObject, IModInfo, IScriptedMod
Datei anzeigen Open project: NexusMods/NexusModManager-4.5 Class Usage Examples

Public Methods

Method Description
Project ( IScriptTypeRegistry p_strScriptTypeRegistry ) : System

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

Project ( string p_strPath, IScriptTypeRegistry p_strScriptTypeRegistry ) : System

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

Save ( string p_strPath ) : void

Saves the project to a file.

The specified file will be overwriiten.

SaveInfo ( XmlDocument p_xmlDocument, bool p_booEncodeScreenshot ) : XmlNode

Serializes the given IModInfo to an XML fragment.

UpdateInfo ( IModInfo p_mifInfo, bool p_booOverwriteAllValues ) : void

Updates the object's proerties to the values of the given IModInfo.

Protected Methods

Method Description
InstallScript_PropertyChanged ( object sender, PropertyChangedEventArgs e ) : void

Handles the INotifyPropertyChanged.PropertyChanged event of the InstallScript.

Load ( string p_strPath ) : void

Loads the project from a file.

LoadInfo ( XmlNode p_xndInfo ) : void

Deserializes an IModInfo from the given XML fragment into the given IModInfo.

LoadInfo ( XmlNode p_xndInfo, bool p_booFillOnlyEmptyValues ) : void

Deserializes an IModInfo from the given XML fragment into the given IModInfo.

OnPropertyChanged ( PropertyChangedEventArgs e ) : void

Raises the INotifyPropertyChanged.PropertyChanged event of the project.

This marks the project as dirty.

Method Details

InstallScript_PropertyChanged() protected method

Handles the INotifyPropertyChanged.PropertyChanged event of the InstallScript.
protected InstallScript_PropertyChanged ( object sender, PropertyChangedEventArgs e ) : void
sender object The object that raised the event.
e System.ComponentModel.PropertyChangedEventArgs A describing the event arguments.
return void

Load() protected method

Loads the project from a file.
protected Load ( string p_strPath ) : void
p_strPath string The path to the file from which to load the project.
return void

LoadInfo() protected method

Deserializes an IModInfo from the given XML fragment into the given IModInfo.
protected LoadInfo ( XmlNode p_xndInfo ) : void
p_xndInfo System.Xml.XmlNode The XML fragment from which to deserialize the .
return void

LoadInfo() protected method

Deserializes an IModInfo from the given XML fragment into the given IModInfo.
protected LoadInfo ( XmlNode p_xndInfo, bool p_booFillOnlyEmptyValues ) : void
p_xndInfo System.Xml.XmlNode The XML fragment from which to deserialize the .
p_booFillOnlyEmptyValues bool Whether to only overwrite null or empty values.
return void

OnPropertyChanged() protected method

Raises the INotifyPropertyChanged.PropertyChanged event of the project.
This marks the project as dirty.
protected OnPropertyChanged ( PropertyChangedEventArgs e ) : void
e System.ComponentModel.PropertyChangedEventArgs A describing the event arguments.
return void

Project() public method

A simple constructor that initializes the object with the required dependencies.
public Project ( IScriptTypeRegistry p_strScriptTypeRegistry ) : System
p_strScriptTypeRegistry IScriptTypeRegistry The contianing the list of available script types.
return System

Project() public method

A simple constructor that initializes the object with the required dependencies.
public Project ( string p_strPath, IScriptTypeRegistry p_strScriptTypeRegistry ) : System
p_strPath string The path from which to load saved project data.
p_strScriptTypeRegistry IScriptTypeRegistry The contianing the list of available script types.
return System

Save() public method

Saves the project to a file.
The specified file will be overwriiten.
public Save ( string p_strPath ) : void
p_strPath string The path to the file in which to save the project.
return void

SaveInfo() public method

Serializes the given IModInfo to an XML fragment.
public SaveInfo ( XmlDocument p_xmlDocument, bool p_booEncodeScreenshot ) : XmlNode
p_xmlDocument System.Xml.XmlDocument The to use to create the XML elements /// created during the unparsing.
p_booEncodeScreenshot bool Whether or not to encode the /// into the XML fragment.
return System.Xml.XmlNode

UpdateInfo() public method

Updates the object's proerties to the values of the given IModInfo.
public UpdateInfo ( IModInfo p_mifInfo, bool p_booOverwriteAllValues ) : void
p_mifInfo IModInfo The whose values /// are to be used to update this object's properties.
p_booOverwriteAllValues bool Whether to overwrite the current info values, /// or just the empty ones.
return void