using System; using System.Collections.Generic; using System.Windows.Forms; namespace NETSCM { static class Program { /// /// 应用程序的主入口点。 /// [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); DBUtility.ClsPub.AppPath = System.Environment.CurrentDirectory; Pub_Class.ClsPub.AppPath = System.Environment.CurrentDirectory; Pub_Class.ClsPub.SetIPAddress(); DBUtility.ClsPub.SetIPAddress(); DBUtility.ClsPub.VersionNum = "12.1"; Pub_Class.ClsPub.VersionNum = "12.1"; SCM.ClsPub1.PubWeb.Url = SCM.ClsPub1.WEBSURL; //=================================================================== try { if (SCM.ClsPub1.CheckUpdate()) { MessageBox.Show("发现最新版本,需要更新!"); string strFileName = Pub_Class.ClsPub.AppPath + @"\HX_UpdateForWeb.exe"; System.Diagnostics.Process.Start(strFileName); Application.Exit(); return; } else { //============================================ SCM.FrmLogin frmlg = new SCM.FrmLogin(); frmlg.ShowDialog(); if (frmlg.isOk) { MDIMain MainFrm = new MDIMain(); Application.Run(MainFrm); } } } catch (Exception e) { MessageBox.Show(e.Message); Application.Exit(); return; } } } }