| | |
| | | System.Threading.Mutex mutex = new System.Threading.Mutex(true, System.Windows.Forms.Application.ProductName, out ret); |
| | | if (ret) |
| | | { |
| | | ////登录验证权限 |
| | | MainWindow.InstanceLoginandConfirmation().ShowDialog(); |
| | | if (!MainWindow.InstanceLoginandConfirmation().isQuit && MainWindow.InstanceLoginandConfirmation().correctUser) |
| | | { |
| | | MainWindow.InstanceLoginandConfirmation().closeLoginFrm(); |
| | | Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); |
| | | System.Windows.Forms.Application.EnableVisualStyles(); |
| | | System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false); |
| | | System.Windows.Forms.Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); |
| | | System.Windows.Forms.Application.ThreadException += (sender, e) => HandleException(e.Exception); |
| | | AppDomain.CurrentDomain.UnhandledException += (sender, e) => HandleException(e.ExceptionObject as Exception); |
| | | // To customize application configuration such as set high DPI settings or default font, |
| | | // see https://aka.ms/applicationconfiguration. |
| | | System.Windows.Forms.Application.Run(new VisionForm()); |
| | | } |
| | | // Main 为你程序的主窗体,如果是控制台程序不用这句 |
| | | else |
| | | { |
| | | MainWindow.InstanceLoginandConfirmation().closeLoginFrm(); |
| | | } |
| | | //// Main 为你程序的主窗体,如果是控制台程序不用这句 |
| | | Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); |
| | | System.Windows.Forms.Application.EnableVisualStyles(); |
| | | System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false); |
| | | System.Windows.Forms.Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); |
| | | System.Windows.Forms.Application.ThreadException += (sender, e) => HandleException(e.Exception); |
| | | AppDomain.CurrentDomain.UnhandledException += (sender, e) => HandleException(e.ExceptionObject as Exception); |
| | | //// To customize application configuration such as set high DPI settings or default font, |
| | | //// see https://aka.ms/applicationconfiguration. |
| | | System.Windows.Forms.Application.Run(new VisionForm()); |
| | | mutex.ReleaseMutex(); |
| | | } |
| | | else |