• 大小: 48KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-13
  • 语言: 其他
  • 标签: Iocomp  plot  

资源简介

设置Iocomp的plot控件 设置X轴显示为时间格式 亲测 VS2013、WIN7系统下都可以使用,但是IocompDotNetV4SP3Eval版本的

资源截图

代码片段和文件信息

using Iocomp.Classes;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender EventArgs e)

        {
            plot1.XAxes.Clear();
            PlotChannelTrace channelMax = new PlotChannelTrace();
            plot1.Channels.Add(channelMax);
            PlotChannelTrace channelMax1 = new PlotChannelTrace();
            plot1.Channels.Add(channelMax1);

            Iocomp.Classes.PlotXAxis xValue = new Iocomp.Classes.PlotXAxis();
            xValue.ScaleDisplay.TextFormatting.style = Iocomp.Types.TextFormatDoublestyle.DateTime;
            xValue.ScaleDisplay.TextFormatting.DateTimeFormat = “yyyyMMdd hh:mm:ss“;
           

            //Iocomp.Classes.PlotXAxis xValue1 = new Iocomp.Classes.PlotXAxis();
            //xValue.ScaleDisplay.TextFormatting.style = Iocomp.Types.TextFormatDoublestyle.DateTime;
            //xValue.ScaleDisplay.TextFormatting.DateTimeFormat = “yyyyMMdd hh:mm:ss“;


            //Iocomp.Classes.PlotXAxis xValue2 = new Iocomp.Classes.PlotXAxis();
            //xValue.ScaleDisplay.TextFormatting.style = Iocomp.Types.TextFormatDoublestyle.DateTime;
            //xValue.ScaleDisplay.TextFormatting.DateTimeFormat = “yyyyMMdd hh:mm:ss“;
            
            
            plot1.XAxes.Add(xValue);
          //  plot1.XAxes.Add(xValue1);
           // plot1.XAxes.Add(xValue2);
            plot1.Channels[0].AddXY(new DateTime(2018324101010) 20);
            plot1.Channels[0].AddXY(new DateTime(2018 3 26 10 10 10) 40);
            plot1.Channels[0].AddXY(new DateTime(2018 3 28 10 10 10) 60);



            plot1.Channels[1].AddXY(new DateTime(2018 3 25 10 10 10) 20);
            plot1.Channels[1].AddXY(new DateTime(2018 3 26 10 10 10) 40);
            plot1.Channels[1].AddXY(new DateTime(2018 3 29 10 10 10) 60);

            plot1.Channels[2].AddXY(new DateTime(2018 3 27 10 10 10) 20);
            plot1.Channels[2].AddXY(new DateTime(2018 3 30 10 10 10) 40);
            plot1.Channels[2].AddXY(new DateTime(2018 3 31 10 10 10) 60);
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       2457  2018-03-27 14:46  Form1.cs

     文件       4124  2018-03-27 14:37  Form1.Designer.cs

     文件       5817  2018-03-27 14:37  Form1.resx

     文件        505  2018-03-27 14:05  Program.cs

     文件       4134  2018-03-27 14:20  WindowsFormsApplication1.csproj

     文件      12288  2018-03-27 14:37  bin\Debug\WindowsFormsApplication1.exe

     文件      24064  2018-03-27 14:37  bin\Debug\WindowsFormsApplication1.pdb

     文件      24216  2018-03-27 14:37  bin\Debug\WindowsFormsApplication1.vshost.exe

     文件        490  2014-01-13 21:31  bin\Debug\WindowsFormsApplication1.vshost.exe.manifest

     文件      12879  2018-03-27 14:05  obj\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       7203  2018-03-27 14:05  obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        764  2018-03-27 14:37  obj\Debug\WindowsFormsApplication1.csproj.FileListAbsolute.txt

     文件        977  2018-03-27 14:37  obj\Debug\WindowsFormsApplication1.csproj.GenerateResource.Cache

     文件      13933  2018-03-27 14:21  obj\Debug\WindowsFormsApplication1.csprojResolveAssemblyReference.cache

     文件      12288  2018-03-27 14:37  obj\Debug\WindowsFormsApplication1.exe

     文件        452  2018-03-27 14:37  obj\Debug\windowsformsapplication1.exe.licenses

     文件        180  2018-03-27 14:37  obj\Debug\WindowsFormsApplication1.Form1.resources

     文件      24064  2018-03-27 14:37  obj\Debug\WindowsFormsApplication1.pdb

     文件        180  2018-03-27 14:21  obj\Debug\WindowsFormsApplication1.Properties.Resources.resources

     文件       1390  2018-03-27 14:05  Properties\AssemblyInfo.cs

     文件        143  2018-03-27 14:37  Properties\licenses.licx

     文件       2900  2018-03-27 14:05  Properties\Resources.Designer.cs

     文件       5612  2018-03-27 14:05  Properties\Resources.resx

     文件       1111  2018-03-27 14:05  Properties\Settings.Designer.cs

     文件        249  2018-03-27 14:05  Properties\Settings.settings

     目录          0  2018-03-27 14:05  obj\Debug\TempPE

     目录          0  2018-03-27 14:21  bin\Debug

     目录          0  2018-03-27 14:37  obj\Debug

     目录          0  2018-03-27 14:05  bin

     目录          0  2018-03-27 14:05  obj

............此处省略4个文件信息

评论

共有 条评论