internal static void Main() { Constants.Port = 17777; Constants.MaxPlayers = 1; ServerStarter.Start(new EmptyLogic()); Server.PacketHandlers.Add((int)PacketEnum.Lol, SendAndHandel.ReceiveLol); }
public MainWindow() { InitializeComponent(); Instnace = this; //GV.MCanvas = mainCanvas; //GV.MWindow = window; //GV.MGrid = MainGrid; ServerStarter serverIniter = new ServerStarter(); }
private void OnStartServer(object sender, RoutedEventArgs e) { // allow only one instance to run if (serverWatcher.IsProcessAlive()) { // show error message return; } ServerStarter starter = new ServerStarter(ServerLocation.Text); }
private void OnStartServer(object sender, RoutedEventArgs e) { string check_server_file = laucherSettings.GetServerLocation() + @"\" + laucherSettings.GetServerFilename() + ".exe"; if (!File.Exists(check_server_file)) { ErrorHandler.AddError(112, "Cannot find server at this location."); } else { ErrorHandler.RemoveError(112, "Cannot find server at this location."); // allow only one instance to run if (serverWatcher.IsProcessAlive()) { ErrorHandler.AddError(201, "Server is already running"); } else { ErrorHandler.RemoveError(201, "Client is already running"); ServerStarter starter = new ServerStarter(ServerLocation.Text, ServerFileName.Text); } } DisplayErrors(); }
private void OnStartServer(object sender, RoutedEventArgs e) { string check_server_file = laucherSettings.GetServerLocation() + @"\" + laucherSettings.GetServerFilename() + ".exe"; if (!File.Exists(check_server_file)) { ErrorHandler.AddError(ErrorType.error_Client_noLocation); } else { ErrorHandler.RemoveError(ErrorType.error_Server_noLocation); // allow only one instance to run if (serverWatcher.IsProcessAlive()) { ErrorHandler.AddError(ErrorType.error_ServerAlreadyRunning); } else { ErrorHandler.RemoveError(ErrorType.error_ServerAlreadyRunning); ServerStarter starter = new ServerStarter(laucherSettings.GetServerLocation(), laucherSettings.GetServerFilename()); } } DisplayErrors(); }
private void OnStartServer(object sender, RoutedEventArgs e) { ServerStarter starter = new ServerStarter(ServerLocation.Text); }
public UnitTest1() { _publisher = new ServerStarter(PUBLISHER_ROOT); _publisher.Start("publisher.appsettings.json"); }
private static void Main(string[] args) { ServerStarter.Start(new GameLogic()); }