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); }
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()); } } }