예제 #1
0
        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());
        }
예제 #2
0
        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());
                }
            }
        }
예제 #3
0
        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);
            //}
        }
예제 #4
0
        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;
            }
        }
예제 #5
0
        static void Main()
        {
            // BasisPlatform:应用程序初始化
            Basiser basiser = Basiser.GetInstance();

            basiser.Init(CommonAppConfig.GetInstance().AppIdentifier, PlatformType.Winform, IPAddress.Parse("127.0.0.1"), 0);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            DotNetBarUtil.InitLocalization();

            Application.Run(new MDIParent1());
        }
예제 #6
0
        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;
            }
        }
예제 #7
0
        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;
            }
        }
예제 #8
0
        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;
            }
        }
예제 #9
0
        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();
            }
        }