C# Класс Nexus.Client.Games.GameDiscoverer

Searches for installed games.
Наследование: FileSearcher
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Accept ( string p_strGameModeId ) : void

Accepts the current installation path that was found for the specified game mode as the correct installation path.

Cancel ( string p_strGameModeId ) : void

Cancels the search for the specified game mode.

DisableButtonOk ( string p_strGameModeId ) : void

Cancels the search for the specified game mode.

Find ( IEnumerable p_lstGameModesToFind ) : void

Searchs for the games described by the given game mode descriptors.

GameDiscoverer ( ) : System

The default constructor.

GetFinalPath ( string p_strGameModeId ) : string

Gets the confirmed installation path of the specified game mode.

This will return null until an installation path has been accepted or overridden for the specified game mode.

HasCandidates ( string p_strGameModeId ) : bool

Determines if the detector has found any installation path candidates that have not been rejected or accepted.

IsFound ( string p_strGameModeId ) : bool

Determines of the installation path for the specified game mode has been found.

This returns true if an installation path for the specified ame mode has been accepted, or if one one specified useing Override(string,string).

Override ( string p_strGameModeId, string p_strInstallPath ) : void

Overrides the installation path of the specified game mode with the given path.

Reject ( string p_strGameModeId ) : void

Rejects the current installation path of the specified game mode, and indicates the detector should continue searching.

Verify ( string p_strGameModeId, string p_strInstallPath ) : bool

Determines if the given installation path contains the specified game.

Защищенные методы

Метод Описание
FoundCandidate ( IGameModeDescriptor gmdGameMode, string p_strInstallationPath ) : void

Adds the given path as an installation path candidate for the specified game.

OnDisableButOk ( GameModeDiscoveredEventArgs e ) : void

Raises the PathFound event.

OnDisableButOk ( IGameModeDescriptor p_gmdGameMode, string p_strFoundPath ) : void

Raises the PathFound event.

OnFileFound ( EventArgs e ) : void

Raises the FileSearcher.FileFound event.

This determines the game mode whose file has been found, and raises the PathFound event as required.

OnGameResolved ( GameModeDiscoveredEventArgs e ) : void

Raises the GameResolved event.

OnGameResolved ( IGameModeDescriptor p_gmdGameMode, string p_strFoundPath ) : void

Raises the PathFound event.

OnPathFound ( GameModeDiscoveredEventArgs e ) : void

Raises the PathFound event.

OnPathFound ( IGameModeDescriptor p_gmdGameMode, string p_strFoundPath ) : void

Raises the PathFound event.

OnTaskEnded ( TaskEndedEventArgs e ) : void

Raises the IBackgroundTask.TaskEnded event.

This raises the GameResolved event for any games that were not found.

Приватные методы

Метод Описание
Stop ( string p_strGameModeId ) : void

Stops the search for the specified game mode.

Описание методов

Accept() публичный Метод

Accepts the current installation path that was found for the specified game mode as the correct installation path.
public Accept ( string p_strGameModeId ) : void
p_strGameModeId string The id of the game mode whose current installation path is to be accepted.
Результат void

Cancel() публичный Метод

Cancels the search for the specified game mode.
public Cancel ( string p_strGameModeId ) : void
p_strGameModeId string The id of the game mode for which to stop searching.
Результат void

DisableButtonOk() публичный Метод

Cancels the search for the specified game mode.
public DisableButtonOk ( string p_strGameModeId ) : void
p_strGameModeId string The id of the game mode for which to stop searching.
Результат void

Find() публичный Метод

Searchs for the games described by the given game mode descriptors.
public Find ( IEnumerable p_lstGameModesToFind ) : void
p_lstGameModesToFind IEnumerable The game mode factorie of the games to search for.
Результат void

FoundCandidate() защищенный Метод

Adds the given path as an installation path candidate for the specified game.
protected FoundCandidate ( IGameModeDescriptor gmdGameMode, string p_strInstallationPath ) : void
gmdGameMode IGameModeDescriptor The game mode for which to set an installation path candidate.
p_strInstallationPath string The installation path candidate.
Результат void

GameDiscoverer() публичный Метод

The default constructor.
public GameDiscoverer ( ) : System
Результат System

GetFinalPath() публичный Метод

Gets the confirmed installation path of the specified game mode.
This will return null until an installation path has been accepted or overridden for the specified game mode.
public GetFinalPath ( string p_strGameModeId ) : string
p_strGameModeId string The id of the game mode for which to return the confirmed installation path.
Результат string

HasCandidates() публичный Метод

Determines if the detector has found any installation path candidates that have not been rejected or accepted.
public HasCandidates ( string p_strGameModeId ) : bool
p_strGameModeId string The id of the game mode for which it is to be determined if there are any installation path candidates.
Результат bool

IsFound() публичный Метод

Determines of the installation path for the specified game mode has been found.
This returns true if an installation path for the specified ame mode has been accepted, or if one one specified useing Override(string,string).
public IsFound ( string p_strGameModeId ) : bool
p_strGameModeId string the id of the game mode for which it is to be determined if the installation path has been found.
Результат bool

OnDisableButOk() защищенный Метод

Raises the PathFound event.
protected OnDisableButOk ( GameModeDiscoveredEventArgs e ) : void
e GameModeDiscoveredEventArgs An describing the task that was started.
Результат void

OnDisableButOk() защищенный Метод

Raises the PathFound event.
protected OnDisableButOk ( IGameModeDescriptor p_gmdGameMode, string p_strFoundPath ) : void
p_gmdGameMode IGameModeDescriptor The game mode which has been resolved.
p_strFoundPath string The installaiton path that was found.
Результат void

OnFileFound() защищенный Метод

Raises the FileSearcher.FileFound event.
This determines the game mode whose file has been found, and raises the PathFound event as required.
protected OnFileFound ( EventArgs e ) : void
e EventArgs The describing the event arguments.
Результат void

OnGameResolved() защищенный Метод

Raises the GameResolved event.
protected OnGameResolved ( GameModeDiscoveredEventArgs e ) : void
e GameModeDiscoveredEventArgs An describing the task that was started.
Результат void

OnGameResolved() защищенный Метод

Raises the PathFound event.
protected OnGameResolved ( IGameModeDescriptor p_gmdGameMode, string p_strFoundPath ) : void
p_gmdGameMode IGameModeDescriptor The game mode which has been resolved.
p_strFoundPath string The installaiton path that was found.
Результат void

OnPathFound() защищенный Метод

Raises the PathFound event.
protected OnPathFound ( GameModeDiscoveredEventArgs e ) : void
e GameModeDiscoveredEventArgs An describing the task that was started.
Результат void

OnPathFound() защищенный Метод

Raises the PathFound event.
protected OnPathFound ( IGameModeDescriptor p_gmdGameMode, string p_strFoundPath ) : void
p_gmdGameMode IGameModeDescriptor The game mode for which a path was found.
p_strFoundPath string The installaiton path that was found.
Результат void

OnTaskEnded() защищенный Метод

Raises the IBackgroundTask.TaskEnded event.
This raises the GameResolved event for any games that were not found.
protected OnTaskEnded ( TaskEndedEventArgs e ) : void
e Nexus.Client.BackgroundTasks.TaskEndedEventArgs The describing the event arguments.
Результат void

Override() публичный Метод

Overrides the installation path of the specified game mode with the given path.
public Override ( string p_strGameModeId, string p_strInstallPath ) : void
p_strGameModeId string The id of the game mode whose installation path is to be overridden.
p_strInstallPath string The path to use as the specified game mode's installation path.
Результат void

Reject() публичный Метод

Rejects the current installation path of the specified game mode, and indicates the detector should continue searching.
public Reject ( string p_strGameModeId ) : void
p_strGameModeId string The id of the game mode whose current installation path is to be rejected.
Результат void

Verify() публичный Метод

Determines if the given installation path contains the specified game.
public Verify ( string p_strGameModeId, string p_strInstallPath ) : bool
p_strGameModeId string The id of the game mode for which the path is to be verified.
p_strInstallPath string The path to verify as being an installation path.
Результат bool