Program.cs 887 B

1234567891011121314151617181920212223242526272829303132333435
  1. using log4net;
  2. using System.Reflection;
  3. namespace Server.MirForms
  4. {
  5. static class Program
  6. {
  7. /// <summary>
  8. /// The main entry point for the application.
  9. /// </summary>
  10. [STAThread]
  11. static void Main()
  12. {
  13. Packet.IsServer = true;
  14. var logRepository = LogManager.GetRepository(Assembly.GetEntryAssembly());
  15. log4net.Config.XmlConfigurator.Configure(logRepository, new FileInfo("log4net.config"));
  16. try
  17. {
  18. Settings.Load();
  19. Application.EnableVisualStyles();
  20. Application.SetCompatibleTextRenderingDefault(false);
  21. Application.Run(new SMain());
  22. Settings.Save();
  23. }
  24. catch(Exception ex)
  25. {
  26. Logger.GetLogger().Error(ex);
  27. }
  28. }
  29. }
  30. }