Exemple #1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            ThreadExceptionHandler handler = new ThreadExceptionHandler();

            Application.ThreadException += new ThreadExceptionEventHandler(handler.Application_ThreadException);
            AppSetting.SkinName          = AppSetting.ConfigGetValue("SkinName");

            //FrmTrail app = new FrmTrail();
            //Application.Run(app);
            FrmMain app = new FrmMain();

            if (app.mutex != null)
            {
                Hi.UserControlEx.UcSplash.ShowFrmSplashScreen();

                Hi.UserControlEx.UcSplash.SetStatus("正在启动主窗口...");
                Thread.Sleep(1000);

                Application.Run(app);
            }
            else
            {
                MsgBox.ShowInformation("已经有一个实例在运行!");
            }
        }