Exemplo n.º 1
0
        public Frm_Main()
        {
            //卸载与安装
            if (!File.Exists(Application.StartupPath + "\\Packaging.mdb") && File.Exists(Application.StartupPath + "\\Backup\\Packaging.mdb"))
            {
                File.Copy(Application.StartupPath + "\\Backup\\Packaging.mdb", Application.StartupPath + "\\Packaging.mdb", true);
            }

            //2013.11.20
            //检查数据库是否存在

            if (!File.Exists(Application.StartupPath + "\\Packaging.mdb"))
            {
                MessageBox.Show("程序根目录中数据库文件Packaging.MDB不存在");
                System.Environment.Exit(System.Environment.ExitCode);
                this.Dispose();
                this.Close();
                return;
            }

            PublicFunc.Init();
            DevExpress.Data.CurrencyDataController.DisableThreadingProblemsDetection = true;
            // PublicFunc.ReadXMLConfigure();

            InitializeComponent();
            BI_ListClose_ItemClick(this, null);
            TE_Title.Text = "Packaging";
            RC_Main.DefaultPageCategory.Expanded = true;
            RC_Main.Minimized = true;
            InitSkinGallery();



            db = new DataBaseManage();

            TxtData.XMLConfigure.RegCode = db.GetRegCode();
            TxtData.XMLConfigure.Reged   = PublicFunc.CompareCode(TxtData.XMLConfigure.RegCode);
            db.SaveCs8cConfigure();
            PublicFunc.ReadCs8CConfigure();

            db.GetIp(ref TxtData.XMLConfigure.IpAddress, ref TxtData.XMLConfigure.RestrictCode);
            db.GetPopedom(ref TxtData.PublicData.ScreenEnable);

            TxtData.XMLConfigure.User = db.GetAutoLogin();


            if (TxtData.XMLConfigure.User != null)
            {
                TxtData.XMLConfigure.Login   = true;
                TxtData.XMLConfigure.PopeDom = db.GetUserPopm(TxtData.XMLConfigure.User);
                db.AddLog(TxtData.XMLConfigure.User + "登录");
            }
            PublicFunc.ReadXMLConfigure();


            poll = new Thread(new ThreadStart(PublicFunc.Poll));
            poll.Start();
        }
Exemplo n.º 2
0
        public Frm_Main()
        {
            //卸载与安装
            if (!File.Exists(Application.StartupPath+"\\RobotPolish.mdb")&&File.Exists(Application.StartupPath+"\\Backup\\RobotPolish.mdb"))
            {
                File.Copy(Application.StartupPath + "\\Backup\\RobotPolish.mdb", Application.StartupPath + "\\RobotPolish.mdb",true);
            }

            //2013.11.20
            //检查数据库是否存在

            if (!File.Exists(Application.StartupPath + "\\RobotPolish.mdb"))
            {
                MessageBox.Show("程序根目录中数据库文件RobotPolish.mdb不存在");
                System.Environment.Exit(System.Environment.ExitCode);
                this.Dispose();
                this.Close();
                return;
            }

            PublicFunc.Init();
            DevExpress.Data.CurrencyDataController.DisableThreadingProblemsDetection = true;
               // PublicFunc.ReadXMLConfigure();

            InitializeComponent();
            BI_ListClose_ItemClick(this, null);
            TE_Title.Text = "抛光工艺管理软件";
            RC_Main.DefaultPageCategory.Expanded = true;
            RC_Main.Minimized = true;
            InitSkinGallery();

            db = new DataBaseManage();

            TxtData.XMLConfigure.RegCode = db.GetRegCode();
            TxtData.XMLConfigure.Reged = true;
            //db.SaveCs8cConfigure();
            //PublicFunc.ReadCs8CConfigure();

            db.GetIp(ref TxtData.XMLConfigure.IpAddress, ref TxtData.XMLConfigure.RestrictCode);
            db.GetPopedom(ref TxtData.PublicData.ScreenEnable);

            TxtData.XMLConfigure.User = db.GetAutoLogin();
            TxtData.SoapData.Tool = db.GetTool();

            if (TxtData.XMLConfigure.User != null)
            {
                TxtData.XMLConfigure.Login = true;
                TxtData.XMLConfigure.PopeDom = db.GetUserPopm(TxtData.XMLConfigure.User);
                db.AddLog(TxtData.XMLConfigure.User + "登录");

            }
            PublicFunc.ReadXMLConfigure();

            poll = new Thread(new ThreadStart(PublicFunc.Poll));
            poll.Start();
        }
Exemplo n.º 3
0
        public Frm_Main()
        {
            //卸载与安装
            if (!File.Exists(Application.StartupPath + "\\LasMAN.mdb") && File.Exists(Application.StartupPath + "\\Backup\\LasMAN.mdb"))
            {
                File.Copy(Application.StartupPath + "\\Backup\\LasMAN.mdb", Application.StartupPath + "\\LasMAN.mdb", true);
            }
            if (!Directory.Exists(Application.StartupPath + "\\Log"))
            {
                Directory.CreateDirectory(Application.StartupPath + "\\Log");
            }

            DevExpress.Data.CurrencyDataController.DisableThreadingProblemsDetection = true;
            // PublicFunc.ReadXMLConfigure();

            InitializeComponent();
            BI_ListClose_ItemClick(this, null);
            //     TE_Title.Text = "机器人与装备集成实验系统";
            RC_Main.DefaultPageCategory.Expanded = true;
            RC_Main.Minimized = true;
            InitSkinGallery();



            db = new DataBaseManage();
            db.SaveCs8cConfigure();
            // PublicFunc.ReadCs8CConfigure();

            db.GetRegCode(ref TxtData.XMLConfigure.RegCode);
            db.GetIp(ref TxtData.XMLConfigure.IpAddress, ref TxtData.XMLConfigure.RestrictCode);
            db.GetPopedom(ref TxtData.PublicData.ScreenEnable);

            TxtData.XMLConfigure.User = db.GetAutoLogin();


            if (TxtData.XMLConfigure.User != null)
            {
                TxtData.XMLConfigure.Login   = true;
                TxtData.XMLConfigure.PopeDom = db.GetUserPopm(TxtData.XMLConfigure.User);
                db.AddLog(TxtData.XMLConfigure.User + "登录");
            }
            PublicFunc.ReadXMLConfigure();


            poll = new Thread(new ThreadStart(PublicFunc.Poll));
            poll.Start();
        }
Exemplo n.º 4
0
        public Frm_Main()
        {
            //卸载与安装
            if (!File.Exists(Application.StartupPath+"\\LasMAN.mdb")&&File.Exists(Application.StartupPath+"\\Backup\\LasMAN.mdb"))
            {
                File.Copy(Application.StartupPath + "\\Backup\\LasMAN.mdb", Application.StartupPath + "\\LasMAN.mdb",true);
            }
            if (!Directory.Exists(Application.StartupPath+"\\Log"))
            {
                Directory.CreateDirectory(Application.StartupPath + "\\Log");
            }

            DevExpress.Data.CurrencyDataController.DisableThreadingProblemsDetection = true;
               // PublicFunc.ReadXMLConfigure();

            InitializeComponent();
            BI_ListClose_ItemClick(this, null);
               //     TE_Title.Text = "机器人与装备集成实验系统";
            RC_Main.DefaultPageCategory.Expanded = true;
            RC_Main.Minimized = true;
            InitSkinGallery();

            db = new DataBaseManage();
            db.SaveCs8cConfigure();
               // PublicFunc.ReadCs8CConfigure();

            db.GetRegCode(ref TxtData.XMLConfigure.RegCode);
            db.GetIp(ref TxtData.XMLConfigure.IpAddress, ref TxtData.XMLConfigure.RestrictCode);
            db.GetPopedom(ref TxtData.PublicData.ScreenEnable);

            TxtData.XMLConfigure.User = db.GetAutoLogin();

            if (TxtData.XMLConfigure.User != null)
            {
                TxtData.XMLConfigure.Login = true;
                TxtData.XMLConfigure.PopeDom = db.GetUserPopm(TxtData.XMLConfigure.User);
                db.AddLog(TxtData.XMLConfigure.User + "登录");

            }
            PublicFunc.ReadXMLConfigure();

            poll = new Thread(new ThreadStart(PublicFunc.Poll));
            poll.Start();
        }