C# 클래스 Nexus.Client.PluginManagement.UI.PluginManagerVM

This class encapsulates the data and the operations presented by UI elements that display plugin management.
파일 보기 프로젝트 열기: NexusMods/NexusModManager-4.5 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
ConfirmUpdaterAction ConfirmActionMethod

공개 메소드들

메소드 설명
ActivatePlugin ( Plugin p_plgPlugin ) : void

Activates the given plugin.

ApplyLoadOrder ( string>.Dictionary p_kvpRegisteredPlugins, bool p_booSortingOnly ) : void

Applies the load order specified by the given list of registered plugins

CanChangeActiveState ( Plugin p_plgPlugin ) : bool

Determines if the active state of the given plugin can be changed.

CanExecuteExportCommands ( ) : bool

Determines whether or not the load order can currently be exported for the current game mode.

CanExecuteImportCommands ( ) : bool

Determines whether or not a load order can currently be imported for the current game mode.

CanMovePluginUp ( Plugin p_plgPlugin ) : bool

Determines if the given plugin can be moved up in the load order.

CanMovePluginsDown ( IList p_lstPlugins ) : bool

Determines if the given plugins can be moved down in the load order.

DeactivatePlugin ( Plugin p_plgPlugin ) : void

deactivates the given plugin.

GetDefaultExportFilename ( ) : string

Returns a default filename for the current game mode when exporting the current load order.

GetExportFilterString ( ) : string

Returns the filter string used when exporting the current load order.

GetImportFilterString ( ) : string

Returns the filter string used when importing a load order.

GetRegisteredPlugins ( string>.Dictionary p_dctPluginFilenames, string>.Dictionary &p_kvpRegisteredPlugins, List &p_lstUnregisteredPlugins ) : void

Gets a list of registered plugins and unregistered plugin filenames for the specified game mode and list of plugin filenames.

GetRegisteredPlugins ( string p_lstPluginFilenames, string>.Dictionary &p_kvpOrderedPlugins ) : void

Gets a list of registered plugins and unregistered plugin filenames for the specified game mode and list of plugin filenames.

ImportLoadOrderFromFile ( string p_strFilename ) : void

Imports a load order from the specified file.

PluginManagerVM ( IPluginManager p_pmgPluginManager, ISettings p_setSettings, IGameMode p_gmdGameMode, ActivateModsMonitor p_ammMonitor ) : System

A simple constructor that initializes the object with its dependencies.

PluginsDisableAll ( ) : void

Deactivates all the enabled plugins.

PluginsEnableAll ( ) : void

Activates all the plugins.

RefreshPluginSorting ( string p_strPluginList ) : void

Automatically sorts the plugins.

SetPluginOrderIndex ( Plugin p_plgPlugin, int p_intNewIndex ) : void

Sets the load order of the specifid plugin.

SortPlugins ( ) : void

Automatically sorts the plugins.

ValidatePluginOrder ( IList p_lstPlugins ) : bool

Determines if the specified plugin order is valid.

보호된 메소드들

메소드 설명
ExportLoadOrderToClipboard ( ) : void

Exports the current load order to the clipboard.

ExportLoadOrderToFile ( string p_strFilename ) : void

Exports the current load order and game mode to a text file.

ImportLoadOrderFromClipboard ( ) : void

Imports a load order from the clipboard.

MovePluginsDown ( IList p_lstPlugins ) : void

Moves the given plugins down in the load order.

Moving plugins down in the load order increases the load order, meaning it is loaded later.

MovePluginsUp ( IEnumerable p_lstPlugins ) : void

Moves the given plugins up in the load order.

Moving plugins up in the load order decreases the load order, meaning it is loaded sooner.

OnExportFailed ( Exception p_exError ) : void

Raises the ExportFailed event.

OnExportFailed ( string p_strFilename, Exception p_exError ) : void

Raises the ExportFailed event.

OnExportSucceeded ( int p_intExportedPluginCount ) : void

Raises the ExportSucceeded event.

OnExportSucceeded ( string p_strFilename, int p_intExportedPluginCount ) : void

Raises the ExportSucceeded event.

OnImportFailed ( Exception p_exError ) : void

Raises the ImportFailed event.

OnImportFailed ( string p_strMessage ) : void

Raises the ImportFailed event.

OnImportFailed ( string p_strFilename, Exception p_exError ) : void

Raises the ImportFailed event.

OnImportFailed ( string p_strFilename, string p_strMessage ) : void

Raises the ImportFailed event.

OnImportPartiallySucceeded ( int p_intTotalPluginCount, int p_intImportedPluginCount, List p_lstPluginsNotImported ) : void

Raises the ImportPartiallySucceeded event.

OnImportPartiallySucceeded ( string p_strFilename, int p_intTotalPluginCount, int p_intImportedPluginCount, List p_lstPluginsNotImported ) : void

Raises the ImportPartiallySucceeded event.

OnImportSucceeded ( int p_intTotalPluginCount, int p_intImportedPluginCount, List p_lstPluginsNotImported ) : void

Raises the ImportSucceeded event.

OnImportSucceeded ( string p_strFilename, int p_intTotalPluginCount, int p_intImportedPluginCount, List p_lstPluginsNotImported ) : void

Raises the ImportSucceeded event.

비공개 메소드들

메소드 설명
ExportLoadOrder ( TextWriter p_twWriter ) : int

Writes the current load order and the id of the specified game mode to the specified TextWriter and returns the number of plugins written.

ImportLoadOrder ( TextReader p_trReader, int &p_intTotalPluginCount, int &p_intImportedCount, List &p_lstUnregisteredPlugins ) : void

Read the load order from the specified TextReader and returns the number of plugins imported as well as the number of plugins not found.

LoadOrderManager_ActivePluginUpdate ( object sender, EventArgs e ) : void

Handles changes to the plugin activation state made by external programs (or manually)

LoadOrderManager_ExternalPluginAdded ( object sender, EventArgs e ) : void

Handles new plugins added by external programs (or manually)

LoadOrderManager_ExternalPluginRemoved ( object sender, EventArgs e ) : void

Handles plugins removed by external programs (or manually)

LoadOrderManager_LoadOrderUpdate ( object sender, EventArgs e ) : void

Handles changes to the plugin load order made by external programs (or manually)

ReadImportSource ( TextReader p_trReader ) : string>.Dictionary

Reads the list of plugin filenames from the specified import source, making sure it is for the current game mode.

메소드 상세

ActivatePlugin() 공개 메소드

Activates the given plugin.
public ActivatePlugin ( Plugin p_plgPlugin ) : void
p_plgPlugin Nexus.Client.Plugins.Plugin The plugin to activate.
리턴 void

ApplyLoadOrder() 공개 메소드

Applies the load order specified by the given list of registered plugins
public ApplyLoadOrder ( string>.Dictionary p_kvpRegisteredPlugins, bool p_booSortingOnly ) : void
p_kvpRegisteredPlugins string>.Dictionary
p_booSortingOnly bool Whether we just want to apply the sorting.
리턴 void

CanChangeActiveState() 공개 메소드

Determines if the active state of the given plugin can be changed.
public CanChangeActiveState ( Plugin p_plgPlugin ) : bool
p_plgPlugin Nexus.Client.Plugins.Plugin The plugin for which it is to be determined if the active state can be changed.
리턴 bool

CanExecuteExportCommands() 공개 메소드

Determines whether or not the load order can currently be exported for the current game mode.
public CanExecuteExportCommands ( ) : bool
리턴 bool

CanExecuteImportCommands() 공개 메소드

Determines whether or not a load order can currently be imported for the current game mode.
public CanExecuteImportCommands ( ) : bool
리턴 bool

CanMovePluginUp() 공개 메소드

Determines if the given plugin can be moved up in the load order.
public CanMovePluginUp ( Plugin p_plgPlugin ) : bool
p_plgPlugin Nexus.Client.Plugins.Plugin The plugin for which it is to be determined if the load order can be decreased.
리턴 bool

CanMovePluginsDown() 공개 메소드

Determines if the given plugins can be moved down in the load order.
public CanMovePluginsDown ( IList p_lstPlugins ) : bool
p_lstPlugins IList The plugins for which it is to be determined if the load order can be increased.
리턴 bool

DeactivatePlugin() 공개 메소드

deactivates the given plugin.
public DeactivatePlugin ( Plugin p_plgPlugin ) : void
p_plgPlugin Nexus.Client.Plugins.Plugin The plugin to deactivate.
리턴 void

ExportLoadOrderToClipboard() 보호된 메소드

Exports the current load order to the clipboard.
protected ExportLoadOrderToClipboard ( ) : void
리턴 void

ExportLoadOrderToFile() 보호된 메소드

Exports the current load order and game mode to a text file.
protected ExportLoadOrderToFile ( string p_strFilename ) : void
p_strFilename string The filename to export the load order to.
리턴 void

GetDefaultExportFilename() 공개 메소드

Returns a default filename for the current game mode when exporting the current load order.
public GetDefaultExportFilename ( ) : string
리턴 string

GetExportFilterString() 공개 메소드

Returns the filter string used when exporting the current load order.
public GetExportFilterString ( ) : string
리턴 string

GetImportFilterString() 공개 메소드

Returns the filter string used when importing a load order.
public GetImportFilterString ( ) : string
리턴 string

GetRegisteredPlugins() 공개 메소드

Gets a list of registered plugins and unregistered plugin filenames for the specified game mode and list of plugin filenames.
The value of PluginDirectory for the current game mode is empty.
public GetRegisteredPlugins ( string>.Dictionary p_dctPluginFilenames, string>.Dictionary &p_kvpRegisteredPlugins, List &p_lstUnregisteredPlugins ) : void
p_dctPluginFilenames string>.Dictionary
p_kvpRegisteredPlugins string>.Dictionary
p_lstUnregisteredPlugins List The return list of unregistered plugin filenames.
리턴 void

GetRegisteredPlugins() 공개 메소드

Gets a list of registered plugins and unregistered plugin filenames for the specified game mode and list of plugin filenames.
The value of PluginDirectory for the current game mode is empty.
public GetRegisteredPlugins ( string p_lstPluginFilenames, string>.Dictionary &p_kvpOrderedPlugins ) : void
p_lstPluginFilenames string The dictionary of plugin filenames.
p_kvpOrderedPlugins string>.Dictionary The return list of registered plugins.
리턴 void

ImportLoadOrderFromClipboard() 보호된 메소드

Imports a load order from the clipboard.
protected ImportLoadOrderFromClipboard ( ) : void
리턴 void

ImportLoadOrderFromFile() 공개 메소드

Imports a load order from the specified file.
public ImportLoadOrderFromFile ( string p_strFilename ) : void
p_strFilename string The filename to import a load order from.
리턴 void

MovePluginsDown() 보호된 메소드

Moves the given plugins down in the load order.
Moving plugins down in the load order increases the load order, meaning it is loaded later.
protected MovePluginsDown ( IList p_lstPlugins ) : void
p_lstPlugins IList The plugins whose load order is to be changed.
리턴 void

MovePluginsUp() 보호된 메소드

Moves the given plugins up in the load order.
Moving plugins up in the load order decreases the load order, meaning it is loaded sooner.
protected MovePluginsUp ( IEnumerable p_lstPlugins ) : void
p_lstPlugins IEnumerable The plugins whose load order is to be changed.
리턴 void

OnExportFailed() 보호된 메소드

Raises the ExportFailed event.
protected OnExportFailed ( Exception p_exError ) : void
p_exError System.Exception The error that occurred.
리턴 void

OnExportFailed() 보호된 메소드

Raises the ExportFailed event.
protected OnExportFailed ( string p_strFilename, Exception p_exError ) : void
p_strFilename string The filename that the load order failed to export to.
p_exError System.Exception The error that occurred.
리턴 void

OnExportSucceeded() 보호된 메소드

Raises the ExportSucceeded event.
protected OnExportSucceeded ( int p_intExportedPluginCount ) : void
p_intExportedPluginCount int The number of plaugins that were exported.
리턴 void

OnExportSucceeded() 보호된 메소드

Raises the ExportSucceeded event.
protected OnExportSucceeded ( string p_strFilename, int p_intExportedPluginCount ) : void
p_strFilename string The filename that the load order was exported to.
p_intExportedPluginCount int The number of plaugins that were exported.
리턴 void

OnImportFailed() 보호된 메소드

Raises the ImportFailed event.
protected OnImportFailed ( Exception p_exError ) : void
p_exError System.Exception The error that occurred.
리턴 void

OnImportFailed() 보호된 메소드

Raises the ImportFailed event.
protected OnImportFailed ( string p_strMessage ) : void
p_strMessage string A message describing why the import failed.
리턴 void

OnImportFailed() 보호된 메소드

Raises the ImportFailed event.
protected OnImportFailed ( string p_strFilename, Exception p_exError ) : void
p_strFilename string The filename that the load order failed to import from.
p_exError System.Exception The error that occurred.
리턴 void

OnImportFailed() 보호된 메소드

Raises the ImportFailed event.
protected OnImportFailed ( string p_strFilename, string p_strMessage ) : void
p_strFilename string The filename that the load order failed to import from.
p_strMessage string A message describing why the import failed.
리턴 void

OnImportPartiallySucceeded() 보호된 메소드

Raises the ImportPartiallySucceeded event.
protected OnImportPartiallySucceeded ( int p_intTotalPluginCount, int p_intImportedPluginCount, List p_lstPluginsNotImported ) : void
p_intTotalPluginCount int The total number of plugins that were found in the specified import source.
p_intImportedPluginCount int The number of plugins that were imported.
p_lstPluginsNotImported List The list of plugins that were not found in the collection.
리턴 void

OnImportPartiallySucceeded() 보호된 메소드

Raises the ImportPartiallySucceeded event.
protected OnImportPartiallySucceeded ( string p_strFilename, int p_intTotalPluginCount, int p_intImportedPluginCount, List p_lstPluginsNotImported ) : void
p_strFilename string The filename that the load order was imported from.
p_intTotalPluginCount int The total number of plugins that were found in the specified import source.
p_intImportedPluginCount int The number of plugins that were imported.
p_lstPluginsNotImported List The list of plugins that were not found in the collection.
리턴 void

OnImportSucceeded() 보호된 메소드

Raises the ImportSucceeded event.
protected OnImportSucceeded ( int p_intTotalPluginCount, int p_intImportedPluginCount, List p_lstPluginsNotImported ) : void
p_intTotalPluginCount int The total number of plugins that were found in the specified import source.
p_intImportedPluginCount int The number of plugins that were imported.
p_lstPluginsNotImported List The list of plugins that were not found in the collection.
리턴 void

OnImportSucceeded() 보호된 메소드

Raises the ImportSucceeded event.
protected OnImportSucceeded ( string p_strFilename, int p_intTotalPluginCount, int p_intImportedPluginCount, List p_lstPluginsNotImported ) : void
p_strFilename string The filename that the load order was imported from.
p_intTotalPluginCount int The total number of plugins that were found in the specified import source.
p_intImportedPluginCount int The number of plugins that were imported.
p_lstPluginsNotImported List The list of plugins that were not found in the collection.
리턴 void

PluginManagerVM() 공개 메소드

A simple constructor that initializes the object with its dependencies.
public PluginManagerVM ( IPluginManager p_pmgPluginManager, ISettings p_setSettings, IGameMode p_gmdGameMode, ActivateModsMonitor p_ammMonitor ) : System
p_pmgPluginManager IPluginManager The plugin manager to use to manage plugins.
p_setSettings ISettings The application and user settings.
p_gmdGameMode IGameMode The game mode that is currently being managed.
p_ammMonitor Nexus.Client.ActivateModsMonitoring.ActivateModsMonitor
리턴 System

PluginsDisableAll() 공개 메소드

Deactivates all the enabled plugins.
public PluginsDisableAll ( ) : void
리턴 void

PluginsEnableAll() 공개 메소드

Activates all the plugins.
public PluginsEnableAll ( ) : void
리턴 void

RefreshPluginSorting() 공개 메소드

Automatically sorts the plugins.
public RefreshPluginSorting ( string p_strPluginList ) : void
p_strPluginList string
리턴 void

SetPluginOrderIndex() 공개 메소드

Sets the load order of the specifid plugin.
public SetPluginOrderIndex ( Plugin p_plgPlugin, int p_intNewIndex ) : void
p_plgPlugin Nexus.Client.Plugins.Plugin The full path to the plugin file whose load order is to be set.
p_intNewIndex int The new load order index of the plugin.
리턴 void

SortPlugins() 공개 메소드

Automatically sorts the plugins.
public SortPlugins ( ) : void
리턴 void

ValidatePluginOrder() 공개 메소드

Determines if the specified plugin order is valid.
public ValidatePluginOrder ( IList p_lstPlugins ) : bool
p_lstPlugins IList The plugins whose order is to be validated.
리턴 bool

프로퍼티 상세

ConfirmUpdaterAction 공개적으로 프로퍼티

Called when an updater's action needs to be confirmed.
public ConfirmActionMethod ConfirmUpdaterAction
리턴 ConfirmActionMethod