C# Класс BF2Statistics.BF2Server

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
ServerProcess Process

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

Метод Описание
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

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

Метод Описание
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

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

CheckServerProcess() защищенный статический Метод

Assigns the Server Process if the process is running
protected static CheckServerProcess ( ) : void
Результат void

GetGametypeString() публичный статический Метод

public static GetGametypeString ( string gametype ) : string
gametype string
Результат string

ServerProcess_Exited() защищенный статический Метод

Event fired when the server closes down
protected static ServerProcess_Exited ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Результат void

SetServerPath() публичный статический Метод

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
Результат void

Start() публичный статический Метод

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
Результат void

Stop() публичный статический Метод

Kills the Bf2 Server process
public static Stop ( ) : void
Результат void

Описание свойств

ServerProcess защищенное статическое свойство

The active (or null) server process
protected static Process ServerProcess
Результат Process