Пример #1
0
 public void SetIndicator(int value)
 {
     // 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 (TrimPotIndicator.InvokeRequired)
       {
     IndicatorCallback d = new IndicatorCallback(SetIndicator);
     this.Invoke(d, new object[] { value });
       }
       else
       {
     TrimPotIndicator.Value = value;
       }
 }
Пример #2
0
 public void SetIndicator(int value)
 {
     // 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 (TrimPotIndicator.InvokeRequired)
     {
         IndicatorCallback d = new IndicatorCallback(SetIndicator);
         this.Invoke(d, new object[] { value });
     }
     else
     {
         TrimPotIndicator.Value = value;
     }
 }