Beispiel #1
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();
            }
        }
Beispiel #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();
            }
            
        }