就是想知道为什么不能添加到工具箱中.......
没人回答, 结帖, 那就留下我使用ocx的方法吧
自己手动 aximp st_curve.ocx 生成要用的类库, 然后手动引用 , 然后写代码自己加载到界面
[C#] 纯文本查看 复制代码 private void Form1_Load(object sender, EventArgs e)
{
var axSTcurve1 = new AxST_CurveLib.AxST_Curve();
axSTcurve1.Dock = DockStyle.Fill;
this.pictureBox1.Controls.Add(axSTcurve1);
axSTcurve1.SetShowMode(0x80);
//axSTcurve1.CtlBackColor=0x000000;
axSTcurve1.CtlBackColor = 0xFFFFFF;
axSTcurve1.CtlForeColor = 0x000000;
axSTcurve1.AxisColor = 0x878787;
axSTcurve1.GridColor = 0xF0F0F0;
axSTcurve1.EnablePreview(false);
axSTcurve1.EnableHelpTip(false);
axSTcurve1.EnableHZoom(true);
axSTcurve1.SetGridMode(3);
axSTcurve1.LimitOnePage(true);
axSTcurve1.SetVPrecision(2);
axSTcurve1.SetHPrecision(0);
axSTcurve1.SetHInterval(10);
axSTcurve1.SetUnit("温度和湿度");
axSTcurve1.AddLegend(1, "aaa", 0xC08E45, 0/*_PS_SOLID*/, 1, 0x0, 255, 0/*CurveMode0/3*/, 1, 0xFF, true);
for (int i = 0; i < 500; i++)
{
axSTcurve1.AddMainData(1, i.ToString(), (float)Math.Sin(i * 0.05), 0, 1, true);
//axSTcurve1.AddMainData2(1, i, (float)Math.Sin(i * 0.05), 0, 1, true);
}
} |