本文整理匯總了C#中System.Windows.Forms.DataVisualization.Charting.Chart.BeginInvoke方法的典型用法代碼示例。如果您正苦於以下問題:C# Chart.BeginInvoke方法的具體用法?C# Chart.BeginInvoke怎麽用?C# Chart.BeginInvoke使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Windows.Forms.DataVisualization.Charting.Chart
的用法示例。
在下文中一共展示了Chart.BeginInvoke方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: updatePoint
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;
}
}
}
示例2: incrementPoint
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);
}
}
示例3: addPoint
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);
}
}
示例4: GetSeriesByName
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));
}
示例5: AddSeriesToChart
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);
}
示例6: AddPointToChartSeries
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);
}