-
大小: 1.43MB文件类型: .rar金币: 1下载: 0 次发布日期: 2023-08-19
- 语言: C#
- 标签:
资源简介
ZedGraphV515SampleCS_(动态实时曲线示例-全部源码)
1、c#的开源的图形控件,可用来画曲线或柱状等图形,功能强大);
2、在原有基础的上改进;
3、动态实时曲线;
4、c#2005全部源码。
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using ZedGraph;
namespace ZedGraphSample
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load( object sender EventArgs e )
{
////CreateGraph_One(this.zedGraphControl1);//一条曲线
//CreateGraph_Two(this.zedGraphControl1); //两条曲线
//CreateGraph_Date(this.zedGraphControl1); //日期
//CreateGraph_Chart(this.zedGraphControl1); //图表
CreateGraph_jingzhi(this.zedGraphControl1);
this.Init_Timer();
this.Timer1.Start();
//SetSize();
}
private void Form1_Resize(object sender EventArgs e)
{
//SetSize();
}
private void SetSize()
{
//zg1.Location = new Point(10 10);
//// Leave a small margin around the outside of the control
//zg1.Size = new Size(this.ClientRectangle.Width - 20 this.ClientRectangle.Height - 20);
}
#region 样例
private void CreateGraph_One( ZedGraphControl zgc )
{
GraphPane myPane = zgc.GraphPane;
// Set the titles and axis labels
myPane.title.Text = “曲线示例“;
myPane.XAxis.title.Text = “Xxx轴“;
myPane.YAxis.title.Text = “Yyy轴“;
// Make up some data points from the Sine function
PointPairList list = new PointPairList();
for ( double x = 0; x < 36; x++ )
{
double y = Math.Sin( x * Math.PI / 15.0 );
list.Add( x y );
}
// Generate a blue curve with circle symbols and “My Curve 2“ in the legend
LineItem myCurve = myPane.AddCurve(“My Curve“ list Color.Blue SymbolType.Circle);
// Fill the area under the curve with a white-red gradient at 45 degrees
myCurve.Line.Fill = new Fill(Color.White Color.Red 45F);
// Make the symbols opaque by filling them with white
myCurve.Symbol.Fill = new Fill(Color.White);
// Fill the axis background with a color gradient
myPane.Chart.Fill = new Fill(Color.White Color.LightGoldenrodYellow 45F);
// Fill the pane background with a color gradient
myPane.Fill = new Fill(Color.White Color.FromArgb(220 220 255) 45F);
// Calculate the Axis Scale Ranges
zgc.AxisChange();
}
private void CreateGraph_Two(ZedGraphControl zgc)
{
// get a reference to the GraphPane
GraphPane myPane = zgc.GraphPane;
// Make up some data arrays based on the Sine function
double x y1 y2;
PointPairList list1 = new PointPairList();
PointPairList list2 = new PointPairList();
for (int i = 0; i < 36; i
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 348160 2010-11-16 21:04 ZedGraphV515SampleCS\ZedGraphSample\bin\Debug\ZedGraph.dll
文件 1070592 2010-11-16 21:04 ZedGraphV515SampleCS\ZedGraphSample\bin\Debug\ZedGraph.pdb
文件 24576 2010-11-16 21:05 ZedGraphV515SampleCS\ZedGraphSample\bin\Debug\ZedGraphSample.exe
文件 26112 2010-11-16 21:05 ZedGraphV515SampleCS\ZedGraphSample\bin\Debug\ZedGraphSample.pdb
文件 5632 2005-11-11 22:25 ZedGraphV515SampleCS\ZedGraphSample\bin\Debug\ZedGraphSample.vshost.exe
文件 4096 2010-11-16 21:04 ZedGraphV515SampleCS\ZedGraphSample\bin\Debug\zh-cn\ZedGraph.resources.dll
文件 12878 2010-11-14 21:19 ZedGraphV515SampleCS\ZedGraphSample\Form1.cs
文件 3411 2010-11-14 19:36 ZedGraphV515SampleCS\ZedGraphSample\Form1.Designer.cs
文件 5814 2010-11-14 19:36 ZedGraphV515SampleCS\ZedGraphSample\Form1.resx
文件 5091 2010-11-16 21:05 ZedGraphV515SampleCS\ZedGraphSample\obj\Debug\ResolveAssemblyReference.cache
文件 842 2010-11-16 21:05 ZedGraphV515SampleCS\ZedGraphSample\obj\Debug\ZedGraphSample.csproj.GenerateResource.Cache
文件 24576 2010-11-16 21:05 ZedGraphV515SampleCS\ZedGraphSample\obj\Debug\ZedGraphSample.exe
文件 180 2010-11-16 21:05 ZedGraphV515SampleCS\ZedGraphSample\obj\Debug\ZedGraphSample.Form1.resources
文件 26112 2010-11-16 21:05 ZedGraphV515SampleCS\ZedGraphSample\obj\Debug\ZedGraphSample.pdb
文件 180 2010-11-16 21:05 ZedGraphV515SampleCS\ZedGraphSample\obj\Debug\ZedGraphSample.Properties.Resources.resources
文件 405 2010-11-16 21:05 ZedGraphV515SampleCS\ZedGraphSample\obj\ZedGraphSample.csproj.FileList.txt
文件 407 2006-03-11 11:28 ZedGraphV515SampleCS\ZedGraphSample\Program.cs
文件 1302 2006-06-26 13:46 ZedGraphV515SampleCS\ZedGraphSample\Properties\AssemblyInfo.cs
文件 2523 2006-03-11 11:28 ZedGraphV515SampleCS\ZedGraphSample\Properties\Resources.Designer.cs
文件 5612 2006-03-11 11:28 ZedGraphV515SampleCS\ZedGraphSample\Properties\Resources.resx
文件 1027 2006-03-11 11:28 ZedGraphV515SampleCS\ZedGraphSample\Properties\Settings.Designer.cs
文件 249 2006-03-11 11:28 ZedGraphV515SampleCS\ZedGraphSample\Properties\Settings.settings
文件 3459 2010-11-16 20:35 ZedGraphV515SampleCS\ZedGraphSample\ZedGraphSample.csproj
文件 168 2010-11-14 19:22 ZedGraphV515SampleCS\ZedGraphSample\ZedGraphSample.csproj.user
文件 1421 2010-11-16 20:34 ZedGraphV515SampleCS\ZedGraphV515SampleCS.sln
..A..H. 46080 2010-11-16 21:05 ZedGraphV515SampleCS\ZedGraphV515SampleCS.suo
文件 348160 2010-11-16 21:04 ZedGraphV515SampleCS\zedgraph_source_v515\bin\Debug\ZedGraph.dll
文件 1070592 2010-11-16 21:04 ZedGraphV515SampleCS\zedgraph_source_v515\bin\Debug\ZedGraph.pdb
文件 4096 2010-11-16 21:04 ZedGraphV515SampleCS\zedgraph_source_v515\bin\Debug\zh-cn\ZedGraph.resources.dll
文件 964 2010-11-16 21:04 ZedGraphV515SampleCS\zedgraph_source_v515\obj\Debug\ZedGraph.csproj.GenerateResource.Cache
............此处省略179个文件信息
- 上一篇:c#工业控件集合
- 下一篇:大学课程设计winform员工管理系统
评论
共有 条评论