本文整理汇总了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);
}