chore: 初始化合力差速器MES采集程序
79
Common/MesControl/MesBoolSignal.Designer.cs
generated
Normal file
@@ -0,0 +1,79 @@
|
||||
namespace MesControl
|
||||
{
|
||||
partial class MesBoolSignal
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region 组件设计器生成的代码
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.pictureBox_Signal = new System.Windows.Forms.PictureBox();
|
||||
this.label_SignalName = new System.Windows.Forms.Label();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox_Signal)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// pictureBox_Signal
|
||||
//
|
||||
this.pictureBox_Signal.BackgroundImage = global::MesControl.Properties.Resources.none;
|
||||
this.pictureBox_Signal.Location = new System.Drawing.Point(3, 1);
|
||||
this.pictureBox_Signal.Name = "pictureBox_Signal";
|
||||
this.pictureBox_Signal.Size = new System.Drawing.Size(20, 20);
|
||||
this.pictureBox_Signal.TabIndex = 0;
|
||||
this.pictureBox_Signal.TabStop = false;
|
||||
//
|
||||
// label_SignalName
|
||||
//
|
||||
this.label_SignalName.AutoSize = true;
|
||||
this.label_SignalName.Font = new System.Drawing.Font("宋体", 12F);
|
||||
this.label_SignalName.Location = new System.Drawing.Point(32, 3);
|
||||
this.label_SignalName.MaximumSize = new System.Drawing.Size(72, 16);
|
||||
this.label_SignalName.MinimumSize = new System.Drawing.Size(72, 16);
|
||||
this.label_SignalName.Name = "label_SignalName";
|
||||
this.label_SignalName.Size = new System.Drawing.Size(72, 16);
|
||||
this.label_SignalName.TabIndex = 1;
|
||||
this.label_SignalName.Text = "心跳信号";
|
||||
//
|
||||
// MesBoolSignal
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.Transparent;
|
||||
this.Controls.Add(this.label_SignalName);
|
||||
this.Controls.Add(this.pictureBox_Signal);
|
||||
this.MaximumSize = new System.Drawing.Size(110, 22);
|
||||
this.MinimumSize = new System.Drawing.Size(110, 22);
|
||||
this.Name = "MesBoolSignal";
|
||||
this.Size = new System.Drawing.Size(110, 22);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox_Signal)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.PictureBox pictureBox_Signal;
|
||||
private System.Windows.Forms.Label label_SignalName;
|
||||
}
|
||||
}
|
||||
111
Common/MesControl/MesBoolSignal.cs
Normal file
@@ -0,0 +1,111 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace MesControl
|
||||
{
|
||||
public partial class MesBoolSignal : UserControl
|
||||
{
|
||||
public MesBoolSignal()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 外部调用控件触发的信号
|
||||
/// </summary>
|
||||
/// <param name="Signal"></param>
|
||||
public void InputBoolSignal(bool Signal)
|
||||
{
|
||||
|
||||
if (Signal)
|
||||
{
|
||||
|
||||
pictureBox_Signal.BackgroundImage = Properties.Resources.green;
|
||||
}
|
||||
else
|
||||
{
|
||||
pictureBox_Signal.BackgroundImage = Properties.Resources.init;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Browsable(true)]
|
||||
[Description("控件中显示的文本内容"), Category("SignalText"), DefaultValue("")]
|
||||
public string SignalText
|
||||
{
|
||||
get
|
||||
{
|
||||
return label_SignalName.Text;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
label_SignalName.Text = value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
SignalImage_Enum enum1;
|
||||
|
||||
[Browsable(true)]
|
||||
[Description("控件用于显示状态的图片"), Category("SignalImage"), DefaultValue("none")]
|
||||
public SignalImage_Enum SignalImage
|
||||
{
|
||||
get
|
||||
{
|
||||
return enum1;
|
||||
}
|
||||
set
|
||||
{
|
||||
SetSignalImage(value);
|
||||
enum1 = value;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public enum SignalImage_Enum
|
||||
{
|
||||
|
||||
none, init, green, yellow, red
|
||||
|
||||
}
|
||||
|
||||
void SetSignalImage(SignalImage_Enum Image)
|
||||
{
|
||||
switch (Image)
|
||||
{
|
||||
case SignalImage_Enum.none:
|
||||
pictureBox_Signal.BackgroundImage = Properties.Resources.none;
|
||||
break;
|
||||
case SignalImage_Enum.init:
|
||||
pictureBox_Signal.BackgroundImage = Properties.Resources.init;
|
||||
break;
|
||||
case SignalImage_Enum.green:
|
||||
pictureBox_Signal.BackgroundImage = Properties.Resources.green;
|
||||
break;
|
||||
case SignalImage_Enum.yellow:
|
||||
pictureBox_Signal.BackgroundImage = Properties.Resources.yellow;
|
||||
break;
|
||||
case SignalImage_Enum.red:
|
||||
pictureBox_Signal.BackgroundImage = Properties.Resources.red;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
126
Common/MesControl/MesBoolSignal.resx
Normal file
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="pictureBox_Signal.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="label_SignalName.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
||||
139
Common/MesControl/MesControl.csproj
Normal file
@@ -0,0 +1,139 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{FAB322CC-531D-4AEA-986A-B921B64D8D3F}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>MesControl</RootNamespace>
|
||||
<AssemblyName>MesControl</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="MesBoolSignal.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MesBoolSignal.Designer.cs">
|
||||
<DependentUpon>MesBoolSignal.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="PlcWorkStationSignal.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="PlcWorkStationSignal.Designer.cs">
|
||||
<DependentUpon>PlcWorkStationSignal.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="PlcConnect.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="PlcConnect.Designer.cs">
|
||||
<DependentUpon>PlcConnect.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SignalInit.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Service Include="{94E38DFF-614B-4cbd-B67C-F211BB35CE8B}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="MesBoolSignal.resx">
|
||||
<DependentUpon>MesBoolSignal.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="PlcWorkStationSignal.resx">
|
||||
<DependentUpon>PlcWorkStationSignal.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="PlcConnect.resx">
|
||||
<DependentUpon>PlcConnect.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\BreakPLC.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\green.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\init.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\none.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\PlcConnectBig.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\PlcConnectSmall.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\red.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\yellow.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\PlcConnect0.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\PlcConnect1.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\PlcConnect2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\PlcConnect3.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\PlcConnect4.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
81
Common/MesControl/PlcConnect.Designer.cs
generated
Normal file
@@ -0,0 +1,81 @@
|
||||
namespace MesControl
|
||||
{
|
||||
partial class PlcConnect
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region 组件设计器生成的代码
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.pictureBox_OpName = new System.Windows.Forms.PictureBox();
|
||||
this.label_OpName = new System.Windows.Forms.Label();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox_OpName)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// pictureBox_OpName
|
||||
//
|
||||
this.pictureBox_OpName.BackgroundImage = global::MesControl.Properties.Resources.BreakPLC;
|
||||
this.pictureBox_OpName.Location = new System.Drawing.Point(3, 1);
|
||||
this.pictureBox_OpName.MaximumSize = new System.Drawing.Size(20, 20);
|
||||
this.pictureBox_OpName.MinimumSize = new System.Drawing.Size(20, 20);
|
||||
this.pictureBox_OpName.Name = "pictureBox_OpName";
|
||||
this.pictureBox_OpName.Size = new System.Drawing.Size(20, 20);
|
||||
this.pictureBox_OpName.TabIndex = 0;
|
||||
this.pictureBox_OpName.TabStop = false;
|
||||
//
|
||||
// label_OpName
|
||||
//
|
||||
this.label_OpName.AutoSize = true;
|
||||
this.label_OpName.Font = new System.Drawing.Font("宋体", 12F);
|
||||
this.label_OpName.Location = new System.Drawing.Point(32, 3);
|
||||
this.label_OpName.MaximumSize = new System.Drawing.Size(72, 16);
|
||||
this.label_OpName.MinimumSize = new System.Drawing.Size(72, 16);
|
||||
this.label_OpName.Name = "label_OpName";
|
||||
this.label_OpName.Size = new System.Drawing.Size(72, 16);
|
||||
this.label_OpName.TabIndex = 1;
|
||||
this.label_OpName.Text = "通讯状态";
|
||||
//
|
||||
// PlcConnect
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.Transparent;
|
||||
this.Controls.Add(this.label_OpName);
|
||||
this.Controls.Add(this.pictureBox_OpName);
|
||||
this.MaximumSize = new System.Drawing.Size(110, 22);
|
||||
this.MinimumSize = new System.Drawing.Size(110, 22);
|
||||
this.Name = "PlcConnect";
|
||||
this.Size = new System.Drawing.Size(110, 22);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox_OpName)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.PictureBox pictureBox_OpName;
|
||||
private System.Windows.Forms.Label label_OpName;
|
||||
}
|
||||
}
|
||||
221
Common/MesControl/PlcConnect.cs
Normal file
@@ -0,0 +1,221 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace MesControl
|
||||
{
|
||||
public delegate void PlcStatusHandle();
|
||||
public partial class PlcConnect: UserControl
|
||||
{
|
||||
public PlcConnect()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
}
|
||||
public static PlcStatusHandle PlcBreakChange,PlcConnectChange;
|
||||
|
||||
|
||||
#region 内部变量
|
||||
int externalTimerTimes =0;
|
||||
|
||||
int testPlcBreakInterval=10000;
|
||||
|
||||
int testPlcBreakTime=0;
|
||||
|
||||
int externalTimerInterval = 200;
|
||||
|
||||
bool isBreakPLC = true;
|
||||
|
||||
bool plcTestEnable;
|
||||
|
||||
bool plcBreakIsChanged=false;
|
||||
bool plcConnectIsChanged = false;
|
||||
|
||||
#endregion
|
||||
#region 内部方法
|
||||
|
||||
void TimerTimeChange()
|
||||
{
|
||||
if (externalTimerTimes == 999)
|
||||
{
|
||||
externalTimerTimes = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
externalTimerTimes++;
|
||||
}
|
||||
|
||||
if (testPlcBreakTime > 0)
|
||||
{
|
||||
testPlcBreakTime--;
|
||||
plcBreakIsChanged = false;
|
||||
|
||||
if (PlcConnectChange!=null&&!plcConnectIsChanged)
|
||||
{
|
||||
PlcConnectChange();
|
||||
plcConnectIsChanged = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (plcTestEnable)
|
||||
{
|
||||
if(PlcBreakChange != null&& !plcBreakIsChanged)
|
||||
{
|
||||
PlcBreakChange();
|
||||
plcBreakIsChanged = true;
|
||||
}
|
||||
plcConnectIsChanged = false;
|
||||
}
|
||||
isBreakPLC = true;
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 外部方法
|
||||
public void ExternalTimer()
|
||||
{
|
||||
|
||||
if (!isBreakPLC)
|
||||
{
|
||||
switch (externalTimerTimes % 5)
|
||||
{
|
||||
case 0:
|
||||
pictureBox_OpName.BackgroundImage = Properties.Resources.PlcConnect0;
|
||||
break;
|
||||
case 1:
|
||||
pictureBox_OpName.BackgroundImage = Properties.Resources.PlcConnect1;
|
||||
break;
|
||||
case 2:
|
||||
pictureBox_OpName.BackgroundImage = Properties.Resources.PlcConnect2;
|
||||
break;
|
||||
case 3:
|
||||
pictureBox_OpName.BackgroundImage = Properties.Resources.PlcConnect3;
|
||||
break;
|
||||
case 4:
|
||||
pictureBox_OpName.BackgroundImage = Properties.Resources.PlcConnect4;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pictureBox_OpName.BackgroundImage = Properties.Resources.BreakPLC;
|
||||
}
|
||||
|
||||
|
||||
TimerTimeChange();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void ExternalPlcConnect()
|
||||
{
|
||||
testPlcBreakTime = (testPlcBreakInterval / externalTimerInterval) + 1;
|
||||
isBreakPLC = false;
|
||||
|
||||
}
|
||||
|
||||
public void PlcBreak()
|
||||
{
|
||||
pictureBox_OpName.BackgroundImage = Properties.Resources.BreakPLC;
|
||||
isBreakPLC = true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 属性
|
||||
|
||||
[Browsable(true)]
|
||||
[Description("控件中显示的文本内容"), Category("外观"), DefaultValue("OP0000")]
|
||||
public string LabelText
|
||||
{
|
||||
get
|
||||
{
|
||||
return label_OpName.Text;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
label_OpName.Text = value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
[Browsable(true)]
|
||||
[Description("外部定时器周期"), Category("行为"), DefaultValue("200")]
|
||||
public int ExternalTimerInterval
|
||||
{
|
||||
get
|
||||
{
|
||||
return externalTimerInterval;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
externalTimerInterval = value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Browsable(true)]
|
||||
[Description("检测PLC在线状态超时,超过此时间,PLC为离线状态"), Category("行为"), DefaultValue("200")]
|
||||
public int TestPlcBreakInterval
|
||||
{
|
||||
get
|
||||
{
|
||||
return testPlcBreakInterval;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
testPlcBreakInterval = value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Browsable(true)]
|
||||
[Description("指示PLC是否为断开状态"), Category("行为"), DefaultValue("True")]
|
||||
public bool IsBreakPLC
|
||||
{
|
||||
get
|
||||
{
|
||||
return isBreakPLC;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
isBreakPLC = value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Browsable(true)]
|
||||
[Description("是否启用检测PLC在线状态功能"), Category("行为"), DefaultValue("True")]
|
||||
public bool PlcTestEnable
|
||||
{
|
||||
get
|
||||
{
|
||||
return plcTestEnable;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
plcTestEnable = value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
129
Common/MesControl/PlcConnect.resx
Normal file
@@ -0,0 +1,129 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="pictureBox_OpName.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="label_OpName.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
||||
80
Common/MesControl/PlcWorkStationSignal.Designer.cs
generated
Normal file
@@ -0,0 +1,80 @@
|
||||
namespace MesControl
|
||||
{
|
||||
partial class PlcWorkStationSignal
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region 组件设计器生成的代码
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.groupBox_WorkStationGrp = new System.Windows.Forms.GroupBox();
|
||||
this.plcConnect_WorkStation = new MesControl.PlcConnect();
|
||||
this.groupBox_WorkStationGrp.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// groupBox_WorkStationGrp
|
||||
//
|
||||
this.groupBox_WorkStationGrp.BackColor = System.Drawing.Color.Transparent;
|
||||
this.groupBox_WorkStationGrp.Controls.Add(this.plcConnect_WorkStation);
|
||||
this.groupBox_WorkStationGrp.Location = new System.Drawing.Point(4, 4);
|
||||
this.groupBox_WorkStationGrp.Name = "groupBox_WorkStationGrp";
|
||||
this.groupBox_WorkStationGrp.Size = new System.Drawing.Size(125, 50);
|
||||
this.groupBox_WorkStationGrp.TabIndex = 0;
|
||||
this.groupBox_WorkStationGrp.TabStop = false;
|
||||
this.groupBox_WorkStationGrp.Text = "OP0000";
|
||||
//
|
||||
// plcConnect_WorkStation
|
||||
//
|
||||
this.plcConnect_WorkStation.BackColor = System.Drawing.Color.Transparent;
|
||||
this.plcConnect_WorkStation.ExternalTimerInterval = 200;
|
||||
this.plcConnect_WorkStation.IsBreakPLC = false;
|
||||
this.plcConnect_WorkStation.LabelText = "通讯状态";
|
||||
this.plcConnect_WorkStation.Location = new System.Drawing.Point(7, 21);
|
||||
this.plcConnect_WorkStation.MaximumSize = new System.Drawing.Size(110, 22);
|
||||
this.plcConnect_WorkStation.MinimumSize = new System.Drawing.Size(110, 22);
|
||||
this.plcConnect_WorkStation.Name = "plcConnect_WorkStation";
|
||||
this.plcConnect_WorkStation.PlcTestEnable = false;
|
||||
this.plcConnect_WorkStation.Size = new System.Drawing.Size(110, 22);
|
||||
this.plcConnect_WorkStation.TabIndex = 0;
|
||||
this.plcConnect_WorkStation.TestPlcBreakInterval = 0;
|
||||
//
|
||||
// PlcWorkStationSignal
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.Transparent;
|
||||
this.Controls.Add(this.groupBox_WorkStationGrp);
|
||||
this.Name = "PlcWorkStationSignal";
|
||||
this.Size = new System.Drawing.Size(136, 60);
|
||||
this.groupBox_WorkStationGrp.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.GroupBox groupBox_WorkStationGrp;
|
||||
private PlcConnect plcConnect_WorkStation;
|
||||
}
|
||||
}
|
||||
225
Common/MesControl/PlcWorkStationSignal.cs
Normal file
@@ -0,0 +1,225 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace MesControl
|
||||
{
|
||||
public delegate void WorkStationPlcBreakChanged();
|
||||
public partial class PlcWorkStationSignal : UserControl
|
||||
{
|
||||
public PlcWorkStationSignal()
|
||||
{
|
||||
InitializeComponent();
|
||||
PlcConnect.PlcBreakChange = new PlcStatusHandle(internalPlcBreak);
|
||||
PlcConnect.PlcConnectChange = new PlcStatusHandle(internalPlcConnect);
|
||||
|
||||
}
|
||||
|
||||
public EventHandler WorkStationPlcStatusChange;
|
||||
|
||||
#region 工位信号方法与属性
|
||||
|
||||
public void InitSignalControl()
|
||||
{
|
||||
|
||||
|
||||
for (int i = 0; i < SignalItems.Count; i++)
|
||||
{
|
||||
|
||||
MesBoolSignal mesBoolSignalNew = new MesBoolSignal();
|
||||
this.groupBox_WorkStationGrp.Controls.Add(mesBoolSignalNew);//扩展GroupBox
|
||||
mesBoolSignalNew.BackColor = System.Drawing.Color.Transparent;
|
||||
mesBoolSignalNew.Location = new System.Drawing.Point(7, 46 + (25 * i));
|
||||
mesBoolSignalNew.Name = SignalItems[i].Name;
|
||||
mesBoolSignalNew.SignalImage = MesBoolSignal.SignalImage_Enum.none;
|
||||
mesBoolSignalNew.SignalText = SignalItems[i].SignalText;
|
||||
mesBoolSignalNew.Size = new System.Drawing.Size(110, 22);
|
||||
mesBoolSignalNew.TabIndex = i;
|
||||
|
||||
}
|
||||
|
||||
//groupbox大小
|
||||
groupBox_WorkStationGrp.Size = new Size(125, 50 + (SignalItems.Count * 25));
|
||||
//控件大小
|
||||
this.Size = new Size(136, 60 + (SignalItems.Count * 25));
|
||||
|
||||
}
|
||||
|
||||
private List<MesBoolSignal> signalItems = new List<MesBoolSignal>();
|
||||
[Browsable(true)]
|
||||
[Description("MES信号控件集合"), Category("数据")]
|
||||
[TypeConverter(typeof(System.ComponentModel.CollectionConverter))]
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
|
||||
public List<MesBoolSignal> SignalItems
|
||||
{
|
||||
get
|
||||
{
|
||||
return signalItems;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
signalItems = value;
|
||||
InitSignalControl();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///更改工位各个信号状态(默认)
|
||||
/// </summary>
|
||||
/// <param name="SignalName"></param>
|
||||
/// <param name="Value"></param>
|
||||
public void SignalChange(string SignalName, bool Value)
|
||||
{
|
||||
MesBoolSignal thisControl = (MesBoolSignal)Controls.Find(SignalName, true)[0];
|
||||
if (thisControl != null)
|
||||
thisControl.SignalImage = Value ? MesBoolSignal.SignalImage_Enum.green : MesBoolSignal.SignalImage_Enum.init;
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region PLC在线状态属性与方法
|
||||
|
||||
///////////////////////////////////////////////方法///////////////////////////////////////////////////
|
||||
|
||||
public void PlcConnectStatusChange(bool value)
|
||||
{
|
||||
plcConnect_WorkStation.ExternalPlcConnect();
|
||||
|
||||
}
|
||||
public void ExternalTimerExcute()
|
||||
{
|
||||
plcConnect_WorkStation.ExternalTimer();
|
||||
}
|
||||
|
||||
public void PlcBreak()
|
||||
{
|
||||
plcConnect_WorkStation.PlcBreak();
|
||||
}
|
||||
|
||||
void internalPlcBreak()
|
||||
{
|
||||
if (WorkStationPlcStatusChange != null)
|
||||
{
|
||||
WorkStationPlcStatusChange(groupBox_WorkStationGrp.Text+"&Breaked",null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void internalPlcConnect()
|
||||
{
|
||||
if (WorkStationPlcStatusChange != null)
|
||||
{
|
||||
WorkStationPlcStatusChange(groupBox_WorkStationGrp.Text + "&Connected", null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////属性///////////////////////////////////////////////
|
||||
|
||||
[Browsable(true)]
|
||||
[Description("检测PLC在线状态开关"), Category("行为"), DefaultValue(true)]
|
||||
public bool TestPLC_Enable
|
||||
{
|
||||
get
|
||||
{
|
||||
return plcConnect_WorkStation.PlcTestEnable;
|
||||
}
|
||||
set
|
||||
{
|
||||
plcConnect_WorkStation.PlcTestEnable = value;
|
||||
}
|
||||
}
|
||||
|
||||
[Browsable(true)]
|
||||
[Description("PLC心跳超时(超过此时间认为PLC离线)"), Category("行为"), DefaultValue(10000)]
|
||||
public int TestPLC_Interval
|
||||
{
|
||||
get
|
||||
{
|
||||
return plcConnect_WorkStation.TestPlcBreakInterval;
|
||||
}
|
||||
set
|
||||
{
|
||||
|
||||
plcConnect_WorkStation.TestPlcBreakInterval = value;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Browsable(true)]
|
||||
[Description("外部定时器循环时间"), Category("行为"), DefaultValue(200)]
|
||||
public int ExternalTimerInterval
|
||||
{
|
||||
get
|
||||
{
|
||||
return plcConnect_WorkStation.ExternalTimerInterval;
|
||||
}
|
||||
set
|
||||
{
|
||||
plcConnect_WorkStation.ExternalTimerInterval = value;
|
||||
}
|
||||
}
|
||||
|
||||
[Browsable(true)]
|
||||
[Description("PLC在线状态"), Category("行为"), DefaultValue(false)]
|
||||
public bool PLC_ConnectStatus
|
||||
{
|
||||
get
|
||||
{
|
||||
return plcConnect_WorkStation.IsBreakPLC;
|
||||
}
|
||||
set
|
||||
{
|
||||
plcConnect_WorkStation.IsBreakPLC = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 当前控件方法与属性
|
||||
|
||||
[Browsable(true)]
|
||||
[Description("控件显示的工位号"), Category("外观"), DefaultValue("OP0000")]
|
||||
public string WorkStationNameText
|
||||
{
|
||||
get
|
||||
{
|
||||
return groupBox_WorkStationGrp.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
groupBox_WorkStationGrp.Text = value;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Browsable(true)]
|
||||
[Description("控件中plc通讯显示的文本内容"), Category("外观"), DefaultValue("PLC连接")]
|
||||
public string WS_PlcLabelText
|
||||
{
|
||||
get
|
||||
{
|
||||
return plcConnect_WorkStation.LabelText ;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
plcConnect_WorkStation.LabelText = value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
123
Common/MesControl/PlcWorkStationSignal.resx
Normal file
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="plcConnect_WorkStation.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
||||
36
Common/MesControl/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("MesControl")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("MesControl")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2017")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
//将 ComVisible 设置为 false 将使此程序集中的类型
|
||||
//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("fab322cc-531d-4aea-986a-b921b64d8d3f")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
|
||||
// 方法是按如下所示使用“*”: :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
193
Common/MesControl/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,193 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MesControl.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 一个强类型的资源类,用于查找本地化的字符串等。
|
||||
/// </summary>
|
||||
// 此类是由 StronglyTypedResourceBuilder
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回此类使用的缓存的 ResourceManager 实例。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MesControl.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重写当前线程的 CurrentUICulture 属性
|
||||
/// 重写当前线程的 CurrentUICulture 属性。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap BreakPLC {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("BreakPLC", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap green {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("green", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap init {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("init", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap none {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("none", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap PlcConnect0 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("PlcConnect0", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap PlcConnect1 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("PlcConnect1", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap PlcConnect2 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("PlcConnect2", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap PlcConnect3 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("PlcConnect3", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap PlcConnect4 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("PlcConnect4", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap PlcConnectBig {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("PlcConnectBig", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap PlcConnectSmall {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("PlcConnectSmall", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap red {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("red", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap yellow {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("yellow", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
160
Common/MesControl/Properties/Resources.resx
Normal file
@@ -0,0 +1,160 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="red" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\red.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="yellow" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\yellow.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="PlcConnect1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\PlcConnect1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="PlcConnect0" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\PlcConnect0.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="PlcConnect3" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\PlcConnect3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="none" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\none.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="PlcConnectSmall" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\PlcConnectSmall.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="PlcConnect2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\PlcConnect2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="init" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\init.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="PlcConnectBig" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\PlcConnectBig.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="BreakPLC" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\BreakPLC.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="green" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\green.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="PlcConnect4" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\PlcConnect4.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
0
Common/MesControl/Properties/_system~.ini
Normal file
BIN
Common/MesControl/Resources/BreakPLC.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
Common/MesControl/Resources/PlcConnect0.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
Common/MesControl/Resources/PlcConnect1.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
Common/MesControl/Resources/PlcConnect2.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
Common/MesControl/Resources/PlcConnect3.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
Common/MesControl/Resources/PlcConnect4.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
Common/MesControl/Resources/PlcConnectBig.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
Common/MesControl/Resources/PlcConnectSmall.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
0
Common/MesControl/Resources/_system~.ini
Normal file
BIN
Common/MesControl/Resources/green.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
Common/MesControl/Resources/init.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
Common/MesControl/Resources/none.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
Common/MesControl/Resources/red.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
Common/MesControl/Resources/yellow.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
37
Common/MesControl/SignalInit.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace MesControl
|
||||
{
|
||||
public partial class PlcWorkStationSignal
|
||||
{
|
||||
void initsignal()
|
||||
{
|
||||
//private PlcConnect plcConnect_WorkStation;
|
||||
//this.plcConnect_WorkStation = new MesControl.PlcConnect();
|
||||
//this.groupBox_WorkStationGrp.Controls.Add(this.plcConnect_WorkStation);
|
||||
|
||||
////
|
||||
//// plcConnect_WorkStation
|
||||
////
|
||||
//this.plcConnect_WorkStation.BackColor = System.Drawing.Color.Transparent;
|
||||
//this.plcConnect_WorkStation.ExternalTimerInterval = 200;
|
||||
//this.plcConnect_WorkStation.IsBreakPLC = false;
|
||||
//this.plcConnect_WorkStation.LabelText = "通讯状态";
|
||||
//this.plcConnect_WorkStation.Location = new System.Drawing.Point(7, 21);
|
||||
//this.plcConnect_WorkStation.MaximumSize = new System.Drawing.Size(110, 22);
|
||||
//this.plcConnect_WorkStation.MinimumSize = new System.Drawing.Size(110, 22);
|
||||
//this.plcConnect_WorkStation.Name = "plcConnect_WorkStation";
|
||||
//this.plcConnect_WorkStation.PlcTestEnable = false;
|
||||
//this.plcConnect_WorkStation.Size = new System.Drawing.Size(110, 22);
|
||||
//this.plcConnect_WorkStation.TabIndex = 0;
|
||||
//this.plcConnect_WorkStation.TestPlcBreakInterval = 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||