Esempio n. 1
0
        public TestProcess(Form1 form)
        {
            formbase = form;

            testdoc = form.test;
            ovencfg = new IniHandler(Path.Combine(Util.basedir, "oven.ini"), "");

            trigger = new SwitchS200("S7214");
            //trigger1 = new SwitchSER("TRIGGER1");
            //trigger2 = new SwitchSER("TRIGGER2");
            //trigger3 = new SwitchSER("TRIGGER3");
            //trigger4 = new SwitchSER("TRIGGER4");
            wd1529 = new WD1529("WD1529");
            bath300A = new BathCTRJ("CTRJ-300A");
            bathN35A = new BathCTRJ("CTRJ-35A");
            if (!bath300A.bInUse && !Util.ISDEBUG)
                MessageBox.Show("连接CTRJ-300A 恒温槽失败,请检查串口设置后重试", "连接失败");
            if (!bathN35A.bInUse && !Util.ISDEBUG)
                MessageBox.Show("连接CTRJ-N35A 恒温槽失败,请检查串口设置后重试", "连接失败");

            if (!wd1529.bInUse || !trigger.bInUse)//!trigger1.bInUse || !trigger2.bInUse || !trigger3.bInUse || !trigger4.bInUse)
            {
                if (!wd1529.bInUse && !Util.ISDEBUG)
                    MessageBox.Show("连接FLUKE 1529失败,请检查串口设置后重试", "连接失败");
                //if ((!trigger1.bInUse || !trigger2.bInUse || !trigger3.bInUse || !trigger4.bInUse) && !Util.ISDEBUG)
                //    MessageBox.Show("连接开关检测模块失败,请检查串口设置后重试", "连接失败");

                if (!trigger.bInUse && !Util.ISDEBUG)
                    MessageBox.Show("连接S7-200 开关检测模块失败,请检查串口设置(9600/8/EVEN/1STOP)后重试, S7-200 地址为2,连接I0.0-I0.3)", "连接失败");
                if (!Util.ISDEBUG)
                    Process.GetCurrentProcess().Kill();
            }
        }
Esempio n. 2
0
        public TestProcess(Form1 form)
        {
            formbase = form;

            testdoc = form.test;
            ovencfg = new IniHandler(Path.Combine(Util.basedir, "oven.ini"), "");

            Scanner     sc148;
            Scanner     sc4012;
            Scanner2560 sc2560 = new Scanner2560("FLUKE2560");
            ThermBridge dq700  = new DQF700("F700");
            ThermBridge dq1560;

            if (dq700.bInUse)
            {
                bridge = dq700;
                sc148  = new ScannerSB148("SB148");
                sc4012 = new ScannerST4012A("ST4012A");
                if (sc148.bInUse || sc4012.bInUse)
                {
                    if (sc148.bInUse && sc4012.bInUse)
                    {
//                        if (DialogResult.Yes == MessageBox.Show("同时发现扫描器SB148 和 ST4012A.\n 按‘是’选择SB148\n按‘否’选择ST4012A", "选择扫描器", MessageBoxButtons.YesNo))
//                            scanner = sc148;
//                        else
                        scanner = sc4012;
                        return;
                    }
                    if (sc148.bInUse)
                    {
                        scanner = sc148;
                    }
                    else
                    {
                        scanner = sc4012;
                    }
                    return;
                }
                MessageBox.Show("连接SB158或ST4012A扫描开关失败,请检查连接后重试", "连接失败");
            }
            else
            {
                dq1560 = new FL1560("FLUKE1560", sc2560);
                if (dq1560.bInUse)
                {
                    bridge  = dq1560;
                    scanner = sc2560;
                    return;
                }
                MessageBox.Show("连接F700测温电桥或FLUKE1560失败,请检查连接后重试", "连接失败");
            }
            if (!Util.ISDEBUG)
            {
                Process.GetCurrentProcess().Kill();
            }
        }
Esempio n. 3
0
        public TestProcess(Form1 form)
        {
            formbase = form;

            testdoc = form.test;
            ovencfg = new IniHandler(Path.Combine(Util.basedir, "oven.ini"), "");
            
            Scanner sc148;
            Scanner sc4012;
            Scanner2560 sc2560 = new Scanner2560("FLUKE2560");
            ThermBridge dq700 = new DQF700("F700");
            ThermBridge dq1560;
            if (dq700.bInUse)
            {
                bridge = dq700;
                sc148 = new ScannerSB148("SB148");
                sc4012 = new ScannerST4012A("ST4012A");
                if (sc148.bInUse || sc4012.bInUse)
                {
                    if (sc148.bInUse && sc4012.bInUse)
                    {

//                        if (DialogResult.Yes == MessageBox.Show("同时发现扫描器SB148 和 ST4012A.\n 按‘是’选择SB148\n按‘否’选择ST4012A", "选择扫描器", MessageBoxButtons.YesNo))
//                            scanner = sc148;
//                        else
                            scanner = sc4012;
                        return;
                    }
                    if (sc148.bInUse)
                        scanner = sc148;
                    else
                        scanner = sc4012;
                    return;
                }
                    MessageBox.Show("连接SB158或ST4012A扫描开关失败,请检查连接后重试", "连接失败");
            }
            else
            {
                dq1560 = new FL1560("FLUKE1560", sc2560);
                if (dq1560.bInUse)
                {
                    bridge = dq1560;
                    scanner = sc2560;
                    return;
                }
                MessageBox.Show("连接F700测温电桥或FLUKE1560失败,请检查连接后重试", "连接失败");
            }
            if (!Util.ISDEBUG)
            {
                Process.GetCurrentProcess().Kill();
            }
            
        }
Esempio n. 4
0
        public TestProcess(Form1 form)
        {
            formbase = form;

            testdoc = form.test;
            ovencfg = new IniHandler(Path.Combine(Util.basedir, "oven.ini"), "");

            trigger = new SwitchS200("S7214");
            //trigger1 = new SwitchSER("TRIGGER1");
            //trigger2 = new SwitchSER("TRIGGER2");
            //trigger3 = new SwitchSER("TRIGGER3");
            //trigger4 = new SwitchSER("TRIGGER4");
            wd1529   = new WD1529("WD1529");
            bath300A = new BathCTRJ("CTRJ-300A");
            bathN35A = new BathCTRJ("CTRJ-35A");
            if (!bath300A.bInUse && !Util.ISDEBUG)
            {
                MessageBox.Show("连接CTRJ-300A 恒温槽失败,请检查串口设置后重试", "连接失败");
            }
            if (!bathN35A.bInUse && !Util.ISDEBUG)
            {
                MessageBox.Show("连接CTRJ-N35A 恒温槽失败,请检查串口设置后重试", "连接失败");
            }

            if (!wd1529.bInUse || !trigger.bInUse)//!trigger1.bInUse || !trigger2.bInUse || !trigger3.bInUse || !trigger4.bInUse)
            {
                if (!wd1529.bInUse && !Util.ISDEBUG)
                {
                    MessageBox.Show("连接FLUKE 1529失败,请检查串口设置后重试", "连接失败");
                }
                //if ((!trigger1.bInUse || !trigger2.bInUse || !trigger3.bInUse || !trigger4.bInUse) && !Util.ISDEBUG)
                //    MessageBox.Show("连接开关检测模块失败,请检查串口设置后重试", "连接失败");

                if (!trigger.bInUse && !Util.ISDEBUG)
                {
                    MessageBox.Show("连接S7-200 开关检测模块失败,请检查串口设置(9600/8/EVEN/1STOP)后重试, S7-200 地址为2,连接I0.0-I0.3)", "连接失败");
                }
                if (!Util.ISDEBUG)
                {
                    Process.GetCurrentProcess().Kill();
                }
            }
        }
Esempio n. 5
0
 static Util()
 {
     ConstIni = new IniHandler(Util.basedir + "\\oven.ini", "");
 }
Esempio n. 6
0
 static Util()
 {
     ConstIni = new IniHandler(Util.basedir + "\\oven.ini", "");
 }