Пример #1
0
 private void SetTextTime(string text)
 {
     // InvokeRequired required compares the thread ID of the
     // calling thread to the thread ID of the creating thread.
     // If these threads are different, it returns true.
     if (this.textBox6.InvokeRequired)
     {
         SetTextCallbackTime d = new SetTextCallbackTime(SetTextTime);
         try
         {
             this.Invoke(d, new object[] { text });
         }
         catch
         {
         }
     }
     else
     {
         this.textBox6.Text = text;
     }
 }
        private void SetTextTime(string text)
        {
            // InvokeRequired required compares the thread ID of the
            // calling thread to the thread ID of the creating thread.
            // If these threads are different, it returns true.
            if (this.textBox6.InvokeRequired)
            {

                SetTextCallbackTime d = new SetTextCallbackTime(SetTextTime);
                try
                {
                    this.Invoke(d, new object[] { text });
                }
                catch
                {

                }
            }
            else
            {
                this.textBox6.Text = text;
            }
        }