void tsbExit_Click(object sender, EventArgs e) { this.Hide(); EpointMethod.UpdateDataLics(); this.Exit(); }
public static void Main() { RegistryKey rkApp = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true); rkApp.SetValue("AutoMail", Application.ExecutablePath.ToString()); Common.SetEnvironment(); Element.sysUser_Id = "SYSTEM"; if (!Login()) { return; } Common.InitSystem(); //frmMain frmmain = new frmMain(); frmUpdateFile frm = new frmUpdateFile(); //frm.Load(); if (!EpointMethod.CheckdataLics()) { Application.Exit(); EpointMethod.UpdateDataLics(); } else { frm.Load(); Application.Run(frm); } }
public static void Main() { try { Common.SetEnvironment(); EpointMethod.RunSqlScript(); EpointMethod.DeleteBak("*.bak"); EpointMethod.DeleteBak("*.pdb"); if (!Login()) { return; } Common.InitSystem(); EpointMethod.UploadFileNewVersion(); EpointMethod.UpdateReportFile(); if (!EpointMethod.CheckdataLics()) { EpointMethod.UpdateDataLics(); Application.Exit(); } else { frmMain frmmain = new frmMain(); Application.Run(frmmain); } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }