• 大小: 253KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-21
  • 语言: 其他
  • 标签:

资源简介

目前大家最容易得到的ICOMP控件是iocomp.v3.04.SP2.Full,这个虽然说不支持VS,但在VS下绝对可以应用。安装iocomp.v3.04.SP2.Full后在VS2005工具箱中找不到ICOMP控件,这个可以通过手动添加,iocomp的动态联结库就能看到ICOMP的控件了,下在在VS2005下用ICOMP做的一个小例子,给大家参考!

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.Drawing;
/*
    Copyright (C) 2008 河南永探矿用监控器材科技发展有限公司
    All rights reserved. 
    文件名称:DrawWave.cs
    摘要:完成画图
  
    当前版本:1.1
    作者:wangxt
    完成日期:2008年5月31日
    取代版本:1.0
    原作者:wangxt                  
    完成日期:2008年5月30日
*/
namespace YTMonitor
{
    class DrawWave
    {
        public DrawWave(int chanleCountfloat alarmDatafloat yAxisMaxfloat yAxisMinAxiPlotLibrary.AxiPlotX iPlot)
        {
            this.m_yAxisMax =yAxisMax;
            this.m_yAxisMin = yAxisMin;
            this.m_chanleCount = chanleCount;
            this.m_alarmData = alarmData;
            this.m_iPlot = iPlot;
            
            SetXYAxis();
            AddChanle();
            SetFireLine();
            SetCursor();
        }
        public void draw(int channleId float data)
        {
            m_iPlot.get_Channel(channleId).AddYNow(data);
        }

        private void SetCursor()
        {
            m_iPlot.AddDataCursor();
            m_iPlot.get_DataCursor(0).Color = 0x000000FF;              //红色
            m_iPlot.get_DataCursor(0).style = iPlotLibrary.TxiPlotDataCursorstyle.ipcsValueXY;

            m_iPlot.get_DataCursor(0).ChannelAllowAll = true;
            m_iPlot.get_DataCursor(0).ChannelName = ““;
            m_iPlot.get_DataCursor(0).ChannelShowAllInLegend = true;
            m_iPlot.get_DataCursor(0).Visible = true;
        }
        private void SetFireLine()
        {
            m_iPlot.AddLimit();
            m_iPlot.get_Limit(0).Color = 0x0000FFFF;//yello
            m_iPlot.get_Limit(0).Linestyle = iPlotLibrary.TxPenstyle.psDot;
            m_iPlot.get_Limit(0).Line1Position = m_alarmData;
        }

        private void SetXYAxis()
        {
            m_iPlot.get_XAxis(0).LabelsFormatstyle = iPlotLibrary.TxiPlotTextFormat.iptfDateTime;
            m_iPlot.get_XAxis(0).DateTimeFormat = “d mmm hh:nn:ss“;
            m_iPlot.get_XAxis(0).Span = 0.0001;

            m_iPlot.get_YAxis(0).ScrollMinMaxEnabled = true;
            m_iPlot.get_YAxis(0).ScrollMin = m_yAxisMin;
            m_iPlot.get_YAxis(0).ScrollMax = m_yAxisMax;
            m_iPlot.get_YAxis(0).Span = m_yAxisMax;
        }
        private void AddChanle()
        {
            for (int i = 0; i < m_chanleCount; i++)
            {
                m_iPlot.AddChannel();
                m_iPlot.get_Channel(i).RingBufferSize = 350;
            }
        }
    


        private int m_chanleCount;
        private float  m_alarmData;
        private float  m_yAxisMax;
        private float  m_yAxisMin;
        private AxiPlotLibrary.AxiPlotX m_iPlot;

       
    }
}

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

     文件     192512  2008-05-30 09:15  WindowsApplication1\WindowsApplication1\bin\Debug\AxInterop.iPlotLibrary.dll

     文件     507904  2008-10-17 17:52  WindowsApplication1\WindowsApplication1\bin\Debug\Interop.iPlotLibrary.dll

     文件      32768  2008-10-17 17:52  WindowsApplication1\WindowsApplication1\bin\Debug\WindowsApplication1.exe

     文件      30208  2008-10-17 17:52  WindowsApplication1\WindowsApplication1\bin\Debug\WindowsApplication1.pdb

     文件       5632  2005-12-08 14:51  WindowsApplication1\WindowsApplication1\bin\Debug\WindowsApplication1.vshost.exe

     文件       2861  2008-05-31 15:49  WindowsApplication1\WindowsApplication1\DrawWave.cs

     文件       4824  2008-10-07 14:04  WindowsApplication1\WindowsApplication1\Form1.cs

     文件       5106  2008-10-07 14:04  WindowsApplication1\WindowsApplication1\Form1.Designer.cs

     文件      19434  2008-10-07 14:04  WindowsApplication1\WindowsApplication1\Form1.resx

     文件     192512  2008-05-30 09:15  WindowsApplication1\WindowsApplication1\obj\Debug\AxInterop.iPlotLibrary.dll

     文件     507904  2008-10-17 17:52  WindowsApplication1\WindowsApplication1\obj\Debug\Interop.iPlotLibrary.dll

     文件        842  2008-10-07 14:04  WindowsApplication1\WindowsApplication1\obj\Debug\WindowsApplication1.csproj.GenerateResource.Cache

     文件        809  2008-10-17 17:52  WindowsApplication1\WindowsApplication1\obj\Debug\WindowsApplication1.csproj.ResolveComReference.cache

     文件      32768  2008-10-17 17:52  WindowsApplication1\WindowsApplication1\obj\Debug\WindowsApplication1.exe

     文件       9089  2008-10-17 17:52  WindowsApplication1\WindowsApplication1\obj\Debug\WindowsApplication1.Form1.resources

     文件      30208  2008-10-17 17:52  WindowsApplication1\WindowsApplication1\obj\Debug\WindowsApplication1.pdb

     文件        180  2008-10-17 17:52  WindowsApplication1\WindowsApplication1\obj\Debug\WindowsApplication1.Properties.Resources.resources

     文件        564  2008-10-17 18:29  WindowsApplication1\WindowsApplication1\obj\WindowsApplication1.csproj.FileList.txt

     文件       1630  2008-09-24 09:00  WindowsApplication1\WindowsApplication1\obj\WindowsApplication1.csproj.FileListAbsolute.txt

     文件        478  2008-05-30 09:12  WindowsApplication1\WindowsApplication1\Program.cs

     文件       1188  2008-05-30 09:12  WindowsApplication1\WindowsApplication1\Properties\AssemblyInfo.cs

     文件       2894  2008-05-30 09:12  WindowsApplication1\WindowsApplication1\Properties\Resources.Designer.cs

     文件       5612  2008-05-30 09:12  WindowsApplication1\WindowsApplication1\Properties\Resources.resx

     文件       1104  2008-05-30 09:12  WindowsApplication1\WindowsApplication1\Properties\Settings.Designer.cs

     文件        249  2008-05-30 09:12  WindowsApplication1\WindowsApplication1\Properties\Settings.settings

     文件       4248  2008-09-27 11:29  WindowsApplication1\WindowsApplication1\WindowsApplication1.csproj

     文件        946  2008-05-30 09:12  WindowsApplication1\WindowsApplication1.sln

    ..A..H.     28672  2008-10-17 18:30  WindowsApplication1\WindowsApplication1.suo

     目录          0  2008-05-30 11:22  WindowsApplication1\WindowsApplication1\obj\Debug\Refactor

     目录          0  2008-05-30 09:12  WindowsApplication1\WindowsApplication1\obj\Debug\TempPE

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

评论

共有 条评论

相关资源