Esempio n. 1
0
 void updatePoint(Chart chart, int i, int point, double val)
 {
     if (chart.InvokeRequired)
     {
         chart.BeginInvoke(new updatePointDelegate(updatePoint), new object[] { chart, i, point, val });
     }
     else
     {
         if (chart.Series[i].Points.Count == 0)
             for (int j = 0; j < 96; j++)
             {
                 chart.Series[i].Points.Add(0);
                 chart.Series[i].Points[j].IsEmpty = true;
             }
         if (point > 0 && point < 96)
         {
             chart.Series[i].Points[point].SetValueY(val);
             chart.Series[i].Points[point].IsEmpty = false;
         }
     }
 }
Esempio n. 2
0
 void incrementPoint(Chart chart, int i, int point, double val)
 {
     if (chart.InvokeRequired)
     {
         chart.BeginInvoke(new incrementPointDelegate(incrementPoint), new object[] { chart, i, point, val });
     }
     else
     {
         if (chart.Series[i].Points.Count == 0)
             for (int j = 0; j < 96; j++)
                 chart.Series[i].Points.Add(0);
         double temp = chart.Series[i].Points[point].YValues[0];
         chart.Series[i].Points[point].SetValueY(temp + val);
     }
 }
Esempio n. 3
0
        void addPoint(Chart chart, int i, Double point)
        {
            if (chart.InvokeRequired)
            {
                chart.BeginInvoke(new addPointDelegate(addPoint), new object[] { chart, i, point });
            }
            else
            {
                if (chart.Series[i].Points.Count >= 96)
                    chart.Series[i].Points.Clear();

                chart.Series[i].Points.Add(point);
            }
        }
 Series GetSeriesByName(Chart chart, string name)
 {
     if (!chart.InvokeRequired) return chart.Series.FindByName(name);
     return (Series)chart.EndInvoke(chart.BeginInvoke(new Delegates.SeriesResultChartStringParams(GetSeriesByName), chart, name));
 }
 void AddSeriesToChart(Chart chart, Series series)
 {
     if (!chart.InvokeRequired)
     {
         if (!chart.Series.Contains(series)) chart.Series.Add(series);
     }
     else chart.BeginInvoke(new Delegates.VoidResultChartSeriesParams(AddSeriesToChart), chart, series);
 }
 void AddPointToChartSeries(Chart chart, string series_name, ulong x, ulong y)
 {
     if (!chart.InvokeRequired) chart.Series[series_name].Points.AddXY(x, y);
     else chart.BeginInvoke(new Delegates.VoidResultChartStringUlongUlongParams(AddPointToChartSeries), chart, series_name, x, y);
 }