示例#1
0
 // Update a chart
 private void updateRefreshChart(System.Windows.Forms.DataVisualization.Charting.Chart chart)
 {
     if (!chart.IsDisposed)
     {
         if (chart.InvokeRequired)
         {
             RefreshChartCallback update = new RefreshChartCallback(_updateRefreshChart);
             chart.Invoke(update, new object[] { chart });
         }
         else
         {
             _updateRefreshChart(chart);
         }
     }
 }
 //Refresh the chart
 private void RefreshChart()
 {
     if (chart.InvokeRequired)
     {
         RefreshChartCallback d = new RefreshChartCallback(RefreshChart);
         this.Invoke(d, null);
     }
     else
     {
         chart.Refresh();
     }
 }
示例#3
0
 // Update a chart
 private void updateRefreshChart(System.Windows.Forms.DataVisualization.Charting.Chart chart)
 {
     if (!chart.IsDisposed)
     {
         if (chart.InvokeRequired)
         {
             RefreshChartCallback update = new RefreshChartCallback(_updateRefreshChart);
             chart.Invoke(update, new object[] { chart });
         }
         else
         {
             _updateRefreshChart(chart);
         }
     }
 }