change - plc点位标注

master
wenjy 1 year ago
parent a1d32cd167
commit fad533557a

@ -0,0 +1,61 @@
namespace Mesnac.Controls.ChemicalWeighing
{
partial class ControlCabinet
{
/// <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.pictureBox1 = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// pictureBox1
//
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBox1.Location = new System.Drawing.Point(0, 0);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(150, 150);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
//
// ControlCabinet
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.pictureBox1);
this.Name = "ControlCabinet";
this.Load += new System.EventHandler(this.ControlCabinet_Load);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.PictureBox pictureBox1;
}
}

@ -0,0 +1,139 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Mesnac.Controls.ChemicalWeighing
{
[ToolboxBitmap(typeof(ControlCabinet), "Resources.controlCabinet.png")]
public partial class ControlCabinet : ChemicalWeighingControl
{
public enum Statuses
{
TurnOff = 0,
TurnOn = 1
}
private bool bNewPic = false;
private string _statusName;
//private object _textName = string.Empty;
private Statuses _status;
private string[] sImages;
public ControlCabinet() : base()
{
InitializeComponent();
Init();
ReloadStream();
this.Reload();
}
protected override void Init()
{
base.Init();
_imageStream = null;
sImages = new string[2];
sImages[0] = "Mesnac.Controls.ChemicalWeighing.Resources.controlCabinet.png";//zsTurnOff
sImages[1] = "Mesnac.Controls.ChemicalWeighing.Resources.controlCabinet1.png";//zsTurnOn
_status = Statuses.TurnOff;
}
private void ReloadStream()
{
int nIndex = (int)_status;
_imageStream = _assembly.GetManifestResourceStream(sImages[nIndex]);
}
public string StatusName
{
get
{
return _statusName;
}
set
{
_statusName = value;
}
}
public Statuses Status
{
get
{
return _status;
}
set
{
if (bFirstCreated == true)
{
bFirstCreated = false;
}
bool flag = false;
//if (_status != value &&(this.Size.Width != 150 || this.Size.Height != 150) )
if (_status != value)
{
flag = true;
if (this.DesignMode == true)
{
bNewPic = true;
}
}
if ((int)value < 0)
{
_status = (Statuses)0;
}
else if ((int)value > 1)
{
_status = (Statuses)1;
}
else
{
_status = value;
}
if (flag)
{
ReloadStream();
Reload();
this.Refresh();
}
}
}
private void Reload()
{
if (_imageStream != null)
{
Image img = Image.FromStream(_imageStream);
Size size = new Size();
size.Width = 29;
size.Height = 24;
this.Size = size;
if (bNewPic == true)
{
this.Size = size;
bNewPic = false;
}
pictureBox1.Image = img;
pictureBox1.Refresh();
}
}
private void ControlCabinet_Load(object sender, EventArgs e)
{
if (bFirstCreated == true && this.DesignMode == true)
{
bNewPic = true;
bFirstCreated = false;
Reload();
}
}
}
}

@ -0,0 +1,120 @@
<?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>
</root>

@ -71,6 +71,12 @@
<Compile Include="BeiLiaoTong.Designer.cs"> <Compile Include="BeiLiaoTong.Designer.cs">
<DependentUpon>BeiLiaoTong.cs</DependentUpon> <DependentUpon>BeiLiaoTong.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="ControlCabinet.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="ControlCabinet.Designer.cs">
<DependentUpon>ControlCabinet.cs</DependentUpon>
</Compile>
<Compile Include="DistributionBox.cs"> <Compile Include="DistributionBox.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
@ -375,6 +381,9 @@
<DependentUpon>BeiLiaoTong.cs</DependentUpon> <DependentUpon>BeiLiaoTong.cs</DependentUpon>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="ControlCabinet.resx">
<DependentUpon>ControlCabinet.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DistributionBox.resx"> <EmbeddedResource Include="DistributionBox.resx">
<DependentUpon>DistributionBox.cs</DependentUpon> <DependentUpon>DistributionBox.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
@ -607,6 +616,9 @@
<EmbeddedResource Include="Resources\leftTong.png" /> <EmbeddedResource Include="Resources\leftTong.png" />
<EmbeddedResource Include="Resources\rightTong.png" /> <EmbeddedResource Include="Resources\rightTong.png" />
<EmbeddedResource Include="Resources\fenchaxian.png" /> <EmbeddedResource Include="Resources\fenchaxian.png" />
<EmbeddedResource Include="Resources\controlCabinet.png" />
<EmbeddedResource Include="Resources\controlCabinet0.png" />
<EmbeddedResource Include="Resources\controlCabinet1.png" />
<Content Include="Resources\prepareHopperRight.png" /> <Content Include="Resources\prepareHopperRight.png" />
<Content Include="Resources\prepareHopperLeft.png" /> <Content Include="Resources\prepareHopperLeft.png" />
<Content Include="Resources\fay.png" /> <Content Include="Resources\fay.png" />

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

@ -408,5 +408,11 @@
<Property Name="StatusName" Caption="Status" Group="Animation" ControlPropertyName="Status"/> <Property Name="StatusName" Caption="Status" Group="Animation" ControlPropertyName="Status"/>
</Propertys> </Propertys>
</Component> </Component>
<Component Name="ControlCabinet" Namespace="Mesnac.Controls.ChemicalWeighing" Asm="Mesnac.Controls.ChemicalWeighing.dll">
<Propertys>
<Property Name="StatusName" Caption="Status" Group="Animation" ControlPropertyName="Status"/>
</Propertys>
</Component>
</Components> </Components>

@ -408,8 +408,14 @@
</Propertys> </Propertys>
</Component> </Component>
<Component Name="ControlCabinet" Namespace="Mesnac.Controls.ChemicalWeighing" Asm="Mesnac.Controls.ChemicalWeighing.dll">
<Propertys>
<Property Name="StatusName" Caption="状态" Group="动画" ControlPropertyName="Status"/>
</Propertys>
</Component>
<!--״̬ÏÔʾ°´Å¥--> <!--状态显示按钮-->
<Component Name="ThreeWayValve" Namespace="Mesnac.Controls.ChemicalWeighing" Asm="Mesnac.Controls.ChemicalWeighing.dll"> <Component Name="ThreeWayValve" Namespace="Mesnac.Controls.ChemicalWeighing" Asm="Mesnac.Controls.ChemicalWeighing.dll">
<Propertys> <Propertys>
<Property Name="ZLTName" Caption="斜通到位" Group="控制阀门" ControlPropertyName="ZLTValue"/> <Property Name="ZLTName" Caption="斜通到位" Group="控制阀门" ControlPropertyName="ZLTValue"/>

@ -1402,6 +1402,16 @@
<DataBinding></DataBinding> <DataBinding></DataBinding>
</Component> </Component>
<Component Name="ControlCabinet" Namespace="Mesnac.Controls.ChemicalWeighing" Asm="Mesnac.Controls.ChemicalWeighing.dll">
<Propertys>
<Property Name="Location" Caption="位置" Group=""/>
<Property Name="Name" Caption="名称" Group=""/>
<Property Name="Size" Caption="大小" Group=""/>
<Property Name="Status" Caption="状态" Group=""/>
</Propertys>
<DataBinding></DataBinding>
</Component>
<Component Name="SheBei" Namespace="Mesnac.Controls.ChemicalWeighing" Asm="Mesnac.Controls.ChemicalWeighing.dll"> <Component Name="SheBei" Namespace="Mesnac.Controls.ChemicalWeighing" Asm="Mesnac.Controls.ChemicalWeighing.dll">
<Propertys> <Propertys>
<Property Name="Location" Caption="λÖÃ" Group=""/> <Property Name="Location" Caption="λÖÃ" Group=""/>

File diff suppressed because it is too large Load Diff

@ -93,6 +93,7 @@
<ToolComponent chineseName="Diverter" assembly="4" enabled="True" class="Mesnac.Controls.Feeding.Diverter" /> <ToolComponent chineseName="Diverter" assembly="4" enabled="True" class="Mesnac.Controls.Feeding.Diverter" />
<ToolComponent chineseName="Jzf" assembly="4" enabled="True" class="Mesnac.Controls.Feeding.Jzf" /> <ToolComponent chineseName="Jzf" assembly="4" enabled="True" class="Mesnac.Controls.Feeding.Jzf" />
<ToolComponent chineseName="clfbdcf" assembly="4" enabled="True" class="Mesnac.Controls.Feeding.clfbdcf" /> <ToolComponent chineseName="clfbdcf" assembly="4" enabled="True" class="Mesnac.Controls.Feeding.clfbdcf" />
<ToolComponent chineseName="ControlCabinet" assembly="4" enabled="True" class="Mesnac.Controls.Feeding.ControlCabinet" />
</Category> </Category>
</Categories> </Categories>

@ -138,6 +138,7 @@
<ToolComponent chineseName="榄菊右侧投料口" assembly="3" enabled="True" class="Mesnac.Controls.ChemicalWeighing.FeedingPortRight" /> <ToolComponent chineseName="榄菊右侧投料口" assembly="3" enabled="True" class="Mesnac.Controls.ChemicalWeighing.FeedingPortRight" />
<ToolComponent chineseName="榄菊左侧备料斗" assembly="3" enabled="True" class="Mesnac.Controls.ChemicalWeighing.PrepareHopperLeft" /> <ToolComponent chineseName="榄菊左侧备料斗" assembly="3" enabled="True" class="Mesnac.Controls.ChemicalWeighing.PrepareHopperLeft" />
<ToolComponent chineseName="榄菊右侧备料斗" assembly="3" enabled="True" class="Mesnac.Controls.ChemicalWeighing.PrepareHopperRight" /> <ToolComponent chineseName="榄菊右侧备料斗" assembly="3" enabled="True" class="Mesnac.Controls.ChemicalWeighing.PrepareHopperRight" />
<ToolComponent chineseName="脉冲控制柜" assembly="3" enabled="True" class="Mesnac.Controls.ChemicalWeighing.ControlCabinet" />
<!--Add end--> <!--Add end-->
</Category> </Category>

Loading…
Cancel
Save