C# Class BF2Statistics.BF2Server

Mostrar archivo Open project: BF2Statistics/ControlCenter Class Usage Examples

Protected Properties

Property Type Description
ServerProcess Process

Public Methods

Method Description
GetGametypeString ( string gametype ) : string
SetServerPath ( string ServerPath ) : void

Loads a battlefield 2 server into this object for use.

Start ( BF2Mod Mod, string ExtraArgs, bool ShowConsole, bool MinConsole ) : void

Starts the Battlefield 2 Server application

Stop ( ) : void

Kills the Bf2 Server process

Protected Methods

Method Description
CheckServerProcess ( ) : void

Assigns the Server Process if the process is running

ServerProcess_Exited ( object sender, EventArgs e ) : void

Event fired when the server closes down

Method Details

CheckServerProcess() protected static method

Assigns the Server Process if the process is running
protected static CheckServerProcess ( ) : void
return void

GetGametypeString() public static method

public static GetGametypeString ( string gametype ) : string
gametype string
return string

ServerProcess_Exited() protected static method

Event fired when the server closes down
protected static ServerProcess_Exited ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void

SetServerPath() public static method

Loads a battlefield 2 server into this object for use.
public static SetServerPath ( string ServerPath ) : void
ServerPath string The full root path to the server's executable file
return void

Start() public static method

Starts the Battlefield 2 Server application
public static Start ( BF2Mod Mod, string ExtraArgs, bool ShowConsole, bool MinConsole ) : void
Mod BF2Mod The battlefield 2 mod that the server is to use
ExtraArgs string Any arguments to be past to the application on startup
ShowConsole bool If false, a console will not be created
MinConsole bool If is enabled, true will start the console minimized
return void

Stop() public static method

Kills the Bf2 Server process
public static Stop ( ) : void
return void

Property Details

ServerProcess protected_oe static_oe property

The active (or null) server process
protected static Process ServerProcess
return Process