C#工业控件


使用C#实现的一些用于组态软件的工业控件实例。
资源截图
代码片段和文件信息
// Copyright (C) 2007 A.J.Bauer
//
//  This software is provided as-is without any express or implied
//  warranty.  In no event will the authors be held liable for any damages
//  arising from the use of this software.

//  Permission is granted to anyone to use this software for any purpose
//  including commercial applications and to alter it and redistribute it
//  freely subject to the following restrictions:

//  1. The origin of this software must not be misrepresented; you must not
//     claim that you wrote the original software. if you use this software
//     in a product an acknowledgment in the product documentation would be
//     appreciated but is not required.
//  2. Altered source versions must be plainly marked as such and must not be
//     misrepresented as being the original software.
//  3. This notice may not be removed or altered from any source distribution.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
using System.Diagnostics;


namespace HMIControls
{
    [ToolboxBitmap(typeof(AGauge) “AGauge.bmp“) 
    DefaultEvent(“ValueInRangeChanged“) 
    Description(“Displays a value on an analog gauge. Raises an event if the value enters one of the definable ranges.“)]
    public partial class AGauge : Control
    {
#region enum var delegate event
        public enum NeedleColorEnum
        {
            Gray = 0
            Red = 1
            Green = 2
            Blue = 3
            Yellow = 4
            Violet = 5
            Magenta = 6
        };

        private const Byte ZERO = 0;
        private const Byte NUMOFCAPS = 5;
        private const Byte NUMOFRANGES = 5;

        private Single fontBoundY1;
        private Single fontBoundY2;
        private Bitmap gaugeBitmap;
        private Boolean drawGaugeBackground = true;

        private Single m_value;
        private Boolean[] m_valueIsInRange = { false false false false false };
        private Byte m_CapIdx = 1;
        private Color[] m_CapColor = { Color.Black Color.Black Color.Black Color.Black Color.Black };
        private String[] m_CapText = { ““ ““ ““ ““ ““ };
        private Point[] m_CapPosition = { new Point(10 10) new Point(10 10) new Point(10 10) new Point(10 10) new Point(10 10) };
        private Point m_Center = new Point(100 100);
        private Single m_MinValue = -100;
        private Single m_MaxValue = 400;

        private Color m_baseArcColor = Color.Gray;
        private Int32 m_baseArcRadius = 80;
        private Int32 m_baseArcStart = 135;
        private Int32 m_baseArcSweep = 270;
        private Int32 m_baseArcWidth = 2;

        private Color m_ScaleLinesInterColor = Color.Black;
        private Int32 m_ScaleLinesInterInnerRadius = 73;
        private Int32 m_ScaleLin

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

     文件      67485  2014-05-27 16:25  IndustrialControlHMIControlsAGauge.cs

     文件       1055  2014-05-27 16:25  IndustrialControlHMIControlsAGauge.Designer.cs

     文件       8042  2014-12-11 22:12  IndustrialControlHMIControlsAirMachine.cs

     文件       8437  2014-12-11 22:12  IndustrialControlHMIControlsAirMachine.Designer.cs

     文件       5817  2014-12-11 22:12  IndustrialControlHMIControlsAirMachine.resx

     文件      32642  2014-05-27 16:26  IndustrialControlHMIControlsAquaGauge.cs

     文件       1320  2014-05-27 16:25  IndustrialControlHMIControlsAquaGauge.Designer.cs

     文件     160256  2018-02-26 10:02  IndustrialControlHMIControlsinDebugHMIControls.dll

     文件     171520  2018-02-26 10:02  IndustrialControlHMIControlsinDebugHMIControls.pdb

     文件     266752  2010-11-09 21:12  IndustrialControlHMIControlsinDebugNationalInstruments.UI.styles3D.dll

     文件     303104  2007-06-02 00:02  IndustrialControlHMIControlsinDebugedGraph.dll

     文件     303104  2007-06-02 00:02  IndustrialControlHMIControlsdlledGraph.dll

     文件       5424  2018-02-26 09:56  IndustrialControlHMIControlsHMIControls.csproj

     文件      35634  2014-05-22 14:52  IndustrialControlHMIControlsimagesairmachine.jpg

     文件      35151  2014-05-23 09:52  IndustrialControlHMIControlsimagesairmachine_1.jpg

     文件        891  2014-05-26 10:22  IndustrialControlHMIControlsimagesarrow-down.png

     文件        834  2014-05-26 10:23  IndustrialControlHMIControlsimagesarrow-left.png

     文件        825  2014-05-23 09:58  IndustrialControlHMIControlsimagesarrow-right.png

     文件        877  2014-05-26 10:23  IndustrialControlHMIControlsimagesarrow-up.png

     文件       9814  2014-05-23 15:38  IndustrialControlHMIControlsimageswater-tank.jpg

     文件       9567  2014-05-26 10:18  IndustrialControlHMIControlsimageswater-tank_1.jpg

     文件      43940  2018-02-26 09:56  IndustrialControlHMIControlsobjDebugDesignTimeResolveAssemblyReferences.cache

     文件       7240  2018-02-26 10:02  IndustrialControlHMIControlsobjDebugDesignTimeResolveAssemblyReferencesInput.cache

     文件       5606  2014-12-11 22:11  IndustrialControlHMIControlsobjDebugGenerateResource.read.1.tlog

     文件       5986  2014-12-11 22:11  IndustrialControlHMIControlsobjDebugGenerateResource.write.1.tlog

     文件        180  2018-02-26 09:56  IndustrialControlHMIControlsobjDebugHMIControls.AirMachine.resources

     文件       4366  2018-02-26 09:56  IndustrialControlHMIControlsobjDebugHMIControls.csproj.FileListAbsolute.txt

     文件       1319  2018-02-26 10:02  IndustrialControlHMIControlsobjDebugHMIControls.csproj.GenerateResource.Cache

     文件      35003  2018-02-26 09:56  IndustrialControlHMIControlsobjDebugHMIControls.csprojResolveAssemblyReference.cache

     文件     160256  2018-02-26 10:02  IndustrialControlHMIControlsobjDebugHMIControls.dll

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

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)