下面是线程部分
- DispatcherTimer Timer_paint = new DispatcherTimer(DispatcherPriority.Normal, this.Dispatcher);
- Timer_paint.Interval = new TimeSpan(0, 0, 0, 0, 100);
- Timer_paint.Tick += TimerPaint_Tick;
- Timer_paint.Start();
- private void TimerPaint_Tick(object sender, EventArgs e)
- {
- List<double> x = new List<double>();
- List<double> y = new List<double>();
- //if (variable.bopen232)
- {
-
- for (int i = 0; i < 4096; i++)
- {
- x.Add(i);
- y.Add(variable.paint_wave[i]);
- }
- draw.drawingXY(flexChart1, x, y);
- }
-
- }
复制代码 |