コード例 #1
0
ファイル: FormMain.cs プロジェクト: 0000duck/MES-3
        private DialogResult ShowLoginForm()
        {
//            timerNotify.Stop();
            FormLogin login = new FormLogin();

            login.ShowDialog(this);
            var dr = login.DialogResult;

            if (dr != DialogResult.OK)
            {
                return(dr);
            }
            Init();

            return(dr);
        }
コード例 #2
0
        private static void Main()
        {
            if (ProgramHelper.HasExist())
            {
                Application.Exit();
                return;
            }


            string      serverUrl         = AppConfigHelper.GetAppValue("UpdateServerUrl");
            string      updateXmlFileName = AppConfigHelper.GetAppValue("UpdateFileName");
            AutoUpdater updater           = new AutoUpdater();

            //"http://127.0.0.1/", "PcUpdate.xml"
            if (updater.CheckUpdateLoad(serverUrl, updateXmlFileName))
            {
                Application.Exit();
            }
            else
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);


                FormLogin frmL = new FormLogin();
                frmL.ShowDialog();

                if (GlobalVar.Oper == null)
                {
                    return;
                }
                if (GlobalVar.Oper.OperCode != "" && GlobalVar.Oper != null)
                {
                    Application.Run(new FormMain());
                }
            }
        }