static void Main() { // 检测更新 AU.Updater updater = new AU.Updater(); if (updater.NeedUpdate()) { Process.Start("AutoUpdater.exe"); Environment.Exit(0); } // BasisPlatform:应用程序初始化 Basiser basiser = Basiser.GetInstance(); basiser.EnabledEbiaSupport = true; basiser.InitBasisPlatform(CommonAppConfig.GetInstance().AppIdentifier, PlatformType.Winform); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.ApplicationExit += new EventHandler(Application_ApplicationExit); DotNetBarUtil.InitLocalization(); CMCS.Common.DAO.CommonDAO.GetInstance().SetSignalDataValue(CommonAppConfig.GetInstance().AppIdentifier, eSignalDataName.系统.ToString(), "1"); Application.Run(new FrmLogin()); }
static void Main() { // 检测更新 AU.Updater updater = new AU.Updater(); if (updater.NeedUpdate()) { Process.Start("AutoUpdater.exe"); Environment.Exit(0); } // BasisPlatform:应用程序初始化 Basiser basiser = Basiser.GetInstance(); basiser.EnabledEbiaSupport = true; basiser.InitBasisPlatform(CommonAppConfig.GetInstance().AppIdentifier, PlatformType.Winform); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); DotNetBarUtil.InitLocalization(); bool notRunning; using (Mutex mutex = new Mutex(true, Application.ProductName, out notRunning)) { if (notRunning) { Application.Run(new FrmLogin()); } } }
static void Main() { // 检测更新 AU.Updater updater = new AU.Updater(); if (updater.NeedUpdate()) { Process.Start("AutoUpdater.exe"); Environment.Exit(0); } // BasisPlatform:应用程序初始化 Basiser basiser = Basiser.GetInstance(); basiser.Init(ClientConfiguration.Instance.AppIdentifier, PlatformType.Winform, IPAddress.Parse("127.0.0.1"), 0); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); bool notRun; //using (Mutex mutex = new Mutex(true, Application.ProductName, out notRun)) //{ // if (notRun) Application.Run(new FrmWin()); //else //MessageBox.Show("程序正在运行", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); //} }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); bool notRun; using (Mutex mutex = new Mutex(true, Application.ProductName, out notRun)) { if (notRun) { // 检测更新 AU.Updater updater = new AU.Updater(); if (updater.NeedUpdate()) { Process.Start("AutoUpdater.exe"); Environment.Exit(0); } Application.Run(new Form1()); } else { MessageBox.Show("程序正在运行", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }
static void Main(string[] args) { // 检测更新 AU.Updater updater = new AU.Updater(); if (updater.NeedUpdate()) { Process.Start("AutoUpdater.exe"); Environment.Exit(0); } // BasisPlatform:应用程序初始化 Basiser basiser = Basiser.GetInstance(); //basiser.EnabledEbiaSupport = true; //basiser.Init(CommonAppConfig.GetInstance().AppIdentifier, PlatformType.Winform); DotNetBarUtil.InitLocalization(); //bool notRunning; //using (Mutex mutex = new Mutex(true, Application.ProductName, out notRunning)) //{ // if (notRunning) // { using (CefAppImpl application = new CefAppImpl()) { application.Run(); } //} //else // MessageBox.Show("程序正在运行中","提示",MessageBoxButtons.OK,MessageBoxIcon.Warning); //} }
static void Main() { // 检测更新 AU.Updater updater = new AU.Updater(); if (updater.NeedUpdate()) { Process.Start("AutoUpdater.exe"); Environment.Exit(0); } // BasisPlatform:应用程序初始化 //Basiser basiser = Basiser.GetInstance(); //basiser.Init(CommonAppConfig.GetInstance().AppIdentifier, PlatformType.Winform, IPAddress.Parse("127.0.0.1"), 0); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.ApplicationExit += new EventHandler(Application_ApplicationExit); Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException); DotNetBarUtil.InitLocalization(); try { Cmcs_SafeUtil.SafeUtil safeUtil = new Cmcs_SafeUtil.SafeUtil(); if (!safeUtil.CheckRegister()) { MessageBox.Show("程序未注册", "操作提示", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } CMCS.Common.DAO.CommonDAO.GetInstance().SetSignalDataValue(CommonAppConfig.GetInstance().AppIdentifier, eSignalDataName.系统.ToString(), "1"); bool notRun; using (Mutex mutex = new Mutex(true, Application.ProductName, out notRun)) { if (notRun) { Application.Run(new FrmLogin()); } else { MessageBox.Show("程序正在运行", "操作提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } catch (Exception ex) { MessageBox.Show("服务器连接异常,请联系管理员!" + ex.Message); return; } }
static void Main() { // 检测更新 AU.Updater updater = new AU.Updater(); if (updater.NeedUpdate()) { Process.Start("AutoUpdater.exe"); Environment.Exit(0); } // BasisPlatform:应用程序初始化 //Basiser basiser = Basiser.GetInstance(); //basiser.Init(CommonAppConfig.GetInstance().AppIdentifier, PlatformType.Winform, IPAddress.Parse("127.0.0.1"), 0); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.ApplicationExit += new EventHandler(Application_ApplicationExit); Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException); DotNetBarUtil.InitLocalization(); try { string sql = @"select t.makecode, count(b.id) as sampleCount from cmcstbmake t left join cmcstbrcsampling a on t.samplingid = a.id left join cmcstbrcsampingdetail b on a.id = b.samplingid where a.isdeleted=0 and b.isdeleted=0 and t.isdeleted=0 and a.samplingdate like '%" + "2021-05-10" + "%' group by t.makecode "; //string sql = "select * from cmcstbrcsampling"; DataTable dataTable = Dbers.GetInstance().SelfDber.ExecuteDataTable(sql); CMCS.Common.DAO.CommonDAO.GetInstance().SetSignalDataValue(CommonAppConfig.GetInstance().AppIdentifier, eSignalDataName.系统.ToString(), "1"); bool notRun; using (Mutex mutex = new Mutex(true, Application.ProductName, out notRun)) { if (notRun) { Application.Run(new FrmLogin()); } else { MessageBox.Show("程序正在运行", "操作提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } catch (Exception ex) { MessageBox.Show("服务器连接异常,请联系管理员!" + ex.Message); return; } }
static void Main() { // 检测更新 AU.Updater updater = new AU.Updater(); if (updater.NeedUpdate()) { Process.Start("AutoUpdater.exe"); Environment.Exit(0); } // BasisPlatform:应用程序初始化 Basiser basiser = Basiser.GetInstance(); basiser.EnabledEbiaSupport = true; basiser.InitBasisPlatform(CommonAppConfig.GetInstance().AppIdentifier, PlatformType.Winform); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); bool notRunning; using (Mutex mutex = new Mutex(true, Application.ProductName, out notRunning)) { if (notRunning) { //int minute = 5, surplus = minute; //while (minute > 0) //{ // double d = minute - Environment.TickCount / 1000 / 60; // if (Environment.TickCount < 0 || d <= 0) break; // Log4Neter.Info("开机延迟启动,剩余" + d + "分钟"); // Thread.Sleep(60000); // surplus--; //} Application.Run(new Form1()); } } }
static void Main() { // 检测更新 AU.Updater updater = new AU.Updater(); if (updater.NeedUpdate()) { Process.Start("AutoUpdater.exe"); Environment.Exit(0); } // BasisPlatform:应用程序初始化 //Basiser basiser = Basiser.GetInstance(); //basiser.Init(ThisAppConfig.GetInstance().AppIdentifier, PlatformType.Winform, IPAddress.Parse("127.0.0.1"), 0); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); DotNetBarUtil.InitLocalization(); try { bool notRun; using (Mutex mutex = new Mutex(true, Application.ProductName, out notRun)) { if (notRun) { Application.Run(new FrmMainFrame()); } else { MessageBox.Show("程序正在运行", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } catch (Exception ex) { MessageBox.Show("服务器连接异常,请联系管理员!" + ex.Message); return; } }
static void Main() { // 检测更新 AU.Updater updater = new AU.Updater(); if (updater.NeedUpdate()) { Process.Start("AutoUpdater.exe"); Environment.Exit(0); } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.ApplicationExit += new EventHandler(Application_ApplicationExit); Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException); DotNetBarUtil.InitLocalization(); try { CMCS.Common.DAO.CommonDAO.GetInstance().SetSignalDataValue(CommonAppConfig.GetInstance().AppIdentifier, eSignalDataName.系统.ToString(), "1"); bool notRun; using (Mutex mutex = new Mutex(true, Application.ProductName, out notRun)) { if (notRun) { Application.Run(new FrmQueueScreen()); } else { MessageBox.Show("程序正在运行", "操作提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } catch (Exception ex) { MessageBox.Show("服务器连接异常,请联系管理员!" + ex.Message); return; } }
static void Main(string[] args) { // 检测更新 AU.Updater updater = new AU.Updater(); if (updater.NeedUpdate()) { Process.Start("AutoUpdater.exe"); Environment.Exit(0); } // BasisPlatform:应用程序初始化 //Basiser basiser = Basiser.GetInstance(); //basiser.EnabledEbiaSupport = true; //basiser.InitBasisPlatform(CommonAppConfig.GetInstance().AppIdentifier, PlatformType.Winform); DotNetBarUtil.InitLocalization(); using (CefAppImpl application = new CefAppImpl()) { application.Run(); } }