C# Class Nexus.Client.Games.GameLauncherBase

A base implementation of a game launcher.
This implements some common functionality for game launchers.
Inheritance: IGameLauncher
Mostrar archivo Open project: NexusMods/NexusModManager-4.5

Public Methods

Method Description
GameLauncherBase ( IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo ) : System

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

Protected Methods

Method Description
AddLaunchCommand ( Command p_cmdLaunch ) : void

Adds the given launch command.

ClearLaunchCommands ( ) : void

Clears all the launch commands.

Launch ( string p_strCommand, string p_strCommandArgs ) : void

Launches the game.

This is the root launch method that all the other launch methods call. This method actually spawns the new process to launch the game, using the given information.

OnGameLaunched ( Nexus.Client.Games.GameLaunchEventArgs e ) : void

Raises the GameLaunched event.

OnGameLaunched ( bool p_booGameLaunched, string p_strMessage ) : void

Raises the GameLaunched event.

OnGameLaunching ( ) : bool

Raises the GameLaunching event.

OnGameLaunching ( CancelEventArgs e ) : void

Raises the GameLaunching event.

SetupCommands ( ) : void

Initializes the game launch commands.

Method Details

AddLaunchCommand() protected method

Adds the given launch command.
protected AddLaunchCommand ( Command p_cmdLaunch ) : void
p_cmdLaunch Nexus.Client.Commands.Command The launch command to add.
return void

ClearLaunchCommands() protected method

Clears all the launch commands.
protected ClearLaunchCommands ( ) : void
return void

GameLauncherBase() public method

A simple constructor that initializes the object with the given dependencies.
public GameLauncherBase ( IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo ) : System
p_gmdGameMode IGameMode >The game mode currently being managed.
p_eifEnvironmentInfo IEnvironmentInfo The application's envrionment info.
return System

Launch() protected method

Launches the game.
This is the root launch method that all the other launch methods call. This method actually spawns the new process to launch the game, using the given information.
protected Launch ( string p_strCommand, string p_strCommandArgs ) : void
p_strCommand string The command to execute to launch the game.
p_strCommandArgs string The command argumetns to pass to the launch command.
return void

OnGameLaunched() protected method

Raises the GameLaunched event.
protected OnGameLaunched ( Nexus.Client.Games.GameLaunchEventArgs e ) : void
e Nexus.Client.Games.GameLaunchEventArgs A describing the event arguments.
return void

OnGameLaunched() protected method

Raises the GameLaunched event.
protected OnGameLaunched ( bool p_booGameLaunched, string p_strMessage ) : void
p_booGameLaunched bool Whether or not the game launched successfully.
p_strMessage string A message to display to the user.
return void

OnGameLaunching() protected method

Raises the GameLaunching event.
protected OnGameLaunching ( ) : bool
return bool

OnGameLaunching() protected method

Raises the GameLaunching event.
protected OnGameLaunching ( CancelEventArgs e ) : void
e CancelEventArgs A describing the event arguments.
return void

SetupCommands() protected abstract method

Initializes the game launch commands.
protected abstract SetupCommands ( ) : void
return void