Commit b5267af2 authored by shaxuezheng's avatar shaxuezheng
parent 9141e4ff
namespace ModbusDemo
{
partial class ComPort
{
/// <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.label7 = new System.Windows.Forms.Label();
this.labPort = new System.Windows.Forms.Label();
this.cmbPort = new System.Windows.Forms.ComboBox();
this.cmbStopBit = new System.Windows.Forms.ComboBox();
this.btCloseCOM = new System.Windows.Forms.Button();
this.cmbParity = new System.Windows.Forms.ComboBox();
this.btOpenCOM = new System.Windows.Forms.Button();
this.cmbDataBit = new System.Windows.Forms.ComboBox();
this.labStopBit = new System.Windows.Forms.Label();
this.labParity = new System.Windows.Forms.Label();
this.labBaud = new System.Windows.Forms.Label();
this.labDataBit = new System.Windows.Forms.Label();
this.cmbBaud = new System.Windows.Forms.ComboBox();
this.SuspendLayout();
//
// label7
//
this.label7.Font = new System.Drawing.Font("Arial", 8F);
this.label7.ForeColor = System.Drawing.Color.Blue;
this.label7.Location = new System.Drawing.Point(3, 17);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(140, 17);
this.label7.TabIndex = 47;
this.label7.Text = "Connection Status";
//
// labPort
//
this.labPort.Font = new System.Drawing.Font("Arial", 8F);
this.labPort.Location = new System.Drawing.Point(3, 34);
this.labPort.Name = "labPort";
this.labPort.Size = new System.Drawing.Size(75, 15);
this.labPort.TabIndex = 53;
this.labPort.Text = "COM Port";
this.labPort.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// cmbPort
//
this.cmbPort.Font = new System.Drawing.Font("Arial", 8F);
this.cmbPort.Location = new System.Drawing.Point(3, 49);
this.cmbPort.Name = "cmbPort";
this.cmbPort.Size = new System.Drawing.Size(75, 22);
this.cmbPort.TabIndex = 52;
//
// cmbStopBit
//
this.cmbStopBit.Font = new System.Drawing.Font("Arial", 8F);
this.cmbStopBit.Items.AddRange(new object[] {
"1",
"2"});
this.cmbStopBit.Location = new System.Drawing.Point(337, 49);
this.cmbStopBit.Name = "cmbStopBit";
this.cmbStopBit.Size = new System.Drawing.Size(56, 22);
this.cmbStopBit.TabIndex = 57;
//
// btCloseCOM
//
this.btCloseCOM.Enabled = false;
this.btCloseCOM.Font = new System.Drawing.Font("Arial", 8F);
this.btCloseCOM.Location = new System.Drawing.Point(315, 75);
this.btCloseCOM.Name = "btCloseCOM";
this.btCloseCOM.Size = new System.Drawing.Size(78, 23);
this.btCloseCOM.TabIndex = 59;
this.btCloseCOM.Text = "Close";
this.btCloseCOM.Click += new System.EventHandler(this.btCloseCOM_Click);
//
// cmbParity
//
this.cmbParity.Font = new System.Drawing.Font("Arial", 8F);
this.cmbParity.Items.AddRange(new object[] {
"0-None Parity",
"1-Odd Parity",
"2-Even Parity"});
this.cmbParity.Location = new System.Drawing.Point(224, 49);
this.cmbParity.Name = "cmbParity";
this.cmbParity.Size = new System.Drawing.Size(100, 22);
this.cmbParity.TabIndex = 56;
//
// btOpenCOM
//
this.btOpenCOM.Font = new System.Drawing.Font("Arial", 8F);
this.btOpenCOM.Location = new System.Drawing.Point(224, 75);
this.btOpenCOM.Name = "btOpenCOM";
this.btOpenCOM.Size = new System.Drawing.Size(78, 23);
this.btOpenCOM.TabIndex = 58;
this.btOpenCOM.Text = "Open";
this.btOpenCOM.Click += new System.EventHandler(this.btOpenCOM_Click);
//
// cmbDataBit
//
this.cmbDataBit.Font = new System.Drawing.Font("Arial", 8F);
this.cmbDataBit.Items.AddRange(new object[] {
"7",
"8"});
this.cmbDataBit.Location = new System.Drawing.Point(168, 49);
this.cmbDataBit.Name = "cmbDataBit";
this.cmbDataBit.Size = new System.Drawing.Size(48, 22);
this.cmbDataBit.TabIndex = 55;
//
// labStopBit
//
this.labStopBit.Font = new System.Drawing.Font("Arial", 8F);
this.labStopBit.Location = new System.Drawing.Point(337, 34);
this.labStopBit.Name = "labStopBit";
this.labStopBit.Size = new System.Drawing.Size(56, 15);
this.labStopBit.TabIndex = 60;
this.labStopBit.Text = "Stop Bit";
this.labStopBit.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// labParity
//
this.labParity.Font = new System.Drawing.Font("Arial", 8F);
this.labParity.Location = new System.Drawing.Point(226, 34);
this.labParity.Name = "labParity";
this.labParity.Size = new System.Drawing.Size(98, 15);
this.labParity.TabIndex = 61;
this.labParity.Text = "Parity";
this.labParity.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// labBaud
//
this.labBaud.Font = new System.Drawing.Font("Arial", 8F);
this.labBaud.Location = new System.Drawing.Point(84, 34);
this.labBaud.Name = "labBaud";
this.labBaud.Size = new System.Drawing.Size(75, 15);
this.labBaud.TabIndex = 62;
this.labBaud.Text = "Baudrate";
this.labBaud.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// labDataBit
//
this.labDataBit.Font = new System.Drawing.Font("Arial", 8F);
this.labDataBit.Location = new System.Drawing.Point(168, 34);
this.labDataBit.Name = "labDataBit";
this.labDataBit.Size = new System.Drawing.Size(48, 15);
this.labDataBit.TabIndex = 63;
this.labDataBit.Text = "Data Bit";
this.labDataBit.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// cmbBaud
//
this.cmbBaud.Font = new System.Drawing.Font("Arial", 8F);
this.cmbBaud.Items.AddRange(new object[] {
"1200",
"2400",
"4800",
"9600",
"19200",
"38400",
"57600",
"115200"});
this.cmbBaud.Location = new System.Drawing.Point(83, 49);
this.cmbBaud.Name = "cmbBaud";
this.cmbBaud.Size = new System.Drawing.Size(76, 22);
this.cmbBaud.TabIndex = 54;
//
// ComPort
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.cmbStopBit);
this.Controls.Add(this.btCloseCOM);
this.Controls.Add(this.cmbParity);
this.Controls.Add(this.btOpenCOM);
this.Controls.Add(this.cmbDataBit);
this.Controls.Add(this.labStopBit);
this.Controls.Add(this.labParity);
this.Controls.Add(this.labBaud);
this.Controls.Add(this.labDataBit);
this.Controls.Add(this.cmbBaud);
this.Controls.Add(this.labPort);
this.Controls.Add(this.cmbPort);
this.Controls.Add(this.label7);
this.Name = "ComPort";
this.Size = new System.Drawing.Size(400, 106);
this.Load += new System.EventHandler(this.ComPort_Load);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label labPort;
private System.Windows.Forms.ComboBox cmbPort;
private System.Windows.Forms.ComboBox cmbStopBit;
private System.Windows.Forms.Button btCloseCOM;
private System.Windows.Forms.ComboBox cmbParity;
private System.Windows.Forms.Button btOpenCOM;
private System.Windows.Forms.ComboBox cmbDataBit;
private System.Windows.Forms.Label labStopBit;
private System.Windows.Forms.Label labParity;
private System.Windows.Forms.Label labBaud;
private System.Windows.Forms.Label labDataBit;
private System.Windows.Forms.ComboBox cmbBaud;
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO.Ports;
namespace ModbusDemo
{
public partial class ComPort : UserControl
{
public ComPort()
{
InitializeComponent();
System.Windows.Forms.Control.CheckForIllegalCrossThreadCalls = false;//设置该属性 为false
}
private byte slaveID = 1;
private SerialPort comPort = new SerialPort();
private void ComPort_Load(object sender, EventArgs e)
{
cmbBaud.SelectedIndex = 7;
cmbDataBit.SelectedIndex = 1;
cmbParity.SelectedIndex = 0;
cmbStopBit.SelectedIndex = 0;
foreach (string s in SerialPort.GetPortNames())
cmbPort.Items.Add(s);
cmbPort.SelectedIndex = -1;
}
private void btOpenCOM_Click(object sender, EventArgs e)
{
if (cmbPort.Text == "")
{
MessageBox.Show("串口打开错误");
return;
}
comPort.PortName = cmbPort.Text;
comPort.BaudRate = int.Parse(cmbBaud.Text);
comPort.DataBits = int.Parse(cmbDataBit.Text);
if (cmbParity.Text.Substring(0, 1) == "0")
{
comPort.Parity = Parity.None;
}
else if (cmbParity.Text.Substring(0, 1) == "1")
{
comPort.Parity = Parity.Odd;
}
else if (cmbParity.Text.Substring(0, 1) == "2")
{
comPort.Parity = Parity.Even;
}
if (cmbStopBit.Text == "0")
{
comPort.StopBits = StopBits.None;
}
else if (cmbStopBit.Text == "1")
{
comPort.StopBits = StopBits.One;
}
try
{
comPort.Open();
//comPort.Write("01 03 00 00 00 05 85 C9");//写数据
comPort.DataReceived += new SerialDataReceivedEventHandler(post_DataReceived);//串口接收处理函数
btOpenCOM.Enabled = false;
btCloseCOM.Enabled = true;
Console.WriteLine(DateTime.Now.ToString() + " =>Open " + comPort.PortName + " sucessfully!");
//MessageBox.Show(DateTime.Now.ToString() + System.Environment.NewLine + " =>Open " + comPort.PortName + " sucessfully!");
}
catch (Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
MessageBox.Show("Error: " + ex.Message);
return;
}
}
//字节数组转16进制字符串
public static string byteToHexStr(byte[] bytes)
{
string returnStr = "";
if (bytes != null)
{
for (int i = 0; i < bytes.Length; i++)
{
returnStr += bytes[i].ToString("X2");
}
}
return returnStr;
}
static int buffersize = 18; //十六进制数的大小(假设为9Byte,可调整数字大小)
byte[] buffer = new Byte[buffersize]; //创建缓冲区
private void post_DataReceived(object sender, SerialDataReceivedEventArgs e)
{
int size = 0;
comPort.Read(buffer, 0, buffersize);
string ss;
ss = byteToHexStr(buffer); //用到函数byteToHexStr
Console.WriteLine(comPort.ReadExisting());
Console.WriteLine(ss);
size = comPort.ReadBufferSize;
if (buffer[0]==255)
{
modbus_Master.TepArray[0] = buffer[0];
modbus_Master.Sign = 2;
Console.WriteLine(comPort.ReadExisting());
}
else
{
modbus_Master.Sign =1;
modbus_Master.TepArray[0] = 0;
}
}
private void btCloseCOM_Click(object sender, EventArgs e)
{
//Close comport first,then stop and dispose slave.
comPort.Close();
btOpenCOM.Enabled = true;
btCloseCOM.Enabled = false;
Console.WriteLine(DateTime.Now.ToString() + " =>Disconnect " + comPort.PortName);
MessageBox.Show(DateTime.Now.ToString() + System.Environment.NewLine + " =>Disconnect " + comPort.PortName);
}
}
}
<?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.objec
oap.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>
\ No newline at end of file
/// <summary> using System;
/// 类说明:Assistant
/// 编 码 人:苏飞
/// 联系方式:361983679
/// 更新网站:http://www.cckan.net/thread-655-1-1.html
/// </summary>
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using System.Data; using System.Data;
......
namespace ModbusDemo
{
partial class Modbus_slave
{
/// <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.components = new System.ComponentModel.Container();
this.pnlCOMStatus = new System.Windows.Forms.Panel();
this.cmbStopBit = new System.Windows.Forms.ComboBox();
this.btCloseCOM = new System.Windows.Forms.Button();
this.cmbParity = new System.Windows.Forms.ComboBox();
this.btOpenCOM = new System.Windows.Forms.Button();
this.cmbDataBit = new System.Windows.Forms.ComboBox();
this.label7 = new System.Windows.Forms.Label();
this.labStopBit = new System.Windows.Forms.Label();
this.labParity = new System.Windows.Forms.Label();
this.labBaud = new System.Windows.Forms.Label();
this.labDataBit = new System.Windows.Forms.Label();
this.labPort = new System.Windows.Forms.Label();
this.cmbBaud = new System.Windows.Forms.ComboBox();
this.cmbPort = new System.Windows.Forms.ComboBox();
this.timer = new System.Windows.Forms.Timer(this.components);
this.label1 = new System.Windows.Forms.Label();
this.chkDO1 = new System.Windows.Forms.CheckBox();
this.chkDO2 = new System.Windows.Forms.CheckBox();
this.chkDO3 = new System.Windows.Forms.CheckBox();
this.chkDO4 = new System.Windows.Forms.CheckBox();
this.label2 = new System.Windows.Forms.Label();
this.chkDI1 = new System.Windows.Forms.CheckBox();
this.chkDI2 = new System.Windows.Forms.CheckBox();
this.chkDI3 = new System.Windows.Forms.CheckBox();
this.chkDI4 = new System.Windows.Forms.CheckBox();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.txtAO1 = new System.Windows.Forms.TextBox();
this.txtAO2 = new System.Windows.Forms.TextBox();
this.txtAO3 = new System.Windows.Forms.TextBox();
this.txtAO4 = new System.Windows.Forms.TextBox();
this.txtAI1 = new System.Windows.Forms.TextBox();
this.txtAI2 = new System.Windows.Forms.TextBox();
this.txtAI3 = new System.Windows.Forms.TextBox();
this.txtAI4 = new System.Windows.Forms.TextBox();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.label5 = new System.Windows.Forms.Label();
this.pnlCOMStatus.SuspendLayout();
this.SuspendLayout();
//
// pnlCOMStatus
//
this.pnlCOMStatus.Controls.Add(this.cmbStopBit);
this.pnlCOMStatus.Controls.Add(this.btCloseCOM);
this.pnlCOMStatus.Controls.Add(this.cmbParity);
this.pnlCOMStatus.Controls.Add(this.btOpenCOM);
this.pnlCOMStatus.Controls.Add(this.cmbDataBit);
this.pnlCOMStatus.Controls.Add(this.label7);
this.pnlCOMStatus.Controls.Add(this.labStopBit);
this.pnlCOMStatus.Controls.Add(this.labParity);
this.pnlCOMStatus.Controls.Add(this.labBaud);
this.pnlCOMStatus.Controls.Add(this.labDataBit);
this.pnlCOMStatus.Controls.Add(this.labPort);
this.pnlCOMStatus.Controls.Add(this.cmbBaud);
this.pnlCOMStatus.Controls.Add(this.cmbPort);
this.pnlCOMStatus.Location = new System.Drawing.Point(12, 20);
this.pnlCOMStatus.Name = "pnlCOMStatus";
this.pnlCOMStatus.Size = new System.Drawing.Size(410, 87);
this.pnlCOMStatus.TabIndex = 35;
this.pnlCOMStatus.Click += new System.EventHandler(this.btOpenCOM_Click);
//
// cmbStopBit
//
this.cmbStopBit.Font = new System.Drawing.Font("Arial", 8F);
this.cmbStopBit.Items.AddRange(new object[] {
"1",
"2"});
this.cmbStopBit.Location = new System.Drawing.Point(339, 35);
this.cmbStopBit.Name = "cmbStopBit";
this.cmbStopBit.Size = new System.Drawing.Size(56, 22);
this.cmbStopBit.TabIndex = 32;
//
// btCloseCOM
//
this.btCloseCOM.Enabled = false;
this.btCloseCOM.Font = new System.Drawing.Font("Arial", 8F);
this.btCloseCOM.Location = new System.Drawing.Point(317, 61);
this.btCloseCOM.Name = "btCloseCOM";
this.btCloseCOM.Size = new System.Drawing.Size(78, 23);
this.btCloseCOM.TabIndex = 45;
this.btCloseCOM.Text = "Close";
this.btCloseCOM.Click += new System.EventHandler(this.btCloseCOM_Click);
//
// cmbParity
//
this.cmbParity.Font = new System.Drawing.Font("Arial", 8F);
this.cmbParity.Items.AddRange(new object[] {
"0-None Parity",
"1-Odd Parity",
"2-Even Parity"});
this.cmbParity.Location = new System.Drawing.Point(226, 35);
this.cmbParity.Name = "cmbParity";
this.cmbParity.Size = new System.Drawing.Size(100, 22);
this.cmbParity.TabIndex = 31;
//
// btOpenCOM
//
this.btOpenCOM.Font = new System.Drawing.Font("Arial", 8F);
this.btOpenCOM.Location = new System.Drawing.Point(226, 61);
this.btOpenCOM.Name = "btOpenCOM";
this.btOpenCOM.Size = new System.Drawing.Size(78, 23);
this.btOpenCOM.TabIndex = 38;
this.btOpenCOM.Text = "Open";
this.btOpenCOM.Click += new System.EventHandler(this.btOpenCOM_Click);
//
// cmbDataBit
//
this.cmbDataBit.Font = new System.Drawing.Font("Arial", 8F);
this.cmbDataBit.Items.AddRange(new object[] {
"7",
"8"});
this.cmbDataBit.Location = new System.Drawing.Point(170, 35);
this.cmbDataBit.Name = "cmbDataBit";
this.cmbDataBit.Size = new System.Drawing.Size(48, 22);
this.cmbDataBit.TabIndex = 30;
//
// label7
//
this.label7.Font = new System.Drawing.Font("Arial", 8F);
this.label7.ForeColor = System.Drawing.Color.Blue;
this.label7.Location = new System.Drawing.Point(3, 3);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(140, 17);
this.label7.TabIndex = 46;
this.label7.Text = "Connection Status";
//
// labStopBit
//
this.labStopBit.Font = new System.Drawing.Font("Arial", 8F);
this.labStopBit.Location = new System.Drawing.Point(339, 20);
this.labStopBit.Name = "labStopBit";
this.labStopBit.Size = new System.Drawing.Size(56, 15);
this.labStopBit.TabIndex = 47;
this.labStopBit.Text = "Stop Bit";
this.labStopBit.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// labParity
//
this.labParity.Font = new System.Drawing.Font("Arial", 8F);
this.labParity.Location = new System.Drawing.Point(228, 20);
this.labParity.Name = "labParity";
this.labParity.Size = new System.Drawing.Size(98, 15);
this.labParity.TabIndex = 48;
this.labParity.Text = "Parity";
this.labParity.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// labBaud
//
this.labBaud.Font = new System.Drawing.Font("Arial", 8F);
this.labBaud.Location = new System.Drawing.Point(86, 20);
this.labBaud.Name = "labBaud";
this.labBaud.Size = new System.Drawing.Size(75, 15);
this.labBaud.TabIndex = 49;
this.labBaud.Text = "Baudrate";
this.labBaud.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// labDataBit
//
this.labDataBit.Font = new System.Drawing.Font("Arial", 8F);
this.labDataBit.Location = new System.Drawing.Point(170, 20);
this.labDataBit.Name = "labDataBit";
this.labDataBit.Size = new System.Drawing.Size(48, 15);
this.labDataBit.TabIndex = 50;
this.labDataBit.Text = "Data Bit";
this.labDataBit.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// labPort
//
this.labPort.Font = new System.Drawing.Font("Arial", 8F);
this.labPort.Location = new System.Drawing.Point(6, 20);
this.labPort.Name = "labPort";
this.labPort.Size = new System.Drawing.Size(75, 15);
this.labPort.TabIndex = 51;
this.labPort.Text = "COM Port";
this.labPort.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// cmbBaud
//
this.cmbBaud.Font = new System.Drawing.Font("Arial", 8F);
this.cmbBaud.Items.AddRange(new object[] {
"1200",
"2400",
"4800",
"9600",
"19200",
"38400",
"57600",
"115200"});
this.cmbBaud.Location = new System.Drawing.Point(85, 35);
this.cmbBaud.Name = "cmbBaud";
this.cmbBaud.Size = new System.Drawing.Size(76, 22);
this.cmbBaud.TabIndex = 29;
//
// cmbPort
//
this.cmbPort.Font = new System.Drawing.Font("Arial", 8F);
this.cmbPort.Location = new System.Drawing.Point(6, 35);
this.cmbPort.Name = "cmbPort";
this.cmbPort.Size = new System.Drawing.Size(75, 22);
this.cmbPort.TabIndex = 28;
//
// timer
//
this.timer.Tick += new System.EventHandler(this.timer_Tick);
//
// label1
//
this.label1.Location = new System.Drawing.Point(519, 55);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(82, 21);
this.label1.TabIndex = 75;
this.label1.Text = "DO Value";
//
// chkDO1
//
this.chkDO1.Location = new System.Drawing.Point(517, 79);
this.chkDO1.Name = "chkDO1";
this.chkDO1.Size = new System.Drawing.Size(82, 23);
this.chkDO1.TabIndex = 56;
this.chkDO1.Text = "000001";
//
// chkDO2
//
this.chkDO2.Location = new System.Drawing.Point(519, 120);
this.chkDO2.Name = "chkDO2";
this.chkDO2.Size = new System.Drawing.Size(82, 23);
this.chkDO2.TabIndex = 57;
this.chkDO2.Text = "000002";
//
// chkDO3
//
this.chkDO3.Location = new System.Drawing.Point(519, 161);
this.chkDO3.Name = "chkDO3";
this.chkDO3.Size = new System.Drawing.Size(82, 23);
this.chkDO3.TabIndex = 58;
this.chkDO3.Text = "000003";
//
// chkDO4
//
this.chkDO4.Location = new System.Drawing.Point(519, 202);
this.chkDO4.Name = "chkDO4";
this.chkDO4.Size = new System.Drawing.Size(82, 23);
this.chkDO4.TabIndex = 59;
this.chkDO4.Text = "000004";
//
// label2
//
this.label2.Location = new System.Drawing.Point(607, 55);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(82, 21);
this.label2.TabIndex = 74;
this.label2.Text = "DI Value";
//
// chkDI1
//
this.chkDI1.Location = new System.Drawing.Point(605, 79);
this.chkDI1.Name = "chkDI1";
this.chkDI1.Size = new System.Drawing.Size(82, 23);
this.chkDI1.TabIndex = 60;
this.chkDI1.Text = "100001";
//
// chkDI2
//
this.chkDI2.Location = new System.Drawing.Point(607, 120);
this.chkDI2.Name = "chkDI2";
this.chkDI2.Size = new System.Drawing.Size(82, 23);
this.chkDI2.TabIndex = 61;
this.chkDI2.Text = "100002";
//
// chkDI3
//
this.chkDI3.Location = new System.Drawing.Point(607, 161);
this.chkDI3.Name = "chkDI3";
this.chkDI3.Size = new System.Drawing.Size(82, 23);
this.chkDI3.TabIndex = 62;
this.chkDI3.Text = "100003";
//
// chkDI4
//
this.chkDI4.Location = new System.Drawing.Point(607, 202);
this.chkDI4.Name = "chkDI4";
this.chkDI4.Size = new System.Drawing.Size(82, 23);
this.chkDI4.TabIndex = 63;
this.chkDI4.Text = "100004";
//
// label4
//
this.label4.Location = new System.Drawing.Point(695, 55);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(109, 21);
this.label4.TabIndex = 73;
this.label4.Text = "AI Value";
//
// label3
//
this.label3.Location = new System.Drawing.Point(810, 55);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(122, 21);
this.label3.TabIndex = 72;
this.label3.Text = "AO Value";
//
// txtAO1
//
this.txtAO1.Location = new System.Drawing.Point(812, 80);
this.txtAO1.Name = "txtAO1";
this.txtAO1.Size = new System.Drawing.Size(98, 21);
this.txtAO1.TabIndex = 64;
this.txtAO1.Text = "0";
//
// txtAO2
//
this.txtAO2.Location = new System.Drawing.Point(812, 120);
this.txtAO2.Name = "txtAO2";
this.txtAO2.Size = new System.Drawing.Size(98, 21);
this.txtAO2.TabIndex = 65;
this.txtAO2.Text = "0";
//
// txtAO3
//
this.txtAO3.Location = new System.Drawing.Point(812, 161);
this.txtAO3.Name = "txtAO3";
this.txtAO3.Size = new System.Drawing.Size(98, 21);
this.txtAO3.TabIndex = 66;
this.txtAO3.Text = "0";
//
// txtAO4
//
this.txtAO4.Location = new System.Drawing.Point(812, 202);
this.txtAO4.Name = "txtAO4";
this.txtAO4.Size = new System.Drawing.Size(98, 21);
this.txtAO4.TabIndex = 67;
this.txtAO4.Text = "0";
//
// txtAI1
//
this.txtAI1.Location = new System.Drawing.Point(695, 80);
this.txtAI1.Name = "txtAI1";
this.txtAI1.Size = new System.Drawing.Size(98, 21);
this.txtAI1.TabIndex = 68;
this.txtAI1.Text = "111";
//
// txtAI2
//
this.txtAI2.Location = new System.Drawing.Point(695, 120);
this.txtAI2.Name = "txtAI2";
this.txtAI2.Size = new System.Drawing.Size(98, 21);
this.txtAI2.TabIndex = 69;
this.txtAI2.Text = "222";
//
// txtAI3
//
this.txtAI3.Location = new System.Drawing.Point(695, 161);
this.txtAI3.Name = "txtAI3";
this.txtAI3.Size = new System.Drawing.Size(98, 21);
this.txtAI3.TabIndex = 70;
this.txtAI3.Text = "333";
//
// txtAI4
//
this.txtAI4.Location = new System.Drawing.Point(695, 202);
this.txtAI4.Name = "txtAI4";
this.txtAI4.Size = new System.Drawing.Size(98, 21);
this.txtAI4.TabIndex = 71;
this.txtAI4.Text = "444";
//
// comboBox1
//
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Items.AddRange(new object[] {
"PLT6090"});
this.comboBox1.Location = new System.Drawing.Point(685, 262);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(72, 20);
this.comboBox1.TabIndex = 52;
//
// label5
//
this.label5.Font = new System.Drawing.Font("Arial", 8F);
this.label5.Location = new System.Drawing.Point(692, 244);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(56, 15);
this.label5.TabIndex = 53;
this.label5.Text = "type";
this.label5.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// Modbus_slave
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.label5);
this.Controls.Add(this.comboBox1);
this.Controls.Add(this.txtAI4);
this.Controls.Add(this.txtAI3);
this.Controls.Add(this.txtAI2);
this.Controls.Add(this.txtAI1);
this.Controls.Add(this.txtAO4);
this.Controls.Add(this.txtAO3);
this.Controls.Add(this.txtAO2);
this.Controls.Add(this.txtAO1);
this.Controls.Add(this.label3);
this.Controls.Add(this.label4);
this.Controls.Add(this.chkDI4);
this.Controls.Add(this.chkDI3);
this.Controls.Add(this.chkDI2);
this.Controls.Add(this.chkDI1);
this.Controls.Add(this.label2);
this.Controls.Add(this.chkDO4);
this.Controls.Add(this.chkDO3);
this.Controls.Add(this.chkDO2);
this.Controls.Add(this.chkDO1);
this.Controls.Add(this.label1);
this.Controls.Add(this.pnlCOMStatus);
this.Name = "Modbus_slave";
this.Size = new System.Drawing.Size(433, 119);
this.Load += new System.EventHandler(this.Modbus_slave_Load);
this.pnlCOMStatus.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Panel pnlCOMStatus;
private System.Windows.Forms.ComboBox cmbStopBit;
private System.Windows.Forms.Button btCloseCOM;
private System.Windows.Forms.ComboBox cmbParity;
private System.Windows.Forms.Button btOpenCOM;
private System.Windows.Forms.ComboBox cmbDataBit;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label labStopBit;
private System.Windows.Forms.Label labParity;
private System.Windows.Forms.Label labBaud;
private System.Windows.Forms.Label labDataBit;
private System.Windows.Forms.Label labPort;
private System.Windows.Forms.ComboBox cmbBaud;
private System.Windows.Forms.ComboBox cmbPort;
private System.Windows.Forms.Timer timer;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.CheckBox chkDO1;
private System.Windows.Forms.CheckBox chkDO2;
private System.Windows.Forms.CheckBox chkDO3;
private System.Windows.Forms.CheckBox chkDO4;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.CheckBox chkDI1;
private System.Windows.Forms.CheckBox chkDI2;
private System.Windows.Forms.CheckBox chkDI3;
private System.Windows.Forms.CheckBox chkDI4;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtAO1;
private System.Windows.Forms.TextBox txtAO2;
private System.Windows.Forms.TextBox txtAO3;
private System.Windows.Forms.TextBox txtAO4;
private System.Windows.Forms.TextBox txtAI1;
private System.Windows.Forms.TextBox txtAI2;
private System.Windows.Forms.TextBox txtAI3;
private System.Windows.Forms.TextBox txtAI4;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.Label label5;
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO.Ports;
using Modbus;
using Modbus.Device;
using Modbus.Data;
using System.Threading;
namespace ModbusDemo
{
public partial class Modbus_slave : UserControl
{
public Modbus_slave()
{
InitializeComponent();
}
ModbusSlave slave;
private byte slaveID = 1;
private SerialPort comPort = new SerialPort();
private void Modbus_slave_Load(object sender, EventArgs e)
{
comboBox1.SelectedIndex = 0;
cmbBaud.SelectedIndex = 7;
cmbDataBit.SelectedIndex = 1;
cmbParity.SelectedIndex = 0;
cmbStopBit.SelectedIndex = 0;
foreach (string s in SerialPort.GetPortNames())
cmbPort.Items.Add(s);
cmbPort.SelectedIndex = -1;
}
private void btOpenCOM_Click(object sender, EventArgs e)
{
comPort.PortName = cmbPort.Text;
comPort.BaudRate = int.Parse(cmbBaud.Text);
comPort.DataBits = int.Parse(cmbDataBit.Text);
if (cmbParity.Text.Substring(0, 1) == "0")
{
comPort.Parity = Parity.None;
}
else if (cmbParity.Text.Substring(0, 1) == "1")
{
comPort.Parity = Parity.Odd;
}
else if (cmbParity.Text.Substring(0, 1) == "2")
{
comPort.Parity = Parity.Even;
}
if (cmbStopBit.Text == "0")
{
comPort.StopBits = StopBits.None;
}
else if (cmbStopBit.Text == "1")
{
comPort.StopBits = StopBits.One;
}
try
{
comPort.Open();
slave = ModbusSerialSlave.CreateRtu(slaveID, comPort);
slave.ModbusSlaveRequestReceived += new EventHandler<ModbusSlaveRequestEventArgs>(Modbus_Request_Event);
slave.DataStore = Modbus.Data.DataStoreFactory.CreateDefaultDataStore();
slave.DataStore.DataStoreWrittenTo += new EventHandler<DataStoreEventArgs>(Modbus_DataStoreWriteTo);
//slave.DataStore.DataStoreReadFrom += new EventHandler<DataStoreEventArgs>(DataStore_DataStoreReadFrom);
btOpenCOM.Enabled = false;
btCloseCOM.Enabled = true;
slave.Listen();
timer.Enabled = true;
Console.WriteLine(DateTime.Now.ToString() + " =>Open " + comPort.PortName + " sucessfully!");
MessageBox.Show(DateTime.Now.ToString() + System.Environment.NewLine + " =>Open " + comPort.PortName + " sucessfully!");
}
catch (Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
MessageBox.Show("Error: " + ex.Message);
return;
}
}
//private void DataStore_DataStoreReadFrom(object sender, DataStoreEventArgs e)
//{
//}
private void btCloseCOM_Click(object sender, EventArgs e)
{
//Close comport first,then stop and dispose slave.
comPort.Close();
slave.Stop();
slave.Dispose();
btOpenCOM.Enabled = true;
btCloseCOM.Enabled = false;
timer.Enabled = false;
Console.WriteLine(DateTime.Now.ToString() + " =>Disconnect " + comPort.PortName);
MessageBox.Show(DateTime.Now.ToString() + System.Environment.NewLine + " =>Disconnect " + comPort.PortName);
}
private void Modbus_Request_Event(object sender, Modbus.Device.ModbusSlaveRequestEventArgs e)
{
try
{
CheckForIllegalCrossThreadCalls = false;
//request from master
byte fc = e.Message.FunctionCode;
byte[] data = e.Message.MessageFrame;
byte[] byteStartAddress = new byte[] { data[3], data[2] };
byte[] byteNum = new byte[] { data[5], data[4] };
Int16 StartAddress = BitConverter.ToInt16(byteStartAddress, 0);
Int16 NumOfPoint = BitConverter.ToInt16(byteNum, 0);
Console.WriteLine(fc.ToString() + "," + StartAddress.ToString() + "," + NumOfPoint.ToString());
modbus_Master.Values = fc.ToString() + "," + StartAddress.ToString() + "," + NumOfPoint.ToString();
}
catch (Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
MessageBox.Show("Error: " + ex.Message);
return;
}
}
private void Modbus_DataStoreWriteTo(object sender, Modbus.Data.DataStoreEventArgs e)
{
//this.Text = "DataType=" + e.ModbusDataType.ToString() + " StartAdress=" + e.StartAddress;
int iAddress = e.StartAddress;//e.StartAddress;
switch (e.ModbusDataType)
{
case ModbusDataType.HoldingRegister:
for (int i = 0; i < e.Data.B.Count; i++)
{
//Set AO
//e.Data.B[i] already write to slave.DataStore.HoldingRegisters[e.StartAddress + i + 1]
//e.StartAddress starts from 0
//You can set AO value to hardware here
DoAOUpdate(iAddress, e.Data.B[i].ToString());
iAddress++;
}
break;
case ModbusDataType.Coil:
for (int i = 0; i < e.Data.A.Count; i++)
{
//Set DO
//e.Data.A[i] already write to slave.DataStore.CoilDiscretes[e.StartAddress + i + 1]
//e.StartAddress starts from 0
//You can set DO value to hardware here
DoDOUpdate(iAddress, e.Data.A[i]);
iAddress++;
if (e.Data.A.Count == 1)
{
break;
}
}
break;
}
}
#region "Set AO"
private delegate void UpdateAOStatusDelegate(int index, String message);
private void DoAOUpdate(int index, String message)
{
if (this.InvokeRequired)
{
// we were called on a worker thread
// marshal the call to the user interface thread
this.Invoke(new UpdateAOStatusDelegate(DoAOUpdate),
new object[] { index, message });
return;
}
// this code can only be reached
// by the user interface thread
switch (index)
{
case 0:
this.txtAO1.Text = message;
break;
case 1:
this.txtAO2.Text = message;
break;
case 2:
this.txtAO3.Text = message;
break;
case 3:
this.txtAO4.Text = message;
break;
}
}
#endregion
#region "Set DO"
private delegate void UpdateDOStatusDelegate(int index, bool value);
private void DoDOUpdate(int index, bool value)
{
if (this.InvokeRequired)
{
// we were called on a worker thread
// marshal the call to the user interface thread
this.Invoke(new UpdateDOStatusDelegate(DoDOUpdate),
new object[] { index, value });
return;
}
// this code can only be reached
// by the user interface thread
switch (index)
{
case 0:
this.chkDO1.Checked = value;
break;
case 1:
this.chkDO2.Checked = value;
break;
case 2:
this.chkDO3.Checked = value;
break;
case 3:
this.chkDO4.Checked = value;
break;
}
}
#endregion
private void timer_Tick(object sender, EventArgs e)
{
//update input values to datastore
//DI
slave.DataStore.InputDiscretes[1] = chkDI1.Checked;
slave.DataStore.InputDiscretes[2] = chkDI2.Checked;
slave.DataStore.InputDiscretes[3] = chkDI3.Checked;
slave.DataStore.InputDiscretes[4] = chkDI4.Checked;
//AI
slave.DataStore.InputRegisters[1] = Convert.ToUInt16(txtAI1.Text);
slave.DataStore.InputRegisters[2] = Convert.ToUInt16(txtAI2.Text);
slave.DataStore.InputRegisters[3] = Convert.ToUInt16(txtAI3.Text);
slave.DataStore.InputRegisters[4] = Convert.ToUInt16(txtAI4.Text);
//AO
switch (comboBox1.SelectedIndex)
{
case 0:
{
slave.DataStore.HoldingRegisters[1] = Convert.ToUInt16(txtAO1.Text);
slave.DataStore.HoldingRegisters[2] = Convert.ToUInt16(txtAO2.Text);
slave.DataStore.HoldingRegisters[3] = Convert.ToUInt16(txtAO3.Text);
slave.DataStore.HoldingRegisters[4] = Convert.ToUInt16(txtAO4.Text);
slave.DataStore.HoldingRegisters[5] = 319; slave.DataStore.HoldingRegisters[6] = 319;
slave.DataStore.HoldingRegisters[7] = 319; slave.DataStore.HoldingRegisters[8] = 3;
slave.DataStore.HoldingRegisters[9] = 0; slave.DataStore.HoldingRegisters[10] = 0;
slave.DataStore.HoldingRegisters[11] = 5000; slave.DataStore.HoldingRegisters[12] = 6000;
slave.DataStore.HoldingRegisters[13] = 7000; slave.DataStore.HoldingRegisters[14] = 8000;
slave.DataStore.HoldingRegisters[15] = 9000; slave.DataStore.HoldingRegisters[16] = 0;
slave.DataStore.HoldingRegisters[17] = 0; slave.DataStore.HoldingRegisters[18] = 0;
slave.DataStore.HoldingRegisters[19] = 0; slave.DataStore.HoldingRegisters[20] = 0;
slave.DataStore.HoldingRegisters[21] = 0; slave.DataStore.HoldingRegisters[22] = 0;
slave.DataStore.HoldingRegisters[23] = 0; slave.DataStore.HoldingRegisters[24] = 0;
slave.DataStore.HoldingRegisters[25] = 0; slave.DataStore.HoldingRegisters[26] = 0;
slave.DataStore.HoldingRegisters[27] = 0; slave.DataStore.HoldingRegisters[28] = 0;
slave.DataStore.HoldingRegisters[29] = 0; slave.DataStore.HoldingRegisters[30] = 0;
slave.DataStore.HoldingRegisters[31] = 0; slave.DataStore.HoldingRegisters[32] = 0;
slave.DataStore.HoldingRegisters[33] = 220; slave.DataStore.HoldingRegisters[34] = 500;
slave.DataStore.HoldingRegisters[35] = 50; slave.DataStore.HoldingRegisters[36] = 1100;
slave.DataStore.HoldingRegisters[37] = 220; slave.DataStore.HoldingRegisters[38] = 500;
slave.DataStore.HoldingRegisters[39] = 50; slave.DataStore.HoldingRegisters[40] = 1100;
slave.DataStore.HoldingRegisters[41] = 5000; slave.DataStore.HoldingRegisters[42] = 5000;
slave.DataStore.HoldingRegisters[43] = 0; slave.DataStore.HoldingRegisters[44] = 0;
}
break;
default:
break;
}
//DO
slave.DataStore.CoilDiscretes[1] = chkDO1.Checked;
slave.DataStore.CoilDiscretes[2] = chkDO2.Checked;
slave.DataStore.CoilDiscretes[3] = chkDO3.Checked;
slave.DataStore.CoilDiscretes[4] = chkDO4.Checked;
}
}
}
<?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="timer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
\ No newline at end of file
...@@ -85,12 +85,6 @@ ...@@ -85,12 +85,6 @@
<Compile Include="478C.cs" /> <Compile Include="478C.cs" />
<Compile Include="418X.cs" /> <Compile Include="418X.cs" />
<Compile Include="Common\Modbuslib.cs" /> <Compile Include="Common\Modbuslib.cs" />
<Compile Include="ComPort.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="ComPort.Designer.cs">
<DependentUpon>ComPort.cs</DependentUpon>
</Compile>
<Compile Include="ConvertJson.cs" /> <Compile Include="ConvertJson.cs" />
<Compile Include="windows\Form1.cs"> <Compile Include="windows\Form1.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
...@@ -98,92 +92,26 @@ ...@@ -98,92 +92,26 @@
<Compile Include="windows\Form1.Designer.cs"> <Compile Include="windows\Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon> <DependentUpon>Form1.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="modbus-Master.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="modbus-Master.Designer.cs">
<DependentUpon>modbus-Master.cs</DependentUpon>
</Compile>
<Compile Include="mqttpacke.cs" /> <Compile Include="mqttpacke.cs" />
<Compile Include="RData.cs" /> <Compile Include="RData.cs" />
<Compile Include="UData.cs" /> <Compile Include="UData.cs" />
<Compile Include="windows\AC.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="windows\AC.Designer.cs">
<DependentUpon>AC.cs</DependentUpon>
</Compile>
<Compile Include="Common\ModSearch.cs" /> <Compile Include="Common\ModSearch.cs" />
<Compile Include="Common\WTModbus.cs" /> <Compile Include="Common\WTModbus.cs" />
<Compile Include="windows\Demo_818X.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="windows\Demo_818X.Designer.cs">
<DependentUpon>Demo_818X.cs</DependentUpon>
</Compile>
<Compile Include="windows\frmInputValue.cs"> <Compile Include="windows\frmInputValue.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="windows\frmInputValue.designer.cs"> <Compile Include="windows\frmInputValue.designer.cs">
<DependentUpon>frmInputValue.cs</DependentUpon> <DependentUpon>frmInputValue.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="windows\MDemo.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="windows\MDemo.Designer.cs">
<DependentUpon>MDemo.cs</DependentUpon>
</Compile>
<Compile Include="Modbus-slave.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Modbus-slave.Designer.cs">
<DependentUpon>Modbus-slave.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" /> <Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="windows\ProTest.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="windows\ProTest.Designer.cs">
<DependentUpon>ProTest.cs</DependentUpon>
</Compile>
<Compile Include="UserMQTT.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="UserMQTT.Designer.cs">
<DependentUpon>UserMQTT.cs</DependentUpon>
</Compile>
<Compile Include="windows\sanchen.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="windows\sanchen.Designer.cs">
<DependentUpon>sanchen.cs</DependentUpon>
</Compile>
<Compile Include="Totxt.cs" /> <Compile Include="Totxt.cs" />
<EmbeddedResource Include="ComPort.resx">
<DependentUpon>ComPort.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="windows\Form1.resx"> <EmbeddedResource Include="windows\Form1.resx">
<DependentUpon>Form1.cs</DependentUpon> <DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="modbus-Master.resx">
<DependentUpon>modbus-Master.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="windows\AC.resx">
<DependentUpon>AC.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="windows\Demo_818X.resx">
<DependentUpon>Demo_818X.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="windows\frmInputValue.resx"> <EmbeddedResource Include="windows\frmInputValue.resx">
<DependentUpon>frmInputValue.cs</DependentUpon> <DependentUpon>frmInputValue.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="windows\MDemo.resx">
<DependentUpon>MDemo.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Modbus-slave.resx">
<DependentUpon>Modbus-slave.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx"> <EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator> <Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput> <LastGenOutput>Resources.Designer.cs</LastGenOutput>
...@@ -194,15 +122,6 @@ ...@@ -194,15 +122,6 @@
<DependentUpon>Resources.resx</DependentUpon> <DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
</Compile> </Compile>
<EmbeddedResource Include="windows\ProTest.resx">
<DependentUpon>ProTest.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UserMQTT.resx">
<DependentUpon>UserMQTT.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="windows\sanchen.resx">
<DependentUpon>sanchen.cs</DependentUpon>
</EmbeddedResource>
<None Include="app.config" /> <None Include="app.config" />
<None Include="packages.config" /> <None Include="packages.config" />
<None Include="Properties\Settings.settings"> <None Include="Properties\Settings.settings">
......
namespace ModbusDemo
{
partial class UserMQTT
{
/// <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.components = new System.ComponentModel.Container();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.btnLogIn = new System.Windows.Forms.Button();
this.btnLogout = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.btnSubscribe = new System.Windows.Forms.Button();
this.txtSubTopic = new System.Windows.Forms.TextBox();
this.BtnPublish = new System.Windows.Forms.Button();
this.txtIp = new System.Windows.Forms.TextBox();
this.txtPort = new System.Windows.Forms.TextBox();
this.txtClientId = new System.Windows.Forms.TextBox();
this.txtUsername = new System.Windows.Forms.TextBox();
this.txtPsw = new System.Windows.Forms.TextBox();
this.button2 = new System.Windows.Forms.Button();
this.label5 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.txtReceiveMessage = new System.Windows.Forms.TextBox();
this.txtPubTopic = new System.Windows.Forms.TextBox();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.label1 = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// groupBox1
//
this.groupBox1.Controls.Add(this.textBox3);
this.groupBox1.Controls.Add(this.textBox2);
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.textBox1);
this.groupBox1.Controls.Add(this.btnLogIn);
this.groupBox1.Controls.Add(this.btnLogout);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.label9);
this.groupBox1.Controls.Add(this.btnSubscribe);
this.groupBox1.Controls.Add(this.txtSubTopic);
this.groupBox1.Controls.Add(this.BtnPublish);
this.groupBox1.Font = new System.Drawing.Font("楷体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox1.ForeColor = System.Drawing.Color.RoyalBlue;
this.groupBox1.Location = new System.Drawing.Point(11, 12);
this.groupBox1.Margin = new System.Windows.Forms.Padding(2);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Padding = new System.Windows.Forms.Padding(2);
this.groupBox1.Size = new System.Drawing.Size(322, 252);
this.groupBox1.TabIndex = 17;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "用户配置";
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(220, 123);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(97, 26);
this.textBox3.TabIndex = 48;
this.textBox3.Text = "120";
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(220, 91);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(97, 26);
this.textBox2.TabIndex = 47;
this.textBox2.Text = "120";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("楷体", 12F);
this.label6.ForeColor = System.Drawing.Color.RoyalBlue;
this.label6.Location = new System.Drawing.Point(4, 129);
this.label6.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(216, 16);
this.label6.TabIndex = 46;
this.label6.Text = "厂商设置数据上传时间(秒):";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("楷体", 12F);
this.label4.ForeColor = System.Drawing.Color.RoyalBlue;
this.label4.Location = new System.Drawing.Point(4, 101);
this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(216, 16);
this.label4.TabIndex = 45;
this.label4.Text = "用户设置数据上传时间(秒):";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(220, 59);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(97, 26);
this.textBox1.TabIndex = 44;
this.textBox1.Text = "120";
//
// btnLogIn
//
this.btnLogIn.Location = new System.Drawing.Point(7, 169);
this.btnLogIn.Margin = new System.Windows.Forms.Padding(2);
this.btnLogIn.Name = "btnLogIn";
this.btnLogIn.Size = new System.Drawing.Size(88, 28);
this.btnLogIn.TabIndex = 20;
this.btnLogIn.Text = "连接服务";
this.btnLogIn.UseVisualStyleBackColor = true;
this.btnLogIn.Click += new System.EventHandler(this.btnLogIn_Click_1);
//
// btnLogout
//
this.btnLogout.ForeColor = System.Drawing.Color.Red;
this.btnLogout.Location = new System.Drawing.Point(220, 220);
this.btnLogout.Margin = new System.Windows.Forms.Padding(2);
this.btnLogout.Name = "btnLogout";
this.btnLogout.Size = new System.Drawing.Size(88, 28);
this.btnLogout.TabIndex = 21;
this.btnLogout.Text = "断开服务";
this.btnLogout.UseVisualStyleBackColor = true;
this.btnLogout.Click += new System.EventHandler(this.btnLogout_Click);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("楷体", 12F);
this.label3.ForeColor = System.Drawing.Color.RoyalBlue;
this.label3.Location = new System.Drawing.Point(4, 66);
this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(184, 16);
this.label3.TabIndex = 40;
this.label3.Text = "实时数据上传时间(秒):";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Font = new System.Drawing.Font("楷体", 12F);
this.label9.ForeColor = System.Drawing.Color.RoyalBlue;
this.label9.Location = new System.Drawing.Point(4, 27);
this.label9.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(72, 16);
this.label9.TabIndex = 39;
this.label9.Text = "设备SN:";
//
// btnSubscribe
//
this.btnSubscribe.Location = new System.Drawing.Point(220, 169);
this.btnSubscribe.Margin = new System.Windows.Forms.Padding(2);
this.btnSubscribe.Name = "btnSubscribe";
this.btnSubscribe.Size = new System.Drawing.Size(88, 28);
this.btnSubscribe.TabIndex = 30;
this.btnSubscribe.Text = "订阅";
this.btnSubscribe.UseVisualStyleBackColor = true;
this.btnSubscribe.Click += new System.EventHandler(this.btnSubscribe_Click);
//
// txtSubTopic
//
this.txtSubTopic.Location = new System.Drawing.Point(221, 24);
this.txtSubTopic.Margin = new System.Windows.Forms.Padding(2);
this.txtSubTopic.Multiline = true;
this.txtSubTopic.Name = "txtSubTopic";
this.txtSubTopic.Size = new System.Drawing.Size(97, 26);
this.txtSubTopic.TabIndex = 31;
this.txtSubTopic.Text = "17080149";
this.txtSubTopic.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtSubTopic_KeyPress);
//
// BtnPublish
//
this.BtnPublish.Location = new System.Drawing.Point(7, 221);
this.BtnPublish.Margin = new System.Windows.Forms.Padding(2);
this.BtnPublish.Name = "BtnPublish";
this.BtnPublish.Size = new System.Drawing.Size(88, 28);
this.BtnPublish.TabIndex = 32;
this.BtnPublish.Text = "发布设置";
this.BtnPublish.UseVisualStyleBackColor = true;
this.BtnPublish.Click += new System.EventHandler(this.BtnPublish_Click);
//
// txtIp
//
this.txtIp.Location = new System.Drawing.Point(684, 131);
this.txtIp.Margin = new System.Windows.Forms.Padding(2);
this.txtIp.Multiline = true;
this.txtIp.Name = "txtIp";
this.txtIp.Size = new System.Drawing.Size(251, 26);
this.txtIp.TabIndex = 18;
this.txtIp.Text = "192.168.1.224";
this.txtIp.Visible = false;
//
// txtPort
//
this.txtPort.Location = new System.Drawing.Point(679, 170);
this.txtPort.Margin = new System.Windows.Forms.Padding(2);
this.txtPort.Multiline = true;
this.txtPort.Name = "txtPort";
this.txtPort.Size = new System.Drawing.Size(251, 26);
this.txtPort.TabIndex = 16;
this.txtPort.Text = "1883";
this.txtPort.Visible = false;
//
// txtClientId
//
this.txtClientId.Location = new System.Drawing.Point(679, 209);
this.txtClientId.Margin = new System.Windows.Forms.Padding(2);
this.txtClientId.Multiline = true;
this.txtClientId.Name = "txtClientId";
this.txtClientId.Size = new System.Drawing.Size(251, 26);
this.txtClientId.TabIndex = 14;
this.txtClientId.Visible = false;
//
// txtUsername
//
this.txtUsername.Location = new System.Drawing.Point(679, 256);
this.txtUsername.Margin = new System.Windows.Forms.Padding(2);
this.txtUsername.Multiline = true;
this.txtUsername.Name = "txtUsername";
this.txtUsername.Size = new System.Drawing.Size(251, 26);
this.txtUsername.TabIndex = 8;
this.txtUsername.Text = "witcloud/wittestdev";
this.txtUsername.Visible = false;
//
// txtPsw
//
this.txtPsw.Location = new System.Drawing.Point(679, 297);
this.txtPsw.Margin = new System.Windows.Forms.Padding(2);
this.txtPsw.Multiline = true;
this.txtPsw.Name = "txtPsw";
this.txtPsw.Size = new System.Drawing.Size(251, 26);
this.txtPsw.TabIndex = 11;
this.txtPsw.Text = "6DxrsNVM3DP1YOYQV6X3y6mS8tHkYLiwYUpdA73+U+4=";
this.txtPsw.Visible = false;
//
// button2
//
this.button2.Location = new System.Drawing.Point(679, 33);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(74, 28);
this.button2.TabIndex = 40;
this.button2.Text = "停止";
this.button2.UseVisualStyleBackColor = true;
this.button2.Visible = false;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("楷体", 12F);
this.label5.ForeColor = System.Drawing.Color.RoyalBlue;
this.label5.Location = new System.Drawing.Point(681, 113);
this.label5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(72, 16);
this.label5.TabIndex = 38;
this.label5.Text = "发布主题";
this.label5.Visible = false;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("楷体", 12F);
this.label2.ForeColor = System.Drawing.Color.RoyalBlue;
this.label2.Location = new System.Drawing.Point(8, 277);
this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(72, 16);
this.label2.TabIndex = 36;
this.label2.Text = "消息展示";
//
// txtReceiveMessage
//
this.txtReceiveMessage.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtReceiveMessage.Location = new System.Drawing.Point(11, 295);
this.txtReceiveMessage.Margin = new System.Windows.Forms.Padding(2);
this.txtReceiveMessage.Multiline = true;
this.txtReceiveMessage.Name = "txtReceiveMessage";
this.txtReceiveMessage.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.txtReceiveMessage.Size = new System.Drawing.Size(662, 162);
this.txtReceiveMessage.TabIndex = 35;
//
// txtPubTopic
//
this.txtPubTopic.Location = new System.Drawing.Point(679, 74);
this.txtPubTopic.Margin = new System.Windows.Forms.Padding(2);
this.txtPubTopic.Multiline = true;
this.txtPubTopic.Name = "txtPubTopic";
this.txtPubTopic.Size = new System.Drawing.Size(90, 26);
this.txtPubTopic.TabIndex = 33;
this.txtPubTopic.Visible = false;
//
// timer1
//
this.timer1.Interval = 10000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(338, 23);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(322, 210);
this.label1.TabIndex = 43;
this.label1.Text = "使用说明:\r\n\r\n1:设置SN,SN在产品背面,例如:20181203\r\n\r\n2:连接服务\r\n\r\n3:设置采样频率,以秒为单位。例如:2分钟=120秒\r\n\r\n4:" +
"点击订阅,方便确认是否返回成功\r\n\r\n5:发布设置\r\n\r\n6:等待消息回复,是否有成功提示\r\n\r\n7:完成操作后请断开服务";
//
// UserMQTT
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.button2);
this.Controls.Add(this.label5);
this.Controls.Add(this.label2);
this.Controls.Add(this.txtReceiveMessage);
this.Controls.Add(this.txtPubTopic);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.label1);
this.Controls.Add(this.txtIp);
this.Controls.Add(this.txtPsw);
this.Controls.Add(this.txtUsername);
this.Controls.Add(this.txtClientId);
this.Controls.Add(this.txtPort);
this.Name = "UserMQTT";
this.Size = new System.Drawing.Size(1123, 556);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.TextBox txtIp;
private System.Windows.Forms.TextBox txtPort;
private System.Windows.Forms.TextBox txtClientId;
private System.Windows.Forms.TextBox txtUsername;
private System.Windows.Forms.TextBox txtPsw;
private System.Windows.Forms.Button btnLogout;
private System.Windows.Forms.Button btnLogIn;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtReceiveMessage;
private System.Windows.Forms.TextBox txtPubTopic;
private System.Windows.Forms.Button BtnPublish;
private System.Windows.Forms.TextBox txtSubTopic;
private System.Windows.Forms.Button btnSubscribe;
private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label label1;
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MQTTnet;
using MQTTnet.Client;
using MQTTnet.Implementations;
using MQTTnet.ManagedClient;
using MQTTnet.Protocol;
namespace ModbusDemo
{
public partial class UserMQTT : UserControl
{
private IMqttClient mqttClient = null;
private bool isReconnect = true;
public UserMQTT()
{
InitializeComponent();
}
private async void btnSubscribe_Click(object sender, EventArgs e)
{
string SN = txtSubTopic.Text.Trim();
if (SN == "")
{
MessageBox.Show("SN不能为空!");
return;
}
await Subscribe();
btnSubscribe.Enabled = false;
}
private async void BtnPublish_Click(object sender, EventArgs e)
{
//timer1.Enabled = true;
//timer1.Interval = Convert.ToInt32(textBox1.Text);
await Publish();
BtnPublish.Enabled = false;
}
private async Task Publish()
{
string SN = txtSubTopic.Text.Trim();
if (SN == "")
{
MessageBox.Show("SN不能为空!");
return;
}
string topic = "ac/WTD93CG" + "/" + SN + "/" + "CFG";
txtPubTopic.Text = topic;
if (string.IsNullOrEmpty(topic))
{
MessageBox.Show("发布主题不能为空!");
return;
}
//{"dperiod":30,"uperiod":120,"mperiod":120}
string inputString =
"{\"dperiod\":"+ textBox1.Text.Trim()+ ","+
"\"uperiod\":" + textBox2.Text.Trim()+ "," +
"\"mperiod\":" + textBox3.Text.Trim()+
"}";
//txtSendMessage.Text.Trim();
string type ="{\"ac\":1}";
var message = new MqttApplicationMessageBuilder()
.WithTopic(topic)
.WithPayload(inputString)
.WithAtMostOnceQoS()
.WithRetainFlag(true)
.Build();
await mqttClient.PublishAsync(message);
var message2 = new MqttApplicationMessageBuilder()
.WithTopic(topic)
.WithPayload(type)
.WithAtMostOnceQoS()
.WithRetainFlag(true)
.Build();
await mqttClient.PublishAsync(message2);
}
private async Task Subscribe()
{
string SN= txtSubTopic.Text.Trim();
if (SN == "")
{
MessageBox.Show("SN不能为空!");
return;
}
string topic = "ac/WTD93CG"+ "/"+SN+"/" + "CFG/RESP";
string Data = "ac/WTD93CG" + "/" + SN + "/" + "DI";
if (string.IsNullOrEmpty(topic))
{
MessageBox.Show("订阅主题不能为空!");
return;
}
if (string.IsNullOrEmpty(Data))
{
MessageBox.Show("订阅主题不能为空!");
return;
}
if (!mqttClient.IsConnected)
{
MessageBox.Show("MQTT客户端尚未连接!");
return;
}
// Subscribe to a topic
await mqttClient.SubscribeAsync(new TopicFilterBuilder()
.WithTopic(topic)
.WithAtMostOnceQoS()
.Build()
);
await mqttClient.SubscribeAsync(new TopicFilterBuilder()
.WithTopic(Data)
.WithAtMostOnceQoS()
.Build()
);
Invoke((new Action(() =>
{
txtReceiveMessage.AppendText($"已订阅[{topic}]主题{Environment.NewLine}");
txtReceiveMessage.AppendText($"已订阅[{Data}]主题{Environment.NewLine}");
})));
}
private async Task ConnectMqttServerAsync()
{
// Create a new MQTT client.
if (mqttClient == null)
{
var factory = new MqttFactory();
mqttClient = factory.CreateMqttClient();
mqttClient.ApplicationMessageReceived += MqttClient_ApplicationMessageReceived;
mqttClient.Connected += MqttClient_Connected;
mqttClient.Disconnected += MqttClient_Disconnected;
}
//非托管客户端
try
{
//Create TCP based options using the builder.
var options = new MqttClientOptionsBuilder()
.WithClientId(txtClientId.Text)
.WithTcpServer(txtIp.Text, Convert.ToInt32(txtPort.Text))
.WithCredentials(txtUsername.Text, txtPsw.Text)
//.WithTls()//服务器端没有启用加密协议,这里用tls的会提示协议异常
.WithCleanSession()
.Build();
await mqttClient.ConnectAsync(options);
}
catch (Exception ex)
{
Invoke((new Action(() =>
{
txtReceiveMessage.AppendText($"连接到MQTT服务器失败!" + Environment.NewLine + ex.Message + Environment.NewLine);
})));
}
//托管客户端
try
{
}
catch (Exception)
{
}
}
private void MqttClient_Connected(object sender, EventArgs e)
{
Invoke((new Action(() =>
{
txtReceiveMessage.Clear();
txtReceiveMessage.AppendText("已连接到MQTT服务器!" + Environment.NewLine);
})));
}
private void MqttClient_Disconnected(object sender, EventArgs e)
{
Invoke((new Action(() =>
{
txtReceiveMessage.Clear();
DateTime curTime = new DateTime();
curTime = DateTime.UtcNow;
txtReceiveMessage.AppendText($">> [{curTime.ToLongTimeString()}]");
txtReceiveMessage.AppendText("已断开MQTT连接!" + Environment.NewLine);
})));
//Reconnecting
if (isReconnect)
{
Invoke((new Action(() =>
{
txtReceiveMessage.AppendText("正在尝试重新连接" + Environment.NewLine);
})));
var options = new MqttClientOptionsBuilder()
.WithClientId(txtClientId.Text)
.WithTcpServer(txtIp.Text, Convert.ToInt32(txtPort.Text))
.WithCredentials(txtUsername.Text, txtPsw.Text)
//.WithTls()
.WithCleanSession()
.Build();
Invoke((new Action(async () =>
{
await Task.Delay(TimeSpan.FromSeconds(5));
try
{
await mqttClient.ConnectAsync(options);
}
catch
{
txtReceiveMessage.AppendText("### RECONNECTING FAILED ###" + Environment.NewLine);
}
})));
}
else
{
Invoke((new Action(() =>
{
txtReceiveMessage.AppendText("已下线!" + Environment.NewLine);
})));
}
}
private void MqttClient_ApplicationMessageReceived(object sender, MqttApplicationMessageReceivedEventArgs e)
{
Invoke((new Action(() =>
{
txtReceiveMessage.AppendText($">> {"### RECEIVED APPLICATION MESSAGE ###"}{Environment.NewLine}");
})));
Invoke((new Action(() =>
{
txtReceiveMessage.AppendText($">> Topic = {e.ApplicationMessage.Topic}{Environment.NewLine}");
})));
Invoke((new Action(() =>
{
txtReceiveMessage.AppendText($">> Payload = {Encoding.UTF8.GetString(e.ApplicationMessage.Payload)}{Environment.NewLine}");
})));
Invoke((new Action(() =>
{
txtReceiveMessage.AppendText($">> QoS = {e.ApplicationMessage.QualityOfServiceLevel}{Environment.NewLine}");
})));
Invoke((new Action(() =>
{
//txtReceiveMessage.AppendText($">> Retain = {e.ApplicationMessage.Retain}{Environment.NewLine}");
})));
}
private void btnLogIn_Click_1(object sender, EventArgs e)
{
isReconnect = true;
Task.Run(async () => { await ConnectMqttServerAsync(); });
btnLogIn.Enabled = false;
btnLogout.Enabled = true;
}
private void btnLogout_Click(object sender, EventArgs e)
{
isReconnect = false;
Task.Run(async () => { await mqttClient.DisconnectAsync(); });
btnLogIn.Enabled = true;
btnSubscribe.Enabled = true;
BtnPublish.Enabled = true;
btnLogout.Enabled = false;
}
private void button2_Click(object sender, EventArgs e)
{
timer1.Enabled = false;
}
private async void timer1_Tick(object sender, EventArgs e)
{
}
private void txtSubTopic_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == 0x20) e.KeyChar = (char)0; //禁止空格键
if ((e.KeyChar == 0x2D) && (((TextBox)sender).Text.Length == 0)) return; //处理负数
if (e.KeyChar > 0x20)
{
try
{
double.Parse(((TextBox)sender).Text + e.KeyChar.ToString());
}
catch
{
e.KeyChar = (char)0; //处理非法字符
MessageBox.Show("只能输入数字");
}
}
}
}
}
<?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="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
\ No newline at end of file
namespace ModbusDemo
{
partial class modbus_Master
{
/// <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.components = new System.ComponentModel.Container();
this.pnlCOMStatus = new System.Windows.Forms.Panel();
this.cmbStopBit = new System.Windows.Forms.ComboBox();
this.btCloseCOM = new System.Windows.Forms.Button();
this.cmbParity = new System.Windows.Forms.ComboBox();
this.btOpenCOM = new System.Windows.Forms.Button();
this.cmbDataBit = new System.Windows.Forms.ComboBox();
this.label7 = new System.Windows.Forms.Label();
this.labStopBit = new System.Windows.Forms.Label();
this.labParity = new System.Windows.Forms.Label();
this.labBaud = new System.Windows.Forms.Label();
this.labDataBit = new System.Windows.Forms.Label();
this.labPort = new System.Windows.Forms.Label();
this.cmbBaud = new System.Windows.Forms.ComboBox();
this.cmbPort = new System.Windows.Forms.ComboBox();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.button1 = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.version = new System.Windows.Forms.Label();
this.StartTest = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.reset = new System.Windows.Forms.Button();
this.bgWorker = new System.ComponentModel.BackgroundWorker();
this.updateops = new System.Windows.Forms.GroupBox();
this.imagesname = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.choosebth = new System.Windows.Forms.Button();
this.label13 = new System.Windows.Forms.Label();
this.UpdateBar = new System.Windows.Forms.ProgressBar();
this.UpdateBtn = new System.Windows.Forms.Button();
this.label14 = new System.Windows.Forms.Label();
this.CcidLab = new System.Windows.Forms.Label();
this.DTUSN = new System.Windows.Forms.TextBox();
this.Nametype = new System.Windows.Forms.TextBox();
this.button2 = new System.Windows.Forms.Button();
this.label15 = new System.Windows.Forms.Label();
this.RtcDate = new System.Windows.Forms.Label();
this.SNcheck = new System.Windows.Forms.Label();
this.label17 = new System.Windows.Forms.Label();
this.label16 = new System.Windows.Forms.Label();
this.SlaveState = new System.Windows.Forms.PictureBox();
this.RTCLED = new System.Windows.Forms.PictureBox();
this.DI15 = new System.Windows.Forms.PictureBox();
this.DI14 = new System.Windows.Forms.PictureBox();
this.DI13 = new System.Windows.Forms.PictureBox();
this.DI12 = new System.Windows.Forms.PictureBox();
this.DI11 = new System.Windows.Forms.PictureBox();
this.DI10 = new System.Windows.Forms.PictureBox();
this.DI9 = new System.Windows.Forms.PictureBox();
this.DI8 = new System.Windows.Forms.PictureBox();
this.DI7 = new System.Windows.Forms.PictureBox();
this.DI6 = new System.Windows.Forms.PictureBox();
this.DI5 = new System.Windows.Forms.PictureBox();
this.DI4 = new System.Windows.Forms.PictureBox();
this.DI3 = new System.Windows.Forms.PictureBox();
this.DI2 = new System.Windows.Forms.PictureBox();
this.DI1 = new System.Windows.Forms.PictureBox();
this.DI0 = new System.Windows.Forms.PictureBox();
this.pnlCOMStatus.SuspendLayout();
this.updateops.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.SlaveState)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.RTCLED)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.DI15)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.DI14)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.DI13)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.DI12)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.DI11)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.DI10)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.DI9)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.DI8)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.DI7)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.DI6)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.DI5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.DI4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.DI3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.DI2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.DI1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.DI0)).BeginInit();
this.SuspendLayout();
//
// pnlCOMStatus
//
this.pnlCOMStatus.Controls.Add(this.cmbStopBit);
this.pnlCOMStatus.Controls.Add(this.btCloseCOM);
this.pnlCOMStatus.Controls.Add(this.cmbParity);
this.pnlCOMStatus.Controls.Add(this.btOpenCOM);
this.pnlCOMStatus.Controls.Add(this.cmbDataBit);
this.pnlCOMStatus.Controls.Add(this.label7);
this.pnlCOMStatus.Controls.Add(this.labStopBit);
this.pnlCOMStatus.Controls.Add(this.labParity);
this.pnlCOMStatus.Controls.Add(this.labBaud);
this.pnlCOMStatus.Controls.Add(this.labDataBit);
this.pnlCOMStatus.Controls.Add(this.labPort);
this.pnlCOMStatus.Controls.Add(this.cmbBaud);
this.pnlCOMStatus.Controls.Add(this.cmbPort);
this.pnlCOMStatus.Location = new System.Drawing.Point(3, 3);
this.pnlCOMStatus.Name = "pnlCOMStatus";
this.pnlCOMStatus.Size = new System.Drawing.Size(419, 87);
this.pnlCOMStatus.TabIndex = 36;
//
// cmbStopBit
//
this.cmbStopBit.Font = new System.Drawing.Font("Arial", 8F);
this.cmbStopBit.Items.AddRange(new object[] {
"1",
"2"});
this.cmbStopBit.Location = new System.Drawing.Point(339, 35);
this.cmbStopBit.Name = "cmbStopBit";
this.cmbStopBit.Size = new System.Drawing.Size(56, 22);
this.cmbStopBit.TabIndex = 32;
//
// btCloseCOM
//
this.btCloseCOM.Enabled = false;
this.btCloseCOM.Font = new System.Drawing.Font("Arial", 8F);
this.btCloseCOM.Location = new System.Drawing.Point(317, 61);
this.btCloseCOM.Name = "btCloseCOM";
this.btCloseCOM.Size = new System.Drawing.Size(78, 23);
this.btCloseCOM.TabIndex = 45;
this.btCloseCOM.Text = "Close";
this.btCloseCOM.Click += new System.EventHandler(this.btCloseCOM_Click);
//
// cmbParity
//
this.cmbParity.Font = new System.Drawing.Font("Arial", 8F);
this.cmbParity.Items.AddRange(new object[] {
"0-None Parity",
"1-Odd Parity",
"2-Even Parity"});
this.cmbParity.Location = new System.Drawing.Point(226, 35);
this.cmbParity.Name = "cmbParity";
this.cmbParity.Size = new System.Drawing.Size(100, 22);
this.cmbParity.TabIndex = 31;
//
// btOpenCOM
//
this.btOpenCOM.Font = new System.Drawing.Font("Arial", 8F);
this.btOpenCOM.Location = new System.Drawing.Point(226, 61);
this.btOpenCOM.Name = "btOpenCOM";
this.btOpenCOM.Size = new System.Drawing.Size(78, 23);
this.btOpenCOM.TabIndex = 38;
this.btOpenCOM.Text = "Open";
this.btOpenCOM.Click += new System.EventHandler(this.btOpenCOM_Click);
//
// cmbDataBit
//
this.cmbDataBit.Font = new System.Drawing.Font("Arial", 8F);
this.cmbDataBit.Items.AddRange(new object[] {
"7",
"8"});
this.cmbDataBit.Location = new System.Drawing.Point(170, 35);
this.cmbDataBit.Name = "cmbDataBit";
this.cmbDataBit.Size = new System.Drawing.Size(48, 22);
this.cmbDataBit.TabIndex = 30;
//
// label7
//
this.label7.Font = new System.Drawing.Font("Arial", 8F);
this.label7.ForeColor = System.Drawing.Color.Blue;
this.label7.Location = new System.Drawing.Point(3, 3);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(140, 17);
this.label7.TabIndex = 46;
this.label7.Text = "Connection Status";
//
// labStopBit
//
this.labStopBit.Font = new System.Drawing.Font("Arial", 8F);
this.labStopBit.Location = new System.Drawing.Point(339, 20);
this.labStopBit.Name = "labStopBit";
this.labStopBit.Size = new System.Drawing.Size(56, 15);
this.labStopBit.TabIndex = 47;
this.labStopBit.Text = "Stop Bit";
this.labStopBit.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// labParity
//
this.labParity.Font = new System.Drawing.Font("Arial", 8F);
this.labParity.Location = new System.Drawing.Point(228, 20);
this.labParity.Name = "labParity";
this.labParity.Size = new System.Drawing.Size(98, 15);
this.labParity.TabIndex = 48;
this.labParity.Text = "Parity";
this.labParity.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// labBaud
//
this.labBaud.Font = new System.Drawing.Font("Arial", 8F);
this.labBaud.Location = new System.Drawing.Point(86, 20);
this.labBaud.Name = "labBaud";
this.labBaud.Size = new System.Drawing.Size(75, 15);
this.labBaud.TabIndex = 49;
this.labBaud.Text = "Baudrate";
this.labBaud.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// labDataBit
//
this.labDataBit.Font = new System.Drawing.Font("Arial", 8F);
this.labDataBit.Location = new System.Drawing.Point(170, 20);
this.labDataBit.Name = "labDataBit";
this.labDataBit.Size = new System.Drawing.Size(48, 15);
this.labDataBit.TabIndex = 50;
this.labDataBit.Text = "Data Bit";
this.labDataBit.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// labPort
//
this.labPort.Font = new System.Drawing.Font("Arial", 8F);
this.labPort.Location = new System.Drawing.Point(6, 20);
this.labPort.Name = "labPort";
this.labPort.Size = new System.Drawing.Size(75, 15);
this.labPort.TabIndex = 51;
this.labPort.Text = "COM Port";
this.labPort.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// cmbBaud
//
this.cmbBaud.Font = new System.Drawing.Font("Arial", 8F);
this.cmbBaud.Items.AddRange(new object[] {
"1200",
"2400",
"4800",
"9600",
"19200",
"38400",
"57600",
"115200"});
this.cmbBaud.Location = new System.Drawing.Point(85, 35);
this.cmbBaud.Name = "cmbBaud";
this.cmbBaud.Size = new System.Drawing.Size(76, 22);
this.cmbBaud.TabIndex = 29;
//
// cmbPort
//
this.cmbPort.Font = new System.Drawing.Font("Arial", 8F);
this.cmbPort.Location = new System.Drawing.Point(6, 35);
this.cmbPort.Name = "cmbPort";
this.cmbPort.Size = new System.Drawing.Size(75, 22);
this.cmbPort.TabIndex = 28;
//
// timer1
//
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// button1
//
this.button1.Enabled = false;
this.button1.Location = new System.Drawing.Point(12, 133);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 62;
this.button1.Text = "连接设备";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(37, 180);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(29, 12);
this.label3.TabIndex = 64;
this.label3.Text = "SN:";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(10, 237);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(59, 12);
this.label4.TabIndex = 66;
this.label4.Text = "version:";
//
// version
//
this.version.AutoSize = true;
this.version.Location = new System.Drawing.Point(68, 237);
this.version.Name = "version";
this.version.Size = new System.Drawing.Size(35, 12);
this.version.TabIndex = 65;
this.version.Text = ".....";
//
// StartTest
//
this.StartTest.Enabled = false;
this.StartTest.Location = new System.Drawing.Point(385, 133);
this.StartTest.Name = "StartTest";
this.StartTest.Size = new System.Drawing.Size(75, 23);
this.StartTest.TabIndex = 80;
this.StartTest.Text = "开始测试";
this.StartTest.UseVisualStyleBackColor = true;
this.StartTest.Click += new System.EventHandler(this.button2_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(258, 135);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(47, 12);
this.label1.TabIndex = 81;
this.label1.Text = "SIM800:";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(240, 167);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(65, 12);
this.label2.TabIndex = 82;
this.label2.Text = "SIM卡状态:";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(246, 203);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(59, 12);
this.label5.TabIndex = 83;
this.label5.Text = "网络状态:";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(741, 308);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(53, 12);
this.label6.TabIndex = 84;
this.label6.Text = "GPS状态:";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(234, 238);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(71, 12);
this.label8.TabIndex = 85;
this.label8.Text = "信号值状态:";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(240, 274);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(65, 12);
this.label9.TabIndex = 86;
this.label9.Text = "FLASH状态:";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(252, 303);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(53, 12);
this.label10.TabIndex = 87;
this.label10.Text = "RTC状态:";
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(28, 269);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(41, 12);
this.label11.TabIndex = 89;
this.label11.Text = "Name:";
//
// reset
//
this.reset.Enabled = false;
this.reset.Location = new System.Drawing.Point(385, 169);
this.reset.Name = "reset";
this.reset.Size = new System.Drawing.Size(75, 23);
this.reset.TabIndex = 90;
this.reset.Text = "复位";
this.reset.UseVisualStyleBackColor = true;
this.reset.Click += new System.EventHandler(this.reset_Click);
//
// bgWorker
//
this.bgWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(this.bgWorker_DoWork);
this.bgWorker.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.bgWorker_ProgressChanged);
//
// updateops
//
this.updateops.Controls.Add(this.imagesname);
this.updateops.Controls.Add(this.label12);
this.updateops.Controls.Add(this.choosebth);
this.updateops.Controls.Add(this.label13);
this.updateops.Controls.Add(this.UpdateBar);
this.updateops.Controls.Add(this.UpdateBtn);
this.updateops.Location = new System.Drawing.Point(38, 382);
this.updateops.Name = "updateops";
this.updateops.Size = new System.Drawing.Size(360, 103);
this.updateops.TabIndex = 91;
this.updateops.TabStop = false;
this.updateops.Text = "更新操作";
//
// imagesname
//
this.imagesname.AutoSize = true;
this.imagesname.Location = new System.Drawing.Point(56, 70);
this.imagesname.Name = "imagesname";
this.imagesname.Size = new System.Drawing.Size(47, 12);
this.imagesname.TabIndex = 5;
this.imagesname.Text = "wtd.bin";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(16, 70);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(41, 12);
this.label12.TabIndex = 4;
this.label12.Text = "镜像:";
//
// choosebth
//
this.choosebth.Location = new System.Drawing.Point(182, 65);
this.choosebth.Name = "choosebth";
this.choosebth.Size = new System.Drawing.Size(75, 23);
this.choosebth.TabIndex = 3;
this.choosebth.Text = "选择bin";
this.choosebth.UseVisualStyleBackColor = true;
this.choosebth.Click += new System.EventHandler(this.choosebth_Click);
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(16, 26);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(41, 12);
this.label13.TabIndex = 2;
this.label13.Text = "进度:";
//
// UpdateBar
//
this.UpdateBar.Location = new System.Drawing.Point(58, 20);
this.UpdateBar.Name = "UpdateBar";
this.UpdateBar.Size = new System.Drawing.Size(280, 23);
this.UpdateBar.TabIndex = 1;
//
// UpdateBtn
//
this.UpdateBtn.Location = new System.Drawing.Point(263, 65);
this.UpdateBtn.Name = "UpdateBtn";
this.UpdateBtn.Size = new System.Drawing.Size(75, 23);
this.UpdateBtn.TabIndex = 0;
this.UpdateBtn.Text = "一键更新";
this.UpdateBtn.UseVisualStyleBackColor = true;
this.UpdateBtn.Click += new System.EventHandler(this.UpdateBtn_Click);
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(28, 301);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(41, 12);
this.label14.TabIndex = 92;
this.label14.Text = "CCID:";
//
// CcidLab
//
this.CcidLab.AutoSize = true;
this.CcidLab.Location = new System.Drawing.Point(68, 301);
this.CcidLab.Name = "CcidLab";
this.CcidLab.Size = new System.Drawing.Size(35, 12);
this.CcidLab.TabIndex = 93;
this.CcidLab.Text = ".....";
//
// DTUSN
//
this.DTUSN.Enabled = false;
this.DTUSN.Location = new System.Drawing.Point(72, 177);
this.DTUSN.Name = "DTUSN";
this.DTUSN.Size = new System.Drawing.Size(100, 21);
this.DTUSN.TabIndex = 94;
this.DTUSN.Text = ".......";
this.DTUSN.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.DTUSN_KeyPress);
//
// Nametype
//
this.Nametype.Enabled = false;
this.Nametype.Location = new System.Drawing.Point(75, 267);
this.Nametype.Name = "Nametype";
this.Nametype.Size = new System.Drawing.Size(100, 21);
this.Nametype.TabIndex = 95;
this.Nametype.Text = ".......";
//
// button2
//
this.button2.Enabled = false;
this.button2.Location = new System.Drawing.Point(108, 133);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 96;
this.button2.Text = "修改参数";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click_1);
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(13, 335);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(59, 12);
this.label15.TabIndex = 97;
this.label15.Text = "RTCDate:";
//
// RtcDate
//
this.RtcDate.AutoSize = true;
this.RtcDate.Location = new System.Drawing.Point(68, 335);
this.RtcDate.Name = "RtcDate";
this.RtcDate.Size = new System.Drawing.Size(35, 12);
this.RtcDate.TabIndex = 98;
this.RtcDate.Text = ".....";
//
// SNcheck
//
this.SNcheck.AutoSize = true;
this.SNcheck.Location = new System.Drawing.Point(70, 206);
this.SNcheck.Name = "SNcheck";
this.SNcheck.Size = new System.Drawing.Size(41, 12);
this.SNcheck.TabIndex = 100;
this.SNcheck.Text = "......";
//
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(10, 206);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(59, 12);
this.label17.TabIndex = 101;
this.label17.Text = "SnCheck:";
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(246, 332);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(59, 12);
this.label16.TabIndex = 103;
this.label16.Text = "从机状态:";
//
// SlaveState
//
this.SlaveState.BackColor = System.Drawing.Color.Navy;
this.SlaveState.Location = new System.Drawing.Point(311, 332);
this.SlaveState.Name = "SlaveState";
this.SlaveState.Size = new System.Drawing.Size(48, 15);
this.SlaveState.TabIndex = 102;
this.SlaveState.TabStop = false;
//
// RTCLED
//
this.RTCLED.BackColor = System.Drawing.Color.Navy;
this.RTCLED.Location = new System.Drawing.Point(311, 303);
this.RTCLED.Name = "RTCLED";
this.RTCLED.Size = new System.Drawing.Size(48, 15);
this.RTCLED.TabIndex = 99;
this.RTCLED.TabStop = false;
//
// DI15
//
this.DI15.BackColor = System.Drawing.Color.Navy;
this.DI15.Location = new System.Drawing.Point(868, 75);
this.DI15.Name = "DI15";
this.DI15.Size = new System.Drawing.Size(48, 15);
this.DI15.TabIndex = 79;
this.DI15.TabStop = false;
//
// DI14
//
this.DI14.BackColor = System.Drawing.Color.Navy;
this.DI14.Location = new System.Drawing.Point(799, 285);
this.DI14.Name = "DI14";
this.DI14.Size = new System.Drawing.Size(48, 15);
this.DI14.TabIndex = 78;
this.DI14.TabStop = false;
//
// DI13
//
this.DI13.BackColor = System.Drawing.Color.Navy;
this.DI13.Location = new System.Drawing.Point(799, 250);
this.DI13.Name = "DI13";
this.DI13.Size = new System.Drawing.Size(48, 15);
this.DI13.TabIndex = 77;
this.DI13.TabStop = false;
//
// DI12
//
this.DI12.BackColor = System.Drawing.Color.Navy;
this.DI12.Location = new System.Drawing.Point(799, 215);
this.DI12.Name = "DI12";
this.DI12.Size = new System.Drawing.Size(48, 15);
this.DI12.TabIndex = 76;
this.DI12.TabStop = false;
//
// DI11
//
this.DI11.BackColor = System.Drawing.Color.Navy;
this.DI11.Location = new System.Drawing.Point(799, 180);
this.DI11.Name = "DI11";
this.DI11.Size = new System.Drawing.Size(48, 15);
this.DI11.TabIndex = 75;
this.DI11.TabStop = false;
//
// DI10
//
this.DI10.BackColor = System.Drawing.Color.Navy;
this.DI10.Location = new System.Drawing.Point(799, 145);
this.DI10.Name = "DI10";
this.DI10.Size = new System.Drawing.Size(48, 15);
this.DI10.TabIndex = 74;
this.DI10.TabStop = false;
//
// DI9
//
this.DI9.BackColor = System.Drawing.Color.Navy;
this.DI9.Location = new System.Drawing.Point(799, 110);
this.DI9.Name = "DI9";
this.DI9.Size = new System.Drawing.Size(48, 15);
this.DI9.TabIndex = 73;
this.DI9.TabStop = false;
//
// DI8
//
this.DI8.BackColor = System.Drawing.Color.Navy;
this.DI8.Location = new System.Drawing.Point(799, 75);
this.DI8.Name = "DI8";
this.DI8.Size = new System.Drawing.Size(48, 15);
this.DI8.TabIndex = 72;
this.DI8.TabStop = false;
//
// DI7
//
this.DI7.BackColor = System.Drawing.Color.Navy;
this.DI7.Location = new System.Drawing.Point(311, 135);
this.DI7.Name = "DI7";
this.DI7.Size = new System.Drawing.Size(48, 15);
this.DI7.TabIndex = 71;
this.DI7.TabStop = false;
//
// DI6
//
this.DI6.BackColor = System.Drawing.Color.Navy;
this.DI6.Location = new System.Drawing.Point(311, 169);
this.DI6.Name = "DI6";
this.DI6.Size = new System.Drawing.Size(48, 15);
this.DI6.TabIndex = 70;
this.DI6.TabStop = false;
//
// DI5
//
this.DI5.BackColor = System.Drawing.Color.Navy;
this.DI5.Location = new System.Drawing.Point(311, 203);
this.DI5.Name = "DI5";
this.DI5.Size = new System.Drawing.Size(48, 15);
this.DI5.TabIndex = 69;
this.DI5.TabStop = false;
//
// DI4
//
this.DI4.BackColor = System.Drawing.Color.Navy;
this.DI4.Location = new System.Drawing.Point(800, 306);
this.DI4.Name = "DI4";
this.DI4.Size = new System.Drawing.Size(48, 15);
this.DI4.TabIndex = 68;
this.DI4.TabStop = false;
//
// DI3
//
this.DI3.BackColor = System.Drawing.Color.Navy;
this.DI3.Location = new System.Drawing.Point(311, 237);
this.DI3.Name = "DI3";
this.DI3.Size = new System.Drawing.Size(48, 15);
this.DI3.TabIndex = 57;
this.DI3.TabStop = false;
//
// DI2
//
this.DI2.BackColor = System.Drawing.Color.Navy;
this.DI2.Location = new System.Drawing.Point(311, 271);
this.DI2.Name = "DI2";
this.DI2.Size = new System.Drawing.Size(48, 15);
this.DI2.TabIndex = 56;
this.DI2.TabStop = false;
//
// DI1
//
this.DI1.BackColor = System.Drawing.Color.Navy;
this.DI1.Location = new System.Drawing.Point(799, 45);
this.DI1.Name = "DI1";
this.DI1.Size = new System.Drawing.Size(48, 15);
this.DI1.TabIndex = 55;
this.DI1.TabStop = false;
//
// DI0
//
this.DI0.BackColor = System.Drawing.Color.Navy;
this.DI0.Location = new System.Drawing.Point(868, 97);
this.DI0.Name = "DI0";
this.DI0.Size = new System.Drawing.Size(48, 15);
this.DI0.TabIndex = 54;
this.DI0.TabStop = false;
//
// modbus_Master
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.label16);
this.Controls.Add(this.SlaveState);
this.Controls.Add(this.label17);
this.Controls.Add(this.SNcheck);
this.Controls.Add(this.RTCLED);
this.Controls.Add(this.RtcDate);
this.Controls.Add(this.label15);
this.Controls.Add(this.button2);
this.Controls.Add(this.Nametype);
this.Controls.Add(this.DTUSN);
this.Controls.Add(this.CcidLab);
this.Controls.Add(this.label14);
this.Controls.Add(this.updateops);
this.Controls.Add(this.reset);
this.Controls.Add(this.label11);
this.Controls.Add(this.label10);
this.Controls.Add(this.label9);
this.Controls.Add(this.label8);
this.Controls.Add(this.label6);
this.Controls.Add(this.label5);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.StartTest);
this.Controls.Add(this.DI15);
this.Controls.Add(this.DI14);
this.Controls.Add(this.DI13);
this.Controls.Add(this.DI12);
this.Controls.Add(this.DI11);
this.Controls.Add(this.DI10);
this.Controls.Add(this.DI9);
this.Controls.Add(this.DI8);
this.Controls.Add(this.DI7);
this.Controls.Add(this.DI6);
this.Controls.Add(this.DI5);
this.Controls.Add(this.DI4);
this.Controls.Add(this.label4);
this.Controls.Add(this.version);
this.Controls.Add(this.label3);
this.Controls.Add(this.button1);
this.Controls.Add(this.DI3);
this.Controls.Add(this.DI2);
this.Controls.Add(this.DI1);
this.Controls.Add(this.DI0);
this.Controls.Add(this.pnlCOMStatus);
this.Name = "modbus_Master";
this.Size = new System.Drawing.Size(481, 494);
this.Load += new System.EventHandler(this.modbus_Master_Load);
this.pnlCOMStatus.ResumeLayout(false);
this.updateops.ResumeLayout(false);
this.updateops.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.SlaveState)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.RTCLED)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.DI15)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.DI14)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.DI13)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.DI12)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.DI11)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.DI10)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.DI9)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.DI8)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.DI7)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.DI6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.DI5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.DI4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.DI3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.DI2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.DI1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.DI0)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Panel pnlCOMStatus;
private System.Windows.Forms.ComboBox cmbStopBit;
private System.Windows.Forms.Button btCloseCOM;
private System.Windows.Forms.ComboBox cmbParity;
private System.Windows.Forms.Button btOpenCOM;
private System.Windows.Forms.ComboBox cmbDataBit;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label labStopBit;
private System.Windows.Forms.Label labParity;
private System.Windows.Forms.Label labBaud;
private System.Windows.Forms.Label labDataBit;
private System.Windows.Forms.Label labPort;
private System.Windows.Forms.ComboBox cmbBaud;
private System.Windows.Forms.ComboBox cmbPort;
private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.PictureBox DI3;
private System.Windows.Forms.PictureBox DI2;
private System.Windows.Forms.PictureBox DI1;
private System.Windows.Forms.PictureBox DI0;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label version;
private System.Windows.Forms.PictureBox DI7;
private System.Windows.Forms.PictureBox DI6;
private System.Windows.Forms.PictureBox DI5;
private System.Windows.Forms.PictureBox DI4;
private System.Windows.Forms.PictureBox DI15;
private System.Windows.Forms.PictureBox DI14;
private System.Windows.Forms.PictureBox DI13;
private System.Windows.Forms.PictureBox DI12;
private System.Windows.Forms.PictureBox DI11;
private System.Windows.Forms.PictureBox DI10;
private System.Windows.Forms.PictureBox DI9;
private System.Windows.Forms.PictureBox DI8;
private System.Windows.Forms.Button StartTest;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Button reset;
private System.ComponentModel.BackgroundWorker bgWorker;
private System.Windows.Forms.GroupBox updateops;
private System.Windows.Forms.Label imagesname;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Button choosebth;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.ProgressBar UpdateBar;
private System.Windows.Forms.Button UpdateBtn;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label CcidLab;
private System.Windows.Forms.TextBox DTUSN;
private System.Windows.Forms.TextBox Nametype;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.Label RtcDate;
private System.Windows.Forms.PictureBox RTCLED;
private System.Windows.Forms.Label SNcheck;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.PictureBox SlaveState;
private System.Windows.Forms.Label label16;
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
//step1. reference nmodbuspc.dll, and using the namespaces.
using Modbus.Device; //for modbus master
using System.IO.Ports; //for serial port
using ModbusRTU_Master;
using ModbusDemo.windows;
using System.IO;
using System.Threading;
usingSystem.Runtime.InteropServices;
using System.Diagnostics;
/*
//Modbus exception codes definition
* Code * Name * Meaning
01 ILLEGAL FUNCTION The function code received in the query is not an allowable action for the server.
02 ILLEGAL DATA ADDRESS The data addrdss received in the query is not an allowable address for the server.
03 ILLEGAL DATA VALUE A value contained in the query data field is not an allowable value for the server.
04 SLAVE DEVICE FAILURE An unrecoverable error occurred while the server attempting to perform the requested action.
05 ACKNOWLEDGE This response is returned to prevent a timeout error from occurring in the client (or master)
when the server (or slave) needs a long duration of time to process accepted request.
06 SLAVE DEVICE BUSY The server (or slave) is engaged in processing a long–duration program command , and the
client (or master) should retransmit the message later when the server (or slave) is free.
08 MEMORY PARITY ERROR The server (or slave) attempted to read record file, but detected a parity error in the memory.
0A GATEWAY PATH UNAVAILABLE The gateway is misconfigured or overloaded.
0B GATEWAY TARGET DEVICE FAILED TO RESPOND No response was obtained from the target device. Usually means that the device is not present on the network.
*/
namespace ModbusDemo
{
public partial class modbus_Master : UserControl
{
SerialPort serialPort = new SerialPort(); //create a new SerialPort object with default settings.
ModbusSerialMaster master;
List<TextBox> listAI = new List<TextBox>();
List<TextBox> listAO = new List<TextBox>();
List<PictureBox> listDI = new List<PictureBox>();
List<PictureBox> listDO = new List<PictureBox>();
string ImagefilePath =null;
FileStream fsl;
byte[] MNames = new byte[12];
byte[] Ccids = new byte[20];
byte[] state = new byte[2];
Int32 SN;
private int waitTime;
private Thread t_UpgradeConn;
private bool bStart = false;
AutoResetEvent exitEvent;
public delegate void invokeDelegate();
[DllImport("user32.dll")]
public static extern int MessageBeep(uint uType);
public static string Values { get; set; }
public static int Sign { get; set; }
public static byte[] TepArray { get; set; } = new Byte[100];
public modbus_Master()
{
InitializeComponent();
Sign = 0;
}
private void modbus_Master_Load(object sender, EventArgs e)
{
cmbBaud.SelectedIndex = 7;
cmbDataBit.SelectedIndex = 1;
cmbParity.SelectedIndex = 0;
cmbStopBit.SelectedIndex = 0;
foreach (string s in SerialPort.GetPortNames())
cmbPort.Items.Add(s);
cmbPort.SelectedIndex = -1;
listDI.Add(DI0);
listDI.Add(DI1);
listDI.Add(DI2);
listDI.Add(DI3);
listDI.Add(DI4);
listDI.Add(DI5);
listDI.Add(DI6);
listDI.Add(DI7);
listDI.Add(DI8);
listDI.Add(DI9);
listDI.Add(DI10);
listDI.Add(DI11);
listDI.Add(DI12);
listDI.Add(DI13);
listDI.Add(DI14);
listDI.Add(DI15);
//listDO.Add(DO0);
//listDO.Add(DO1);
//listDO.Add(DO2);
//listDO.Add(DO3);
//listAI.Add(AI0);
//listAI.Add(AI1);
//listAI.Add(AI2);
//listAI.Add(AI3);
//listAO.Add(AO0);
//listAO.Add(AO1);
//listAO.Add(AO2);
//listAO.Add(AO3);
exitEvent = new AutoResetEvent(false);
waitTime = 6000;
t_UpgradeConn = new Thread(UpgradeProc);
t_UpgradeConn.IsBackground = true;
t_UpgradeConn.Start();
}
private void btOpenCOM_Click(object sender, EventArgs e)
{
if (cmbPort.Text == "")
{
MessageBox.Show("串口打开错误");
return;
}
else
{
serialPort.PortName = cmbPort.Text;
serialPort.BaudRate = int.Parse(cmbBaud.Text);
serialPort.DataBits = int.Parse(cmbDataBit.Text);
}
if (cmbParity.Text.Substring(0, 1) == "0")
{
serialPort.Parity = Parity.None;
}
else if (cmbParity.Text.Substring(0, 1) == "1")
{
serialPort.Parity = Parity.Odd;
}
else if (cmbParity.Text.Substring(0, 1) == "2")
{
serialPort.Parity = Parity.Even;
}
if (cmbStopBit.Text == "0")
{
serialPort.StopBits = StopBits.None;
}
else if (cmbStopBit.Text == "1")
{
serialPort.StopBits = StopBits.One;
}
try
{
serialPort.Open();
master = ModbusSerialMaster.CreateRtu(serialPort);
master.Transport.Retries = 0; //don't have to do retries
master.Transport.ReadTimeout = 6000; //milliseconds
master.Transport.WriteTimeout = 6000;
uint beepI = 0x00000066;
MessageBeep(beepI);
Console.WriteLine(DateTime.Now.ToString() + " =>Open " + serialPort.PortName + " sucessfully!");
//MessageBox.Show(DateTime.Now.ToString() + System.Environment.NewLine + " =>Open " + serialPort.PortName + " sucessfully!");
btOpenCOM.Enabled = false;
btCloseCOM.Enabled = true;
button1.Enabled = true;
}
catch (Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
MessageBox.Show("Error: " + ex.Message);
return;
}
}
private void btCloseCOM_Click(object sender, EventArgs e)
{
//Close comport first,then stop and dispose slave.
serialPort.Close();
btOpenCOM.Enabled = true;
btCloseCOM.Enabled = false;
timer1.Enabled = false;
button1.Enabled = false;
StartTest.Enabled = false;
reset.Enabled = false;
Console.WriteLine(DateTime.Now.ToString() + " =>Disconnect " + serialPort.PortName);
MessageBox.Show(DateTime.Now.ToString() + System.Environment.NewLine + " =>Disconnect " + serialPort.PortName);
}
//set DO
private void DO_click(object sender, EventArgs e)
{
byte slaveID = 1;
if (serialPort.IsOpen == true)
{
ushort index = ushort.Parse(((PictureBox)sender).Tag.ToString());
if (((PictureBox)sender).BackColor == Color.DarkRed)
master.WriteSingleCoil(slaveID, index, true);
else
master.WriteSingleCoil(slaveID, index, false);
}
}
//set AO
private void AO_click(object sender, EventArgs e)
{
byte slaveID = 1;
frmInputValue inputvalue = new frmInputValue();
if (serialPort.IsOpen == true)
{
ushort index = ushort.Parse(((TextBox)sender).Tag.ToString());
inputvalue.StringValue = ((TextBox)sender).Text;
inputvalue.ShowDialog();
if (inputvalue.DialogResult == DialogResult.OK)
{
double value = inputvalue.Value;
ushort aovalue = (ushort)value;
//use gain=20/32767, offset=0
//ushort aovalue = (ushort)(value * 32767 / 20.0);
master.WriteSingleRegister(slaveID, index, aovalue);
}
}
}
/*************************************************************************************/
private void button1_Click(object sender, EventArgs e)//设备信息读取
{
////下载部分
Process proc = null;
try
{
//"C:\Users\shaxu\OneDrive\C# lib\c#-utilityLibrary\ModbusDemo\bin\Debug\"
//当前运行目录
string targetDir = string.Format(@System.Windows.Forms.Application.StartupPath);//this is where testChange.bat lies
proc = new Process();
proc.StartInfo.WorkingDirectory = targetDir;
proc.StartInfo.FileName = "jlink_app_download.bat";
proc.StartInfo.Arguments = string.Format("10");//this is argument
//proc.StartInfo.CreateNoWindow = true;
//proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;//这里设置DOS窗口不显示,经实践可行
proc.Start();
proc.WaitForExit();
}
catch (Exception ex)
{
Console.WriteLine("Exception Occurred :{0},{1}", ex.Message, ex.StackTrace.ToString());
}
try
{
ushort[] register = master.ReadHoldingRegisters(1, 0, 3);
SN = (register[0] << 16) + (Int32)register[1];
DTUSN.Text = SN.ToString();
byte[] bs = BitConverter.GetBytes(register[2]);
version.Text = (
Convert.ToInt32(bs[1].ToString("X2")) / 10 + Convert.ToInt32(bs[1].ToString("X2")) % 10 + "." +
Convert.ToInt32(bs[0].ToString("X2")) / 10 + "." + Convert.ToInt32(bs[0].ToString("X2")) % 10
).ToString();
ushort[] Namestr = master.ReadHoldingRegisters(1, 3, 6);
for (int i = 0; i < 4; i++)
{
if (i < 2)
MNames[i] = (byte)((Namestr[0] >> (i * 8)) & 0x00ff);
else
MNames[i] = (byte)(Namestr[1] >> ((i % 2) * 8) & 0x00ff);
}
for (int i = 4; i < 8; i++)
{
if (i < 6)
MNames[i] = (byte)((Namestr[2] >> (i * 8)) & 0x00ff);
else
MNames[i] = (byte)(Namestr[3] >> ((i % 2) * 8) & 0x00ff);
}
for (int i = 8; i < 12; i++)
{
if (i < 10)
MNames[i] = (byte)((Namestr[4] >> (i * 8)) & 0x00ff);
else
MNames[i] = (byte)(Namestr[5] >> ((i % 2) * 8) & 0x00ff);
}
Nametype.Text = System.Text.Encoding.ASCII.GetString(MNames);
Int32 year, month, day;
ushort[] RtcDates = master.ReadHoldingRegisters(1, 23, 6);
year = RtcDates[0];
month = RtcDates[1];
day = RtcDates[2];
RtcDate.Text = year.ToString() + "." +
month.ToString() + "." +
day.ToString();
if (RtcDate.Text != "1999.12.31")
{
RTCLED.BackColor = Color.Lime;
}
else
RTCLED.BackColor = Color.Red;
StartTest.Enabled = true;
reset.Enabled = true;
this.UpdateBtn.Enabled = true;
this.choosebth.Enabled = true;
this.button2.Enabled = true;
//关闭写入功能
DTUSN.Enabled = true;
Nametype.Enabled = true;
}
catch (Exception exception)
{
//Connection exception
//No response from server.
//The server maybe close the com port, or response timeout.
if (exception.Source.Equals("System"))
{
Console.WriteLine(DateTime.Now.ToString() + " " + exception.Message);
return ;
//MessageBox.Show(DateTime.Now.ToString() + " " + exception.Message);
}
//The server return error code.
//You can get the function code and exception code.
if (exception.Source.Equals("nModbusPC"))
{
string str = exception.Message;
int FunctionCode;
string ExceptionCode;
str = str.Remove(0, str.IndexOf("\r\n") + 17);
FunctionCode = Convert.ToInt16(str.Remove(str.IndexOf("\r\n")));
Console.WriteLine("Function Code: " + FunctionCode.ToString("X"));
MessageBox.Show("Function Code: " + FunctionCode.ToString("X"));
str = str.Remove(0, str.IndexOf("\r\n") + 17);
ExceptionCode = str.Remove(str.IndexOf("-"));
switch (ExceptionCode.Trim())
{
case "1":
Console.WriteLine("Exception Code: " + ExceptionCode.Trim() + "----> Illegal function!");
MessageBox.Show("Exception Code: " + ExceptionCode.Trim() + "----> Illegal function!");
break;
case "2":
Console.WriteLine("Exception Code: " + ExceptionCode.Trim() + "----> Illegal data address!");
MessageBox.Show("Exception Code: " + ExceptionCode.Trim() + "----> Illegal data address!");
break;
case "3":
Console.WriteLine("Exception Code: " + ExceptionCode.Trim() + "----> Illegal data value!");
MessageBox.Show("Exception Code: " + ExceptionCode.Trim() + "----> Illegal data value!");
break;
case "4":
Console.WriteLine("Exception Code: " + ExceptionCode.Trim() + "----> Slave device failure!");
MessageBox.Show("Exception Code: " + ExceptionCode.Trim() + "----> Slave device failure!");
break;
}
}
}
}
private void timer1_Tick(object sender, EventArgs e)
{
try
{
ushort[] signflag = master.ReadHoldingRegisters(1, 10, 1);
if (Sign == 1)
{
SlaveState.BackColor = Color.Lime;
Sign = 0;
}
if(Sign ==2)
{
SlaveState.BackColor = Color.Red;
MessageBox.Show("从机通道异常,异常数据头为:" + " ‘ " + TepArray[0].ToString("X2") + " ’ ");
TepArray[0] = 0;
Sign = 0;
}
if (signflag[0] == 3)
{
/*获取状态*/
ushort[] register = master.ReadHoldingRegisters(1, 11, 1);
for (int i = 0; i < 2; i++)
{
state[i] = (byte)((register[0] >> (i * 8)) & 0x00ff);
}
bool[] status = GetBoolArr(state[0]);
bool[] status2 = GetBoolArr(state[1]);
for (int num = 7; num >= 0; num--)
{
if (status[num] == true)
listDI[num].BackColor = Color.Lime;
else
listDI[num].BackColor = Color.Red;
if (status2[num] == true)
listDI[num + 8].BackColor = Color.Lime;
else
listDI[num + 8].BackColor = Color.Red;
}
/*CCID获取*/
ushort[] CCID = master.ReadHoldingRegisters(1, 13, 10);
for (int i = 0; i < 4; i++)
{
if (i < 2)
Ccids[i] = (byte)((CCID[0] >> (i * 8)) & 0x00ff);
else
Ccids[i] = (byte)(CCID[1] >> ((i % 2) * 8) & 0x00ff);
}
for (int i = 4; i < 8; i++)
{
if (i < 6)
Ccids[i] = (byte)((CCID[2] >> (i * 8)) & 0x00ff);
else
Ccids[i] = (byte)(CCID[3] >> ((i % 2) * 8) & 0x00ff);
}
for (int i = 8; i < 12; i++)
{
if (i < 10)
Ccids[i] = (byte)((CCID[4] >> (i * 8)) & 0x00ff);
else
Ccids[i] = (byte)(CCID[5] >> ((i % 2) * 8) & 0x00ff);
}
for (int i = 12; i < 16; i++)
{
if (i < 14)
Ccids[i] = (byte)((CCID[6] >> (i * 8)) & 0x00ff);
else
Ccids[i] = (byte)(CCID[7] >> ((i % 2) * 8) & 0x00ff);
}
for (int i = 16; i < 20; i++)
{
if (i < 18)
Ccids[i] = (byte)((CCID[8] >> (i * 8)) & 0x00ff);
else
Ccids[i] = (byte)(CCID[9] >> ((i % 2) * 8) & 0x00ff);
}
CcidLab.Text = System.Text.Encoding.ASCII.GetString(Ccids);
timer1.Enabled = false;
DialogResult dr = MessageBox.Show("从机测试完成请确认", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
if (dr == DialogResult.OK)
{
//点确定的代码
StartTest.Enabled = true;
for (int num = 7; num >= 0; num--)
{
if (status[num] == true)
listDI[num].BackColor = Color.Navy;
else
listDI[num].BackColor = Color.Red;
if (status2[num] == true)
listDI[num + 8].BackColor = Color.Navy;
else
listDI[num + 8].BackColor = Color.Red;
}
if (Values != null)
{
DialogResult dv = MessageBox.Show("主机回复正常请确认" + "\n\r" + "回复内容:" + Values.ToString(), "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
}
RTCLED.BackColor = Color.Navy;
SlaveState.BackColor = Color.Navy;
DTUSN.Text = "......";
SNcheck.Text = "......";
version.Text = "......";
Nametype.Text = "......";
CcidLab.Text = "......";
RtcDate.Text = ".......";
btOpenCOM.Enabled = false;
button2.Enabled = false;
btCloseCOM.Enabled = true;
timer1.Enabled = false;
button1.Enabled = true;
StartTest.Enabled = false;
reset.Enabled = false;
}
//else
//{
RTCLED.BackColor = Color.Navy;
SlaveState.BackColor = Color.Navy;
btOpenCOM.Enabled = false;
button2.Enabled = false;
btCloseCOM.Enabled = true;
timer1.Enabled = false;
button1.Enabled = true;
StartTest.Enabled = false;
reset.Enabled = false;
// }
}
}
catch (Exception exception)
{
//Connection exception
//No response from server.
//The server maybe close the com port, or response timeout.
if (exception.Source.Equals("System"))
{
timer1.Enabled = false;
StartTest.Enabled = false;
reset.Enabled = false;
this.UpdateBtn.Enabled = false;
this.choosebth.Enabled = false;
this.button2.Enabled = false;
Console.WriteLine(DateTime.Now.ToString() + " " + exception.Message);
MessageBox.Show(DateTime.Now.ToString() + " " + exception.Message);
return;
}
//The server return error code.
//You can get the function code and exception code.
if (exception.Source.Equals("nModbusPC"))
{
string str = exception.Message;
int FunctionCode;
string ExceptionCode;
str = str.Remove(0, str.IndexOf("\r\n") + 17);
FunctionCode = Convert.ToInt16(str.Remove(str.IndexOf("\r\n")));
Console.WriteLine("Function Code: " + FunctionCode.ToString("X"));
MessageBox.Show("Function Code: " + FunctionCode.ToString("X"));
str = str.Remove(0, str.IndexOf("\r\n") + 17);
ExceptionCode = str.Remove(str.IndexOf("-"));
switch (ExceptionCode.Trim())
{
case "1":
Console.WriteLine("Exception Code: " + ExceptionCode.Trim() + "----> Illegal function!");
MessageBox.Show("Exception Code: " + ExceptionCode.Trim() + "----> Illegal function!");
break;
case "2":
Console.WriteLine("Exception Code: " + ExceptionCode.Trim() + "----> Illegal data address!");
MessageBox.Show("Exception Code: " + ExceptionCode.Trim() + "----> Illegal data address!");
break;
case "3":
Console.WriteLine("Exception Code: " + ExceptionCode.Trim() + "----> Illegal data value!");
MessageBox.Show("Exception Code: " + ExceptionCode.Trim() + "----> Illegal data value!");
break;
case "4":
Console.WriteLine("Exception Code: " + ExceptionCode.Trim() + "----> Slave device failure!");
MessageBox.Show("Exception Code: " + ExceptionCode.Trim() + "----> Slave device failure!");
break;
}
}
}
}
private void button2_Click(object sender, EventArgs e)
{
//MessageBox.Show("开始写入测试");
try
{
master.WriteSingleRegister(1, 10, 1);
timer1.Enabled = true;
button1.Enabled = false;
StartTest.Enabled = false;
reset.Enabled = false;
button2.Enabled = false;
this.UpdateBtn.Enabled = false;
this.choosebth.Enabled = false;
}
catch (Exception exception)
{
//Connection exception
//No response from server.
//The server maybe close the com port, or response timeout.
if (exception.Source.Equals("System"))
{
Console.WriteLine(DateTime.Now.ToString() + " " + exception.Message);
MessageBox.Show(DateTime.Now.ToString() + " " + exception.Message);
StartTest.Enabled = false;
reset.Enabled = false;
this.UpdateBtn.Enabled = false;
this.choosebth.Enabled = false;
timer1.Enabled = false;
return;
}
//The server return error code.
//You can get the function code and exception code.
if (exception.Source.Equals("nModbusPC"))
{
string str = exception.Message;
int FunctionCode;
string ExceptionCode;
str = str.Remove(0, str.IndexOf("\r\n") + 17);
FunctionCode = Convert.ToInt16(str.Remove(str.IndexOf("\r\n")));
Console.WriteLine("Function Code: " + FunctionCode.ToString("X"));
MessageBox.Show("Function Code: " + FunctionCode.ToString("X"));
str = str.Remove(0, str.IndexOf("\r\n") + 17);
ExceptionCode = str.Remove(str.IndexOf("-"));
switch (ExceptionCode.Trim())
{
case "1":
Console.WriteLine("Exception Code: " + ExceptionCode.Trim() + "----> Illegal function!");
MessageBox.Show("Exception Code: " + ExceptionCode.Trim() + "----> Illegal function!");
break;
case "2":
Console.WriteLine("Exception Code: " + ExceptionCode.Trim() + "----> Illegal data address!");
MessageBox.Show("Exception Code: " + ExceptionCode.Trim() + "----> Illegal data address!");
break;
case "3":
Console.WriteLine("Exception Code: " + ExceptionCode.Trim() + "----> Illegal data value!");
MessageBox.Show("Exception Code: " + ExceptionCode.Trim() + "----> Illegal data value!");
break;
case "4":
Console.WriteLine("Exception Code: " + ExceptionCode.Trim() + "----> Slave device failure!");
MessageBox.Show("Exception Code: " + ExceptionCode.Trim() + "----> Slave device failure!");
break;
}
}
}
}
private void reset_Click(object sender, EventArgs e)
{
try
{
master.WriteSingleRegister(1, 9, 0x55AA);
reset.Enabled = true;
}
catch (Exception exception)
{
//Connection exception
//No response from server.
//The server maybe close the com port, or response timeout.
if (exception.Source.Equals("System"))
{
Console.WriteLine(DateTime.Now.ToString() + " " + exception.Message);
MessageBox.Show(DateTime.Now.ToString() + " " + exception.Message);
StartTest.Enabled = false;
reset.Enabled = false;
this.UpdateBtn.Enabled = false;
this.choosebth.Enabled = false;
return;
}
//The server return error code.
//You can get the function code and exception code.
if (exception.Source.Equals("nModbusPC"))
{
string str = exception.Message;
int FunctionCode;
string ExceptionCode;
str = str.Remove(0, str.IndexOf("\r\n") + 17);
FunctionCode = Convert.ToInt16(str.Remove(str.IndexOf("\r\n")));
Console.WriteLine("Function Code: " + FunctionCode.ToString("X"));
MessageBox.Show("Function Code: " + FunctionCode.ToString("X"));
str = str.Remove(0, str.IndexOf("\r\n") + 17);
ExceptionCode = str.Remove(str.IndexOf("-"));
switch (ExceptionCode.Trim())
{
case "1":
Console.WriteLine("Exception Code: " + ExceptionCode.Trim() + "----> Illegal function!");
MessageBox.Show("Exception Code: " + ExceptionCode.Trim() + "----> Illegal function!");
break;
case "2":
Console.WriteLine("Exception Code: " + ExceptionCode.Trim() + "----> Illegal data address!");
MessageBox.Show("Exception Code: " + ExceptionCode.Trim() + "----> Illegal data address!");
break;
case "3":
Console.WriteLine("Exception Code: " + ExceptionCode.Trim() + "----> Illegal data value!");
MessageBox.Show("Exception Code: " + ExceptionCode.Trim() + "----> Illegal data value!");
break;
case "4":
Console.WriteLine("Exception Code: " + ExceptionCode.Trim() + "----> Slave device failure!");
MessageBox.Show("Exception Code: " + ExceptionCode.Trim() + "----> Slave device failure!");
break;
}
}
}
}
private void bgWorker_DoWork(object sender, DoWorkEventArgs e)
{
this.upgrade();
}
private void bgWorker_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
UpdateBar.Value = e.ProgressPercentage;
}
private void choosebth_Click(object sender, EventArgs e)
{
OpenFileDialog dialog = new OpenFileDialog();
dialog.Multiselect = false;//该值确定是否可以选择多个文件
dialog.Title = "请选择文件夹";
dialog.Filter = "镜像文件(*.bin)|*.bin";
if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
string file = dialog.FileName;
this.ImagefilePath = file;
this.imagesname.Text = file.Substring(file.LastIndexOf("\\") + 1); ;
}
}
private void UpdateBtn_Click(object sender, EventArgs e)
{
bStart = true;
int iMaxBufSize = 1024 * 100;
this.UpdateBtn.Enabled = false;
this.choosebth.Enabled = false;
int iFileSize = 0;
Byte[] FileBuf = new Byte[iMaxBufSize];
if (ImagefilePath != null)
{
FileStream fsl = File.Open(ImagefilePath, FileMode.Open, FileAccess.ReadWrite);
if (File.Exists(ImagefilePath) == true)
{
BinaryReader br = new BinaryReader(fsl);
FileBuf = br.ReadBytes(iMaxBufSize);
iFileSize = FileBuf.Length;
br.Close();
fsl.Close();
}
}
else
{
MessageBox.Show("程序不存在");
this.UpdateBtn.Enabled = true;
this.choosebth.Enabled = true;
}
UpdateBar.Maximum = iFileSize;
UpdateBar.Minimum = 0;
if (bStart == true)
{
this.bgWorker.WorkerReportsProgress = true;
this.bgWorker.RunWorkerAsync();
bStart = false;
}
else
{
this.bgWorker.WorkerReportsProgress = false;
}
}
private void UpgradeProc()
{
while (true)
{
if (exitEvent.WaitOne(waitTime))
{
break;
}
invokeDelegate setText = () =>
{
if (this.UpdateBar.Value == this.UpdateBar.Maximum)
{
MessageBox.Show("更新成功!");
this.UpdateBar.Value = this.UpdateBar.Minimum;
this.UpdateBtn.Enabled = false;
this.choosebth.Enabled = true;
}
};
Invoke(setText);
}
}
private void upgrade()
{
//CheckForIllegalCrossThreadCalls = false;
////设置CheckForIllegalCrossThreadCalls = false 是能去掉这个检查的,但是这不是标准的作法.
////标准的作法是在访问界面控件时,访问下窗体的 InvokeRequired 属性,如果为false就可以直接访问,
////否则就是跨线程访问; 此时,创建一个delegate,并通过Invoke() 来调用它.
////参考https://www.cnblogs.com/janghe/p/7874889.html
const int Singlepackage =100;
const int PerBlockPacket = Singlepackage;
const int MB_ENOERR = 0;
int iFileSizeNow = 0;
int iFileSize = 0;
int iMaxBufSize = 1024 * 100;
ushort[] istage = new ushort[2];
//ushort[] data = new ushort[2];
Byte[] FileBuf = new Byte[iMaxBufSize];
string strLog = "";
UInt16 u16DevStatus = 0;
ushort[] usTrans = new ushort[Singlepackage];
UInt16[] u16unlock = { 0x5749, 0x5449, 0x554D };
int ret;
int errCnt = 0;
FileStream fsl = File.Open(ImagefilePath, FileMode.Open, FileAccess.ReadWrite);
if (File.Exists(ImagefilePath) == true)
{
BinaryReader br = new BinaryReader(fsl);
FileBuf = br.ReadBytes(iMaxBufSize);
iFileSize = FileBuf.Length;
br.Close();
fsl.Close();
}
else
{
MessageBox.Show("程序不存在");
}
istage[0] = 0;
master.WriteSingleRegister(1, 20600, 0);
ushort[] usFileBuf = new ushort[iMaxBufSize];
Buffer.BlockCopy(FileBuf, 0, usFileBuf, 0, FileBuf.Length);
bgWorker.ReportProgress(0);
while (true)
{
try
{
ushort[] data = master.ReadHoldingRegisters(1, 20600, 1);
u16DevStatus = data[0];
int sent = istage[0] * (Singlepackage * 2);
strLog = sent.ToString() + " has been sent.";
// UpdateBar.Value = sent;
bgWorker.ReportProgress(sent);
if (u16DevStatus == istage[0])
{
}
else
{
continue;
}
if (iFileSizeNow + PerBlockPacket * 2 <= iFileSize)
{
Buffer.BlockCopy(usFileBuf, iFileSizeNow, usTrans, 0, Singlepackage*2);
try
{
master.WriteMultipleRegisters(1, 20480, usTrans);
istage[0]++;
iFileSizeNow += PerBlockPacket * 2;
//Thread.Sleep(10);
}
catch (Exception exception)
{
//Connection exception
//No response from server.
//The server maybe close the com port, or response timeout.
if (exception.Source.Equals("System"))
{
if (errCnt > 5)
return;
else
errCnt++;
Console.WriteLine(DateTime.Now.ToString() + " " + exception.Message);
MessageBox.Show(DateTime.Now.ToString() + " " + exception.Message);
this.UpdateBar.Value = this.UpdateBar.Minimum;
this.StartTest.Enabled = false;
this.reset.Enabled = false;
this.UpdateBtn.Enabled = false;
this.choosebth.Enabled = false;
return;
}
}
}
else
{
//最后一帧
Array.Clear(usTrans, 0, usTrans.Length);
Buffer.BlockCopy(usFileBuf, iFileSizeNow, usTrans, 0, iFileSize - iFileSizeNow);
try
{
master.WriteMultipleRegisters(1, 20480, usTrans);
istage[0]++;
iFileSizeNow += PerBlockPacket * 2;
istage[0] = 0x5754;
bgWorker.ReportProgress(iFileSize);
while (true)
{
//ret = mb_dev.WriteMultipleRegs(wtdslaveid, 2173, 3, "", 502, ref u16unlock);
try
{
master.WriteMultipleRegisters(1, 20601, u16unlock);
break;
}
catch (Exception exception)
{
//Connection exception
//No response from server.
//The server maybe close the com port, or response timeout.
if (exception.Source.Equals("System"))
{
Console.WriteLine(DateTime.Now.ToString() + " " + exception.Message);
MessageBox.Show(DateTime.Now.ToString() + " " + exception.Message);
this.UpdateBar.Value = this.UpdateBar.Minimum;
this.StartTest.Enabled = false;
this.reset.Enabled = false;
this.UpdateBtn.Enabled = false;
this.choosebth.Enabled = false;
return;
}
}
}
return;
}
catch (Exception exception)
{
//Connection exception
//No response from server.
//The server maybe close the com port, or response timeout.
if (exception.Source.Equals("System"))
{
if (errCnt > 5)
return;
else
errCnt++;
Console.WriteLine(DateTime.Now.ToString() + " " + exception.Message);
MessageBox.Show(DateTime.Now.ToString() + " " + exception.Message);
this.UpdateBar.Value = this.UpdateBar.Minimum;
this.StartTest.Enabled = false;
this.reset.Enabled = false;
this.UpdateBtn.Enabled = false;
this.choosebth.Enabled = false;
return;
}
}
}
}
catch (Exception exception)
{
//Connection exception
//No response from server.
//The server maybe close the com port, or response timeout.
if (exception.Source.Equals("System"))
{
if (errCnt > 5)
return;
else
errCnt++;
Console.WriteLine(DateTime.Now.ToString() + " " + exception.Message);
MessageBox.Show(DateTime.Now.ToString() + " " + exception.Message);
this.UpdateBar.Value = this.UpdateBar.Minimum;
this.StartTest.Enabled = false;
this.reset.Enabled = false;
this.UpdateBtn.Enabled = false;
this.choosebth.Enabled = false;
return;
}
//The server return error code.
//You can get the function code and exception code.
if (exception.Source.Equals("nModbusPC"))
{
string str = exception.Message;
int FunctionCode;
string ExceptionCode;
str = str.Remove(0, str.IndexOf("\r\n") + 17);
FunctionCode = Convert.ToInt16(str.Remove(str.IndexOf("\r\n")));
Console.WriteLine("Function Code: " + FunctionCode.ToString("X"));
MessageBox.Show("Function Code: " + FunctionCode.ToString("X"));
str = str.Remove(0, str.IndexOf("\r\n") + 17);
ExceptionCode = str.Remove(str.IndexOf("-"));
switch (ExceptionCode.Trim())
{
case "1":
Console.WriteLine("Exception Code: " + ExceptionCode.Trim() + "----> Illegal function!");
MessageBox.Show("Exception Code: " + ExceptionCode.Trim() + "----> Illegal function!");
break;
case "2":
Console.WriteLine("Exception Code: " + ExceptionCode.Trim() + "----> Illegal data address!");
MessageBox.Show("Exception Code: " + ExceptionCode.Trim() + "----> Illegal data address!");
break;
case "3":
Console.WriteLine("Exception Code: " + ExceptionCode.Trim() + "----> Illegal data value!");
MessageBox.Show("Exception Code: " + ExceptionCode.Trim() + "----> Illegal data value!");
break;
case "4":
Console.WriteLine("Exception Code: " + ExceptionCode.Trim() + "----> Slave device failure!");
MessageBox.Show("Exception Code: " + ExceptionCode.Trim() + "----> Slave device failure!");
break;
}
this.UpdateBar.Value = this.UpdateBar.Minimum;
this.UpdateBtn.Enabled = false;
this.choosebth.Enabled = true;
return;
}
}
}
}
/****************转换函数*****************/
public static bool[] GetBoolArr(byte b)
{
bool[] Bool = new bool[8];
int i = 0;//读取出bit和byte顺序是颠倒的,利用i来作为数组下标
for (int num = 7; num >= 0; num--)
{
Bool[i] = (1 << num & b) > 0;
i++;
}
return Bool;
}
public static byte ConvertBCDToInt(byte b)
{
//高四位
byte b1 = (byte)((b >> 4) & 0xF);
//低四位
byte b2 = (byte)(b & 0xF);
return (byte)(b1 * 10 + b2);
}
public static byte[] HexStringToByteArray(string s)
{
s = s.Replace(" ", "");
byte[] buffer = new byte[s.Length / 2];
for (int i = 0; i < s.Length; i += 2)
buffer[i / 2] = (byte)Convert.ToByte(s.Substring(i, 2), 16);
return buffer;
}
//字符串转16进制字节组:
        public static byte[] strToHexByte(string hexString)
{
hexString = hexString.Replace(" ", "");   //去除空格
            if ((hexString.Length % 2) != 0)     //判断hexstring的长度是否为偶数
            {
hexString += "";
}
//声明一个长度为hexstring长度一半的字节组returnBytes
            byte[] returnBytes = new byte[hexString.Length / 2];
for (int i = 0; i < returnBytes.Length; i++)
{
//将hexstring的两个字符转换成16进制的字节组
                returnBytes[i] = Convert.ToByte(hexString.Substring(i * 2, 2), 16);
}
return returnBytes;
}
private string StringToHexString(string s, Encoding encode)
{
byte[] b = encode.GetBytes(s);//按照指定编码将string编程字节数组
string result = string.Empty;
for (int i = 0; i < b.Length; i++)//逐字节变为16进制字符,以%隔开
{
result += "%" + Convert.ToString(b[i], 16);
}
return result;
}
//字符串转16进制字节数组
/// <summary>
/// 字符串转16进制字节数组
/// </summary>
/// <param name="hexString"></param>
/// <returns></returns>
private static byte[] strToToHexByte(string hexString)
{
hexString = hexString.Replace(" ", "");
if ((hexString.Length % 2) != 0)
hexString = hexString.Insert(hexString.Length - 1, 0.ToString());
byte[] returnBytes = new byte[hexString.Length / 2];
for (int i = 0; i < returnBytes.Length; i++)
returnBytes[i] = Convert.ToByte(hexString.Substring(i * 2, 2), 16);
return returnBytes;
}
private void button2_Click_1(object sender, EventArgs e)
{
string sntext;
string Names;
int ki, kj;
ushort[] vOut2= new ushort[4];
UInt16[] SNIN16 = new UInt16[2];
sntext = DTUSN.Text.ToString();
int.TryParse(sntext, out ki);
string s = ki.ToString("X");
kj = int.Parse(s, System.Globalization.NumberStyles.AllowHexSpecifier);
var m = (kj >> 16) & 0Xffff;
var l = kj & 0xffff;
SNIN16[0] = (ushort)m;
SNIN16[1] = (ushort)l;
master.WriteMultipleRegisters(1, 0, SNIN16);
ushort[] SNC = master.ReadHoldingRegisters(1, 0, 3);
SN = (SNC[0] << 16) + (Int32)SNC[1];
SNcheck.Text = SN.ToString();
Names = Nametype.Text.ToString().PadRight(8,' ');
//int x = 0;
//List<short> result = new List<short>();
//while (NamesToHexByte.Length - x > 2)
//{
// result.Add(BitConverter.ToInt16(NamesToHexByte, x));
// x += 2;
//}
//short[] arr = result.ToArray();//这就是你要的
byte[] vOut = System.Text.Encoding.UTF8.GetBytes(Names);
vOut2[0]= BitConverter.ToUInt16(vOut, 0 /* Which byte position to convert */);
vOut2[1] = BitConverter.ToUInt16(vOut, 2 /* Which byte position to convert */);
vOut2[2] = BitConverter.ToUInt16(vOut, 4 /* Which byte position to convert */);
vOut2[3] = BitConverter.ToUInt16(vOut, 6 /* Which byte position to convert */);
master.WriteMultipleRegisters(1, 3, vOut2);
ushort[] register = master.ReadHoldingRegisters(1, 0, 3);
SN = (register[0] << 16) + (Int32)register[1];
DTUSN.Text = SN.ToString();
ushort[] Namestr = master.ReadHoldingRegisters(1, 3, 6);
for (int i = 0; i < 4; i++)
{
if (i < 2)
MNames[i] = (byte)((Namestr[0] >> (i * 8)) & 0x00ff);
else
MNames[i] = (byte)(Namestr[1] >> ((i % 2) * 8) & 0x00ff);
}
for (int i = 4; i < 8; i++)
{
if (i < 6)
MNames[i] = (byte)((Namestr[2] >> (i * 8)) & 0x00ff);
else
MNames[i] = (byte)(Namestr[3] >> ((i % 2) * 8) & 0x00ff);
}
for (int i = 8; i < 12; i++)
{
if (i < 10)
MNames[i] = (byte)((Namestr[4] >> (i * 8)) & 0x00ff);
else
MNames[i] = (byte)(Namestr[5] >> ((i % 2) * 8) & 0x00ff);
}
Nametype.Text = System.Text.Encoding.ASCII.GetString(MNames);
}
private void DTUSN_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar != 8 && !Char.IsDigit(e.KeyChar))//如果不是输入数字就不让输入
{
e.Handled = true;
}
}
}
}
<?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="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="bgWorker.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>132, 16</value>
</metadata>
</root>
\ No newline at end of file
namespace ModbusDemo
{
partial class AC
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AC));
this.userMQTT1 = new ModbusDemo.UserMQTT();
this.modbus_slave1 = new ModbusDemo.Modbus_slave();
this.SuspendLayout();
//
// userMQTT1
//
this.userMQTT1.Location = new System.Drawing.Point(12, 12);
this.userMQTT1.Name = "userMQTT1";
this.userMQTT1.Size = new System.Drawing.Size(659, 467);
this.userMQTT1.TabIndex = 0;
//
// modbus_slave1
//
this.modbus_slave1.Location = new System.Drawing.Point(677, 12);
this.modbus_slave1.Name = "modbus_slave1";
this.modbus_slave1.Size = new System.Drawing.Size(503, 308);
this.modbus_slave1.TabIndex = 1;
//
// AC
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1183, 488);
this.Controls.Add(this.modbus_slave1);
this.Controls.Add(this.userMQTT1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "AC";
this.Text = "AC";
this.Load += new System.EventHandler(this.AC_Load);
this.ResumeLayout(false);
}
#endregion
private UserMQTT userMQTT1;
private Modbus_slave modbus_slave1;
}
}
\ No newline at end of file
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 ModbusDemo
{
public partial class AC : Form
{
public AC()
{
InitializeComponent();
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.AllPaintingInWmPaint, true); // 禁止擦除背景.
SetStyle(ControlStyles.DoubleBuffer, true); // 双缓冲
}
private void AC_Load(object sender, EventArgs e)
{
}
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
namespace ModbusDemo
{
partial class Demo_818X
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Demo_818X));
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.label32 = new System.Windows.Forms.Label();
this.label33 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.button3 = new System.Windows.Forms.Button();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.userMQTT1 = new ModbusDemo.UserMQTT();
this.button1 = new System.Windows.Forms.Button();
this.label8 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.label23 = new System.Windows.Forms.Label();
this.label22 = new System.Windows.Forms.Label();
this.label21 = new System.Windows.Forms.Label();
this.label20 = new System.Windows.Forms.Label();
this.label19 = new System.Windows.Forms.Label();
this.label18 = new System.Windows.Forms.Label();
this.label17 = new System.Windows.Forms.Label();
this.label16 = new System.Windows.Forms.Label();
this.label31 = new System.Windows.Forms.Label();
this.label30 = new System.Windows.Forms.Label();
this.label29 = new System.Windows.Forms.Label();
this.label28 = new System.Windows.Forms.Label();
this.label27 = new System.Windows.Forms.Label();
this.label26 = new System.Windows.Forms.Label();
this.label25 = new System.Windows.Forms.Label();
this.label24 = new System.Windows.Forms.Label();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// groupBox4
//
this.groupBox4.Controls.Add(this.label32);
this.groupBox4.Controls.Add(this.label33);
this.groupBox4.Controls.Add(this.label7);
this.groupBox4.Controls.Add(this.label6);
this.groupBox4.Controls.Add(this.label5);
this.groupBox4.Controls.Add(this.label1);
this.groupBox4.Controls.Add(this.label2);
this.groupBox4.Controls.Add(this.comboBox1);
this.groupBox4.Controls.Add(this.button3);
this.groupBox4.Controls.Add(this.label4);
this.groupBox4.Controls.Add(this.label3);
this.groupBox4.Location = new System.Drawing.Point(12, 12);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(533, 103);
this.groupBox4.TabIndex = 5;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "模块搜索功能:";
//
// label32
//
this.label32.AutoSize = true;
this.label32.Location = new System.Drawing.Point(338, 64);
this.label32.Name = "label32";
this.label32.Size = new System.Drawing.Size(47, 12);
this.label32.TabIndex = 11;
this.label32.Text = "0:0:0:0";
//
// label33
//
this.label33.AutoSize = true;
this.label33.Location = new System.Drawing.Point(303, 64);
this.label33.Name = "label33";
this.label33.Size = new System.Drawing.Size(29, 12);
this.label33.TabIndex = 10;
this.label33.Text = "Mac:";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(219, 64);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(47, 12);
this.label7.TabIndex = 9;
this.label7.Text = "0.0.0.0";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(76, 64);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(47, 12);
this.label6.TabIndex = 8;
this.label6.Text = "0.0.0.0";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(219, 31);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(47, 12);
this.label5.TabIndex = 7;
this.label5.Text = "0.0.0.0";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(166, 64);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(53, 12);
this.label1.TabIndex = 6;
this.label1.Text = "Gateway:";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(17, 65);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(59, 12);
this.label2.TabIndex = 5;
this.label2.Text = "Netmask:";
//
// comboBox1
//
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Location = new System.Drawing.Point(78, 27);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(82, 20);
this.comboBox1.TabIndex = 3;
//
// button3
//
this.button3.Location = new System.Drawing.Point(305, 24);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(75, 23);
this.button3.TabIndex = 2;
this.button3.Text = "search";
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(166, 30);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(47, 12);
this.label4.TabIndex = 1;
this.label4.Text = "模块IP:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(17, 31);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(65, 12);
this.label3.TabIndex = 0;
this.label3.Text = "模块名称:";
//
// userMQTT1
//
this.userMQTT1.Location = new System.Drawing.Point(551, 23);
this.userMQTT1.Name = "userMQTT1";
this.userMQTT1.Size = new System.Drawing.Size(760, 446);
this.userMQTT1.TabIndex = 7;
//
// button1
//
this.button1.Location = new System.Drawing.Point(305, 20);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 1;
this.button1.Text = "UpData";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(19, 61);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(41, 12);
this.label8.TabIndex = 2;
this.label8.Text = "label8";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(19, 86);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(41, 12);
this.label9.TabIndex = 3;
this.label9.Text = "label9";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(19, 111);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(47, 12);
this.label10.TabIndex = 4;
this.label10.Text = "label10";
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(19, 136);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(47, 12);
this.label11.TabIndex = 5;
this.label11.Text = "label11";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(19, 161);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(47, 12);
this.label12.TabIndex = 6;
this.label12.Text = "label12";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(19, 186);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(47, 12);
this.label13.TabIndex = 7;
this.label13.Text = "label13";
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(19, 211);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(47, 12);
this.label14.TabIndex = 8;
this.label14.Text = "label14";
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(19, 236);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(47, 12);
this.label15.TabIndex = 9;
this.label15.Text = "label15";
//
// label23
//
this.label23.AutoSize = true;
this.label23.Location = new System.Drawing.Point(113, 61);
this.label23.Name = "label23";
this.label23.Size = new System.Drawing.Size(47, 12);
this.label23.TabIndex = 10;
this.label23.Text = "label23";
//
// label22
//
this.label22.AutoSize = true;
this.label22.Location = new System.Drawing.Point(113, 86);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(47, 12);
this.label22.TabIndex = 11;
this.label22.Text = "label22";
//
// label21
//
this.label21.AutoSize = true;
this.label21.Location = new System.Drawing.Point(113, 111);
this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(47, 12);
this.label21.TabIndex = 12;
this.label21.Text = "label21";
//
// label20
//
this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(113, 136);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(47, 12);
this.label20.TabIndex = 13;
this.label20.Text = "label20";
//
// label19
//
this.label19.AutoSize = true;
this.label19.Location = new System.Drawing.Point(113, 161);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(47, 12);
this.label19.TabIndex = 14;
this.label19.Text = "label19";
//
// label18
//
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(113, 186);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(47, 12);
this.label18.TabIndex = 15;
this.label18.Text = "label18";
//
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(113, 211);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(47, 12);
this.label17.TabIndex = 16;
this.label17.Text = "label17";
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(113, 236);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(47, 12);
this.label16.TabIndex = 17;
this.label16.Text = "label16";
//
// label31
//
this.label31.AutoSize = true;
this.label31.Location = new System.Drawing.Point(219, 61);
this.label31.Name = "label31";
this.label31.Size = new System.Drawing.Size(47, 12);
this.label31.TabIndex = 18;
this.label31.Text = "label31";
//
// label30
//
this.label30.AutoSize = true;
this.label30.Location = new System.Drawing.Point(219, 86);
this.label30.Name = "label30";
this.label30.Size = new System.Drawing.Size(47, 12);
this.label30.TabIndex = 19;
this.label30.Text = "label30";
//
// label29
//
this.label29.AutoSize = true;
this.label29.Location = new System.Drawing.Point(219, 111);
this.label29.Name = "label29";
this.label29.Size = new System.Drawing.Size(47, 12);
this.label29.TabIndex = 20;
this.label29.Text = "label29";
//
// label28
//
this.label28.AutoSize = true;
this.label28.Location = new System.Drawing.Point(219, 136);
this.label28.Name = "label28";
this.label28.Size = new System.Drawing.Size(47, 12);
this.label28.TabIndex = 21;
this.label28.Text = "label28";
//
// label27
//
this.label27.AutoSize = true;
this.label27.Location = new System.Drawing.Point(219, 161);
this.label27.Name = "label27";
this.label27.Size = new System.Drawing.Size(47, 12);
this.label27.TabIndex = 22;
this.label27.Text = "label27";
//
// label26
//
this.label26.AutoSize = true;
this.label26.Location = new System.Drawing.Point(219, 186);
this.label26.Name = "label26";
this.label26.Size = new System.Drawing.Size(47, 12);
this.label26.TabIndex = 23;
this.label26.Text = "label26";
//
// label25
//
this.label25.AutoSize = true;
this.label25.Location = new System.Drawing.Point(219, 211);
this.label25.Name = "label25";
this.label25.Size = new System.Drawing.Size(47, 12);
this.label25.TabIndex = 24;
this.label25.Text = "label25";
//
// label24
//
this.label24.AutoSize = true;
this.label24.Location = new System.Drawing.Point(219, 236);
this.label24.Name = "label24";
this.label24.Size = new System.Drawing.Size(47, 12);
this.label24.TabIndex = 25;
this.label24.Text = "label24";
//
// pictureBox1
//
this.pictureBox1.Image = global::ModbusDemo.Properties.Resources._057;
this.pictureBox1.Location = new System.Drawing.Point(305, 61);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(96, 87);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 26;
this.pictureBox1.TabStop = false;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.pictureBox1);
this.groupBox1.Controls.Add(this.label24);
this.groupBox1.Controls.Add(this.label25);
this.groupBox1.Controls.Add(this.label26);
this.groupBox1.Controls.Add(this.label27);
this.groupBox1.Controls.Add(this.label28);
this.groupBox1.Controls.Add(this.label29);
this.groupBox1.Controls.Add(this.label30);
this.groupBox1.Controls.Add(this.label31);
this.groupBox1.Controls.Add(this.label16);
this.groupBox1.Controls.Add(this.label17);
this.groupBox1.Controls.Add(this.label18);
this.groupBox1.Controls.Add(this.label19);
this.groupBox1.Controls.Add(this.label20);
this.groupBox1.Controls.Add(this.label21);
this.groupBox1.Controls.Add(this.label22);
this.groupBox1.Controls.Add(this.label23);
this.groupBox1.Controls.Add(this.label15);
this.groupBox1.Controls.Add(this.label14);
this.groupBox1.Controls.Add(this.label13);
this.groupBox1.Controls.Add(this.label12);
this.groupBox1.Controls.Add(this.label11);
this.groupBox1.Controls.Add(this.label10);
this.groupBox1.Controls.Add(this.label9);
this.groupBox1.Controls.Add(this.label8);
this.groupBox1.Controls.Add(this.button1);
this.groupBox1.Location = new System.Drawing.Point(12, 135);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(533, 281);
this.groupBox1.TabIndex = 6;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "数据展示";
//
// Demo_818X
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1358, 481);
this.Controls.Add(this.userMQTT1);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.groupBox4);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "Demo_818X";
this.Text = "模块测试Demo";
this.groupBox4.ResumeLayout(false);
this.groupBox4.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label32;
private System.Windows.Forms.Label label33;
private UserMQTT userMQTT1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.Label label23;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.Label label21;
private System.Windows.Forms.Label label20;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.Label label31;
private System.Windows.Forms.Label label30;
private System.Windows.Forms.Label label29;
private System.Windows.Forms.Label label28;
private System.Windows.Forms.Label label27;
private System.Windows.Forms.Label label26;
private System.Windows.Forms.Label label25;
private System.Windows.Forms.Label label24;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.GroupBox groupBox1;
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using ModbusDemo.windows;
using System.Threading;
using System.Windows.Forms;
using System.Net.Sockets;
using System.Net;
namespace ModbusDemo
{
public partial class Demo_818X : Form
{
WTModbus ReadTest = new WTModbus();
UserMQTT userMqtt = new UserMQTT();
ModSearch n_ModSearch = new ModSearch();
const int MAX_AN_CH_NUM = 8;
ushort[] typeData = new ushort[8];//当前量程读数
byte [] AbnoSignal = new byte[8];//通道异常信号
ushort[] Inputtype = new ushort[8];//输入类型
ushort[] m_u16ADData = new ushort[MAX_AN_CH_NUM]; //保存AD的值
string[] Strcom = new string[] {"A_10V","A_5V","A_2_5V","A_1V","A_500mV",
"A_100mV","A_20mV","T-K","T-J","T-R","T-S",
"T-B","T_E","T_T","T_N","I_0_20mA","I_4_20mA","null"};
string[] unit = new string[] { "null", "℃", "V", "MV", "MA" };
public class UserInfo
{
public int UserId { get; set; }
public string UserCompany { get; set; }
public float Data { get; set; }
public ushort UserModel { get; set; }
public double[] NegMin = {-10.000, -5.000, -2.500, -1.000, -500.00, -100.00,
-20.00, 0, 0, 0, 0, 0, 0, -100,0, -20, -20 }; //负数最小值
public double[] NegMax = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };//负数最大值
public double[] PosMin = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 500, 500, 500, 0, 0, 0, 0, 0 };//正数最小值
public double[] PosMax = { 10.000, 5.000, 2.500, 1.000, 500.00, 100.00, 20.000, 1370,
760, 1750, 1750, 1800 , 1000, 400,200,20,20};//正数最大值
public ushort[] usMin = {0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000 ,
0x0000, 0x0000, 0x2492, 0x2492, 0x2381, 0x0000, 0xE000,0x0000,0x8000,0x8000 };
public ushort[] usMax = {0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF,0x0000, 0x7FFF, 0x7FFF ,
0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF,0x7FFF,0x7FFF,0x7FFF };
}
UserInfo users = new UserInfo();
UserInfo users1 = new UserInfo();
UserInfo users2 = new UserInfo();
UserInfo users3 = new UserInfo();
UserInfo users4 = new UserInfo();
UserInfo users5 = new UserInfo();
UserInfo users6 = new UserInfo();
UserInfo users7 = new UserInfo();
public Demo_818X()
{
InitializeComponent();
}
private void button3_Click(object sender, EventArgs e)
{
n_ModSearch.ThStart();
label5.Text = n_ModSearch.m_DeviceInfo.IpAddr;
comboBox1.Text = n_ModSearch.m_DeviceInfo.ModuleName;
label6.Text = n_ModSearch.m_DeviceInfo.Netmask;
label7.Text = n_ModSearch.m_DeviceInfo.Gateway;
label32.Text = n_ModSearch.m_DeviceInfo.MacAddr;
}
private void button1_Click(object sender, EventArgs e)
{
int ret = 0;
n_ModSearch.ThStop();
ret = ReadTest.ReadHoldingReg(1,8, n_ModSearch.m_DeviceInfo.IpAddr, 502, ref typeData);//当前量程读数
ret = ReadTest.ReadHoldingReg(11, 8, n_ModSearch.m_DeviceInfo.IpAddr, 502, ref Inputtype);//输入类型
ret = ReadTest.ReadCoilStatus(200, 8, n_ModSearch.m_DeviceInfo.IpAddr, 502, ref AbnoSignal);//异常信号备用
ShowValue();
}
public void ShowValue()
{
/********************/
users.UserId = 0;//通道
users.Data = typeData[0];//数据
users.UserCompany = Strcom[Inputtype[0]];//通道类型
users.UserModel = Inputtype[0];//确定计算公式
/********************/
users1.UserId = 1;//通道
users1.Data = typeData[1];//数据
users1.UserCompany = Strcom[Inputtype[1]];//通道类型
users1.UserModel = Inputtype[1];//确定计算公式
/********************/
users2.UserId = 2;//通道
users2.Data = typeData[2];//数据
users2.UserCompany = Strcom[Inputtype[2]];//通道类型
users2.UserModel = Inputtype[2];//确定计算公式
/********************/
users3.UserId = 3;//通道
users3.Data = typeData[3];//数据
users3.UserCompany = Strcom[Inputtype[3]];//通道类型
users3.UserModel = Inputtype[3];//确定计算公式
/********************/
users4.UserId = 4;//通道
users4.Data = typeData[4];//数据
users4.UserCompany = Strcom[Inputtype[4]];//通道类型
users4.UserModel = Inputtype[4];//确定计算公式
/********************/
users5.UserId = 5;//通道
users5.Data = typeData[5];//数据
users5.UserCompany = Strcom[Inputtype[5]];//通道类型
users5.UserModel = Inputtype[5];//确定计算公式
/********************/
users6.UserId = 6;//通道
users6.Data = typeData[6];//数据
users6.UserCompany = Strcom[Inputtype[6]];//通道类型
users6.UserModel = Inputtype[6];//确定计算公式
/********************/
users7.UserId = 7;//通道
users7.Data = typeData[7];//数据
users7.UserCompany = Strcom[Inputtype[7]];//通道类型
users7.UserModel = Inputtype[7];//确定计算公式
//显示通道类型
this.label8.Text = Strcom[Inputtype[0]];
this.label9.Text = Strcom[Inputtype[1]];
this.label10.Text = Strcom[Inputtype[2]];
this.label11.Text = Strcom[Inputtype[3]];
this.label12.Text = Strcom[Inputtype[4]];
this.label13.Text = Strcom[Inputtype[5]];
this.label14.Text = Strcom[Inputtype[6]];
this.label15.Text = Strcom[Inputtype[7]];
//通道单位获取
this.label31.Text = Conversion(Convert.ToUInt16(users.UserModel), users.Data)[1];
this.label30.Text = Conversion(Convert.ToUInt16(users1.UserModel), users1.Data)[1];
this.label29.Text = Conversion(Convert.ToUInt16(users2.UserModel), users2.Data)[1];
this.label28.Text = Conversion(Convert.ToUInt16(users3.UserModel), users3.Data)[1];
this.label27.Text = Conversion(Convert.ToUInt16(users4.UserModel), users4.Data)[1];
this.label26.Text = Conversion(Convert.ToUInt16(users5.UserModel), users5.Data)[1];
this.label25.Text = Conversion(Convert.ToUInt16(users6.UserModel), users6.Data)[1];
this.label24.Text = Conversion(Convert.ToUInt16(users7.UserModel), users7.Data)[1];
////根据通道类型换算数据
//////输入格式为:NegMin NegMax PosMin PosMax usMin usMax
this.label23.Text = current(users.NegMin[users.UserModel], users.NegMax[users.UserModel], users.PosMin[users.UserModel],
users.PosMax[users.UserModel], users.usMin[users.UserModel], users.usMax[users.UserModel],
users.Data); //处理函数
this.label22.Text = current(users1.NegMin[users1.UserModel], users1.NegMax[users1.UserModel], users1.PosMin[users1.UserModel],
users1.PosMax[users1.UserModel], users1.usMin[users1.UserModel], users1.usMax[users1.UserModel],
users1.Data); //处理函数
this.label21.Text = current(users2.NegMin[users2.UserModel], users2.NegMax[users2.UserModel], users2.PosMin[users2.UserModel],
users2.PosMax[users2.UserModel], users2.usMin[users2.UserModel], users2.usMax[users2.UserModel],
users2.Data); //处理函数
this.label20.Text = current(users3.NegMin[users3.UserModel], users3.NegMax[users3.UserModel], users3.PosMin[users3.UserModel],
users3.PosMax[users3.UserModel], users3.usMin[users3.UserModel], users3.usMax[users3.UserModel],
users3.Data); //处理函数
this.label19.Text = current(users4.NegMin[users4.UserModel], users4.NegMax[users4.UserModel], users4.PosMin[users4.UserModel],
users4.PosMax[users4.UserModel], users4.usMin[users4.UserModel], users4.usMax[users4.UserModel],
users4.Data); //处理函数
this.label18.Text = current(users5.NegMin[users5.UserModel], users5.NegMax[users5.UserModel], users5.PosMin[users5.UserModel],
users5.PosMax[users5.UserModel], users5.usMin[users5.UserModel], users5.usMax[users5.UserModel],
users5.Data); //处理函数
this.label17.Text = current(users6.NegMin[users6.UserModel], users6.NegMax[users6.UserModel], users6.PosMin[users6.UserModel],
users6.PosMax[users6.UserModel], users6.usMin[users6.UserModel], users6.usMax[users6.UserModel],
users6.Data); //处理函数
this.label16.Text = current(users7.NegMin[users7.UserModel], users7.NegMax[users7.UserModel], users7.PosMin[users7.UserModel],
users7.PosMax[users7.UserModel], users7.usMin[users7.UserModel], users7.usMax[users7.UserModel],
users7.Data); //处理函数
}
double parameter;
string parameter2;
//输入格式为:NegMin NegMax PosMin PosMax usMin usMax
public string current(double NegMin, double NegMax, double PosMin,
double PosMax, double usMin, double usMax,
float Input) //处理函数
{
if (Input >= 0x0000
&& Input <= 0x7FFF)
{
parameter = Convert.ToSingle(PosMin + ((PosMax - PosMin) * Input) / usMax);
parameter2 = parameter.ToString("F3");
}
else
{
parameter = -Convert.ToSingle(PosMin + ((PosMax - PosMin) * (0x10000 - Input)) / (0x10000 - usMax));
parameter2 = parameter.ToString("F3");
}
if (parameter2 == "0.000")
{
parameter2 = "Burn_out";
return parameter2;
}
else
return parameter2;
}
/**********************************************************************/
public string Calculation(double maxNum, double minNum, float Input)
{
double parameter;
string parameter2;
parameter = Convert.ToSingle(double.Parse(Input.ToString()) * minNum / maxNum);
parameter2 = parameter.ToString("F3");
return parameter2;
}
string[] text = new string[3];
/**********************************************************************/
public string[] Conversion(UInt16 type, float typedata)//, ushort[] typedata
{
switch (type)
{
case 0://"V","A_10V"
text[0] = Calculation(10.000, -10.000, typedata);
text[1] = "V";
break;
case 1://"V","A_5V"
text[0] = Calculation(5.000, -5.000, typedata);
text[1] = "V";
break;
case 2://"V","A_2_5V"
text[0] = Calculation(-2.500, 2.500, typedata);
text[1] = "V";
break;
case 3://"V","A_1V"
text[0] = Calculation(1, -1, typedata);
text[1] = "V";
break;
case 4://"MV","A_500mV"
text[0] = Calculation(500.00, -500.00, typedata);
text[1] = "MV";
break;
case 5://"MV","A_100mV"
text[0] = Calculation(100.00, -100.00, typedata);
text[1] = "MV";
break;
case 6://"MV","A_20mV"
//text[0] = "MV";
text[1] = "MV";
break;
case 7://"℃","T-K"
text[0] = Calculation(0x7FFF, 1370.0f, typedata);
text[1] = "℃";
break;
case 8://"℃" ,"T-J"
text[0] = Calculation(0x7FFF, 7600.0f, typedata);
text[1] = "℃";
break;
case 9://"℃" ,"T-R"
text[0] = Calculation(0x7FFF, 1750.0f, typedata);
text[1] = "℃";
break;
case 10://"℃" ,"T-S"
text[0] = Calculation(0x7FFF, 1750.0f, typedata);
text[1] = "℃";
break;
case 11://"℃","T-B"
text[0] = Calculation(0x7FFF, 1800.0f, typedata);
text[1] = "℃";
break;
case 12://"℃" ,"T_E"
text[0] = Calculation(0x7FFF, 1000.0d, typedata);
text[1] = "℃";
break;
case 13://"℃" ,"T_T"
text[0] = Calculation(0x7FFF, 400.0f, typedata);
text[1] = "℃";
break;
case 14://"℃" ,"T_N"
text[0] = Calculation(0x7FFF, 1800, typedata);
text[1] = "℃";
break;
case 15:// "MA","I_0_20mA"
text[0] = Calculation(0x7FFF, 1800, typedata);
text[1] = "MA";
break;
case 16:// "MA", "I_4_20mA"
text[0] = Calculation(0x7FFF, 1800, typedata);
text[1] = "MA";
break;
default:
MessageBox.Show("我没有这个范围");
break;
}
/*****************有效判断*****************************/
if (text[0] == "0.000")
{
text[0] = "Burn_out";
return text;
}
else
return text;
//通过Case做判断并输出一个数组
}
//public string[] StrcomValue;
}
}
<?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.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAY2YAAAEAIABQpAAAFgAAACgAAABjAAAAzAAAAAEAIAAAAAAAyJ0AAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAI0AAADVAAAA2QAAANkAAADZAAAA2QAA
ANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAA
ANUAAACOAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAUQAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAA
ANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAAUQAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAjgAAANkAAADZAAAA2QAA
ANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAA
ANkAAADZAAAA2QAAANkAAADZAAAAjgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAxQAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAA
ANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAAxQAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAiAAAA2QAA
ANkAAADZAgIC1uLi4vv//////////+Xl5f/l5eX////////////l5eX/5eXl////////////5eXl/+Xl
5f///////////+Xl5f/i4uL7AgIC0QAAANkAAADZAAAA2QAAACIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYAAAA2QAAANkAAADZISEhv+Xl5f///////////+Xl
5f/l5eX////////////l5eX/5eXl////////////5eXl/+Xl5f///////////+Xl5f/l5eX/JycnuAAA
ANkAAADZAAAA2QAAAFgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAACOAAAA2QAAANkAAADZcXFxt//////l5eX/5eXl////////////5eXl/+Xl5f///////////+Xl
5f/l5eX////////////l5eX/5eXl////////////YmJivgAAAN0AAADZAAAA2QAAAI4AAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADCAAAA2QAAANkAAADZxcXF0v//
///l5eX/5eXl////////////5eXl/+Xl5f///////////+Xl5f/l5eX////////////l5eX/5eXl////
////////rq6u1gAAAN0AAADZAAAA2QAAAMUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAB8AAADZAAAA2QAAANkCAgLR4uLi++Xl5f///////////+Xl5f/l5eX/////////
///l5eX/5eXl////////////5eXl/+Xl5f///////////+Xl5f/l5eX//Pz8+wICAtEAAADZAAAA2QAA
ANkAAAAiAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFUAAADZAAAA2QAA
ANknJye45eXl/+Xl5f///////////+Xl5f/l5eX////////////l5eX/5eXl////////////5eXl/+Xl
5f///////////+Xl5f/l5eX//////ycnJ7gAAADZAAAA2QAAANkAAABWAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIsAAADZAAAA2QAAANlxcXG3////////////////////////
/////////////////////////////////////////////////////////////////////////////3Fx
cbcAAADZAAAA2QAAANkAAACLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AMEAAADZAAAA2QAAANnFxcXS////////////////////////////////////////////////////////
/////////////////////////////////////////////8XFxdIAAADZAAAA2QAAANkAAADBAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHwAAANkAAADZAAAA2QICAtH8/Pz7////////
////////////////////////////////////////////////////////////////////////////////
//////////////z8/PsCAgLRAAAA2QAAANkAAADZAAAAHwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAVgAAANkAAADZAAAA2ScnJ7j/////////////////////////////////////////////
//////////////////////////////////////////////////////////////////8nJye4AAAA2QAA
ANkAAADZAAAAVgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACUAAACFAAAA0wAAANkAAADZAAAA2XFx
cbf/////////////////////////////////////////////////////////////////////////////
//////////////////////////////////9xcXG3AAAA2QAAANkAAADZAAAA0wAAAIUAAAAlAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAAVAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAiAAAAkwAAANgAAADZAAAA2QAAANkAAADZAAAA2Nra2t7/////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///a2treAAAA2AAAANkAAADZAAAA2QAAANkAAADYAAAAkwAAACMAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYAAAALAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAPwAAANEAAADZAAAAvgAAAH0AAABAAAAACAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAIIAAADWAAAA2QAAANkAAADZAAAA2QAA
ANkAAADZYGBgtf//////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////YWFhtQAAANkAAADZAAAA2QAA
ANkAAADZAAAA2QAAANYAAACDAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAACAAAAEAAAAB9AAAAvQAAANkAAADRAAAAPwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJAAAAwgAA
ANkAAADZAAAA2QAAANkAAADZAAAA0gAAAJ0AAABfAAAAHwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAABLAAAAxgAAANkAAADZAAAA2QAAANkAAADZAAAA2QwMDMWUlJS+////////////////////////
////////////////////////////////////////////////////////////////////////////////
/////////////////////////////5SUlL8MDAzFAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAAxgAA
AEsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHwAAAF4AAACdAAAA0gAAANkAAADZAAAA2QAA
ANkAAADZAAAAwgAAAAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABxAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAA
ANkAAADZAAAA2QAAALoAAAB8AAAAPgAAAAgAAAAAAAAADQAAAI4AAADZAAAA2QAAANkAAADZAAAA2QAA
ANkaGhq8pKSkxP39/f3/////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///9/f39pKSkxBoaGrwAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAACOAAAADQAAAAAAAAAIAAAAPgAA
AHwAAAC6AAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAAHEAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
ABsAAADRAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAA
ANEAAACZAAAAvAAAANkAAADZAAAA2QAAANkAAADZDg4Owqenp8X+/v7+////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////7+/v6lpaXEDg4OwgAA
ANkAAADZAAAA2QAAANkAAADZAAAAvAAAAJkAAADRAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAA
ANkAAADbAAAA3QAAANoAAADZAAAA2QAAANEAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJEAAADZAAAA2QAAANkICAjJoqKixk5O
TrQMDAzHAAAA3AAAANoAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QIC
AtNubm63+/v7+v//////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////+vr6+WxsbLYBAQHUAAAA2QAAANkAAADZAAAA2QAA
ANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QwMDMVGRka5kpKSyggICMsAAADZAAAA2QAA
ANkAAACRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAANQAAANkAAADZAAAA2QAAANmPj4/A5eXl/+3t7f/t7e3/wMDA4XZ2drwlJSW4AQEB1AAA
ANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZFRUVvtra2t7/////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////////////Z2dndFBQUvwAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAQEB1CQk
JLpvb2++ycnJ3//////4+Pj/9/f3/5SUlL8AAADZAAAA2QAAANkAAADZAAAANQAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAsAAAANkAAADZAAAA2RgY
GL319fX+5+fn//Ly8v//////8vLy//39/f//////9vb29KqqqsVKSkq0CgoKxgAAANkAAADZAAAA2QAA
ANhZWVm1+vr6+f//////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////+fn5+FRU
VLQAAADYAAAA2QAAANkAAADZCgoKxkpKSrSqqqrF9vb29Pv7+//m5ub/5+fn//Ly8v/l5eX/8vLy//z8
/P4YGBi/AAAA2QAAANkAAADZAAAAsAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAABWAAAA2QAAANkAAADZAAAA2MXFxdL/////+vr6//Pz8//+/v7/6+vr/+fn
5//5+fn//////////////////////9bW1tyMjIy8jo6Ovd7e3uH/////////////////////////////
///////////////////////////////////////////////////+/fz/9+zj//DayP/pzLL/5cCh/+G3
lP/fsoz/3a6G/96wiP/ftI//4biV/+XAof/pzLL/8NrI//fs4//+/fz/////////////////////////
///////////////////////////////////////////////////e3t7hmZmZwIyMjLzW1tbc////////
///////////////////39/f//f39//n5+f/m5ub/8fHx/+rq6v+urq7WAAAA2gAAANkAAADZAAAA2QAA
AFYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAADGAAAA2QAA
ANkAAADZOzs7tezs7P/4+Pj/7u7u/+Xl5f/v7+//7Ozs/+fn5//+/v7/////////////////////////
////////////////////////////////////////////////////////////////////////////////
///+/fz/9ObZ/+jIrf/esYv/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G/92uhv/esYv/6Mit//Pj1v/+/Pv/////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////j4
+P/09PT///////b29v/s7Oz/Ozs7tgAAANkAAADZAAAA2QAAAMYAAAANAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHYAAADZAAAA2QAAANkCAgLS2dnZ6OXl5f/r6+v/9/f3/+rq
6v/8/Pz///////z8/P//////////////////////////////////////////////////////////////
/////////////////////////////////////////Pfz/+3Uv//gtI//3a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv/ftI//7dS+//z38///////////////////////////////////////////////////////////////
////////////////////////////////////////+Pj4/+Xl5f/o6Oj/+vr6/+3t7f/5+fn/5ubm5wIC
AtEAAADZAAAA2QAAANkAAAB3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAA
ANQAAADZAAAA2QAAANltbW23/v7+//Pz8//5+fn///////Ly8v/x8fH//f39////////////////////
//////////////////////////////////////////////////////////////////////////////37
+P/t1L7/3rGK/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/96xiv/t1L7//fv4////
////////////////////////////////////////////////////////////////////////////////
/////////////+zs7P/z8/P/8vLy/+Xl5f/r6+v/8fHx/19fX74AAADaAAAA2QAAANkAAADUAAAAIAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAmAAAANkAAADZAAAA2QwMDMbw8PD3//////X1
9f/o6Oj/9fX1/+bm5v/l5eX/+fn5////////////////////////////////////////////////////
////////////////////////////////////////9OXZ/+C2kv/drob/3a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/4LaS//Tl2f//////////////////////////////
/////////////////////////////////////////////////////////////////////////v7+/+/v
7//8/Pz/7+/v/97e3vgKCgrIAAAA2QAAANkAAADZAAAAmQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAA8AAAA2QAAANkAAADZAAAA2ZqamsTl5eX/7Ozs/+3t7f/l5eX/9vb2//r6+v/y8vL/////////
//////////////////////////////////////////////////////////////////////////////78
+//rz7f/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G/92uhv/rz7f//vz7////////////////////////////////////////////////////
///////////////////////////////////7+/v/6urq/+7u7v//////9/f3//j4+P+hoaHDAAAA2QAA
ANkAAADZAAAA2QAAADwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAC1AAAA2QAAANkAAADZICAguvf3
9//o6Oj/8/Pz///////z8/P//Pz8////////////////////////////////////////////////////
////////////////////////////////////////+/bx/+S+nf/drob/3a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/5L6e//v2
8v//////////////////////////////////////////////////////////////////////////////
///8/Pz/5ubm/+jo6P/x8fH/5eXl//Hx8f/8/Pz/Hh4evgAAANkAAADZAAAA2QAAALUAAAADAAAAAAAA
AAAAAAAAAAAAAAAAAF0AAADZAAAA2QAAANkAAADXzs7O1//////6+vr/8fHx//7+/v/q6ur/5ubm//n5
+f//////////////////////////////////////////////////////////////////////////////
///58er/4beT/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/+G4lf/68uz/////////////////////////
////////////////////////////////////////////////////////+fn5//7+/v/6+vr/5ubm//Pz
8//q6ur/t7e33AAAANkAAADZAAAA2QAAANkAAABdAAAAAAAAAAAAAAAAAAAADwAAAMoAAADZAAAA2QAA
ANlGRka16urq//b29v/t7e3/5eXl//Dw8P/u7u7/6Ojo//7+/v//////////////////////////////
//////////////////////////////////////////////rz7f/gtZD/3a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3K2G/7iZfvV9a1zdQzs0zh0ZF8sJBwbRAgIC1gIC
AtYJBwbRHRkXy0M7NM59a1zduJl+9dythv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G/92uhv/gtZD/+vPt////////////////////////////////////////////////////
///////////////////////////////////29vb/9PT0///////39/f/7u7u/0ZGRrUAAADZAAAA2QAA
ANkAAADKAAAAEAAAAAAAAAAAAAAAfgAAANkAAADZAAAA2QQEBM/e3t7s5eXl/+zs7P/5+fn/7Ozs//39
/f///////v7+////////////////////////////////////////////////////////////////////
////////+/by/+G4lf/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/8ym
hfxvYFTYDw4MzgAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2Q8O
DM5vYFTYzKaF/N2uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/4biV//v2
8v////////////////////////////////////////////////////////////////////////////j4
+P/l5eX/5+fn//n5+f/r6+v/+Pj4/+zs7OwEBATPAAAA2QAAANkAAADZAAAAfgAAAAAAAAAkAAAA1gAA
ANkAAADZAAAA2Xp6erj/////9fX1//j4+P//////8fHx/+/v7//9/f3/////////////////////////
///////////////////////////////////////////////////+/Pv/5L6d/92uhv/drob/3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv/SqYb+XlJJ0wICAtYAAADZAAAA2QAAANkAAADZAAAA2QAA
ANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAgIC1l5SSdPSqYb+3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/+S+nv/+/Pv/////////////////////////
///////////////////////////////////////////////////t7e3/9fX1//Pz8//l5eX/7Ozs/+/v
7/9qamrAAAAA2gAAANkAAADZAAAA1gAAACUAAACNAAAA2QAAANkAAADZCgoKx/Ly8vr+/v7/9PT0/+bm
5v/z8/P/5ubm/+Xl5f/6+vr/////////////////////////////////////////////////////////
///////////////////rz7f/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/52F
ceoKCQfQAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAA
ANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkKCQfQnYVx6t2uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G/92uhv/rz7f/////////////////////////////////////////////////////////
//////////////////////////////7+/v/w8PD//v7+//Dw8P/h4eH7CQkJyQAAANkAAADZAAAA2QAA
AI4AAACfAAAA2QAAANkAAADZAAAA2nR0dMLr6+v/7u7u/+Xl5f/4+Pj/+/v7//T09P//////////////
//////////////////////////////////////////////////////////////Tm2f/drob/3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv/brYb/XVFH0wAAANkAAADZAAAA2QAAANkAAADZAAAA2QAA
AMwAAACOAAAAVgAAAC4AAAARAAAABAAAAAQAAAARAAAALgAAAFYAAACOAAAAzAAAANkAAADZAAAA2QAA
ANkAAADZAAAA2V1RR9PbrYb/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/9OXZ////
////////////////////////////////////////////////////////////////////////+vr6/+np
6f/s7Oz///////b29v+CgoK8AAAA2AAAANkAAADZAAAA2QAAAKIAAAA6AAAA1AAAANkAAADZAAAA2gAA
ANx3d3e8//////T09P/7+/v/////////////////////////////////////////////////////////
/////////////////////////fv5/+C2kv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/9er
hv88NS7MAAAA2QAAANkAAADZAAAA2QAAANkAAAC6AAAAUwAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAABwAAAFMAAAC6AAAA2QAAANkAAADZAAAA2QAAANk7My7M16uG/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/4LaS//37+P//////////////////////////////
/////////////////////////////////////////f39/+bm5v/p6en/8PDw/2xsbMAAAADbAAAA2QAA
ANkAAADZAAAA1AAAADYAAAAAAAAAPwAAANEAAADZAAAA2QAAANkAAADZcXFxt+np6f/m5ub/+Pj4////
////////////////////////////////////////////////////////////////////////7dS//92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/262G/zw1LswAAADZAAAA2QAAANkAAADZAAAA0QAA
AGMAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAEAAAAYwAAANEAAADZAAAA2QAAANkAAADZPDUuzNuthv/drob/3a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G/+3Uvv//////////////////////////////////////////////////////////////
//////////////r6+v/+/v7/b29vuAAAAN0AAADbAAAA2QAAANkAAADRAAAAQAAAAAAAAAAAAAAAAAAA
ADgAAADRAAAA2QAAANkAAADZAAAA2WFhYbrp6en//v7+////////////////////////////////////
///////////////////////////////////89/P/3rGK/92uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv/drob/XVFH0wAAANkAAADZAAAA2QAAANkAAAC7AAAAJgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACYAAAC7AAAA2QAA
ANkAAADZAAAA2V1RR9Pdrob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/96xiv/89/P/////////
//////////////////////////////////////////////////////////////////9hYWG1AAAA2QAA
ANkAAADZAAAA2QAAANEAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1AAAAzAAAANkAAADZAAAA2QAA
ANlcXFy1////////////////////////////////////////////////////////////////////////
///t1L//3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv+dhXHqAAAA2QAAANkAAADZAAAA2QAA
ALAAAAASAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASAAAArwAAANkAAADZAAAA2QAAANmdhXHq3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv/t1L//////////////////////////////////////////
/////////////////////////////1xcXLUAAADZAAAA2QAAANkAAADZAAAAzAAAADYAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAALwAAAMwAAADZAAAA2QAAANkAAADZVVVVtP7+/v7/////////////
//////////////////////////////////////////////79/P/ftI//3a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G/9Kphv4KCQfQAAAA2QAAANkAAADZAAAAuwAAABIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAEgAAALoAAADZAAAA2QAAANkKCQfQ0qmG/t2uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv/ftI///vz7///////////////////////////////////////////////////////+/v7+SkpKtAAA
ANkAAADZAAAA2QAAANkAAADMAAAALwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
ACwAAADHAAAA2QAAANkAAADZAAAA2UpKSrT+/v7+////////////////////////////////////////
//////////////Pj1v/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/15SSdMAAADZAAAA2QAA
ANkAAADRAAAAJgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACYAAADRAAAA2QAA
ANkAAADZXlJJ092uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/8+PW////////////////////
//////////////////////////////z8/PxHR0e0AAAA2QAAANkAAADZAAAA2QAAAMcAAAAtAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAmAAAAxwAAANkAAADZAAAA2QAA
ANlHR0e0/v7+/v///////////////////////////////////////////////+jIrf/drob/3a6G/92u
hv/drob/3a6G/92uhv/drob/zaWE/QICAtYAAADZAAAA2QAAANkAAABjAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABjAAAA2QAAANkAAADZAgIC1symhfzdrob/3a6G/92u
hv/drob/3a6G/92uhv/drob/6Mit/////////////////////////////////////////////v7+/js7
O7UAAADZAAAA2QAAANkAAADZAAAAxwAAACYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAJAAAAMEAAADZAAAA2QAAANkAAADZhISEuv//////////////////
/////////////////////////v38/96xi//drob/3a6G/92uhv/drob/3a6G/92uhv/drob/b2BU2AAA
ANkAAADZAAAA2QAAALoAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAEAAAAugAAANkAAADZAAAA2W9gVNjdrob/3a6G/92uhv/drob/3a6G/92uhv/drob/3rGL//79
/P//////////////////////////////////////fX19uQAAANkAAADZAAAA2QAAANkAAADBAAAAJQAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AB8AAADBAAAA2QAAANkAAADZERERwf//////////////////////////////////////////9+zj/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv/crYb/Dw4MzgAAANkAAADZAAAA2QAAAFMAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUwAAANkAAADZAAAA2Q8O
DM7crYb/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G//fs4///////////////////////////////
////////EBAQwQAAANkAAADZAAAA2QAAAMEAAAAfAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAfAAAA2QAAANkAAADZAgIC0f//
////////////////////////////////////////8NrI/92uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv+4mX71AAAA2QAAANkAAADZAAAAzAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAABwAAAMwAAADZAAAA2QAAANm5mH723a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G//DayP//////////////////////////////////////AgIC0QAAANkAAADZAAAA2QAA
ACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAXAAAA2QAAANkAAADZCAgIyf//////////////////////////////////
////////6cyy/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv9+bF3dAAAA2QAAANkAAADZAAAAjwAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AI4AAADZAAAA2QAAANl9a1zd3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/+nMsv//////////////
////////////////////////CAgIyQAAANkAAADZAAAA2QAAABYAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAvAAAA2QAA
ANkAAADZGBgYvf//////////////////////////////////////////5cCh/92uhv/drob/3a6G/92u
hv/drob/3a6G/92uhv9DOzTOAAAA2QAAANkAAADZAAAAVgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFYAAADZAAAA2QAAANlDOzTO3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/+XAof//////////////////////////////////////GBgYvQAA
ANkAAADZAAAA2QAAAC4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABDAAAA2QAAANkAAADZKysrt///////////////////
////////////////////////4beU/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv8dGRfLAAAA2QAA
ANkAAADZAAAALwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAC4AAADZAAAA2QAAANkdGRfL3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/+G4
lf//////////////////////////////////////KysrtwAAANkAAADZAAAA2QAAAEEAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAABLAAAA2QAAANkAAADZOjo6tf//////////////////////////////////////////37KM/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv8JBwbRAAAA2QAAANkAAADZAAAAEgAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEAAADZAAAA2QAA
ANkJBwfR3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/9+0j///////////////////////////////
////////Ozs7tQAAANkAAADZAAAA2QAAAEQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABRAAAA2QAAANkAAADZQEBAtP//
////////////////////////////////////////3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv8CAgLWAAAA2QAAANkAAADZAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAADZAAAA2QAAANkCAgLW3a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G/96wif//////////////////////////////////////QUFBtAAAANkAAADZAAAA2QAA
AFEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAABRAAAA2QAAANkAAADZQEBAtP//////////////////////////////////
////////3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv8CAgLWAAAA2QAAANkAAADZAAAABQAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAUAAADZAAAA2QAAANkCAgLW3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv//////////////
////////////////////////QUFBtAAAANkAAADZAAAA2QAAAFEAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABLAAAA2QAA
ANkAAADZOjo6tf//////////////////////////////////////////37KM/92uhv/drob/3a6G/92u
hv/drob/3a6G/92uhv8JBwbRAAAA2QAAANkAAADZAAAAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEAAADZAAAA2QAAANkJBwfR3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/9+yjP//////////////////////////////////////Ojo6tQAA
ANkAAADZAAAA2QAAAEQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABDAAAA2QAAANkAAADZKysrt///////////////////
////////////////////////4beU/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv8dGRfLAAAA2QAA
ANkAAADZAAAALwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAC4AAADZAAAA2QAAANkdGRfL3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/+G3
lP//////////////////////////////////////KysrtwAAANkAAADZAAAA2QAAAEEAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAvAAAA2QAAANkAAADZGBgYvf//////////////////////////////////////////5cCh/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv9DOzTOAAAA2QAAANkAAADZAAAAVgAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFYAAADZAAAA2QAA
ANlDOzTO3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/+XAof//////////////////////////////
////////GBgYvQAAANkAAADZAAAA2QAAAC4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXAAAA2QAAANkAAADZCAgIyf//
////////////////////////////////////////6cyy/92uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv9+bF3dAAAA2QAAANkAAADZAAAAjwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI4AAADZAAAA2QAAANl9a1zd3a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G/+nMsv//////////////////////////////////////CAgIyQAAANkAAADZAAAA2QAA
ABYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAhAAAA2QAAANkAAADZAgIC0v//////////////////////////////////
////////8NrI/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv+4mX71AAAA2QAAANkAAADZAAAAzAAA
AAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAA
AMwAAADZAAAA2QAAANm5mH723a6G/92uhv/drob/3a6G/92uhv/drob/3a6G//DayP//////////////
////////////////////////AgIC0QAAANkAAADZAAAA2QAAACEAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB8AAADBAAAA2QAA
ANkAAADZERERwf//////////////////////////////////////////9+zj/92uhv/drob/3a6G/92u
hv/drob/3a6G/92uhv/crYb/Dw4MzgAAANkAAADZAAAA2QAAAFMAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVAAAANkAAADZAAAA2Q8ODM7crYb/3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G//fs4///////////////////////////////////////ERERwQAA
ANkAAADZAAAA2QAAAMEAAAAfAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAJgAAAMEAAADZAAAA2QAAANkAAADZhISEuv//////////////////
/////////////////////////v38/96xi//drob/3a6G/92uhv/drob/3a6G/92uhv/drob/b2BU2AAA
ANkAAADZAAAA2QAAALoAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAEAAAAugAAANkAAADZAAAA2W9gVNjdrob/3a6G/92uhv/drob/3a6G/92uhv/drob/3rGL//79
/P//////////////////////////////////////fX19uQAAANkAAADZAAAA2QAAANkAAADCAAAAJgAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAmAAAAxwAA
ANkAAADZAAAA2QAAANlKSkq0/v7+/v///////////////////////////////////////////////+jJ
rv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/zaWE/QICAtYAAADZAAAA2QAAANkAAABjAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABjAAAA2QAAANkAAADZAgIC1sym
hfzdrob/3a6G/92uhv/drob/3a6G/92uhv/drob/6Mit////////////////////////////////////
/////////v7+/js7O7UAAADZAAAA2QAAANkAAADZAAAAxwAAACYAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC4AAADHAAAA2QAAANkAAADZAAAA2UpKSrT+/v7+////////
//////////////////////////////////////////////Tm2f/drob/3a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G/15SSdMAAADZAAAA2QAAANkAAADRAAAAJgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAACYAAADRAAAA2QAAANkAAADZXlJJ092uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv/drob/9ObZ//////////////////////////////////////////////////z8/PxISEi0AAAA2QAA
ANkAAADZAAAA2QAAAMcAAAAvAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALwAA
AMwAAADZAAAA2QAAANkAAADZWFhYtP7+/v7/////////////////////////////////////////////
//////////////79/P/gtI//3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/9Kphv4KCQnQAAAA2QAA
ANkAAADZAAAAuwAAABIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgAAALsAAADZAAAA2QAA
ANkKCQnQ0qmG/t2uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/gtI///v38////////////////////
///////////////////////////////////+/v7+TU1NtAAAANkAAADZAAAA2QAAANkAAADMAAAALwAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3AAAAzAAAANkAAADZAAAA2QAAANlcXFy1////////
///////////////////////////////////////////////////////////////////t1L//3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv+dhXHqAAAA2QAAANkAAADZAAAA2QAAALEAAAASAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAASAAAAsQAAANkAAADZAAAA2QAAANmdhXHq3a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G/92uhv/t1L//////////////////////////////////////////////////////////
/////////////1xcXLUAAADZAAAA2QAAANkAAADZAAAAzAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
ADgAAADRAAAA2QAAANkAAADZAAAA2WxsbLb/////////////////////////////////////////////
///////////////////////////////////89/P/3rGK/92uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv/drob/XVFH0wAAANkAAADZAAAA2QAAANkAAAC7AAAAJgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACYAAAC7AAAA2QAA
ANkAAADZAAAA2V1RR9Pdrob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/96xiv/89/P/////////
//////////////////////////////////////////////////////////////7+/v9YWFi8AAAA2wAA
ANkAAADZAAAA2QAAANEAAAA4AAAAAAAAAAAAAAAAAAAAQAAAANEAAADZAAAA2QAAANkAAADbY2Njvvv7
+//+/v7/+vr6////////////////////////////////////////////////////////////////////
////////7dXA/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/262G/z01L80AAADZAAAA2QAA
ANkAAADZAAAA0QAAAGMAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAEAAAAYwAAANEAAADZAAAA2QAAANkAAADZPDUuzNuthv/drob/3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/+3Uv///////////////////////////////////////////////
//////////////////////////////j4+P/m5ub/ZGRkvQAAANkAAADZAAAA2QAAANkAAADRAAAAQQAA
AAAAAAA6AAAA1AAAANkAAADZAAAA2QAAANh3d3e+5eXl//Dw8P/p6en/5ubm//39/f//////////////
/////////////////////////////////////////////////////////fv5/+G3k//drob/3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/9erhv89NS/NAAAA2QAAANkAAADZAAAA2QAAANkAAAC6AAAAVAAA
AAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAAAFMAAAC6AAAA2QAA
ANkAAADZAAAA2QAAANk8NS7M16uG/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/4LaS//37
+P//////////////////////////////////////////////////////////////////////////////
///7+/v/9PT0/319fbkAAADaAAAA3AAAANoAAADZAAAA1AAAADYAAACfAAAA2QAAANkAAADZAAAA2IaG
hrv5+fn/9vb2///////s7Oz/6enp//r6+v//////////////////////////////////////////////
//////////////////////////////Xm2v/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv/brYb/XVFH0wAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAAMwAAACPAAAAVgAAAC8AAAASAAAABgAA
AAYAAAASAAAALwAAAFYAAACPAAAAzAAAANkAAADZAAAA2QAAANkAAADZAAAA2V1RR9PbrYb/3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/9OXZ////////////////////////////////////
////////////////////////////////////////9PT0//v7+//4+Pj/5eXl/+7u7v94eHjAAAAA3AAA
ANoAAADZAAAA2QAAAKIAAACNAAAA2QAAANkAAADZCgoKxvDw8Pnm5ub/8PDw//7+/v/w8PD//v7+////
////////////////////////////////////////////////////////////////////////////////
///rz7j/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/52FceoKCQfQAAAA2QAA
ANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAA
ANkAAADZAAAA2QAAANkKCQfQnYVx6t2uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv/rz7f/////////////////////////////////////////////////////////////////////////
///6+vr/5eXl/+bm5v/09PT/5ubm//T09P/6+vr6CgoKyAAAANkAAADZAAAA2QAAAI4AAAAkAAAA1gAA
ANkAAADZAAAA2XZ2drrl5eX/7+/v/+zs7P/l5eX/8/Pz//X19f/t7e3/////////////////////////
///////////////////////////////////////////////////+/Pv/5L6d/92uhv/drob/3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv/SqYb+XlJJ0wICAtYAAADZAAAA2QAAANkAAADZAAAA2QAA
ANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAgIC1l5SSdPSqYb+3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/+S+nf/+/Pv/////////////////////////
///////////////////////////////////////////////////9/f3/7+/v//Hx8f//////+fn5//X1
9f95eXm5AAAA2QAAANkAAADZAAAA1gAAACQAAAAAAAAAfQAAANkAAADZAAAA2QQEBM/o6Ojr//////j4
+P/r6+v/+fn5/+fn5//l5eX/+Pj4////////////////////////////////////////////////////
////////////////////////+/bx/+G3k//drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G/82mhP1vYFTYDw4MzgAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAA
ANkAAADZAAAA2Q8ODM5vYFTYzaaE/d2uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv/drob/4beT//v28f//////////////////////////////////////////////////////////////
//////////////39/f///////f39/+zs7P/5+fn/7Ozs/9HR0e0EBATRAAAA2QAAANkAAADZAAAAfgAA
AAAAAAAAAAAADwAAAMoAAADZAAAA2QAAANlHR0e0/Pz8/+7u7v/39/f///////T09P/29vb/////////
//////////////////////////////////////////////////////////////////////////////nx
6v/gtZD/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3K2G/7iZ
fvV+bF3dQzs0zh0ZF8sJBwbRAgIC1QICAtUJBwbRHRkXy0M7NM5+bF3duJl+9dythv/drob/3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/gtZD/+fHq////////////////////
/////////////////////////////////////////////////////////v7+/+jo6P/u7u7/8PDw/+Xl
5f/t7e3/9vb2/z8/P7oAAADZAAAA2QAAANkAAADKAAAADwAAAAAAAAAAAAAAAAAAAFwAAADZAAAA2QAA
ANkAAADYw8PD2eXl5f/q6ur/8/Pz/+bm5v/6+vr//v7+//n5+f//////////////////////////////
///////////////////////////////////////////////////58er/4beT/92uhv/drob/3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G/+G4lf/68+3/////////////////////////////////////////////////////////
////////////////////////+fn5/+bm5v/q6ur//v7+//Hx8f/6+vr/zs7O1wAAANcAAADZAAAA2QAA
ANkAAABdAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAC1AAAA2QAAANkAAADZHh4euvDw8P/8/Pz/8fHx/+Xl
5f/x8fH/6Ojo/+bm5v/8/Pz/////////////////////////////////////////////////////////
////////////////////////+/bx/+S+nf/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/5L6e//v28v//////////////
//////////////////////////////////////////////////////////////////////////////z8
/P/z8/P///////Pz8//o6Oj/Hh4evAAAANkAAADZAAAA2QAAALUAAAADAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAA7AAAA2QAAANkAAADZAAAA2aCgoML/////+Pj4//f39///////7u7u/+vr6//7+/v/////////
//////////////////////////////////////////////////////////////////////////////78
+//r0Lj/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G/92uhv/rz7f//vz7////////////////////////////////////////////////////
///////////////////////////////////y8vL/+fn5//b29v/l5eX/7e3t/+zs7P+MjIzIAAAA2gAA
ANkAAADZAAAA2QAAADwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlwAAANkAAADZAAAA2QoK
Csbr6+v35eXl/+/v7//8/Pz/7+/v//7+/v//////////////////////////////////////////////
////////////////////////////////////////////////////////9eba/+G3k//drob/3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/4LaS//Xm2v//////////////
//////////////////////////////////////////////////////////////////////////////n5
+f/l5eX/5ubm//X19f/o6Oj/9fX1//f39/YKCgrHAAAA2QAAANkAAADZAAAAlwAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAHwAAANQAAADZAAAA2QAAANlpaWm45ubm//Ly8v/s7Oz/5eXl//Ly
8v/z8/P/7Ozs////////////////////////////////////////////////////////////////////
//////////////////////////////37+f/t1cD/3rGK/92uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G/96xiv/t1cD//fv5////////////////////////////////////////////////////
//////////////////////////////////////////////7+/v/x8fH/8vLy///////5+fn/8vLy/21t
bbcAAADZAAAA2QAAANkAAADUAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AHYAAADZAAAA2QAAANkCAgLS4+Pj5//////5+fn/7e3t//r6+v/o6Oj/5eXl//j4+P//////////////
////////////////////////////////////////////////////////////////////////////////
/////////Pfz/+3Uv//gtI//3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/gtI//7dS///z38///////////////
////////////////////////////////////////////////////////////////////////////////
/////////Pz8///////8/Pz/6urq//f39//r6+v/zMzM6QICAtQAAADZAAAA2QAAANkAAAB2AAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAADGAAAA2QAAANkAAADZOzs7tfv7
+//s7Oz/9vb2///////19fX/+Pj4////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////+/fz/9ObZ/+jJ
rv/esYv/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92uhv/drob/3a6G/92u
hv/fsoz/6Mit//Pj1v/+/fz/////////////////////////////////////////////////////////
///////////////////////////////////////////////////+/v7/5+fn/+zs7P/w8PD/5eXl/+7u
7v/4+Pj/NTU1ugAAANkAAADZAAAA2QAAAMYAAAANAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAABWAAAA2QAAANkAAADZAAAA2Lu7u9Pl5eX/6urq//Hx8f/m5ub/+fn5//39
/f/39/f//////////////////////9PT09qUlJS+jo6Ovd7e3uD/////////////////////////////
///////////////////////////////////////////////////+/fz/9+zj//DayP/pzLL/5cCh/+G3
lP/fsoz/3a6G/92uhv/fsoz/4beU/+XAof/pzLL/8NrI//fs4//+/fz/////////////////////////
///////////////////////////////////////////////////e3t7gjo6OvZSUlL7T09Pa////////
///////////////////5+fn/5+fn/+vr6///////8/Pz//r6+v/FxcXSAAAA2AAAANkAAADZAAAA2QAA
AFYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAArwAA
ANkAAADZAAAA2RgYGL3y8vL+/f39//Ly8v/l5eX/8vLy/+fn5//m5ub/8fHx9aqqqsVKSkq0CgoKxgAA
ANkAAADZAAAA2QAAANhYWFi0+fn5+P//////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////+fn5+FJSUrQAAADYAAAA2QAAANkAAADZCgoKx0pKSrSqqqrF9vb29P///////////f39//Ly
8v//////8vLy/+bm5v4YGBi/AAAA2QAAANkAAADZAAAAsAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANQAAANkAAADZAAAA2QAAANmUlJS+//////f3
9//4+Pj/1tbW3G9vb70gICC+AQEB1QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZFRUVvtnZ
2d3/////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////W1tbcFBQUvwAAANkAAADZAAAA2QAA
ANkAAADZAAAA2QAAANkAAADZAQEB1CIiIrl6enq4zc3N3eXl5f/s7Oz/7e3t/4GBgcUAAADaAAAA2QAA
ANkAAADZAAAANQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAJAAAADZAAAA2QAAANkICAjJnp6ex0JCQrwKCgrKAAAA2QAAANkAAADZAAAA2QAA
ANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QEBAdRsbGy2+vr6+f//////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////+vr6+WpqarYBAQHUAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAA
ANkAAADZAAAA2gkJCctISEi3p6enxQgICMoAAADZAAAA2QAAANkAAACRAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABsAAADRAAAA2QAA
ANkAAADZAAAA2QAAAN0AAADbAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANEAAACZAAAAvAAA
ANkAAADZAAAA2QAAANkAAADZDg4OwqWlpcT+/v7+////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////7+/v6kpKTEDg4OwgAAANkAAADZAAAA2QAA
ANkAAADZAAAAvAAAAJkAAADRAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAA
ANkAAADZAAAA2QAAANEAAAAbAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAA
ANkAAADZAAAA2QAAALoAAAB7AAAAPAAAAAcAAAAAAAAADQAAAI4AAADZAAAA2QAAANkAAADZAAAA2QAA
ANkYGBi9pKSkxPz8/Pz/////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///8/Pz8pKSkxBgYGL0AAADZAAAA2QAAANkAAADZAAAA2QAAANkAAACOAAAADQAAAAAAAAAHAAAAPAAA
AHoAAAC6AAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAAHEAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAJAAAAwgAAANkAAADZAAAA2QAAANkAAADZAAAA0QAAAJsAAABdAAAAHwAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAABLAAAAxgAAANkAAADZAAAA2QAAANkAAADZAAAA2QwMDMaSkpK+////////
////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////5KSkr4MDAzGAAAA2QAAANkAAADZAAAA2QAA
ANkAAADZAAAAxgAAAEsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHwAAAF0AAACbAAAA0QAA
ANkAAADZAAAA2QAAANkAAADZAAAAwgAAAAkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPgAAANAAAADZAAAAvAAA
AH0AAABAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAA
AIEAAADWAAAA2QAAANkAAADZAAAA2QAAANkAAADZYGBgtf//////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////YGBgtQAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANYAAACCAAAADgAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAEAAAAB9AAAAvAAAANkAAADQAAAAPgAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAATAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAhAAAAkgAAANgAAADZAAAA2QAA
ANkAAADZAAAA2NnZ2d3/////////////////////////////////////////////////////////////
///////////////////////////////////////////////////a2treAAAA2AAAANkAAADZAAAA2QAA
ANkAAADYAAAAkwAAACIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABMAAAALAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACYAAACIAAAA0wAAANkAAADZAAAA2WxsbLb/////////////
////////////////////////////////////////////////////////////////////////////////
//////////////////9xcXG3AAAA2QAAANkAAADZAAAA0wAAAIQAAAAkAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAVgAAANkAAADZAAAA2ScnJ7j/////////////////////////////////////////////
//////////////////////////////////////////////////////////////////8nJye4AAAA2QAA
ANkAAADZAAAAVgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHwAAANkAAADZAAAA2QIC
AtH8/Pz7////////////////////////////////////////////////////////////////////////
//////////////////////////////z8/PsCAgLRAAAA2QAAANkAAADZAAAAHwAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMEAAADZAAAA2QAAANnFxcXS////////////////////////
/////////////////////////////////////////////////////////////////////////////8XF
xdIAAADZAAAA2QAAANkAAADBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AIsAAADZAAAA2QAAANlxcXG3////////////////////////////////////////////////////////
/////////////////////////////////////////////3FxcbcAAADZAAAA2QAAANkAAACLAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFUAAADZAAAA2QAAANknJye4////////
///l5eX/5eXl////////////5eXl/+Xl5f///////////+Xl5f/l5eX////////////l5eX/5eXl////
////////5eXl/yEhIb8AAADZAAAA2QAAANkAAABVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAB8AAADZAAAA2QAAANkCAgLR/Pz8+//////l5eX/5eXl////////////5eXl/+Xl
5f///////////+Xl5f/l5eX////////////l5eX/5eXl////////////4uLi+wICAtYAAADZAAAA2QAA
ANkAAAAfAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBAAAA2QAA
ANkAAADZrq6u1uXl5f///////////+Xl5f/l5eX////////////l5eX/5eXl////////////5eXl/+Xl
5f///////////+Xl5f/l5eX/xcXF0gAAANkAAADZAAAA2QAAAMUAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACNAAAA2QAAANkAAADZYmJivuXl5f///////////+Xl
5f/l5eX////////////l5eX/5eXl////////////5eXl/+Xl5f///////////+Xl5f/l5eX/cXFxtwAA
ANkAAADZAAAA2QAAAI4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAABYAAAA2QAAANkAAADZJycnuP/////l5eX/5eXl////////////5eXl/+Xl5f///////////+Xl
5f/l5eX////////////l5eX/5eXl////////////ISEhvwAAAN0AAADZAAAA2QAAAFgAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAiAAAA2QAAANkAAADZAgIC0fz8
/Pvl5eX/5eXl////////////5eXl/+Xl5f///////////+Xl5f/l5eX////////////l5eX/5eXl////
///8/Pz7AgIC1gAAAN0AAADZAAAA2QAAACIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAxQAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAA
ANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAAxQAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAjgAA
ANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAA
ANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAAjgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUQAAANkAAADZAAAA2QAAANkAAADZAAAA2QAA
ANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAA
ANkAAADZAAAAUQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAABQAAAI0AAADUAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAA
ANkAAADZAAAA2QAAANkAAADZAAAA2QAAANkAAADZAAAA2QAAANQAAACNAAAABQAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAD/////+AAAA//////gAAAA//////gAAAP/////4AAAAP/////4AAAD/////+AA
AAD/////+AAAA//////gAAAA//////AAAAH/////4AAAAP/////wAAAB/////+AAAAD/////8AAAAf//
///gAAAA//////AAAAH/////4AAAAP/////gAAAA/////+AAAAD/////4AAAAP/////gAAAA/////+AA
AAD/////4AAAAP/////gAAAA/////+AAAAD/////wAAAAH/////gAAAA/////8AAAAB/////4AAAAP//
//8AAAAAH////+AAAAD/5//8AAAAAAf//P/gAAAA/8B/8AAAAAAB/8B/4AAAAP+AD+AAAAAAAP4AP+AA
AAD/gACAAAAAAAAgAD/gAAAA/wAAAAAAAAAAAAAf4AAAAP8AAAAAAAAAAAAAH+AAAAD+AAAAAAAAAAAA
AA/gAAAA/AAAAAAAAAAAAAAH4AAAAPwAAAAAAAAAAAAAB+AAAAD4AAAAAAAAAAAAAAPgAAAA+AAAAAAA
AAAAAAAD4AAAAPAAAAAAAAAAAAAAAeAAAADwAAAAAAAAAAAAAAHgAAAA4AAAAAAAAAAAAAAA4AAAAMAA
AAAAAAAAAAAAAGAAAADAAAAAAAAAAAAAAABgAAAAgAAAAAAAAAAAAAAAIAAAAIAAAAAAAAAAAAAAACAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf+AAAA
AAAAAAAAgAAAAAAf/4AAAAAAIAAAAMAAAAAAf//gAAAAAGAAAADgAAAAAP//8AAAAADgAAAA8AAAAAH/
//gAAAAB4AAAAPgAAAAD///8AAAAA+AAAAD8AAAAB////gAAAAfgAAAA/gAAAAf///4AAAAP4AAAAP8A
AAAP////AAAAH+AAAAD/gAAAD////wAAAD/gAAAA/4AAAB////+AAAA/4AAAAP+AAAAf////gAAAP+AA
AAD/gAAAH////4AAAD/gAAAA/4AAAB////+AAAA/4AAAAP+AAAAf////gAAAP+AAAAD/gAAAH////4AA
AD/gAAAA/4AAAB////+AAAA/4AAAAP+AAAAf////gAAAP+AAAAD/gAAAH////4AAAD/gAAAA/4AAAB//
//+AAAA/4AAAAP+AAAAP////AAAAP+AAAAD/AAAAD////wAAAB/gAAAA/gAAAAf///4AAAAP4AAAAPwA
AAAH///+AAAAB+AAAAD4AAAAA////AAAAAPgAAAA8AAAAAH///gAAAAB4AAAAOAAAAAA///wAAAAAOAA
AADAAAAAAH//4AAAAABgAAAAgAAAAAAf/4AAAAAAIAAAAAAAAAAAB/4AAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAgAAAAgAAAAAAA
AAAAAAAAIAAAAMAAAAAAAAAAAAAAAGAAAADAAAAAAAAAAAAAAABgAAAA4AAAAAAAAAAAAAAA4AAAAPAA
AAAAAAAAAAAAAeAAAADwAAAAAAAAAAAAAAHgAAAA+AAAAAAAAAAAAAAD4AAAAPgAAAAAAAAAAAAAA+AA
AAD8AAAAAAAAAAAAAAfgAAAA/AAAAAAAAAAAAAAH4AAAAP4AAAAAAAAAAAAAD+AAAAD/AAAAAAAAAAAA
AB/gAAAA/wAAAAAAAAAAAAAf4AAAAP+AAIAAAAAAACAAP+AAAAD/gA/gAAAAAAD+AD/gAAAA/8B/8AAA
AAAB/8B/4AAAAP/n//wAAAAAB//8/+AAAAD/////AAAAAB/////gAAAA/////8AAAAB/////4AAAAP//
///AAAAAf////+AAAAD/////4AAAAP/////gAAAA/////+AAAAD/////4AAAAP/////gAAAA/////+AA
AAD/////4AAAAP/////gAAAA//////AAAAH/////4AAAAP/////wAAAB/////+AAAAD/////8AAAAf//
///gAAAA//////AAAAH/////4AAAAP/////4AAAD/////+AAAAD/////+AAAA//////gAAAA//////gA
AAP/////4AAAAP/////4AAAD/////+AAAAA=
</value>
</data>
</root>
\ No newline at end of file
namespace ModbusDemo
{
partial class MDemo
{
/// <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 Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.TestBtn = new System.Windows.Forms.Button();
this.CoilBox = new System.Windows.Forms.GroupBox();
this.label16 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.stopbtn = new System.Windows.Forms.Button();
this.label17 = new System.Windows.Forms.Label();
this.IPsetBox = new System.Windows.Forms.TextBox();
this.pictureBox16 = new System.Windows.Forms.PictureBox();
this.pictureBox15 = new System.Windows.Forms.PictureBox();
this.pictureBox14 = new System.Windows.Forms.PictureBox();
this.pictureBox13 = new System.Windows.Forms.PictureBox();
this.pictureBox12 = new System.Windows.Forms.PictureBox();
this.pictureBox11 = new System.Windows.Forms.PictureBox();
this.pictureBox10 = new System.Windows.Forms.PictureBox();
this.pictureBox9 = new System.Windows.Forms.PictureBox();
this.pictureBox8 = new System.Windows.Forms.PictureBox();
this.pictureBox7 = new System.Windows.Forms.PictureBox();
this.pictureBox6 = new System.Windows.Forms.PictureBox();
this.pictureBox5 = new System.Windows.Forms.PictureBox();
this.pictureBox4 = new System.Windows.Forms.PictureBox();
this.pictureBox3 = new System.Windows.Forms.PictureBox();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.CoilBox.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox16)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox15)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox14)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox13)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox12)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox11)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox10)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox9)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox8)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// TestBtn
//
this.TestBtn.Location = new System.Drawing.Point(226, 23);
this.TestBtn.Name = "TestBtn";
this.TestBtn.Size = new System.Drawing.Size(105, 23);
this.TestBtn.TabIndex = 0;
this.TestBtn.Text = "读线圈测试";
this.TestBtn.UseVisualStyleBackColor = true;
this.TestBtn.Click += new System.EventHandler(this.TestBtn_Click);
//
// CoilBox
//
this.CoilBox.Controls.Add(this.pictureBox16);
this.CoilBox.Controls.Add(this.pictureBox15);
this.CoilBox.Controls.Add(this.pictureBox14);
this.CoilBox.Controls.Add(this.pictureBox13);
this.CoilBox.Controls.Add(this.pictureBox12);
this.CoilBox.Controls.Add(this.pictureBox11);
this.CoilBox.Controls.Add(this.pictureBox10);
this.CoilBox.Controls.Add(this.pictureBox9);
this.CoilBox.Controls.Add(this.pictureBox8);
this.CoilBox.Controls.Add(this.pictureBox7);
this.CoilBox.Controls.Add(this.pictureBox6);
this.CoilBox.Controls.Add(this.pictureBox5);
this.CoilBox.Controls.Add(this.pictureBox4);
this.CoilBox.Controls.Add(this.pictureBox3);
this.CoilBox.Controls.Add(this.pictureBox2);
this.CoilBox.Controls.Add(this.pictureBox1);
this.CoilBox.Controls.Add(this.label16);
this.CoilBox.Controls.Add(this.label15);
this.CoilBox.Controls.Add(this.label14);
this.CoilBox.Controls.Add(this.label13);
this.CoilBox.Controls.Add(this.label12);
this.CoilBox.Controls.Add(this.label11);
this.CoilBox.Controls.Add(this.label10);
this.CoilBox.Controls.Add(this.label9);
this.CoilBox.Controls.Add(this.label8);
this.CoilBox.Controls.Add(this.label7);
this.CoilBox.Controls.Add(this.label6);
this.CoilBox.Controls.Add(this.label5);
this.CoilBox.Controls.Add(this.label4);
this.CoilBox.Controls.Add(this.label3);
this.CoilBox.Controls.Add(this.label2);
this.CoilBox.Controls.Add(this.label1);
this.CoilBox.Location = new System.Drawing.Point(13, 63);
this.CoilBox.Name = "CoilBox";
this.CoilBox.Size = new System.Drawing.Size(424, 164);
this.CoilBox.TabIndex = 1;
this.CoilBox.TabStop = false;
this.CoilBox.Text = "DI Port";
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(326, 126);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(29, 12);
this.label16.TabIndex = 15;
this.label16.Text = "DI16";
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(326, 94);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(29, 12);
this.label15.TabIndex = 14;
this.label15.Text = "DI15";
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(326, 62);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(29, 12);
this.label14.TabIndex = 13;
this.label14.Text = "DI14";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(326, 30);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(29, 12);
this.label13.TabIndex = 12;
this.label13.Text = "DI13";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(229, 126);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(29, 12);
this.label12.TabIndex = 11;
this.label12.Text = "DI12";
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(229, 94);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(29, 12);
this.label11.TabIndex = 10;
this.label11.Text = "DI11";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(229, 62);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(29, 12);
this.label10.TabIndex = 9;
this.label10.Text = "DI10";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(229, 30);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(23, 12);
this.label9.TabIndex = 8;
this.label9.Text = "DI9";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(132, 126);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(23, 12);
this.label8.TabIndex = 7;
this.label8.Text = "DI8";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(132, 94);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(23, 12);
this.label7.TabIndex = 6;
this.label7.Text = "DI7";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(132, 62);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(23, 12);
this.label6.TabIndex = 5;
this.label6.Text = "DI6";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(132, 30);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(23, 12);
this.label5.TabIndex = 4;
this.label5.Text = "DI5";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(35, 126);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(23, 12);
this.label4.TabIndex = 3;
this.label4.Text = "DI4";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(35, 94);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(23, 12);
this.label3.TabIndex = 2;
this.label3.Text = "DI3";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(35, 62);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(23, 12);
this.label2.TabIndex = 1;
this.label2.Text = "DI2";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(35, 30);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(23, 12);
this.label1.TabIndex = 0;
this.label1.Text = "DI1";
//
// stopbtn
//
this.stopbtn.Location = new System.Drawing.Point(350, 23);
this.stopbtn.Name = "stopbtn";
this.stopbtn.Size = new System.Drawing.Size(75, 23);
this.stopbtn.TabIndex = 2;
this.stopbtn.Text = "停止测试";
this.stopbtn.UseVisualStyleBackColor = true;
this.stopbtn.Click += new System.EventHandler(this.stopbtn_Click);
//
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(23, 28);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(47, 12);
this.label17.TabIndex = 3;
this.label17.Text = "IP设置:";
//
// IPsetBox
//
this.IPsetBox.Location = new System.Drawing.Point(76, 25);
this.IPsetBox.Name = "IPsetBox";
this.IPsetBox.Size = new System.Drawing.Size(122, 21);
this.IPsetBox.TabIndex = 4;
//
// pictureBox16
//
this.pictureBox16.BackColor = System.Drawing.Color.Black;
this.pictureBox16.Location = new System.Drawing.Point(361, 122);
this.pictureBox16.Name = "pictureBox16";
this.pictureBox16.Size = new System.Drawing.Size(36, 19);
this.pictureBox16.TabIndex = 31;
this.pictureBox16.TabStop = false;
this.pictureBox16.Tag = "15";
//
// pictureBox15
//
this.pictureBox15.BackColor = System.Drawing.Color.Black;
this.pictureBox15.Location = new System.Drawing.Point(361, 90);
this.pictureBox15.Name = "pictureBox15";
this.pictureBox15.Size = new System.Drawing.Size(36, 19);
this.pictureBox15.TabIndex = 30;
this.pictureBox15.TabStop = false;
this.pictureBox15.Tag = "14";
//
// pictureBox14
//
this.pictureBox14.BackColor = System.Drawing.Color.Black;
this.pictureBox14.Location = new System.Drawing.Point(361, 59);
this.pictureBox14.Name = "pictureBox14";
this.pictureBox14.Size = new System.Drawing.Size(36, 19);
this.pictureBox14.TabIndex = 29;
this.pictureBox14.TabStop = false;
this.pictureBox14.Tag = "13";
//
// pictureBox13
//
this.pictureBox13.BackColor = System.Drawing.Color.Black;
this.pictureBox13.Location = new System.Drawing.Point(361, 26);
this.pictureBox13.Name = "pictureBox13";
this.pictureBox13.Size = new System.Drawing.Size(36, 19);
this.pictureBox13.TabIndex = 28;
this.pictureBox13.TabStop = false;
this.pictureBox13.Tag = "12";
//
// pictureBox12
//
this.pictureBox12.BackColor = System.Drawing.Color.Black;
this.pictureBox12.Location = new System.Drawing.Point(264, 122);
this.pictureBox12.Name = "pictureBox12";
this.pictureBox12.Size = new System.Drawing.Size(36, 19);
this.pictureBox12.TabIndex = 27;
this.pictureBox12.TabStop = false;
this.pictureBox12.Tag = "11";
//
// pictureBox11
//
this.pictureBox11.BackColor = System.Drawing.Color.Black;
this.pictureBox11.Location = new System.Drawing.Point(264, 90);
this.pictureBox11.Name = "pictureBox11";
this.pictureBox11.Size = new System.Drawing.Size(36, 19);
this.pictureBox11.TabIndex = 26;
this.pictureBox11.TabStop = false;
this.pictureBox11.Tag = "10";
//
// pictureBox10
//
this.pictureBox10.BackColor = System.Drawing.Color.Black;
this.pictureBox10.Location = new System.Drawing.Point(264, 59);
this.pictureBox10.Name = "pictureBox10";
this.pictureBox10.Size = new System.Drawing.Size(36, 19);
this.pictureBox10.TabIndex = 25;
this.pictureBox10.TabStop = false;
this.pictureBox10.Tag = "9";
//
// pictureBox9
//
this.pictureBox9.BackColor = System.Drawing.Color.Black;
this.pictureBox9.Location = new System.Drawing.Point(264, 26);
this.pictureBox9.Name = "pictureBox9";
this.pictureBox9.Size = new System.Drawing.Size(36, 19);
this.pictureBox9.TabIndex = 24;
this.pictureBox9.TabStop = false;
this.pictureBox9.Tag = "8";
//
// pictureBox8
//
this.pictureBox8.BackColor = System.Drawing.Color.Black;
this.pictureBox8.Location = new System.Drawing.Point(161, 122);
this.pictureBox8.Name = "pictureBox8";
this.pictureBox8.Size = new System.Drawing.Size(36, 19);
this.pictureBox8.TabIndex = 23;
this.pictureBox8.TabStop = false;
this.pictureBox8.Tag = "7";
//
// pictureBox7
//
this.pictureBox7.BackColor = System.Drawing.Color.Black;
this.pictureBox7.Location = new System.Drawing.Point(161, 90);
this.pictureBox7.Name = "pictureBox7";
this.pictureBox7.Size = new System.Drawing.Size(36, 19);
this.pictureBox7.TabIndex = 22;
this.pictureBox7.TabStop = false;
this.pictureBox7.Tag = "6";
//
// pictureBox6
//
this.pictureBox6.BackColor = System.Drawing.Color.Black;
this.pictureBox6.Location = new System.Drawing.Point(161, 59);
this.pictureBox6.Name = "pictureBox6";
this.pictureBox6.Size = new System.Drawing.Size(36, 19);
this.pictureBox6.TabIndex = 21;
this.pictureBox6.TabStop = false;
this.pictureBox6.Tag = "5";
//
// pictureBox5
//
this.pictureBox5.BackColor = System.Drawing.Color.Black;
this.pictureBox5.Location = new System.Drawing.Point(161, 26);
this.pictureBox5.Name = "pictureBox5";
this.pictureBox5.Size = new System.Drawing.Size(36, 19);
this.pictureBox5.TabIndex = 20;
this.pictureBox5.TabStop = false;
this.pictureBox5.Tag = "4";
//
// pictureBox4
//
this.pictureBox4.BackColor = System.Drawing.Color.Black;
this.pictureBox4.Location = new System.Drawing.Point(64, 122);
this.pictureBox4.Name = "pictureBox4";
this.pictureBox4.Size = new System.Drawing.Size(36, 19);
this.pictureBox4.TabIndex = 19;
this.pictureBox4.TabStop = false;
this.pictureBox4.Tag = "3";
//
// pictureBox3
//
this.pictureBox3.BackColor = System.Drawing.Color.Black;
this.pictureBox3.Location = new System.Drawing.Point(64, 90);
this.pictureBox3.Name = "pictureBox3";
this.pictureBox3.Size = new System.Drawing.Size(36, 19);
this.pictureBox3.TabIndex = 18;
this.pictureBox3.TabStop = false;
this.pictureBox3.Tag = "2";
//
// pictureBox2
//
this.pictureBox2.BackColor = System.Drawing.Color.Black;
this.pictureBox2.Location = new System.Drawing.Point(64, 59);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(36, 19);
this.pictureBox2.TabIndex = 17;
this.pictureBox2.TabStop = false;
this.pictureBox2.Tag = "1";
//
// pictureBox1
//
this.pictureBox1.BackColor = System.Drawing.Color.Black;
this.pictureBox1.Location = new System.Drawing.Point(64, 26);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(36, 19);
this.pictureBox1.TabIndex = 16;
this.pictureBox1.TabStop = false;
this.pictureBox1.Tag = "0";
//
// MDemo
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(442, 234);
this.Controls.Add(this.IPsetBox);
this.Controls.Add(this.label17);
this.Controls.Add(this.stopbtn);
this.Controls.Add(this.CoilBox);
this.Controls.Add(this.TestBtn);
this.Name = "MDemo";
this.Text = "Demo";
this.CoilBox.ResumeLayout(false);
this.CoilBox.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox16)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox15)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox14)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox13)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox12)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox11)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox10)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox9)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox8)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button TestBtn;
private System.Windows.Forms.GroupBox CoilBox;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button stopbtn;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.TextBox IPsetBox;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.PictureBox pictureBox3;
private System.Windows.Forms.PictureBox pictureBox16;
private System.Windows.Forms.PictureBox pictureBox15;
private System.Windows.Forms.PictureBox pictureBox14;
private System.Windows.Forms.PictureBox pictureBox13;
private System.Windows.Forms.PictureBox pictureBox12;
private System.Windows.Forms.PictureBox pictureBox11;
private System.Windows.Forms.PictureBox pictureBox10;
private System.Windows.Forms.PictureBox pictureBox9;
private System.Windows.Forms.PictureBox pictureBox8;
private System.Windows.Forms.PictureBox pictureBox7;
private System.Windows.Forms.PictureBox pictureBox6;
private System.Windows.Forms.PictureBox pictureBox5;
private System.Windows.Forms.PictureBox pictureBox4;
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ModbusDemo.windows;
using System.Threading;
using System.Text.RegularExpressions;
namespace ModbusDemo
{
public partial class MDemo : Form
{
WTModbus ReadTest;
const ushort address = 17;
const ushort num = 6;
const ushort DevicePort = 502;
string DeviceIP;
ManualResetEvent showmre = new ManualResetEvent(false);
public delegate void invokeDelegate();
public MDemo()
{
InitializeComponent();
ReadTest = new WTModbus();
}
Thread t_ReadCoil;
private void TestBtn_Click(object sender, EventArgs e)
{
this.TestBtn.Enabled = false;
if (this.IPsetBox.Text != "")
{
DeviceIP = this.IPsetBox.Text;
}
else
{
MessageBox.Show("请检查IP输入是否正确");
this.TestBtn.Enabled = true;
return;
}
if (showmre != null)
{
showmre.Reset();
}
t_ReadCoil = new Thread(ReadCoilProc);
t_ReadCoil.IsBackground = true;
t_ReadCoil.Start();
}
private void ReadCoilProc(object obj)
{
short allval;
byte[] temp = new byte[6];
int ret;
while (!showmre.WaitOne(500))
{
//读线圈
ret = ReadTest.ReadCoilStatus(address, num, DeviceIP, DevicePort, ref temp);
allval = BitConverter.ToInt16(temp, 0);
invokeDelegate update = () =>
{
foreach (Control control in this.CoilBox.Controls)
{
if(control is PictureBox)
{
if ((allval >> Convert.ToUInt16((control as PictureBox).Tag) & 0x1) == 1)
{
(control as PictureBox).BackColor = Color.Green;
}
else
{
(control as PictureBox).BackColor = Color.Black;
}
}
}
};
Invoke(update);
}
}
private void stopbtn_Click(object sender, EventArgs e)
{
this.TestBtn.Enabled = true;
if (showmre != null)
showmre.Set();
foreach (Control control in this.CoilBox.Controls)
{
if (control is PictureBox)
{
(control as PictureBox).BackColor = Color.Black;
}
}
}
}
}
<?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>
\ No newline at end of file
namespace ModbusDemo
{
partial class ProTest
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.label9 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.hwstart = new System.Windows.Forms.Button();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.label8 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.sfstart = new System.Windows.Forms.Button();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.label10 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.label16 = new System.Windows.Forms.Label();
this.label17 = new System.Windows.Forms.Label();
this.label18 = new System.Windows.Forms.Label();
this.label19 = new System.Windows.Forms.Label();
this.label20 = new System.Windows.Forms.Label();
this.label21 = new System.Windows.Forms.Label();
this.label22 = new System.Windows.Forms.Label();
this.label23 = new System.Windows.Forms.Label();
this.label24 = new System.Windows.Forms.Label();
this.label25 = new System.Windows.Forms.Label();
this.label26 = new System.Windows.Forms.Label();
this.label27 = new System.Windows.Forms.Label();
this.label28 = new System.Windows.Forms.Label();
this.label29 = new System.Windows.Forms.Label();
this.onethrun = new System.Windows.Forms.Button();
this.tenthrun = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
this.SuspendLayout();
//
// groupBox1
//
this.groupBox1.Controls.Add(this.label9);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.hwstart);
this.groupBox1.Location = new System.Drawing.Point(15, 9);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(434, 65);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "设备读取性能";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(247, 32);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(41, 12);
this.label9.TabIndex = 5;
this.label9.Text = "label9";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(381, 32);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(41, 12);
this.label4.TabIndex = 4;
this.label4.Text = "label4";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(324, 32);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(65, 12);
this.label3.TabIndex = 3;
this.label3.Text = "花费时间:";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(180, 32);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(41, 12);
this.label2.TabIndex = 2;
this.label2.Text = "label2";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(109, 32);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(65, 12);
this.label1.TabIndex = 1;
this.label1.Text = "读取次数:";
//
// hwstart
//
this.hwstart.Location = new System.Drawing.Point(19, 27);
this.hwstart.Name = "hwstart";
this.hwstart.Size = new System.Drawing.Size(75, 23);
this.hwstart.TabIndex = 0;
this.hwstart.Text = "开始";
this.hwstart.UseVisualStyleBackColor = true;
this.hwstart.Click += new System.EventHandler(this.hwstart_Click);
//
// groupBox2
//
this.groupBox2.Controls.Add(this.label8);
this.groupBox2.Controls.Add(this.label7);
this.groupBox2.Controls.Add(this.label6);
this.groupBox2.Controls.Add(this.label5);
this.groupBox2.Controls.Add(this.sfstart);
this.groupBox2.Location = new System.Drawing.Point(15, 89);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(327, 65);
this.groupBox2.TabIndex = 1;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "ModSim读取性能";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(280, 31);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(41, 12);
this.label8.TabIndex = 4;
this.label8.Text = "label8";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(223, 31);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(65, 12);
this.label7.TabIndex = 3;
this.label7.Text = "花费时间:";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(166, 31);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(41, 12);
this.label6.TabIndex = 2;
this.label6.Text = "label6";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(109, 31);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(65, 12);
this.label5.TabIndex = 1;
this.label5.Text = "读取次数:";
//
// sfstart
//
this.sfstart.Location = new System.Drawing.Point(26, 26);
this.sfstart.Name = "sfstart";
this.sfstart.Size = new System.Drawing.Size(75, 23);
this.sfstart.TabIndex = 0;
this.sfstart.Text = "开始";
this.sfstart.UseVisualStyleBackColor = true;
this.sfstart.Click += new System.EventHandler(this.sfstart_Click);
//
// groupBox3
//
this.groupBox3.Controls.Add(this.tenthrun);
this.groupBox3.Controls.Add(this.onethrun);
this.groupBox3.Controls.Add(this.label29);
this.groupBox3.Controls.Add(this.label28);
this.groupBox3.Controls.Add(this.label27);
this.groupBox3.Controls.Add(this.label26);
this.groupBox3.Controls.Add(this.label25);
this.groupBox3.Controls.Add(this.label24);
this.groupBox3.Controls.Add(this.label23);
this.groupBox3.Controls.Add(this.label22);
this.groupBox3.Controls.Add(this.label21);
this.groupBox3.Controls.Add(this.label20);
this.groupBox3.Controls.Add(this.label19);
this.groupBox3.Controls.Add(this.label18);
this.groupBox3.Controls.Add(this.label17);
this.groupBox3.Controls.Add(this.label16);
this.groupBox3.Controls.Add(this.label15);
this.groupBox3.Controls.Add(this.label14);
this.groupBox3.Controls.Add(this.label13);
this.groupBox3.Controls.Add(this.label12);
this.groupBox3.Controls.Add(this.label11);
this.groupBox3.Controls.Add(this.label10);
this.groupBox3.Location = new System.Drawing.Point(15, 179);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(422, 317);
this.groupBox3.TabIndex = 2;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "groupBox3";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(175, 29);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(47, 12);
this.label10.TabIndex = 0;
this.label10.Text = "label10";
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(175, 57);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(47, 12);
this.label11.TabIndex = 0;
this.label11.Text = "label10";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(175, 85);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(47, 12);
this.label12.TabIndex = 0;
this.label12.Text = "label10";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(175, 113);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(47, 12);
this.label13.TabIndex = 0;
this.label13.Text = "label10";
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(175, 141);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(47, 12);
this.label14.TabIndex = 0;
this.label14.Text = "label10";
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(175, 169);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(47, 12);
this.label15.TabIndex = 0;
this.label15.Text = "label10";
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(175, 197);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(47, 12);
this.label16.TabIndex = 0;
this.label16.Text = "label10";
//
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(175, 225);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(47, 12);
this.label17.TabIndex = 0;
this.label17.Text = "label10";
//
// label18
//
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(175, 253);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(47, 12);
this.label18.TabIndex = 0;
this.label18.Text = "label10";
//
// label19
//
this.label19.AutoSize = true;
this.label19.Location = new System.Drawing.Point(175, 281);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(47, 12);
this.label19.TabIndex = 0;
this.label19.Text = "label10";
//
// label20
//
this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(263, 29);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(47, 12);
this.label20.TabIndex = 1;
this.label20.Text = "label20";
//
// label21
//
this.label21.AutoSize = true;
this.label21.Location = new System.Drawing.Point(263, 57);
this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(47, 12);
this.label21.TabIndex = 1;
this.label21.Text = "label20";
//
// label22
//
this.label22.AutoSize = true;
this.label22.Location = new System.Drawing.Point(263, 85);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(47, 12);
this.label22.TabIndex = 1;
this.label22.Text = "label20";
//
// label23
//
this.label23.AutoSize = true;
this.label23.Location = new System.Drawing.Point(263, 113);
this.label23.Name = "label23";
this.label23.Size = new System.Drawing.Size(47, 12);
this.label23.TabIndex = 1;
this.label23.Text = "label20";
//
// label24
//
this.label24.AutoSize = true;
this.label24.Location = new System.Drawing.Point(263, 141);
this.label24.Name = "label24";
this.label24.Size = new System.Drawing.Size(47, 12);
this.label24.TabIndex = 1;
this.label24.Text = "label20";
//
// label25
//
this.label25.AutoSize = true;
this.label25.Location = new System.Drawing.Point(263, 169);
this.label25.Name = "label25";
this.label25.Size = new System.Drawing.Size(47, 12);
this.label25.TabIndex = 1;
this.label25.Text = "label20";
//
// label26
//
this.label26.AutoSize = true;
this.label26.Location = new System.Drawing.Point(263, 197);
this.label26.Name = "label26";
this.label26.Size = new System.Drawing.Size(47, 12);
this.label26.TabIndex = 1;
this.label26.Text = "label20";
//
// label27
//
this.label27.AutoSize = true;
this.label27.Location = new System.Drawing.Point(263, 225);
this.label27.Name = "label27";
this.label27.Size = new System.Drawing.Size(47, 12);
this.label27.TabIndex = 1;
this.label27.Text = "label20";
//
// label28
//
this.label28.AutoSize = true;
this.label28.Location = new System.Drawing.Point(263, 253);
this.label28.Name = "label28";
this.label28.Size = new System.Drawing.Size(47, 12);
this.label28.TabIndex = 1;
this.label28.Text = "label20";
//
// label29
//
this.label29.AutoSize = true;
this.label29.Location = new System.Drawing.Point(263, 281);
this.label29.Name = "label29";
this.label29.Size = new System.Drawing.Size(47, 12);
this.label29.TabIndex = 1;
this.label29.Text = "label20";
//
// onethrun
//
this.onethrun.Location = new System.Drawing.Point(19, 29);
this.onethrun.Name = "onethrun";
this.onethrun.Size = new System.Drawing.Size(75, 23);
this.onethrun.TabIndex = 2;
this.onethrun.Text = "单一线程测试";
this.onethrun.UseVisualStyleBackColor = true;
this.onethrun.Click += new System.EventHandler(this.onethrun_Click);
//
// tenthrun
//
this.tenthrun.Location = new System.Drawing.Point(19, 85);
this.tenthrun.Name = "tenthrun";
this.tenthrun.Size = new System.Drawing.Size(75, 23);
this.tenthrun.TabIndex = 3;
this.tenthrun.Text = "10线程测试";
this.tenthrun.UseVisualStyleBackColor = true;
this.tenthrun.Click += new System.EventHandler(this.tenthrun_Click);
//
// ProTest
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(461, 548);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Name = "ProTest";
this.Text = "性能测试";
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Button hwstart;
private System.Windows.Forms.Button sfstart;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.Label label29;
private System.Windows.Forms.Label label28;
private System.Windows.Forms.Label label27;
private System.Windows.Forms.Label label26;
private System.Windows.Forms.Label label25;
private System.Windows.Forms.Label label24;
private System.Windows.Forms.Label label23;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.Label label21;
private System.Windows.Forms.Label label20;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Button tenthrun;
private System.Windows.Forms.Button onethrun;
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ModbusDemo.windows;
using System.Threading;
using System.Text.RegularExpressions;
namespace ModbusDemo
{
public partial class ProTest : Form
{
WTModbus ReadTest;
// WTModbus TenReadTest; // = new WTModbus[10];
const ushort address = 1;
const ushort num = 16;
const ushort DevicePort = 502;
string DeviceIP = "192.168.1.57";
ManualResetEvent showmre = new ManualResetEvent(false);
public delegate void invokeDelegate();
//Ten module
string [] TenDeviceIP = new string[10];
public ProTest()
{
InitializeComponent();
setTenIP();
}
private void setTenIP()
{
TenDeviceIP[0] = "192.168.102";
TenDeviceIP[1] = "192.168.113";
TenDeviceIP[2] = "192.168.112";
TenDeviceIP[3] = "192.168.109";
TenDeviceIP[4] = "192.168.110";
TenDeviceIP[5] = "192.168.103";
TenDeviceIP[6] = "192.168.111";
TenDeviceIP[7] = "192.168.107";
TenDeviceIP[8] = "192.168.104";
TenDeviceIP[9] = "192.168.106";
}
Boolean hwstartuse = false;
Thread t_ReadCoil;
bool closethread = false;
private void hwstart_Click(object sender, EventArgs e)
{
if(!hwstartuse)
{
hwstartuse = !hwstartuse;
this.hwstart.Text = "停止";
t_ReadCoil = new Thread(ReadCoilProc);
t_ReadCoil.IsBackground = true;
t_ReadCoil.Start();
closethread = false;
}else
{
hwstartuse = !hwstartuse;
this.hwstart.Text = "开始";
closethread = true;
}
}
private void ReadCoilProc(object obj)
{
short allval;
int readcount = 0;
int failcount = 0;
byte[] temp = new byte[2];
int ret;
ReadTest = new WTModbus();
int starttime = System.Environment.TickCount;
while (true)
{
//读线圈
ret = ReadTest.ReadCoilStatus(address, num, DeviceIP, DevicePort, ref temp);
// allval = BitConverter.ToInt16(temp, 0);
if(ret == 0)
{
readcount++;
}else
{
failcount++;
}
invokeDelegate update = () =>
{
this.label2.Text = readcount.ToString() + "次";
this.label9.Text = failcount.ToString() + "次";
this.label4.Text = (System.Environment.TickCount - starttime).ToString() + "ms";
};
Invoke(update);
if (closethread)
{
break;
}
}
}
bool []tenclosethread = new bool[10];
WTModbus[]TReadTest = new WTModbus[10];
private void eReadCoilProc(object obj)
{
//WTModbus TReadTest;
int readcount = 0;
int failcount = 0;
byte[] temp = new byte[2];
int ret;
int thnum = 0;
thnum = int.Parse(obj.ToString());
this.TReadTest[thnum] = new WTModbus();
int starttime = System.Environment.TickCount;
while (true)
{
//读线圈
ret = TReadTest[thnum].ReadCoilStatus(address, num, TenDeviceIP[thnum], DevicePort, ref temp);
if (ret == 0)
{
readcount++;
}
else
{
failcount++;
}
invokeDelegate update = () =>
{
foreach(Control c in groupBox3.Controls)
{
if(c is Label)
{
if(c.Name == ("label1" + thnum.ToString()) )
c.Text = readcount.ToString() + "次";
if(c.Name == ("label2" + thnum.ToString()))
c.Text = (System.Environment.TickCount - starttime).ToString() + "ms";
}
}
};
Invoke(update);
if (tenclosethread[thnum])
{
break;
}
}
}
private void sfstart_Click(object sender, EventArgs e)
{
}
Thread []ten_ReadCoil = new Thread[10];
private void tenthrun_Click(object sender, EventArgs e)
{
int i = 0;
if (!hwstartuse)
{
hwstartuse = !hwstartuse;
this.tenthrun.Text = "停止";
for (i = 0; i < 10; i++ )
{
tenclosethread[i] = false;
ten_ReadCoil[i] = new Thread(new ParameterizedThreadStart(eReadCoilProc));
ten_ReadCoil[i].IsBackground = true;
ten_ReadCoil[i].Start(i.ToString());
}
}
else
{
hwstartuse = !hwstartuse;
for (i = 0; i < 10; i++)
{
tenclosethread[i] = true;
}
this.tenthrun.Text = "10线程测试";
}
}
private void onethrun_Click(object sender, EventArgs e)
{
if (!hwstartuse)
{
hwstartuse = !hwstartuse;
this.onethrun.Text = "停止";
t_ReadCoil = new Thread(oneReadCoilProc);
t_ReadCoil.IsBackground = true;
t_ReadCoil.Start();
closethread = false;
}
else
{
hwstartuse = !hwstartuse;
this.onethrun.Text = "单一线程测试";
closethread = true;
}
}
WTModbus[] TenReadTest = new WTModbus[10];
private void oneReadCoilProc(object obj)
{
int []readcount = new int[10];
int []failcount = new int[10];
byte[]temp = new byte[2];
int []ret = new int[10];
int i = 0;
int []tenstatrttime = new int[10];
for (i = 0; i < 10; i++)
{
TenReadTest[i] = new WTModbus();
}
for (i = 0; i < 10; i++)
{
tenstatrttime[i] = System.Environment.TickCount;
}
while (true)
{
//读线圈
for (i = 0; i < 10; i++ )
{
ret[i] = TenReadTest[i].ReadCoilStatus(address, num, TenDeviceIP[i], DevicePort, ref temp);
if (ret[i] == 0)
{
readcount[i]++;
}
else
{
failcount[i]++;
}
invokeDelegate update = () =>
{
foreach (Control c in groupBox3.Controls)
{
if (c is Label)
{
if (c.Name == ("label1" + i.ToString()))
c.Text = readcount[i].ToString() + "次";
if (c.Name == ("label2" + i.ToString()))
c.Text = (System.Environment.TickCount - tenstatrttime[i]).ToString() + "ms";
}
}
};
Invoke(update);
}
if (closethread)
{
break;
}
}
}
}
}
<?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>
\ No newline at end of file
namespace ModbusDemo.windows
{
partial class sanchen
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(sanchen));
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.modbus_Master1 = new ModbusDemo.modbus_Master();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.comPort1 = new ModbusDemo.ComPort();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// pictureBox1
//
this.pictureBox1.Image = global::ModbusDemo.Properties.Resources._057;
this.pictureBox1.Location = new System.Drawing.Point(392, 389);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(124, 136);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.pictureBox1.TabIndex = 1;
this.pictureBox1.TabStop = false;
//
// modbus_Master1
//
this.modbus_Master1.Location = new System.Drawing.Point(12, 151);
this.modbus_Master1.Name = "modbus_Master1";
this.modbus_Master1.Size = new System.Drawing.Size(472, 374);
this.modbus_Master1.TabIndex = 0;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(163, 12);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(135, 20);
this.label1.TabIndex = 3;
this.label1.Text = "主机串口设置";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Location = new System.Drawing.Point(163, 128);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(135, 20);
this.label2.TabIndex = 4;
this.label2.Text = "从机串口设置";
//
// comPort1
//
this.comPort1.Location = new System.Drawing.Point(18, 26);
this.comPort1.Name = "comPort1";
this.comPort1.Size = new System.Drawing.Size(408, 108);
this.comPort1.TabIndex = 5;
//
// sanchen
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(539, 537);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.comPort1);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.modbus_Master1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "sanchen";
this.Text = "sanchen";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.sanchen_FormClosing);
this.Load += new System.EventHandler(this.sanchen_Load);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private modbus_Master modbus_Master1;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private ComPort comPort1;
}
}
\ No newline at end of file
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 ModbusDemo.windows
{
public partial class sanchen : Form
{
public sanchen()
{
InitializeComponent();
System.Windows.Forms.Control.CheckForIllegalCrossThreadCalls = false;//设置该属性 为false
}
private void sanchen_Load(object sender, EventArgs e)
{
this.Text = "WTD93UG" + "  (V." + Application.ProductVersion + ")";
}
private void sanchen_FormClosing(object sender, FormClosingEventArgs e)
{
System.Environment.Exit(0);
}
}
}
<?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.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAE0QAABNEAAAAAAAAAAA
AAAAAAAAAAAAAGE4KABrRTUYZDwoVGlELiF3UEIKZj4oTl84KDL///8Cb0s3O3FOOSh0UToFZ0ApRG9O
OT10UkAYZ0EsSHxdSwpqRjAqbEYyTmtFL0VvSjc6gWJRFGU+K0hxTkARXjkrRmxFMyRsSTgrbkg1N///
/wHf2NIAAAAAAAAAAAAAAAAASRkDAGA3ImRbMBn7ZT8mhXVSPkdeNRzxWC8ZsLqpnw5jPSSrZkEpdWM7
IxxcMxnNdVI9SGY/KDtbMhrSe1tHK2Q9JrBjPCSdZDwloGQ7Jap7WUY8WTAX0mZBLDdSKRXKYjkicGE6
JXtiOiOg////AeHb1wAAAAAAAAAAAHROQQB/WlAKXTUeq2E5IZ5mPyewZT4mxWlDK5FdMxrLeFVAKnJO
OJl0UDtnZUAsSV01HOZvSzVfck86M21JMsOEZFApaUMtlmA4I1ZmQSpVZkAqhH1bSSxhOSKqbEcxa100
HapmPyd1YzwkkWM8JmcAAAAA497aAAAAAAAAAAAAb0k7AHBLPR5kPSisb0kzOmhDL2xmQSucbko2JWhD
LIl6WUcykXZkZ5l/bURtTDkXZT0pbndUQCWVemkdkHRhjJp/cBGxoZUHqJSHBbOjlASwnY8HsJiPArul
mgmljYEGqpKHCYNlTwSKbFgOlnpwBI1vYgAAAAAAAAAAAAAAAACdhngAoox9A5J3ahV2VUI7ZkApaWhB
KW5fOCBmZ0EpbWQ+JWtlPiV0ZD0lb181H2RgNyFjYDcdZmM4IWtlPSZ3YTkfaF83HWZgNh5mXzYeZl82
HmVeNh5mXjUeZV42HWZdNhxnaEIpWH5dTBl0WDMAknJjAAAAAAAAAAAAAAAAAHdSRgCFY1kHYjolfl00
HepcMRn+XDEY/1sxGP9bMRj/WzIY/1syGP9bMhj/WzEZ/1sxGf9cMRj/WzEY/1sxGP5cMhn/WzIZ/1sx
Gf9bMhn/WzIZ/1syGf9bMhn/WzIZ/1syGP9dMxv5XDQbymM9JjhWLBIAAAAAAAAAAAAAAAAAXzQgAGc+
KztcMRrvXDMa/1wzGv9cMxr/XDMa/1wzGv9cMxr/XDMa/1wzGv9cMxr/XDMa/1wzGv9cMxr/XDMa/1wz
Gv9cMxr/XDMa/1wzGv9cMxr/XDMa/1wzGv9cMxr/XDMa/1wzGv9bMhn/ZT4nnOvn4wW5qZ0AAAAAAAAA
AABZLBgAZj0qTlwyGvpcMxr/XDMa/1wzGv9bMhn/WzIZ/1wyGv9cMxr/XDMa/1wzGv9cMxr/XDMa/1wz
Gv9cMxr/XDMa/1wzGv9cMxr/XDMa/1wzGv9cMxr/XDMa/1wzGv9cMxr/XDMa/1szGf9pQyu9sZmPD6mP
gwAAAAAAAAAAAFgtGABmPipOXDIa+lwzGv9cMxr/XDMa/1wzGv9cMxr/XDMa/1wzGv9cMxr/XDMa/1wz
Gv9cMxr/XDMa/1wzGv9cMxr/XDMa/1wzGv9cMxr/XDMa/1wzGv9cMxr/XDMa/1wzGv9cMxr/XDIZ/2pD
LLyzmpAPq5CEAAAAAAAAAAAAWC0XAGU9Kk5bMhr6XDMa/1wzGv9cMxr/XTMa/1sxGP9bMRn/WjEZ/1ow
Gf9bMBn/XDIZ/1wzGf9bMRj/WjEY/1owGf9aMRn/XDIY/1wzGv9cMxr/WS8V/1guFv9ZLxb/WzEX/10y
Gf9cMxn/aUQsva6ZjQ+nkIIAAAAAAAAAAABYLRgAZT0qTlwyGvpcMxr/XDMa/1wzGv9cMhr/nIN1/76u
pv+9q6P/vayj/7qnn/9vSzb/aEEr/7ShmP+9rKT/vauj/7+up/+XfW7/WjAW/1sxGP+HaFb/sp6T/7Wh
l/+EY1L/XDEY/1wyGf9pRCy9r5qND6eQggAAAAAAAAAAAFgtGABlPSpOWzIa+lwzGv9cMxr/WzIZ/100
Hf/TyMP//////////////////Pv6/4RkVf95V0f/9vTz/////////////////8q8tv9aMBn/aEIu/+Ha
1v//////5+Hf/4doWP9aMRj/XDIZ/2lELb2vmowPp5CCAAAAAAAAAAAAWC0XAGU9Kk5bMhr6XDMa/1wz
Gv9bMhn/YTgn/+Ha1///////////////////////kXVs/4lqXv/7+/r/////////////////2c7K/2E4
Iv9vSjj/6uXj//////+7qqH/WS4W/1wzGv9bMhn/akQtva+ajQ+nkIIAAAAAAAAAAABYLRcAZT0qTlsy
GvpcMxr/XDMa/1oxF/9oQzL/6+fl//////////////////////+kjYT/n4d+////////////////////
///m4N3/bEYx/21JN//q5eL//////72so/9cMhj/XDMa/1syGf9pRC29r5qND6eQggAAAAAAAAAAAFgt
GABlPSpOWzIa+lwzGv9cMxr/WS8W/3ZUQf/z8O7//////////////////////7qqo/+5qqT/////////
//////////////Hu7f95VkX/bEY0/+rk4v//////vKuj/1sxGP9cMxr/WzIZ/2pELb2vmo0Pp5CCAAAA
AAAAAAAAWS4XAGY/KU5cMxr6XDMa/1wzGv9YLxX/iW1c//j39///////////////////////0sfB/9DD
v/////////////7+////////+vn5/4dnVv9oQjD/6ePh//////+7qaL/WjAX/1wzGv9cMhn/akQtva+a
jQ+nkIIAAAAAAAAAAABYLhYAZj8pTlwzGfpcMxr/XDMa/1kvFf+giHv//f3+///////8+/r/+Pf2////
///s5+X/6uTj///////59/f//f39//7////+/v7/lHhp/3xbS//v6un//////8q9uP9mPin/XDIZ/1sz
Gf9pRCy9r5qND6eQggAAAAAAAAAAAFguFgBlPylOWzMZ+lwzGv9cMxr/WjEY/7akmv///////////+vm
5P/Vy8b///////79/v/+/f7//Pv7/9nOy//29PP///////////+hiH3/qpWL//39/f//////7Ojn/4Fg
Tf9aMRb/WzMZ/2lELb2vmo0Pp5CCAAAAAAAAAAAAVy8WAGU/KU5bMxn6XDMa/1wzGv9cNBz/x7mz////
////////29LO/7Shl//////////////////6+fn/t6Wd/+/r6f///////////7Oglv9yTj7/6OLg//z7
/P/BsKv/XzUe/1wyGv9bMhr/akQtva+ajQ+nkIIAAAAAAAAAAABXLhYAZD8pTlszGfpcMxr/XDMa/2A4
IP/Vy8b////////////PxMD/nIV8//////////////////j29f+ehX3/5+Lg////////////yLmy/2M7
Jf+DYlH/iGla/3dUQf9cMhn/XDMa/1syGf9qRC29r5qND6eQggAAAAAAAAAAAFcuFgBkPylOWzMZ+lwz
Gv9bMhn/ZDwk/+DY1P///////////8O0r/+KbWX//Pz7////////////9PHv/4ZmWP/e1tP/////////
///Z0Mz/Zj8p/1kvFf9aLxb/WjEX/1wzGv9cMxr/WzIZ/2lELb2vmo0Pp5CCAAAAAAAAAAAAWC0XAGU+
Kk5bMxr6XDMa/1oxF/9pRC7/6eTh////////////t6Wd/3tZS//18/L////////////u6uj/c089/9HF
wP///////////+rl5P9wSzn/WjEY/1wzGv9cMxr/XDMa/1wzGv9bMhn/aUQtva+ajQ+nkIIAAAAAAAAA
AABYLRgAZT0qTlwyGvpcMxr/WjAW/3VRPf/y7+7///////////+tmIz/bUkz/+vm4////////////+fh
3v9lPSz/vKqi////////////8/Hv/3hVQv9ZLxb/XDMa/1wzGv9cMxr/XDMa/1syGf9pRCy9r5qND6eQ
ggAAAAAAAAAAAFgtGABlPSpOXDMa+l0zGv9aLxf/iGpZ//n49////////v7+/56Fd/9jOyX/4NfU////
////////4NfU/140Hf+jjH/////////////5+Pf/gmJR/1guFf9cMxr/XDMa/1wzGv9cMxr/XDMa/2lE
Lb2vmo0Pp5CCAAAAAAAAAAAAWC0XAGU+KU5bMxr6XTMZ/1wxGP9/XUr/s6GW/7Ohl/+zn5b/eVhE/1wz
HP+giX3/uaeg/7mnn/+iin7/WzEX/31bSf+5pZ7/t6Sd/7eknf93VEH/WS8W/1wzGv9cMxr/XDMa/1wz
Gv9bMhn/aUQtva+ajQ+nkIIAAAAAAAAAAABYLhYAZT4pTlszGfpcMxn/XDMZ/1wyGP9ZMBj/WS8X/1ov
GP9bMRj/XDMY/1sxGP9aMBf/WjAX/1swF/9dMxn/XDIY/1owGP9aMBf/WjAY/1wyGf9cMxr/XDMa/1wz
Gv9cMxr/XDMa/1syGf9pRC29r5qND6eQggAAAAAAAAAAAFcvFgBlPylOWzMZ+lwzGf9cMxr/XDMZ/1wz
Gv9cMxr/XDMa/1wzGv9cMxr/XTMa/1wzGv9cMxr/XDMa/10zGf9cMxr/XTMZ/1wzGv9cMxr/XDMa/1wz
Gv9cMxr/XDMa/1wzGv9cMxr/WzIZ/2lELb2vmo0Pp5CCAAAAAAAAAAAAVy4XAGU/KU9cMxr6XDMa/1wz
Gv9cMxn/XDMa/1wzGv9cMxr/XDMa/1wzGv9cMxr/XDMa/1wzGv9cMxr/XDMa/1wzGv9cMxr/XDMa/1wz
Gv9cMxr/XDMa/1wzGv9cMxr/XDMa/1wzGv9bMhn/aUMsvq6ZjQ+nj4IAAAAAAAAAAABZLxgAZD0nSlsy
GPlcMxr/XDMa/1wzGv9cMxr/XDMa/1wzGv9cMxr/XDMa/1wzGv9cMxr/XDMa/1wzGv9cMxr/XDMa/1wz
Gv9cMxr/XDMa/1wzGv9cMxr/XDMa/1wzGv9cMxr/XDMa/1wyGf9oQSmzuqmgC62XjAAAAAAAAAAAAGU/
KABpRC4gXDIazFsyGf9bMhn/XDIZ/1syGf9bMhn/WzIZ/1syGf9bMhn/WzIZ/1syGf9bMhn/WzIZ/1sy
Gf9bMhn/WzIZ/1syGf9bMhn/XDIZ/1syGf9bMhn/WzIZ/1wyGf9bMhn/WzAY+mQ6JW0AAAAA2M7IAAAA
AAAAAAAAzb3BAAAAAABnQCoyYjojh2Y/KKdnPymnZkAop2ZAKKdmPyinZj8op2Y/KKdmQCinZkAop2Y/
KKdmPyinZkAop2ZAKKdmQCinZkAop2Y/KKdmPyinZj8op2Y/KKdmQCinZ0AoqGQ8Jp9fNyNic1A6D2tF
LgAAAAAAAAAAAAAAAAAAAAAAAAAAAPv6+AD6+fgB8e7qBfb08Qb49/UF9vT0Bvf19QX59/YF+ff3Bfj2
9QX59vYF+Pb2Bfn39gX29PQG9/T0Bfn29gX18fEG9fHyBvn39wX59/YF9/X1Bff19AX38vEG9fLwBP//
/wD///8AAAAAAAAAAAAAAAAA4AAAA+AAAAPAAAAHwAAAB8AAAA/AAAAHwAAAA8AAAAPAAAADwAAAA8AA
AAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AA
AAPAAAADwAAAA8AAAAPAAAAH4AAAB/AAAA8=
</value>
</data>
</root>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment