Beispiel #1
0
 /// <summary>
 /// 扫入SN直接用timer挂起,由timer调用测试进程
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void TxtSN_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         //支持B条码
         if (!TxtSN.Text.StartsWith("WIP") && TxtSN.Text.Contains("WIP"))
         {
             TxtSN.Text = TxtSN.Text.Substring(TxtSN.Text.IndexOf("WIP"));
         }
         //挂起
         TxtSN.Enabled = false;
         if (BoxSNEnterDown != null)
         {
             TimPending.Enabled = false;
             LabCount.Text      = "COUNT:" + FPY.GetCount(TxtSN.Text);
             new Thread(() => { BoxSNEnterDown(TxtSN, new BoxEventArgs(TxtSN.Text)); }).Start();
         }
         else
         {
             TimPending.Enabled = true;
             TimPending.Start();
             if (TimOut.Enabled)
             {
                 TimOut.Stop();
                 TimOut.Start();
             }
         }
     }
 }
Beispiel #2
0
 /// <summary>
 /// DUT TimeOut 提示
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void TimOut_Tick(object sender, EventArgs e)
 {
     TimOut.Stop();
     if (!DutOnline.Contains(TxtSN.Text))
     {
         MessageBox.Show("DUT等待超时!");
         Reset_DoubleClick(null, null);
     }
 }