| using System; | 
| using System.Collections.Generic; | 
| using System.Windows.Forms; | 
|   | 
| namespace NETERPNoWin | 
| { | 
|     static class Program | 
|     { | 
|         /// <summary> | 
|         /// 应用程序的主入口点。 | 
|         /// </summary> | 
|         [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"; | 
|             //=================================================================== | 
|             try | 
|             { | 
|                 if (DBUtility.ClsPub.CheckUpdate()) | 
|                 { | 
|                     //string strFileName = DBUtility.ClsPub.AppPath + @"\HX_Update.exe"; | 
|                     //System.Diagnostics.Process.Start(strFileName); | 
|                     //Application.Exit(); | 
|                     //return; | 
|                     MESMain oMESMain = new MESMain(); | 
|                     Application.Run(oMESMain); | 
|                 } | 
|                 else | 
|                 { | 
|                     //BLL.FrmLogin frmlg = new BLL.FrmLogin(); | 
|                     //frmlg.ShowDialog(); | 
|                     //if (frmlg.isOk) | 
|                     //{ | 
|                     MESMain oMESMain = new MESMain(); | 
|                     Application.Run(oMESMain); | 
|                     //} | 
|                 } | 
|             } | 
|             catch (Exception e) | 
|             { | 
|                 MessageBox.Show(e.Message); | 
|                 Application.Exit(); | 
|                 return; | 
|             } | 
|         } | 
|     } | 
| } |