/// <summary> /// 消息处理 /// </summary> /// <param name="m"></param> //protected override void WndProc(ref Message m) //{ // switch (m.Msg) // { // case Win32API.WM_CLOSE: // //m6620_testPanel.thread_test.Abort(); // break; // default: // base.WndProc(ref m); // break; // } // if (m.Msg == Win32API.WM_CLOSE) // { // base.WndProc(ref m); // } //} private void txtLabelImei_TextChanged(object sender, EventArgs e) { lblLabelImei.Visible = txtLabelImei.TextLength < 1; int imeiLength = 15; if (txtLabelImei.Text.Length == imeiLength) { if (!Regex.IsMatch(txtLabelImei.Text, @"^\d{15}")) { MessageBox.Show("IMEI号不合法"); ClearUILastTestState(); return; } //初始化测试状态 txtLabelImei.ReadOnly = true; ClearUILastTestState(); ProductionTestFactory productionTestFactory = ProductionTestFactory.GetProductionTestFactory(this); //开启线程 Thread thread = new Thread(productionTestFactory.CheckProductionTestState); thread.IsBackground = true; thread.Start(txtLabelImei.Text.Trim()); } else if (txtLabelImei.Text.Length > imeiLength) { txtLabelImei.Text = txtLabelImei.Text.Substring(imeiLength); txtLabelImei.Select(txtLabelImei.Text.Length, 0); } }
private void 更改计划单号ToolStripMenuItem_Click(object sender, EventArgs e) { //填计划单 FormPlanCodeConfirm frmPlanCodeConfirm = new FormPlanCodeConfirm(this); frmPlanCodeConfirm.ShowDialog(); ProductionTestFactory ptf = ProductionTestFactory.GetProductionTestFactory(this); ptf.ChangePlanCodeInTestFlow(); }