private void Window_Loaded(object sender, RoutedEventArgs e) { Console.SetOut(new ConsoleWriter()); Instance = this; Log.SetLevel(Log.LogLevel.ConsoleInfo | Log.LogLevel.ConsoleDebug); try { ServerConfigReader GetConfig = new ServerConfigReader(); GetConfig.ReadServerConfig(@".\config.ini"); _server = new Server(GetConfig); _server.Start(); } catch (Exception ex) { Log.Error(ex.ToString()); } }
static void Main(string[] args) { Log.SetLevel(Log.LogLevel.ConsoleInfo | Log.LogLevel.ConsoleDebug); try { ServerConfigReader GetConfig = new ServerConfigReader(); GetConfig.ReadServerConfig(@".\config.ini"); Server server = new Server(GetConfig); server.Start(); } catch (Exception e) { Log.Error(e.ToString()); } while (true) { Console.ReadLine(); } }