Program.cs 884 B

1234567891011121314151617181920212223242526272829303132333435
  1. using System;
  2. using System.Threading;
  3. using System.Windows.Forms;
  4. namespace Venus_RT
  5. {
  6. internal static class Program
  7. {
  8. /// <summary>
  9. /// 应用程序的主入口点。
  10. /// </summary>
  11. [STAThread]
  12. static void Main()
  13. {
  14. bool createdNew;
  15. using (Mutex mutex = new Mutex(true, Application.ProductName, out createdNew))
  16. {
  17. if (createdNew)
  18. {
  19. Application.EnableVisualStyles();
  20. Application.SetCompatibleTextRenderingDefault(false);
  21. Application.Run(new RtApplication());
  22. }
  23. else
  24. {
  25. MessageBox.Show("Only One Venus_RT is allowed");
  26. System.Environment.Exit(1);
  27. }
  28. }
  29. }
  30. }
  31. }