Exemple #1
0
 private void SendStr(string text)
 {
     if (this.tbCarNum.InvokeRequired)
     {
     SendStrCallback method = new SendStrCallback(this.SendStr);
     base.Invoke(method, new object[] { text });
     }
     else
     {
     this.tbCarNum.Text = this.sCarNum;
     }
 }
Exemple #2
0
 /// <summary>
 /// 发送扫描到TextBox控件
 /// </summary>
 /// <param name="text"></param>
 private void SendStr(string text)
 {
     if (this.listBox1.InvokeRequired)
     {
         //MessageBox.Show("invokerequired!!!");
         SendStrCallback d = new SendStrCallback(SendStr);
         this.Invoke(d, new object[] { text });
     }
     else
     {
         //MessageBox.Show("out!!");
         this.listBox1.Items.Add(text);
     }
 }
Exemple #3
0
        private void SendStr(string text)
        {
            if (this.tbCarNum.InvokeRequired)
            {
                SendStrCallback d = new SendStrCallback(SendStr);
                this.Invoke(d, new object[] { text });
            }
            else
            {

                tbCarNum.Text = sCarNum;
            }
        }