示例#1
0
 private void SetTextg(float[] g)
 {
     // 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.chart.InvokeRequired)
     {
         SetTextgraph d = new SetTextgraph(SetTextg);
         try
         {
             this.Invoke(d, new object[] { g });
         }
         catch
         {
         }
     }
     else
     {
         chart.UpdateWaveform("Test", g);
     }
 }
        private void SetTextg(float[] g)
        {
            // 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.chart.InvokeRequired)
            {

                SetTextgraph d = new SetTextgraph(SetTextg);
                try
                {
                    this.Invoke(d, new object[] { g });
                }
                catch
                {

                }
            }
            else
            {
                chart.UpdateWaveform("Test",g);
            }
        }