/// <summary>
 /// Initialises a new instance of the ServerWindow class and sets up the required values and
 /// objects for use.
 /// </summary>
 public ServerWindow()
 {
     InitializeComponent();
     _logger = new Logger();
     _logger.IsEnabled = true;
     Overlay.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#44FFFFFF"));
     this.Log("Loading Messenger::Server modules");
     this.Log("Creating Server instance...");
     _server = new Server(this, 25958);
     this.Log("Server instance {0} on port {1}", _server, _server.Port);
     this.Log("Log location: {0}", _logger.LogDirectory + "\\" + _logger.LogFile);
     new Thread(FinishLoadingThread).Start();
     _server.Start();
 }
Пример #2
0
 /// <summary>
 /// Initialises a new instance of the ServerWindow class and sets up the required values and
 /// objects for use.
 /// </summary>
 public ServerWindow(bool crashRecovery)
 {
     InitializeComponent();
     _logger = new Logger();
     _logger.IsEnabled = true;
     Overlay.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#44FFFFFF"));
     this.Log("Loading Messenger::Server modules");
     this.Log("Creating Server instance...");
     RunningServer = new Server(this, this.GetPort());
     this.Log("Server instance {0} on port {1}", RunningServer, RunningServer.Port);
     this.Log("Log location: {0}", _logger.LogDirectory + "\\" + _logger.LogFile);
     new Thread(FinishLoadingThread).Start();
     RunningServer.Start();
     _commands = new CommandRegistry<ServerCommand>();
     new ServerCommands(RunningServer, _commands);
 }