資源簡介
設置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個文件信息
評論
共有 條評論