Ejemplo n.º 1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);
            string errStr = "";
            //if (!Dog.Dog.CheckDog(out errStr))
            //{
            //    MessageBox.Show("与加密狗通讯出错!\r\n错误信息:" + errStr, "系统信息");
            //    Application.Current.Shutdown();
            //    return;
            //}

            //////////测试代码
            //DateTime dt1 = DateTime.Now;
            //DateTime dt2 = new DateTime(2015, 11, 30);
            //int result = DateTime.Compare(dt1, dt2);
            //Console.WriteLine("result is:{0}",result);
            /////////测试代码结束

            Caches.Dict.DictCache.LoadDict();

            if (DSJL.Tools.DBUpgrade.Upgrade())
            {
                LoginWindow login = new LoginWindow();
                Application.Current.MainWindow = login;
                login.Show();

                //MainWindow mainWindow = new MainWindow();
                //Application.Current.MainWindow = mainWindow;
                //mainWindow.Show();
            }
            else {
                Application.Current.Shutdown();
            }
        }
Ejemplo n.º 2
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);
            string errStr = "";

            //if (!Dog.Dog.CheckDog(out errStr))
            //{
            //    MessageBox.Show("与加密狗通讯出错!\r\n错误信息:" + errStr, "系统信息");
            //    Application.Current.Shutdown();
            //    return;
            //}

            //////////测试代码
            //DateTime dt1 = DateTime.Now;
            //DateTime dt2 = new DateTime(2015, 11, 30);
            //int result = DateTime.Compare(dt1, dt2);
            //Console.WriteLine("result is:{0}",result);
            /////////测试代码结束


            Caches.Dict.DictCache.LoadDict();

            if (DSJL.Tools.DBUpgrade.Upgrade())
            {
                LoginWindow login = new LoginWindow();
                Application.Current.MainWindow = login;
                login.Show();

                //MainWindow mainWindow = new MainWindow();
                //Application.Current.MainWindow = mainWindow;
                //mainWindow.Show();
            }
            else
            {
                Application.Current.Shutdown();
            }
        }