Beispiel #1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            log4net.Config.XmlConfigurator.Configure();

            LogManager.LogManager.Info("启动软件");

            //应用程序关闭时,才 System.Windows.Application.Shutdown 调用
            this.ShutdownMode = ShutdownMode.OnExplicitShutdown;

            //验证License
            if (!RegisterMaster.CanStart())
            {
                this.Shutdown();
            }

            //登录
            bool?loginDlgResult = (new LoginDlg(AppSettings["DEFAULT_USER_MAIL"])).ShowDialog();

            if (!loginDlgResult.HasValue || !loginDlgResult.Value)
            {
                this.Shutdown();
            }

            circleProgressBox.ShowPregress();

            base.OnStartup(e);
        }
        protected override void OnStartup(StartupEventArgs e)
        {
            //应用程序关闭时,才 System.Windows.Application.Shutdown 调用
            this.ShutdownMode = ShutdownMode.OnExplicitShutdown;

            //验证License
            if (!RegisterMaster.CanStart())
            {
                this.Shutdown();
            }

            //登录
            bool?loginDlgResult = (new LoginDlg(AppSettings["DEFAULT_USER_MAIL"])).ShowDialog();

            if (!loginDlgResult.HasValue || !loginDlgResult.Value)
            {
                this.Shutdown();
            }

            base.OnStartup(e);
        }