コード例 #1
0
        protected void OnConfig(object sender, EventArgs args)
        {
            ConfigDlg configdlg = new ConfigDlg();

            configdlg.comname = mConfigInfo[tmMarcos.kFixtureCom] as string;
            configdlg.config  = mConfigInfo[tmMarcos.kFixtureConfig] as string;
            configdlg.ShowDialog();
            if (configdlg.DialogResult == DialogResult.OK)
            {
                m_object.SaveConfig(configdlg.comname, configdlg.config);
                m_object.Init();
                ConnectCom();
            }
        }
コード例 #2
0
        public void DetectStartString()
        {
            ConfigDlg configdlg = new ConfigDlg();
            string    str       = System.Text.Encoding.UTF8.GetString(m_Buffer.ToArray());

            if (str.IndexOf("START") != -1)
            {
                //if (str.IndexOf("START_A") != -1)
                //{
                //    SetDut(0);
                //}
                //else if (str.IndexOf("START_B") != -1)
                //{
                //    SetDut(1);
                //}
                SetDut(0);
                ClearBuffer();
                DictionaryEx dic = new DictionaryEx();
                dic["id"] = -1;
                if (GT_EEBroadController.m_TestEngine.IsTesting(-1) == 0)
                {
                    if (NeedScanSN())
                    {
                        System.Windows.Forms.MessageBox.Show("Please scan the SN firstly!");
                        WriteString("fixture_reset\r\n");
                    }
                    else
                    {
                        //configdlg.bnwork_Click(null, null);
                        NotificationCenter.DefaultCenter().PostNotification(tmMarcos.kOnStartTest, dic);
                    }
                }
            }

            else if (str.ToUpper().IndexOf("RESET") != -1)
            {
                ClearBuffer();
                ScriptEngine se = GT_EEBroadController.m_TestEngine.GetScriptEngine(0) as ScriptEngine;
                se.DoString("Perfrom_C28StopTest()");
                System.Threading.Thread.Sleep(500);
                GT_EEBroadController.m_TestEngine.StopTest(-1);
            }
        }