添加项目文件。

master
xiaoguo 3 years ago
parent 21a62a80cd
commit 163f1f75c0

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{50011230-779E-484E-9FED-1CF3086FA14E}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>EPSON_SOCKET</RootNamespace>
<AssemblyName>EPSON_SOCKET</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup>
<Compile Include="EPSON_SOCKET\EPSON_SOCKET.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="EPSON_SOCKET\STATES.cs" />
<Compile Include="EPSON_SOCKET\Vector3d.cs" />
<Compile Include="EventArgsCmd.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Utils.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="EPSON_SOCKET\EPSON_SOCKET.resx">
<DependentUpon>EPSON_SOCKET.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

@ -0,0 +1,884 @@
namespace EPSON_SOCKET
{
using System;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Runtime.CompilerServices;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Windows.Forms;
public class EPSON_SOCKET : UserControl
{
private Thread thd_conn;
private Thread thd_recv;
// private bool isConnection = false;
private bool timerStart = false;
private IPAddress ip;
private Socket clientSocket;
private int port_value = 0x138a;
private string ip_addr = "127.0.0.1";
private bool init_success = false;
private bool rec_start_flag = false;
private string send_data = string.Empty;
private int pickCounter = 0;
private long totalPickCounter = 0L;
private int place_counter = 0;
private int transfer_counter = 0;
private double x_val = 0.0;
private double y_val = 0.0;
private int groove_num;
private int col_num;
private double groove_to_groove;
private double col_to_col;
private double bar_length;
private double col_step;
private int bal_step;
private double boder;
private int in_bar_a;
private int in_bar_b;
private int rem_num;
private int select_num;
private int weightStep;
private int weightCounter;
private int weightFalseCounter;
private int weightFalseMax;
private int clearSpace;
private int boatNum = 0;
// private string warnMsg = string.Empty; //收到警告消息.
private string statusMsg = string.Empty; //收到状态消息.
private string node_time = "KFC";
private int f_send_status = 0;
private double resend_weight_value = 0.0;
private IContainer components = null;
private TextBox txtMsg;
private bool is_admin; //是否是管理端口.
private bool is_reconnect = true;//是否开启自动重联.
private bool bFirstConnect = true;//是否是第一次连接.
public event BtnClickHandle rec_data_refresh;
public event EventHandler OnStateChanged;
private static object _lock = new object();
public EPSON_SOCKET()
{
this.InitializeComponent();
this.createLogDir();
}
private void createLogDir()
{
string logDir = System.Environment.CurrentDirectory + "\\Logs";
Directory.CreateDirectory(logDir);
}
private void saveLog(string str)
{
string logDir = System.Environment.CurrentDirectory + "\\Logs\\";
string logFile = logDir + DateTime.Today.ToString("yyyy-MM-dd") + ".log";
string text = "【" + DateTime.Now.ToLongTimeString() + "】" + str + Environment.NewLine;
try
{
FileStream fs = File.Open(logFile, FileMode.Append);
StreamWriter sw = new StreamWriter(fs);
sw.Write(text);
sw.Close();
fs.Close();
}
catch (Exception ex) {}
}
private void com_timer_Tick(object sender, EventArgs e)
{
this.connection_epson();
}
private void connection_epson()
{
this.init_epson_com();
try
{
if (this.init_success)
{
if (this.clientSocket == null)
{
this.clientSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
this.clientSocket.Connect(new IPEndPoint(this.ip, this.port_value));
this.clientSocket.SendTimeout = 5000;
// 管理端口自动发送登录命令.
if ((this.is_admin) && (this.clientSocket.Connected))
{
this.Login();
}
}
else if (!this.clientSocket.Connected)
{
//如果不是自动重联.
if (!Is_Reconnect)
{
// 如果不是首次连接,那么直接返回不再连接.
if (!bFirstConnect)
return;
}
this.clientSocket.Dispose();
this.clientSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
this.clientSocket.Connect(new IPEndPoint(this.ip, this.port_value));
this.clientSocket.SendTimeout = 5000;
// check if the last state has been changed item value content.
if (this.OnStateChanged != null) this.OnStateChanged(false, null);
// 管理端口自动发送登录命令.
if ((this.is_admin) && (this.clientSocket.Connected))
{
bFirstConnect = false;
this.Login();
}
}
if (((this.clientSocket != null) && this.clientSocket.Connected) && !this.rec_start_flag)
{
this.rec_start_flag = true;
this.thd_recv = new Thread(new ThreadStart(this.tcp_rec));
this.thd_recv.Start();
// check if the last state has been changed item value content.
if (this.OnStateChanged != null) this.OnStateChanged(STATES.STATUS_CONNECTED,null);
}
}
}
catch (Exception exception)
{
if (!Is_Reconnect)
{
// 连接不上,并且不开启自动重联,不再连接接.
bFirstConnect = false;
}
// if (exception.ErrorCode == 10060) bFirstConnect = false;
this.print_msg("连接EPSON机器人异常:" + exception.Message);
}
}
// 发送Login指令给设备.
private void Login()
{
String cmd = String.Format("$login,1");
this.tcp_send(cmd);
this.print_msg("发送登录消息:" + cmd);
}
//发送GetStatus消息.
public void sendGetStatus()
{
if (this.IsConnection)
{
// 00100000001
String cmd = String.Format("$getstatus");
this.tcp_send(cmd);
this.print_msg("发送获取状态命令:" + cmd);
}
}
public void Delay(int mm)
{
DateTime now = DateTime.Now;
while (now.AddMilliseconds((double) mm) > DateTime.Now)
{
Application.DoEvents();
System.Threading.Thread.Sleep(10);
}
}
protected override void Dispose(bool disposing)
{
if (disposing && (this.components != null))
{
this.components.Dispose();
}
base.Dispose(disposing);
}
private void EPSON_SOCKET_Load(object sender, EventArgs e)
{
this.txtMsg.Size = base.Size;
}
private void EPSON_SOCKET_Resize(object sender, EventArgs e)
{
this.txtMsg.Size = base.Size;
}
private void init_epson_com()
{
this.init_success = true;
try
{
this.ip = IPAddress.Parse(this.ip_addr);
}
catch
{
this.init_success = false;
MessageBox.Show("IP地址格式错误");
}
if (this.port_value > 0xffff)
{
this.init_success = false;
MessageBox.Show("端口号设置操作范围!");
}
}
private void InitializeComponent()
{
this.txtMsg = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// txtMsg
//
this.txtMsg.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtMsg.Location = new System.Drawing.Point(0, 0);
this.txtMsg.Multiline = true;
this.txtMsg.Name = "txtMsg";
this.txtMsg.ReadOnly = true;
this.txtMsg.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.txtMsg.Size = new System.Drawing.Size(100, 23);
this.txtMsg.TabIndex = 0;
//
// EPSON_SOCKET
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.txtMsg);
this.Name = "EPSON_SOCKET";
this.Size = new System.Drawing.Size(272, 119);
this.Load += new System.EventHandler(this.EPSON_SOCKET_Load);
this.Resize += new System.EventHandler(this.EPSON_SOCKET_Resize);
this.ResumeLayout(false);
this.PerformLayout();
}
private void print_msg(string str)
{
if (this.txtMsg.InvokeRequired)
{
SetTextCallback method = new SetTextCallback(this.print_msg);
base.Invoke(method, new object[] { str });
}
else
{
string text = this.txtMsg.Text;
this.txtMsg.Text = text + "【" + DateTime.Now.ToLongTimeString() + "】" + str + Environment.NewLine;
this.txtMsg.Select(this.txtMsg.Text.Length - 1, 0);
this.txtMsg.ScrollToCaret();
}
this.saveLog(str);
}
// 管理员连接解码.
private void rec_data_decode_admin(String str)
{
String cmdType = str.Substring(0, 1);
str = str.Substring(1);
String[] result = str.Split(',');
if ((result == null) || (result.Length <= 0)) return;
if (cmdType == "#")
{
switch (result[0])
{
// 登录返回.
case "login":
{
if (result[1] == "0")
{
this.sendGetStatus();
if (this.OnStateChanged != null)
this.OnStateChanged(STATES.STATUS_LOGIN_OK, new EventArgsCmd(str));
}
else
{
// 打印登录失败返回消息.
this.print_msg("登录失败:" + str);
}
} break;
// 获取状态.
case "getstatus":
{
this.statusMsg = result[1] + "," + result[2];
} break;
// 启动回复
case "start":
{
if (result[1] == "0")
{
// 为防止连接时端口还没有开,这里先等待500毫秒再连接数据端口.
System.Threading.Thread.Sleep(500);
this.OnStateChanged(STATES.STATUS_START_SUCCEDSS, new EventArgsCmd(str));
}
} break;
// 停止回复
case "stop":
{
// if (result[1] == "0")
{
this.OnStateChanged(STATES.STATUS_STOP_SUCCESS, new EventArgsCmd(str));
}
}
break;
}
}
else if (cmdType == "!")
{
this.print_msg("命令失败:" + str);
}
}
// 普通通信解码.
private void rec_data_decode_normal(String str)
{
String cmdType = str.Substring(0, 1);
str = str.Substring(1);
String[] result = str.Split('=');
if ((result == null) || (result.Length <= 0)) return;
if (cmdType == "#")
{
switch (result[0])
{
case "statusmsg":
// this.statusMsg = result[1];
this.print_msg(result[1]);
break;
}
}
}
// 解析接收到的数据.
private void rec_data_decode(string str)
{
str = Regex.Replace(str, @"[\r\n]", "");
if (this.is_admin)
{
// 解析控制指令.
rec_data_decode_admin(str);
}
else
{
// 解析数据内容.
rec_data_decode_normal(str);
}
}
private void tcp_rec()
{
try
{
if (this.clientSocket == null)
{
this.print_msg("clientSocket为空!");
return;
}
if (!this.clientSocket.Connected)
{
this.print_msg("clientSocket未连接!");
return;
}
// loop to received data now.
while (this.rec_start_flag)
{
string str = "";
byte[] buffer = new byte[1024];
int count = this.clientSocket.Receive(buffer, buffer.Length, SocketFlags.None);
if (count > 0)
{
int pos = -1;
str = str + Encoding.Default.GetString(buffer, 0, count);
while ((pos = str.IndexOf("\r\n")) > 0)
{
String item = str.Substring(0, pos);
this.rec_data_decode(item);
this.print_msg("服务端发来消息:" + item);
if (this.rec_data_refresh != null)
{
this.rec_data_refresh(new Button(), new EventArgsCmd(item));
}
// skip current item now.
str = str.Substring(pos+2);
}
}
}
}
catch (Exception exception)
{
this.print_msg("接收异常:" + exception.Message);
}
finally
{
this.rec_start_flag = false;
this.print_msg("服务器断开连接......");
}
}
public void tcp_send(string sentstr)
{
try
{
if ((this.clientSocket != null) && this.clientSocket.Connected)
{
string s = string.Empty;
s = sentstr + Environment.NewLine;
lock(_lock)
{
// 锁定并发送数据,为了防止同时发送数据导致冲突.
this.clientSocket.Send(Encoding.UTF8.GetBytes(s));
}
this.print_msg("发送:" + s);
}
}
catch
{
}
}
private void timer_tick()
{
while (true)
{
// this.print_msg("检查机器人通信状态");
this.connection_epson();
this.Delay(500);
}
}
public bool IsConnection
{
get
{
return ((this.clientSocket != null) && this.clientSocket.Connected);
}
}
public bool TimerStart
{
get
{
return this.timerStart;
}
set
{
this.timerStart = value;
this.bFirstConnect = true;
if (value)
{
this.thd_conn = new Thread(new ThreadStart(this.timer_tick));
this.thd_conn.Start();
}
if ((this.clientSocket != null) && !value)
{
try
{
// 先停止接收线程.
if (this.thd_recv != null)
{
this.thd_recv.Abort();
this.thd_recv = null;
}
this.thd_conn.Abort();
this.clientSocket.Dispose();
}
catch (Exception)
{
}
}
}
}
public int Port_value
{
get
{
return this.port_value;
}
set
{
this.port_value = value;
}
}
public string Ip_addr
{
get
{
return this.ip_addr;
}
set
{
this.ip_addr = value;
}
}
public string Send_data
{
get
{
return this.send_data;
}
set
{
this.send_data = value;
this.tcp_send(this.send_data);
}
}
public int PickCounter
{
get
{
return this.pickCounter;
}
}
public long TotalPickCounter
{
get
{
return this.totalPickCounter;
}
}
public int Place_counter
{
get
{
return this.place_counter;
}
}
public int Transfer_counter
{
get
{
return this.transfer_counter;
}
}
public double X_val
{
get
{
return this.x_val;
}
}
public double Y_val
{
get
{
return this.y_val;
}
}
public int Groove_num
{
get
{
return this.groove_num;
}
set
{
this.groove_num = value;
}
}
public int Col_num
{
get
{
return this.col_num;
}
set
{
this.col_num = value;
}
}
public double Groove_to_groove
{
get
{
return this.groove_to_groove;
}
set
{
this.groove_to_groove = value;
}
}
public double Col_to_col
{
get
{
return this.col_to_col;
}
set
{
this.col_to_col = value;
}
}
public double Bar_length
{
get
{
return this.bar_length;
}
set
{
this.bar_length = value;
}
}
public double Col_step
{
get
{
return this.col_step;
}
set
{
this.col_step = value;
}
}
public int Bal_step
{
get
{
return this.bal_step;
}
set
{
this.bal_step = value;
}
}
public double Boder
{
get
{
return this.boder;
}
set
{
this.boder = value;
}
}
public int In_bar_a
{
get
{
return this.in_bar_a;
}
set
{
this.in_bar_a = value;
}
}
public int In_bar_b
{
get
{
return this.in_bar_b;
}
set
{
this.in_bar_b = value;
}
}
public int Rem_num
{
get
{
return this.rem_num;
}
set
{
this.rem_num = value;
}
}
public int Select_num
{
get
{
return this.select_num;
}
set
{
this.select_num = value;
}
}
public int WeightStep
{
get
{
return this.weightStep;
}
set
{
this.weightStep = value;
}
}
public int WeightCounter
{
get
{
return this.weightCounter;
}
set
{
this.weightCounter = value;
}
}
public int WeightFalseCounter
{
get
{
return this.weightFalseCounter;
}
set
{
this.weightFalseCounter = value;
}
}
public int WeightFalseMax
{
get
{
return this.weightFalseMax;
}
set
{
this.weightFalseMax = value;
}
}
public int ClearSpace
{
get
{
return this.clearSpace;
}
set
{
this.clearSpace = value;
}
}
public int BoatNum
{
get
{
return this.boatNum;
}
set
{
this.boatNum = value;
}
}
public string Node_time
{
get
{
return this.node_time;
}
set
{
this.node_time = value;
}
}
public int F_send_status
{
get
{
return this.f_send_status;
}
set
{
this.f_send_status = value;
}
}
public double Resend_weight_value
{
get
{
return this.resend_weight_value;
}
set
{
this.resend_weight_value = value;
}
}
public Boolean Is_admin
{
get
{
return this.is_admin;
}
set
{
is_admin = value;
}
}
public Boolean Is_Reconnect
{
get
{
return this.is_reconnect;
}
set
{
is_reconnect = value;
}
}
public string StatusMsg
{
get
{
return this.statusMsg;
}
set
{
this.statusMsg = value;
}
}
public delegate void BtnClickHandle(object sender, EventArgs e);
private delegate void SetTextCallback(string text);
}
}

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace EPSON_SOCKET
{
// 状态改变.
public enum STATES
{
STATUS_CONNECTED = 1, //连接成功
STATUS_LOGIN_OK, //登录成功
STATUS_START_SUCCEDSS, //启动成功
STATUS_STOP_SUCCESS, //停止成功
}
}

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EPSON_SOCKET
{
public class Vector3d
{
public double X { get; set; }
public double Y { get; set; }
public double Z { get; set; }
public double U { get; set; }
}
}

@ -0,0 +1,74 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace EPSON_SOCKET
{
public class EventArgsCmd : EventArgs
{
public String CmdType { get; set; } //$表示发送,#表示接收,!表示错误.
public String Cmd { get; set; } //命令字,例如,execute,login
public String Str { get; set; }
public String[] Result { get; set; }
public EventArgsCmd(String str)
{
// 解析返回命令,并清理返回数据内容格式.
if (str == null) return;
CmdType = str.Substring(0, 1);
str = str.Substring(1);
str = str.Replace("\"", "");
str = str.Replace(" ", "");
str = str.Replace("\r\n", "");
str = str.Replace(";", ","); //统一所有分隔符为,
Str = str;
Result = new string[0];
if (!string.IsNullOrEmpty(str))
{
Result = str.Split(',');
Cmd = Result[0];
}
}
// 从字符串中解析点位数据.
public static Vector3d ParseVector3d(String str)
{
Vector3d vec3d = new Vector3d();
str = str.Replace("\"", "");
str = str.Replace(" ", "");
str = str.Replace("\r\n", "");
str = str.Replace(";", ",");
String[] arr = str.Split(',');
for (int i = 0; i < arr.Length; i++)
{
if (arr[i].IndexOf("=") >= 0)
{
String[] temp = arr[i].Split('=');
if (temp.Length >= 2)
{
double val = Convert.ToDouble(temp[1]);
temp[0] = temp[0].Trim(' ');
switch (temp[0])
{
case "x":
vec3d.X = val;
break;
case "y":
vec3d.Y = val;
break;
case "z":
vec3d.Z = val;
break;
case "u":
vec3d.U = val;
break;
}
}
}
}
//Cleanup:
return vec3d;
}
}
}

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("EPSON_SOCKET")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("EPSON_SOCKET")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("50011230-779e-484e-9fed-1cf3086fa14e")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace EPSON_SOCKET
{
public class Utils
{
// 将值转成int32,空值不会报错.
public static int TryToInt32(string Text)
{
int result = 0;
try
{
if (String.IsNullOrEmpty(Text)) return result;
result = Convert.ToInt32(Text);
}
catch (Exception ex) { }
//Cleanup:
return result;
}
// 将值转成double,空值不会报错.
public static double TryToDouble(string Text)
{
double result = 0;
try
{
if (String.IsNullOrEmpty(Text)) return result;
result = Convert.ToDouble(Text);
}
catch (Exception ex) { }
//Cleanup:
return result;
}
// 将值转成double,空值不会报错.
public static float TryToFloat(string Text)
{
float result = (float)Utils.TryToDouble(Text);
//Cleanup:
return result;
}
}
}

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</configSections>
<entityFramework>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6"/>
</providers>
</entityFramework>
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SQLite.EF6"/>
<add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6"/>
<remove invariant="System.Data.SQLite"/><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite"/></DbProviderFactories>
</system.data>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ZWGXZWGXPICK_SYS.DAL")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ZWGXZWGXPICK_SYS.DAL")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("7357684a-0246-4a72-8189-4724bdffa5d1")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.props" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{7357684A-0246-4A72-8189-4724BDFFA5D1}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ZWGXPICK_SYS.DAL</RootNamespace>
<AssemblyName>ZWGXPICK_SYS.DAL</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Data.SQLite, Version=1.0.115.5, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.5\lib\net40\System.Data.SQLite.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ZWGXPICK_SYS\DAL\ALARM_LOG.cs" />
<Compile Include="ZWGXPICK_SYS\DAL\PRODUCT_ITEM_CONFIG.cs" />
<Compile Include="ZWGXPICK_SYS\DAL\SYS\SYS_USER.cs" />
<Compile Include="ZWGXPICK_SYS\DAL\WEIGHT_LOG.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ZWGXPICK_SYS.DBUtility\ZWGXPICK_SYS.DBUtility.csproj">
<Project>{97d88b49-5203-468e-b253-97d17a45a60d}</Project>
<Name>ZWGXPICK_SYS.DBUtility</Name>
</ProjectReference>
<ProjectReference Include="..\ZWGXPICK_SYS.Model\ZWGXPICK_SYS.Model.csproj">
<Project>{e63102b9-b1ce-47e3-abd1-d9a4d4458b63}</Project>
<Name>ZWGXPICK_SYS.Model</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.props'))" />
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" />
<Error Condition="!Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.5\build\net40\Stub.System.Data.SQLite.Core.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.5\build\net40\Stub.System.Data.SQLite.Core.NetFramework.targets'))" />
</Target>
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
<Import Project="..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.5\build\net40\Stub.System.Data.SQLite.Core.NetFramework.targets" Condition="Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.5\build\net40\Stub.System.Data.SQLite.Core.NetFramework.targets')" />
</Project>

@ -0,0 +1,234 @@
using Maticsoft.DBUtility;
using ZWGXPICK_SYS.Model;
using System;
using System.Data;
using System.Data.SQLite;
using System.Text;
namespace ZWGXZWGXPICK_SYS.DAL
{
// 报警日志实现.
public class ALARM_LOG
{
// 添加一条新数据.
public int Add(ZWGXPICK_SYS.Model.ALARM_LOG model)
{
StringBuilder builder = new StringBuilder();
builder.Append("insert into TB_ALARM_LOG(");
builder.Append("log_date,log_time,log_classify,log_content)");
builder.Append(" values (");
builder.Append("@log_date,@log_time,@log_classify,@log_content)");
builder.Append(";select LAST_INSERT_ROWID()");
SQLiteParameter[] cmdParms = new SQLiteParameter[]
{
new SQLiteParameter("@log_date", DbType.String),
new SQLiteParameter("@log_time", DbType.String),
new SQLiteParameter("@log_classify",DbType.String),
new SQLiteParameter("@log_content", DbType.String),
};
cmdParms[0].Value = model.log_date;
cmdParms[1].Value = model.log_time;
cmdParms[2].Value = model.log_classify;
cmdParms[3].Value = model.log_content;
object single = DbHelperSQLite.GetSingle(builder.ToString(), cmdParms);
if (single == null)
{
return 0;
}
return Convert.ToInt32(single);
}
// 根据指定的ID获取某一行数据.
public ZWGXPICK_SYS.Model.ALARM_LOG DataRowToModel(DataRow row)
{
ZWGXPICK_SYS.Model.ALARM_LOG alarm_log = new ZWGXPICK_SYS.Model.ALARM_LOG();
if (row != null)
{
// model.id
if ((row["id"] != null) && (row["ID"].ToString() != ""))
{
alarm_log.id = int.Parse(row["ID"].ToString());
}
//model.product_model
if ((row["log_date"] != null) && (row["log_date"].ToString() != ""))
{
alarm_log.log_date = row["log_date"].ToString();
}
//model.product_date;
if ((row["log_time"] != null) && (row["log_time"].ToString() != ""))
{
alarm_log.log_time = row["log_time"].ToString();
}
//model.log_classify;
if ((row["log_classify"] != null) && (row["log_classify"].ToString() != ""))
{
alarm_log.log_content = row["log_classify"].ToString();
}
//model.log_content;
if ((row["log_content"] != null) && (row["log_content"].ToString() != ""))
{
alarm_log.log_content = row["log_content"].ToString();
}
}
return alarm_log;
}
// 删除一行数据.
public bool Delete(int id)
{
StringBuilder builder = new StringBuilder();
builder.Append("delete from TB_ALARM_LOG ");
builder.Append(" where id=@id");
SQLiteParameter[] cmdParms = new SQLiteParameter[] { new SQLiteParameter("@id", DbType.Int32, 4) };
cmdParms[0].Value = id;
return (DbHelperSQLite.ExecuteSql(builder.ToString(), cmdParms) > 0);
}
// 清空整个表数据.
public bool DeleteAll()
{
StringBuilder builder = new StringBuilder();
builder.Append("delete from TB_ALARM_LOG");
return (DbHelperSQLite.ExecuteSql(builder.ToString()) > 0);
}
// 删除多行数据.
public bool DeleteList(string IDlist)
{
StringBuilder builder = new StringBuilder();
builder.Append("delete from TB_ALARM_LOG ");
builder.Append(" where id in (" + IDlist + ") ");
return (DbHelperSQLite.ExecuteSql(builder.ToString()) > 0);
}
// 数据是否存在.
public bool Exists(int id)
{
StringBuilder builder = new StringBuilder();
builder.Append("select count(1) from TB_ALARM_LOG");
builder.Append(" where id=@id");
SQLiteParameter[] cmdParms = new SQLiteParameter[] { new SQLiteParameter("@id", DbType.Int32, 4) };
cmdParms[0].Value = id;
return DbHelperSQLite.Exists(builder.ToString(), cmdParms);
}
// 获取列表数据.
public DataSet GetList(string strWhere)
{
StringBuilder builder = new StringBuilder();
builder.Append("select id,log_date,log_time,log_classify,log_content,status");
builder.Append(" FROM TB_ALARM_LOG ");
if (strWhere.Trim() != "")
{
builder.Append(" where " + strWhere);
}
return DbHelperSQLite.Query(builder.ToString());
}
// 按分页获取列表数据.
public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
{
StringBuilder builder = new StringBuilder();
builder.Append("SELECT * FROM ( ");
builder.Append(" SELECT ROW_NUMBER() OVER (");
if (!string.IsNullOrEmpty(orderby.Trim()))
{
builder.Append("order by T." + orderby);
}
else
{
builder.Append("order by T.ID desc");
}
builder.Append(")AS Row, T.* from TB_ALARM_LOG T ");
if (!string.IsNullOrEmpty(strWhere.Trim()))
{
builder.Append(" WHERE " + strWhere);
}
builder.Append(" ) TT");
builder.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
return DbHelperSQLite.Query(builder.ToString());
}
// 获取最大ID.
public int GetMaxId()
{
return DbHelperSQLite.GetMaxID("id", "TB_ALARM_LOG");
}
// 根据ID获取一条数据.
public ZWGXPICK_SYS.Model.ALARM_LOG GetModel(int id)
{
StringBuilder builder = new StringBuilder();
builder.Append("select id,log_date,log_time,log_classify,log_content,status from TB_ALARM_LOG ");
builder.Append(" where id=@id");
SQLiteParameter[] cmdParms = new SQLiteParameter[] { new SQLiteParameter("@id", DbType.Int32, 4) };
cmdParms[0].Value = id;
ZWGXPICK_SYS.Model.ALARM_LOG alarm_log = new ZWGXPICK_SYS.Model.ALARM_LOG();
DataSet set = DbHelperSQLite.Query(builder.ToString(), cmdParms);
if (set.Tables[0].Rows.Count > 0)
{
return this.DataRowToModel(set.Tables[0].Rows[0]);
}
return null;
}
// 根据条件查询数据总条数.
public int GetRecordCount(string strWhere)
{
StringBuilder builder = new StringBuilder();
builder.Append("select count(1) FROM TB_ALARM_LOG ");
if (strWhere.Trim() != "")
{
builder.Append(" where " + strWhere);
}
object single = DbHelperSQLite.GetSingle(builder.ToString());
if (single == null)
{
return 0;
}
return Convert.ToInt32(single);
}
// 根据ID更新某一行数据.
public bool Update(ZWGXPICK_SYS.Model.ALARM_LOG model)
{
StringBuilder builder = new StringBuilder();
builder.Append("update TB_ALARM_LOG set ");
builder.Append("log_date=@log_date,");
builder.Append("log_time=@log_time,");
builder.Append("log_classify=@log_classify,");
builder.Append("log_content=@log_content,");
builder.Append("status=@status");
builder.Append(" where id=@id");
SQLiteParameter[] cmdParms = new SQLiteParameter[]
{
new SQLiteParameter("@log_date", DbType.String),
new SQLiteParameter("@log_time", DbType.String),
new SQLiteParameter("@log_classify",DbType.String),
new SQLiteParameter("@log_content", DbType.String),
new SQLiteParameter("@status", DbType.String),
new SQLiteParameter("@id", DbType.Int32,4),
};
// 设置参数.
cmdParms[0].Value = model.log_date;
cmdParms[1].Value = model.log_time;
cmdParms[2].Value = model.log_classify;
cmdParms[3].Value = model.log_content;
cmdParms[4].Value = model.status;
cmdParms[5].Value = model.id;
return (DbHelperSQLite.ExecuteSql(builder.ToString(), cmdParms) > 0);
}
}
}

@ -0,0 +1,416 @@
using Maticsoft.DBUtility;
using ZWGXPICK_SYS.Model;
using System;
using System.Data;
using System.Data.SQLite;
using System.Text;
namespace ZWGXZWGXPICK_SYS.DAL
{
// 产品参数信息.
public class PRODUCT_ITEM_CONFIG
{
// 添加一条新数据.
public int Add(ZWGXPICK_SYS.Model.PRODUCT_ITEM_CONFIG model)
{
StringBuilder builder = new StringBuilder();
builder.Append("insert into TB_PRODUCT_ITEM_CONFIG(");
builder.Append("product_name,boat_dish_type,product_type,boat_dish_length,boat_dish_width,boat_slot_num,product_length,product_width,circular_boat_radius,central_hole_radius,matrix_type,place_type,x_direction_num,y_direction_num,is_rotation,standard_weight,qualified_allow_error,single_weight_allow_error,boat_first_point_x,boat_first_point_y,boat_dash_center_x,boat_dish_center_y)");
builder.Append(" values (");
builder.Append("@product_name,@boat_dish_type,@product_type,@boat_dish_length,@boat_dish_width,@boat_slot_num,@product_length,@product_width,@circular_boat_radius,@central_hole_radius,@matrix_type,@place_type,@x_direction_num,@y_direction_num,@is_rotation,@standard_weight,@qualified_allow_error,@single_weight_allow_error,@boat_first_point_x,@boat_first_point_y,@boat_dash_center_x,@boat_dish_center_y)");
builder.Append(";select LAST_INSERT_ROWID()");
SQLiteParameter[] cmdParms = new SQLiteParameter[]
{
new SQLiteParameter("@product_name", DbType.String),
new SQLiteParameter("@boat_dish_type", DbType.Int32,4),
new SQLiteParameter("@product_type", DbType.Int32,4),
new SQLiteParameter("@boat_dish_length", DbType.Double,8),
new SQLiteParameter("@boat_dish_width", DbType.Double,8),
new SQLiteParameter("@boat_slot_num", DbType.Int32,4),
new SQLiteParameter("@product_length", DbType.Double,8),
new SQLiteParameter("@product_width", DbType.Double,8),
new SQLiteParameter("@circular_boat_radius", DbType.Double,8),
new SQLiteParameter("@central_hole_radius", DbType.Double,8),
new SQLiteParameter("@matrix_type", DbType.Int32,4),
new SQLiteParameter("@place_type", DbType.Int32,4),
new SQLiteParameter("@x_direction_num", DbType.Int32,4),
new SQLiteParameter("@y_direction_num", DbType.Int32,4),
new SQLiteParameter("@is_rotation", DbType.Int32,4),
new SQLiteParameter("@standard_weight", DbType.Double,8),
new SQLiteParameter("@qualified_allow_error", DbType.Double,8),
new SQLiteParameter("@single_weight_allow_error", DbType.Double,8),
new SQLiteParameter("@boat_first_point_x", DbType.Double,8),
new SQLiteParameter("@boat_first_point_y", DbType.Double,8),
new SQLiteParameter("@boat_dash_center_x", DbType.Double,8),
new SQLiteParameter("@boat_dish_center_y", DbType.Double,8),
};
cmdParms[0].Value = model.product_name;
cmdParms[1].Value = model.boat_dish_type;
cmdParms[2].Value = model.product_type;
cmdParms[3].Value = model.boat_dish_length;
cmdParms[4].Value = model.boat_dish_width;
cmdParms[5].Value = model.boat_slot_num;
cmdParms[6].Value = model.product_length;
cmdParms[7].Value = model.product_width;
cmdParms[8].Value = model.circular_boat_radius;
cmdParms[9].Value = model.central_hole_radius;
cmdParms[10].Value = model.matrix_type;
cmdParms[11].Value = model.place_type;
cmdParms[12].Value = model.x_direction_num;
cmdParms[13].Value = model.y_direction_num;
cmdParms[14].Value = model.is_rotation;
cmdParms[15].Value = model.standard_weight;
cmdParms[16].Value = model.qualified_allow_error;
cmdParms[17].Value = model.single_weight_allow_error;
cmdParms[18].Value = model.boat_first_point_x;
cmdParms[19].Value = model.boat_first_point_y;
cmdParms[20].Value = model.boat_dash_center_x;
cmdParms[21].Value = model.boat_dish_center_y;
object single = DbHelperSQLite.GetSingle(builder.ToString(), cmdParms);
if (single == null)
{
return 0;
}
return Convert.ToInt32(single);
}
// 根据指定的ID获取某一行数据.
public ZWGXPICK_SYS.Model.PRODUCT_ITEM_CONFIG DataRowToModel(DataRow row)
{
ZWGXPICK_SYS.Model.PRODUCT_ITEM_CONFIG alarm_log = new ZWGXPICK_SYS.Model.PRODUCT_ITEM_CONFIG();
if (row != null)
{
// model.id
if ((row["id"] != null) && (row["ID"].ToString() != ""))
{
alarm_log.id = Convert.ToInt32(row["ID"].ToString());
}
//model.product_name
if ((row["product_name"] != null) && (row["product_name"].ToString() != ""))
{
alarm_log.product_name = row["product_name"].ToString();
}
//model.boat_dish_type;
if ((row["boat_dish_type"] != null) && (row["boat_dish_type"].ToString() != ""))
{
alarm_log.boat_dish_type = Convert.ToInt32(row["boat_dish_type"].ToString());
}
//model.product_type;
if ((row["product_type"] != null) && (row["product_type"].ToString() != ""))
{
alarm_log.product_type = Convert.ToInt32(row["product_type"].ToString());
}
//model.boat_dish_length;
if ((row["boat_dish_length"] != null) && (row["boat_dish_length"].ToString() != ""))
{
alarm_log.boat_dish_length = Convert.ToDouble(row["boat_dish_length"].ToString());
}
//model.boat_dish_width;
if ((row["boat_dish_width"] != null) && (row["boat_dish_width"].ToString() != ""))
{
alarm_log.boat_dish_width = Convert.ToDouble(row["boat_dish_width"].ToString());
}
//model.boat_slot_num
if ((row["boat_slot_num"] != null) && (row["boat_slot_num"].ToString() != ""))
{
alarm_log.boat_slot_num = Convert.ToInt32(row["boat_slot_num"].ToString());
}
//model.product_length;
if ((row["product_length"] != null) && (row["product_length"].ToString() != ""))
{
alarm_log.product_length = Convert.ToDouble(row["product_length"].ToString());
}
//model.product_width;
if ((row["product_width"] != null) && (row["product_width"].ToString() != ""))
{
alarm_log.product_width = Convert.ToDouble(row["product_width"].ToString());
}
//model.circular_boat_radius;
if ((row["circular_boat_radius"] != null) && (row["circular_boat_radius"].ToString() != ""))
{
alarm_log.circular_boat_radius = Convert.ToDouble(row["circular_boat_radius"].ToString());
}
//model.central_hole_radius;
if ((row["central_hole_radius"] != null) && (row["central_hole_radius"].ToString() != ""))
{
alarm_log.central_hole_radius = Convert.ToDouble(row["central_hole_radius"].ToString());
}
//model.matrix_type;
if ((row["matrix_type"] != null) && (row["matrix_type"].ToString() != ""))
{
alarm_log.matrix_type = Convert.ToInt32(row["matrix_type"].ToString());
}
//model.place_type;
if ((row["place_type"] != null) && (row["place_type"].ToString() != ""))
{
alarm_log.place_type = Convert.ToInt32(row["place_type"].ToString());
}
//model.x_direction_num;
if ((row["x_direction_num"] != null) && (row["x_direction_num"].ToString() != ""))
{
alarm_log.x_direction_num = Convert.ToInt32(row["x_direction_num"].ToString());
}
//model.y_direction_num;
if ((row["y_direction_num"] != null) && (row["y_direction_num"].ToString() != ""))
{
alarm_log.y_direction_num = Convert.ToInt32(row["y_direction_num"].ToString());
}
//model.is_rotation;
if ((row["is_rotation"] != null) && (row["is_rotation"].ToString() != ""))
{
alarm_log.is_rotation = Convert.ToInt32(row["is_rotation"].ToString());
}
//model.standard_weight;
if ((row["standard_weight"] != null) && (row["standard_weight"].ToString() != ""))
{
alarm_log.standard_weight = Convert.ToDouble(row["standard_weight"].ToString());
}
//model.qualified_allow_error;
if ((row["qualified_allow_error"] != null) && (row["qualified_allow_error"].ToString() != ""))
{
alarm_log.qualified_allow_error = Convert.ToDouble(row["qualified_allow_error"].ToString());
}
//model.single_weight_allow_error;
if ((row["single_weight_allow_error"] != null) && (row["single_weight_allow_error"].ToString() != ""))
{
alarm_log.single_weight_allow_error = Convert.ToDouble(row["single_weight_allow_error"].ToString());
}
//model.boat_first_point_x;
if ((row["boat_first_point_x"] != null) && (row["boat_first_point_x"].ToString() != ""))
{
alarm_log.boat_first_point_x = Convert.ToDouble(row["boat_first_point_x"].ToString());
}
//model.boat_first_point_y;
if ((row["boat_first_point_y"] != null) && (row["boat_first_point_y"].ToString() != ""))
{
alarm_log.boat_first_point_y = Convert.ToDouble(row["boat_first_point_y"].ToString());
}
//model.boat_dash_center_x;
if ((row["boat_dash_center_x"] != null) && (row["boat_dash_center_x"].ToString() != ""))
{
alarm_log.boat_dash_center_x = Convert.ToDouble(row["boat_dash_center_x"].ToString());
}
//model.boat_dish_center_y;
if ((row["boat_dish_center_y"] != null) && (row["boat_dish_center_y"].ToString() != ""))
{
alarm_log.boat_dish_center_y = Convert.ToDouble(row["boat_dish_center_y"].ToString());
}
//model.status;
if ((row["status"] != null) && (row["status"].ToString() != ""))
{
alarm_log.status = Convert.ToInt32(row["status"].ToString());
}
}
return alarm_log;
}
// 删除一行数据.
public bool Delete(int id)
{
StringBuilder builder = new StringBuilder();
builder.Append("delete from TB_PRODUCT_ITEM_CONFIG ");
builder.Append(" where id=@id");
SQLiteParameter[] cmdParms = new SQLiteParameter[] { new SQLiteParameter("@id", DbType.Int32, 4) };
cmdParms[0].Value = id;
return (DbHelperSQLite.ExecuteSql(builder.ToString(), cmdParms) > 0);
}
// 删除多行数据.
public bool DeleteList(string IDlist)
{
StringBuilder builder = new StringBuilder();
builder.Append("delete from TB_PRODUCT_ITEM_CONFIG ");
builder.Append(" where id in (" + IDlist + ") ");
return (DbHelperSQLite.ExecuteSql(builder.ToString()) > 0);
}
// 数据是否存在.
public bool Exists(int id)
{
StringBuilder builder = new StringBuilder();
builder.Append("select count(1) from TB_PRODUCT_ITEM_CONFIG");
builder.Append(" where id=@id");
SQLiteParameter[] cmdParms = new SQLiteParameter[] { new SQLiteParameter("@id", DbType.Int32, 4) };
cmdParms[0].Value = id;
return DbHelperSQLite.Exists(builder.ToString(), cmdParms);
}
// 获取列表数据.
public DataSet GetList(string strWhere)
{
StringBuilder builder = new StringBuilder();
builder.Append("select id, product_name,boat_dish_type,product_type,boat_dish_length,boat_dish_width,boat_slot_num,product_length,product_width,circular_boat_radius,central_hole_radius,matrix_type,place_type,x_direction_num,y_direction_num,is_rotation,standard_weight,qualified_allow_error,single_weight_allow_error,boat_first_point_x,boat_first_point_y,boat_dash_center_x,boat_dish_center_y, status");
builder.Append(" FROM TB_PRODUCT_ITEM_CONFIG ");
if (strWhere.Trim() != "")
{
builder.Append(" where " + strWhere);
}
return DbHelperSQLite.Query(builder.ToString());
}
// 按分页获取列表数据.
public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
{
StringBuilder builder = new StringBuilder();
builder.Append("SELECT * FROM ( ");
builder.Append(" SELECT ROW_NUMBER() OVER (");
if (!string.IsNullOrEmpty(orderby.Trim()))
{
builder.Append("order by T." + orderby);
}
else
{
builder.Append("order by T.ID desc");
}
builder.Append(")AS Row, T.* from TB_PRODUCT_ITEM_CONFIG T ");
if (!string.IsNullOrEmpty(strWhere.Trim()))
{
builder.Append(" WHERE " + strWhere);
}
builder.Append(" ) TT");
builder.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
return DbHelperSQLite.Query(builder.ToString());
}
// 获取最大ID.
public int GetMaxId()
{
return DbHelperSQLite.GetMaxID("id", "TB_PRODUCT_ITEM_CONFIG");
}
// 根据ID获取一条数据.
public ZWGXPICK_SYS.Model.PRODUCT_ITEM_CONFIG GetModel(int id)
{
StringBuilder builder = new StringBuilder();
builder.Append("select id, product_name,boat_dish_type,product_type,boat_dish_length,boat_dish_width,boat_slot_num,product_length,product_width,circular_boat_radius,central_hole_radius,matrix_type,place_type,x_direction_num,y_direction_num,is_rotation,standard_weight,qualified_allow_error,single_weight_allow_error,boat_first_point_x,boat_first_point_y,boat_dash_center_x,boat_dish_center_y, status from TB_PRODUCT_ITEM_CONFIG ");
builder.Append(" where id=@id");
SQLiteParameter[] cmdParms = new SQLiteParameter[] { new SQLiteParameter("@id", DbType.Int32, 4) };
cmdParms[0].Value = id;
ZWGXPICK_SYS.Model.PRODUCT_ITEM_CONFIG alarm_log = new ZWGXPICK_SYS.Model.PRODUCT_ITEM_CONFIG();
DataSet set = DbHelperSQLite.Query(builder.ToString(), cmdParms);
if (set.Tables[0].Rows.Count > 0)
{
return this.DataRowToModel(set.Tables[0].Rows[0]);
}
return null;
}
// 根据条件查询数据总条数.
public int GetRecordCount(string strWhere)
{
StringBuilder builder = new StringBuilder();
builder.Append("select count(1) FROM TB_PRODUCT_ITEM_CONFIG ");
if (strWhere.Trim() != "")
{
builder.Append(" where " + strWhere);
}
object single = DbHelperSQLite.GetSingle(builder.ToString());
if (single == null)
{
return 0;
}
return Convert.ToInt32(single);
}
// 根据ID更新某一行数据.
public bool Update(ZWGXPICK_SYS.Model.PRODUCT_ITEM_CONFIG model)
{
StringBuilder builder = new StringBuilder();
builder.Append("update TB_PRODUCT_ITEM_CONFIG set ");
builder.Append("product_name=@product_name,");
builder.Append("boat_dish_type=@boat_dish_type,");
builder.Append("product_type=@product_type,");
builder.Append("boat_dish_length=@boat_dish_length,");
builder.Append("boat_dish_width=@boat_dish_width,");
builder.Append("boat_slot_num=@boat_slot_num,");
builder.Append("product_length=@product_length,");
builder.Append("product_width=@product_width,");
builder.Append("circular_boat_radius=@circular_boat_radius,");
builder.Append("central_hole_radius=@central_hole_radius,");
builder.Append("matrix_type=@matrix_type,");
builder.Append("place_type=@place_type,");
builder.Append("x_direction_num=@x_direction_num,");
builder.Append("y_direction_num=@y_direction_num,");
builder.Append("is_rotation=@is_rotation,");
builder.Append("standard_weight=@standard_weight,");
builder.Append("qualified_allow_error=@qualified_allow_error,");
builder.Append("single_weight_allow_error=@single_weight_allow_error,");
builder.Append("boat_first_point_x=@boat_first_point_x,");
builder.Append("boat_first_point_y=@boat_first_point_y,");
builder.Append("boat_dash_center_x=@boat_dash_center_x,");
builder.Append("boat_dish_center_y=@boat_dish_center_y,");
builder.Append("status=@status");
builder.Append(" where id=@id");
SQLiteParameter[] cmdParms = new SQLiteParameter[]
{
new SQLiteParameter("@product_name", DbType.String),
new SQLiteParameter("@boat_dish_type", DbType.Int32,4),
new SQLiteParameter("@product_type", DbType.Int32,4),
new SQLiteParameter("@boat_dish_length", DbType.Double,8),
new SQLiteParameter("@boat_dish_width", DbType.Double,8),
new SQLiteParameter("@boat_slot_num", DbType.Int32,4),
new SQLiteParameter("@product_length", DbType.Double,8),
new SQLiteParameter("@product_width", DbType.Double,8),
new SQLiteParameter("@circular_boat_radius", DbType.Double,8),
new SQLiteParameter("@central_hole_radius", DbType.Double,8),
new SQLiteParameter("@matrix_type", DbType.Int32,4),
new SQLiteParameter("@place_type", DbType.Int32,4),
new SQLiteParameter("@x_direction_num", DbType.Int32,4),
new SQLiteParameter("@y_direction_num", DbType.Int32,4),
new SQLiteParameter("@is_rotation", DbType.Int32,4),
new SQLiteParameter("@standard_weight", DbType.Double,8),
new SQLiteParameter("@qualified_allow_error", DbType.Double,8),
new SQLiteParameter("@single_weight_allow_error", DbType.Double,8),
new SQLiteParameter("@boat_first_point_x", DbType.Double,8),
new SQLiteParameter("@boat_first_point_y", DbType.Double,8),
new SQLiteParameter("@boat_dash_center_x", DbType.Double,8),
new SQLiteParameter("@boat_dish_center_y", DbType.Double,8),
new SQLiteParameter("@status", DbType.Int32,4),
new SQLiteParameter("@id", DbType.Int32,4),
};
// 设置参数.
cmdParms[0].Value = model.product_name;
cmdParms[1].Value = model.boat_dish_type;
cmdParms[2].Value = model.product_type;
cmdParms[3].Value = model.boat_dish_length;
cmdParms[4].Value = model.boat_dish_width;
cmdParms[5].Value = model.boat_slot_num;
cmdParms[6].Value = model.product_length;
cmdParms[7].Value = model.product_width;
cmdParms[8].Value = model.circular_boat_radius;
cmdParms[9].Value = model.central_hole_radius;
cmdParms[10].Value = model.matrix_type;
cmdParms[11].Value = model.place_type;
cmdParms[12].Value = model.x_direction_num;
cmdParms[13].Value = model.y_direction_num;
cmdParms[14].Value = model.is_rotation;
cmdParms[15].Value = model.standard_weight;
cmdParms[16].Value = model.qualified_allow_error;
cmdParms[17].Value = model.single_weight_allow_error;
cmdParms[18].Value = model.boat_first_point_x;
cmdParms[19].Value = model.boat_first_point_y;
cmdParms[20].Value = model.boat_dash_center_x;
cmdParms[21].Value = model.boat_dish_center_y;
cmdParms[22].Value = model.status;
cmdParms[23].Value = model.id;
return (DbHelperSQLite.ExecuteSql(builder.ToString(), cmdParms) > 0);
}
}
}

@ -0,0 +1,214 @@
using Maticsoft.DBUtility;
using ZWGXPICK_SYS.Model;
using System;
using System.Data;
using System.Data.SQLite;
using System.Text;
namespace ZWGXZWGXPICK_SYS.DAL.SYS
{
// 报警日志实现.
public class SYS_USER
{
// 添加一条新数据.
public int Add(ZWGXPICK_SYS.Model.SYS.SYS_USER model)
{
StringBuilder builder = new StringBuilder();
builder.Append("insert into TB_SYS_USER(");
builder.Append("uid,pwd,type)");
builder.Append(" values (");
builder.Append("@uid,@pwd,@type)");
builder.Append(";select LAST_INSERT_ROWID()");
SQLiteParameter[] cmdParms = new SQLiteParameter[]
{
new SQLiteParameter("@uid", DbType.String),
new SQLiteParameter("@pwd", DbType.String),
new SQLiteParameter("@type",DbType.Int32,4),
};
cmdParms[0].Value = model.uid;
cmdParms[1].Value = model.pwd;
cmdParms[2].Value = model.type;
object single = DbHelperSQLite.GetSingle(builder.ToString(), cmdParms);
if (single == null)
{
return 0;
}
return Convert.ToInt32(single);
}
// 根据指定的ID获取某一行数据.
public ZWGXPICK_SYS.Model.SYS.SYS_USER DataRowToModel(DataRow row)
{
ZWGXPICK_SYS.Model.SYS.SYS_USER alarm_log = new ZWGXPICK_SYS.Model.SYS.SYS_USER();
if (row != null)
{
// model.id
if ((row["id"] != null) && (row["id"].ToString() != ""))
{
alarm_log.id = int.Parse(row["id"].ToString());
}
//model.product_model
if ((row["uid"] != null) && (row["uid"].ToString() != ""))
{
alarm_log.uid= row["uid"].ToString();
}
//model.product_date;
if ((row["pwd"] != null) && (row["pwd"].ToString() != ""))
{
alarm_log.pwd = row["pwd"].ToString();
}
//model.product_time;
if ((row["type"] != null) && (row["type"].ToString() != ""))
{
alarm_log.type = int.Parse(row["type"].ToString());
}
}
return alarm_log;
}
// 删除一行数据.
public bool Delete(int id)
{
StringBuilder builder = new StringBuilder();
builder.Append("delete from TB_SYS_USER ");
builder.Append(" where id=@id");
SQLiteParameter[] cmdParms = new SQLiteParameter[] { new SQLiteParameter("@id", DbType.Int32, 4) };
cmdParms[0].Value = id;
return (DbHelperSQLite.ExecuteSql(builder.ToString(), cmdParms) > 0);
}
// 删除多行数据.
public bool DeleteList(string IDlist)
{
StringBuilder builder = new StringBuilder();
builder.Append("delete from TB_SYS_USER ");
builder.Append(" where id in (" + IDlist + ") ");
return (DbHelperSQLite.ExecuteSql(builder.ToString()) > 0);
}
// 数据是否存在.
public bool Exists(int id)
{
StringBuilder builder = new StringBuilder();
builder.Append("select count(1) from TB_SYS_USER");
builder.Append(" where id=@id");
SQLiteParameter[] cmdParms = new SQLiteParameter[] { new SQLiteParameter("@id", DbType.Int32, 4) };
cmdParms[0].Value = id;
return DbHelperSQLite.Exists(builder.ToString(), cmdParms);
}
// 获取列表数据.
public DataSet GetList(string strWhere)
{
StringBuilder builder = new StringBuilder();
builder.Append("select id,uid,pwd,type,status");
builder.Append(" FROM TB_SYS_USER ");
if (strWhere.Trim() != "")
{
builder.Append(" where " + strWhere);
}
return DbHelperSQLite.Query(builder.ToString());
}
// 按分页获取列表数据.
public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
{
StringBuilder builder = new StringBuilder();
builder.Append("SELECT * FROM ( ");
builder.Append(" SELECT ROW_NUMBER() OVER (");
if (!string.IsNullOrEmpty(orderby.Trim()))
{
builder.Append("order by T." + orderby);
}
else
{
builder.Append("order by T.ID desc");
}
builder.Append(")AS Row, T.* from TB_SYS_USER T ");
if (!string.IsNullOrEmpty(strWhere.Trim()))
{
builder.Append(" WHERE " + strWhere);
}
builder.Append(" ) TT");
builder.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
return DbHelperSQLite.Query(builder.ToString());
}
// 获取最大ID.
public int GetMaxId()
{
return DbHelperSQLite.GetMaxID("id", "TB_SYS_USER");
}
// 根据ID获取一条数据.
public ZWGXPICK_SYS.Model.SYS.SYS_USER GetModel(int id)
{
StringBuilder builder = new StringBuilder();
builder.Append("select id,uid,pwd,type,status from TB_SYS_USER ");
builder.Append(" where id=@id");
SQLiteParameter[] cmdParms = new SQLiteParameter[] { new SQLiteParameter("@id", DbType.Int32, 4) };
cmdParms[0].Value = id;
ZWGXPICK_SYS.Model.SYS.SYS_USER alarm_log = new ZWGXPICK_SYS.Model.SYS.SYS_USER();
DataSet set = DbHelperSQLite.Query(builder.ToString(), cmdParms);
if (set.Tables[0].Rows.Count > 0)
{
return this.DataRowToModel(set.Tables[0].Rows[0]);
}
return null;
}
// 根据条件查询数据总条数.
public int GetRecordCount(string strWhere)
{
StringBuilder builder = new StringBuilder();
builder.Append("select count(1) FROM TB_SYS_USER ");
if (strWhere.Trim() != "")
{
builder.Append(" where " + strWhere);
}
object single = DbHelperSQLite.GetSingle(builder.ToString());
if (single == null)
{
return 0;
}
return Convert.ToInt32(single);
}
// 根据ID更新某一行数据.
public bool Update(ZWGXPICK_SYS.Model.SYS.SYS_USER model)
{
StringBuilder builder = new StringBuilder();
builder.Append("update TB_SYS_USER set ");
builder.Append("uid=@uid,");
builder.Append("pwd=@pwd,");
builder.Append("type=@type,");
builder.Append("status=@status");
builder.Append(" where id=@id");
SQLiteParameter[] cmdParms = new SQLiteParameter[]
{
new SQLiteParameter("@uid", DbType.String),
new SQLiteParameter("@pwd", DbType.String),
new SQLiteParameter("@type", DbType.Int32,4),
new SQLiteParameter("@status", DbType.Int32,4),
new SQLiteParameter("@id", DbType.Int32,4),
};
// 设置参数.
cmdParms[0].Value = model.uid;
cmdParms[1].Value = model.pwd;
cmdParms[2].Value = model.type;
cmdParms[3].Value = model.status;
cmdParms[4].Value = model.id;
return (DbHelperSQLite.ExecuteSql(builder.ToString(), cmdParms) > 0);
}
}
}

@ -0,0 +1,241 @@
using Maticsoft.DBUtility;
using ZWGXPICK_SYS.Model;
using System;
using System.Data;
using System.Data.SQLite;
using System.Text;
namespace ZWGXPICK_SYS.DAL
{
public class WEIGHT_LOG
{
// 添加一条新数据.
public int Add(ZWGXPICK_SYS.Model.WEIGHT_LOG model)
{
StringBuilder builder = new StringBuilder();
builder.Append("insert into TB_WEIGHT_LOG(");
builder.Append("product_model,product_date,product_time,weight,is_qualified)");
builder.Append(" values (");
builder.Append("@product_model,@product_date,@product_time,@weight,@is_qualified)");
builder.Append(";select LAST_INSERT_ROWID()");
SQLiteParameter[] cmdParms = new SQLiteParameter[]
{
new SQLiteParameter("@product_model", DbType.String),
new SQLiteParameter("@product_date", DbType.String),
new SQLiteParameter("@product_time", DbType.String),
new SQLiteParameter("@weight", DbType.String),
new SQLiteParameter("@is_qualified", DbType.Int32, 4),
};
cmdParms[0].Value = model.product_model;
cmdParms[1].Value = model.product_date;
cmdParms[2].Value = model.product_time;
cmdParms[3].Value = model.weight;
cmdParms[4].Value = model.is_qualified;
object single = DbHelperSQLite.GetSingle(builder.ToString(), cmdParms);
if (single == null)
{
return 0;
}
return Convert.ToInt32(single);
}
// 根据指定的ID获取某一行数据.
public ZWGXPICK_SYS.Model.WEIGHT_LOG DataRowToModel(DataRow row)
{
ZWGXPICK_SYS.Model.WEIGHT_LOG weight_log = new ZWGXPICK_SYS.Model.WEIGHT_LOG();
if (row != null)
{
// model.id
if ((row["id"] != null) && (row["ID"].ToString() != ""))
{
weight_log.id = int.Parse(row["ID"].ToString());
}
//model.product_model
if ((row["product_model"] != null) && (row["product_model"].ToString() != ""))
{
weight_log.product_model = row["product_model"].ToString();
}
//model.product_date;
if ((row["product_date"] != null) && (row["product_date"].ToString() != ""))
{
weight_log.product_date = row["product_date"].ToString();
}
//model.product_time;
if ((row["product_time"] != null) && (row["product_time"].ToString() != ""))
{
weight_log.product_time = row["product_time"].ToString();
}
//model.weight;
if ((row["weight"] != null) && (row["weight"].ToString() != ""))
{
weight_log.weight = row["weight"].ToString();
}
//model.is_qualified;
if ((row["is_qualified"] != null) && (row["is_qualified"].ToString() != ""))
{
weight_log.is_qualified = int.Parse(row["is_qualified"].ToString());
}
}
return weight_log;
}
// 删除一行数据.
public bool Delete(int id)
{
StringBuilder builder = new StringBuilder();
builder.Append("delete from TB_WEIGHT_LOG ");
builder.Append(" where id=@id");
SQLiteParameter[] cmdParms = new SQLiteParameter[] { new SQLiteParameter("@id", DbType.Int32, 4) };
cmdParms[0].Value = id;
return (DbHelperSQLite.ExecuteSql(builder.ToString(), cmdParms) > 0);
}
// 清空整个表数据.
public bool DeleteAll()
{
StringBuilder builder = new StringBuilder();
builder.Append("delete from TB_WEIGHT_LOG");
return (DbHelperSQLite.ExecuteSql(builder.ToString()) > 0);
}
// 删除多行数据.
public bool DeleteList(string IDlist)
{
StringBuilder builder = new StringBuilder();
builder.Append("delete from TB_WEIGHT_LOG ");
builder.Append(" where id in (" + IDlist + ") ");
return (DbHelperSQLite.ExecuteSql(builder.ToString()) > 0);
}
// 数据是否存在.
public bool Exists(int id)
{
StringBuilder builder = new StringBuilder();
builder.Append("select count(1) from TB_WEIGHT_LOG");
builder.Append(" where id=@id");
SQLiteParameter[] cmdParms = new SQLiteParameter[] { new SQLiteParameter("@id", DbType.Int32, 4) };
cmdParms[0].Value = id;
return DbHelperSQLite.Exists(builder.ToString(), cmdParms);
}
// 获取列表数据.
public DataSet GetList(string strWhere)
{
StringBuilder builder = new StringBuilder();
builder.Append("select id,product_model,product_date,product_time,weight,is_qualified ");
builder.Append(" FROM TB_WEIGHT_LOG ");
if (strWhere.Trim() != "")
{
builder.Append(" where " + strWhere);
}
return DbHelperSQLite.Query(builder.ToString());
}
// 按分页获取列表数据.
public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
{
StringBuilder builder = new StringBuilder();
builder.Append("SELECT * FROM ( ");
builder.Append(" SELECT ROW_NUMBER() OVER (");
if (!string.IsNullOrEmpty(orderby.Trim()))
{
builder.Append("order by T." + orderby);
}
else
{
builder.Append("order by T.ID desc");
}
builder.Append(")AS Row, T.* from TB_WEIGHT_LOG T ");
if (!string.IsNullOrEmpty(strWhere.Trim()))
{
builder.Append(" WHERE " + strWhere);
}
builder.Append(" ) TT");
builder.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
return DbHelperSQLite.Query(builder.ToString());
}
// 获取最大ID.
public int GetMaxId()
{
return DbHelperSQLite.GetMaxID("id", "TB_WEIGHT_LOG");
}
// 根据ID获取一条数据.
public ZWGXPICK_SYS.Model.WEIGHT_LOG GetModel(int id)
{
StringBuilder builder = new StringBuilder();
builder.Append("select id,product_model,product_date,product_time,weight,is_qualified from TB_WEIGHT_LOG ");
builder.Append(" where id=@id");
SQLiteParameter[] cmdParms = new SQLiteParameter[] { new SQLiteParameter("@id", DbType.Int32, 4) };
cmdParms[0].Value = id;
ZWGXPICK_SYS.Model.WEIGHT_LOG weight_log = new ZWGXPICK_SYS.Model.WEIGHT_LOG();
DataSet set = DbHelperSQLite.Query(builder.ToString(), cmdParms);
if (set.Tables[0].Rows.Count > 0)
{
return this.DataRowToModel(set.Tables[0].Rows[0]);
}
return null;
}
// 根据条件查询数据总条数.
public int GetRecordCount(string strWhere)
{
StringBuilder builder = new StringBuilder();
builder.Append("select count(1) FROM TB_WEIGHT_LOG ");
if (strWhere.Trim() != "")
{
builder.Append(" where " + strWhere);
}
object single = DbHelperSQLite.GetSingle(builder.ToString());
if (single == null)
{
return 0;
}
return Convert.ToInt32(single);
}
// 根据ID更新某一行数据.
public bool Update(ZWGXPICK_SYS.Model.WEIGHT_LOG model)
{
StringBuilder builder = new StringBuilder();
builder.Append("update TB_WEIGHT_LOG set ");
builder.Append("product_model=@product_model,");
builder.Append("product_date=@product_date,");
builder.Append("product_time=@product_time,");
builder.Append("weight=@weight,");
builder.Append("is_qualified=@is_qualified");
builder.Append(" where id=@id");
SQLiteParameter[] cmdParms = new SQLiteParameter[]
{
new SQLiteParameter("@product_model", DbType.String),
new SQLiteParameter("@product_date", DbType.String),
new SQLiteParameter("@product_time", DbType.String),
new SQLiteParameter("@weight", DbType.String),
new SQLiteParameter("@is_qualified", DbType.Int32,4),
new SQLiteParameter("@id", DbType.Int32,4),
};
// 设置参数.
cmdParms[0].Value = model.product_model;
cmdParms[1].Value = model.product_date;
cmdParms[2].Value = model.product_time;
cmdParms[3].Value = model.weight;
cmdParms[4].Value = model.is_qualified;
cmdParms[5].Value = model.id;
return (DbHelperSQLite.ExecuteSql(builder.ToString(), cmdParms) > 0);
}
}
}

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EntityFramework" version="6.4.4" targetFramework="net40" requireReinstallation="true" />
<package id="Stub.System.Data.SQLite.Core.NetFramework" version="1.0.115.5" targetFramework="net40" requireReinstallation="true" />
<package id="System.Data.SQLite" version="1.0.115.5" targetFramework="net40" />
<package id="System.Data.SQLite.Core" version="1.0.115.5" targetFramework="net40" />
<package id="System.Data.SQLite.EF6" version="1.0.115.5" targetFramework="net40" requireReinstallation="true" />
<package id="System.Data.SQLite.Linq" version="1.0.115.5" targetFramework="net40" requireReinstallation="true" />
</packages>

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</configSections>
<entityFramework>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6"/>
</providers>
</entityFramework>
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SQLite.EF6"/>
<add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6"/>
<remove invariant="System.Data.SQLite"/><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite"/></DbProviderFactories>
</system.data>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ZWGXZWGXPICK_SYS.DBUtility")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ZWGXZWGXPICK_SYS.DBUtility")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("97d88b49-5203-468e-b253-97d17a45a60d")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

@ -0,0 +1,60 @@
namespace Maticsoft.DBUtility
{
using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;
using System.Web.Security;
public class DESEncrypt
{
private static string key = "ZWGXPICK";
public static string Decrypt(string Text)
{
return Decrypt(Text, key);
}
public static string Decrypt(string Text, string sKey)
{
DESCryptoServiceProvider provider = new DESCryptoServiceProvider();
int num = Text.Length / 2;
byte[] buffer = new byte[num];
for (int i = 0; i < num; i++)
{
int num3 = Convert.ToInt32(Text.Substring(i * 2, 2), 0x10);
buffer[i] = (byte) num3;
}
provider.Key = Encoding.ASCII.GetBytes(FormsAuthentication.HashPasswordForStoringInConfigFile(sKey, "md5").Substring(0, 8));
provider.IV = Encoding.ASCII.GetBytes(FormsAuthentication.HashPasswordForStoringInConfigFile(sKey, "md5").Substring(0, 8));
MemoryStream stream = new MemoryStream();
CryptoStream stream2 = new CryptoStream(stream, provider.CreateDecryptor(), CryptoStreamMode.Write);
stream2.Write(buffer, 0, buffer.Length);
stream2.FlushFinalBlock();
return Encoding.Default.GetString(stream.ToArray());
}
public static string Encrypt(string Text)
{
return Encrypt(Text, key);
}
public static string Encrypt(string Text, string sKey)
{
DESCryptoServiceProvider provider = new DESCryptoServiceProvider();
byte[] bytes = Encoding.Default.GetBytes(Text);
provider.Key = Encoding.ASCII.GetBytes(FormsAuthentication.HashPasswordForStoringInConfigFile(sKey, "md5").Substring(0, 8));
provider.IV = Encoding.ASCII.GetBytes(FormsAuthentication.HashPasswordForStoringInConfigFile(sKey, "md5").Substring(0, 8));
MemoryStream stream = new MemoryStream();
CryptoStream stream2 = new CryptoStream(stream, provider.CreateEncryptor(), CryptoStreamMode.Write);
stream2.Write(bytes, 0, bytes.Length);
stream2.FlushFinalBlock();
StringBuilder builder = new StringBuilder();
foreach (byte num in stream.ToArray())
{
builder.AppendFormat("{0:X2}", num);
}
return builder.ToString();
}
}
}

@ -0,0 +1,393 @@
namespace Maticsoft.DBUtility
{
using System;
using System.Collections;
using System.Data;
using System.Data.SQLite;
public abstract class DbHelperSQLite
{
public static string connectionString = "Data Source=zwgxpick_sys_db.db";
public static SQLiteDataReader ExecuteReader(string strSQL)
{
SQLiteDataReader reader2;
SQLiteConnection connection = new SQLiteConnection(connectionString);
SQLiteCommand command = new SQLiteCommand(strSQL, connection);
try
{
connection.Open();
reader2 = command.ExecuteReader();
}
catch (SQLiteException exception)
{
throw new Exception(exception.Message);
}
return reader2;
}
public static SQLiteDataReader ExecuteReader(string SQLString, params SQLiteParameter[] cmdParms)
{
SQLiteDataReader reader2;
SQLiteConnection conn = new SQLiteConnection(connectionString);
SQLiteCommand cmd = new SQLiteCommand();
try
{
PrepareCommand(cmd, conn, null, SQLString, cmdParms);
SQLiteDataReader reader = cmd.ExecuteReader();
cmd.Parameters.Clear();
reader2 = reader;
}
catch (SQLiteException exception)
{
throw new Exception(exception.Message);
}
return reader2;
}
public static int ExecuteSql(string SQLString)
{
int count = 0;
using (SQLiteConnection connection = new SQLiteConnection(connectionString))
{
SQLiteCommand command = new SQLiteCommand(SQLString, connection);
try
{
connection.Open();
count = command.ExecuteNonQuery();
}
catch (SQLiteException exception)
{
connection.Close();
throw new Exception(exception.Message);
}
finally
{
if (command != null)
{
command.Dispose();
}
}
}
//Cleanup:
return count;
}
public static int ExecuteSql(string SQLString, string content)
{
int num2;
using (SQLiteConnection connection = new SQLiteConnection(connectionString))
{
SQLiteCommand command = new SQLiteCommand(SQLString, connection);
SQLiteParameter parameter = new SQLiteParameter("@content", DbType.String);
parameter.Value = content;
command.Parameters.Add(parameter);
try
{
connection.Open();
num2 = command.ExecuteNonQuery();
}
catch (SQLiteException exception)
{
throw new Exception(exception.Message);
}
finally
{
command.Dispose();
connection.Close();
}
}
return num2;
}
public static int ExecuteSql(string SQLString, params SQLiteParameter[] cmdParms)
{
int count = 0;
using (SQLiteConnection connection = new SQLiteConnection(connectionString))
{
SQLiteCommand cmd = new SQLiteCommand();
try
{
PrepareCommand(cmd, connection, null, SQLString, cmdParms);
count = cmd.ExecuteNonQuery();
cmd.Parameters.Clear();
}
catch (SQLiteException exception)
{
throw new Exception(exception.Message);
}
finally
{
if (cmd != null)
{
cmd.Dispose();
}
}
}
//Cleanup:
return count;
}
public static int ExecuteSqlInsertImg(string strSQL, byte[] fs)
{
int num2;
using (SQLiteConnection connection = new SQLiteConnection(connectionString))
{
SQLiteCommand command = new SQLiteCommand(strSQL, connection);
SQLiteParameter parameter = new SQLiteParameter("@fs", DbType.Binary);
parameter.Value = fs;
command.Parameters.Add(parameter);
try
{
connection.Open();
num2 = command.ExecuteNonQuery();
}
catch (SQLiteException exception)
{
throw new Exception(exception.Message);
}
finally
{
command.Dispose();
connection.Close();
}
}
return num2;
}
public static void ExecuteSqlTran(ArrayList SQLStringList)
{
using (SQLiteConnection connection = new SQLiteConnection(connectionString))
{
connection.Open();
SQLiteCommand command = new SQLiteCommand();
command.Connection = connection;
SQLiteTransaction transaction = connection.BeginTransaction();
command.Transaction = transaction;
try
{
for (int i = 0; i < SQLStringList.Count; i++)
{
string str = SQLStringList[i].ToString();
if (str.Trim().Length > 1)
{
command.CommandText = str;
command.ExecuteNonQuery();
}
}
transaction.Commit();
}
catch (SQLiteException exception)
{
transaction.Rollback();
throw new Exception(exception.Message);
}
}
}
public static void ExecuteSqlTran(Hashtable SQLStringList)
{
using (SQLiteConnection connection = new SQLiteConnection(connectionString))
{
connection.Open();
using (SQLiteTransaction transaction = connection.BeginTransaction())
{
SQLiteCommand cmd = new SQLiteCommand();
try
{
foreach (DictionaryEntry entry in SQLStringList)
{
string cmdText = entry.Key.ToString();
SQLiteParameter[] cmdParms = (SQLiteParameter[]) entry.Value;
PrepareCommand(cmd, connection, transaction, cmdText, cmdParms);
int num = cmd.ExecuteNonQuery();
cmd.Parameters.Clear();
transaction.Commit();
}
}
catch
{
transaction.Rollback();
throw;
}
}
}
}
public static bool Exists(string strSql)
{
int num;
object single = GetSingle(strSql);
if (object.Equals(single, null) || object.Equals(single, DBNull.Value))
{
num = 0;
}
else
{
num = int.Parse(single.ToString());
}
if (num == 0)
{
return false;
}
return true;
}
public static bool Exists(string strSql, params SQLiteParameter[] cmdParms)
{
int num;
object single = GetSingle(strSql, cmdParms);
if (object.Equals(single, null) || object.Equals(single, DBNull.Value))
{
num = 0;
}
else
{
num = int.Parse(single.ToString());
}
if (num == 0)
{
return false;
}
return true;
}
public static int GetMaxID(string FieldName, string TableName)
{
object single = GetSingle("select max(" + FieldName + ")+1 from " + TableName);
if (single == null)
{
return 1;
}
return int.Parse(single.ToString());
}
public static object GetSingle(string SQLString)
{
object obj = null;
using (SQLiteConnection connection = new SQLiteConnection(connectionString))
{
SQLiteCommand command = new SQLiteCommand(SQLString, connection);
try
{
connection.Open();
obj = command.ExecuteScalar();
if (object.Equals(obj, null) || object.Equals(obj, DBNull.Value))
{
obj = null;
}
}
catch (SQLiteException exception)
{
connection.Close();
throw new Exception(exception.Message);
}
finally
{
if (command != null)
{
command.Dispose();
}
}
}
return obj;
}
public static object GetSingle(string SQLString, params SQLiteParameter[] cmdParms)
{
object obj = null;
using (SQLiteConnection connection = new SQLiteConnection(connectionString))
{
SQLiteCommand cmd = new SQLiteCommand();
try
{
PrepareCommand(cmd, connection, null, SQLString, cmdParms);
obj = cmd.ExecuteScalar();
cmd.Parameters.Clear();
if (object.Equals(obj, null) || object.Equals(obj, DBNull.Value))
{
obj = null;
}
}
catch (SQLiteException exception)
{
throw new Exception(exception.Message);
}
finally
{
if (cmd != null)
{
cmd.Dispose();
}
}
}
return obj;
}
private static void PrepareCommand(SQLiteCommand cmd, SQLiteConnection conn, SQLiteTransaction trans, string cmdText, SQLiteParameter[] cmdParms)
{
if (conn.State != ConnectionState.Open)
{
conn.Open();
}
cmd.Connection = conn;
cmd.CommandText = cmdText;
if (trans != null)
{
cmd.Transaction = trans;
}
cmd.CommandType = CommandType.Text;
if (cmdParms != null)
{
foreach (SQLiteParameter parameter in cmdParms)
{
cmd.Parameters.Add(parameter);
}
}
}
public static DataSet Query(string SQLString)
{
using (SQLiteConnection connection = new SQLiteConnection(connectionString))
{
DataSet dataSet = new DataSet();
try
{
connection.Open();
new SQLiteDataAdapter(SQLString, connection).Fill(dataSet, "ds");
}
catch (SQLiteException exception)
{
throw new Exception(exception.Message);
}
return dataSet;
}
}
public static DataSet Query(string SQLString, params SQLiteParameter[] cmdParms)
{
DataSet set2;
using (SQLiteConnection connection = new SQLiteConnection(connectionString))
{
SQLiteCommand cmd = new SQLiteCommand();
PrepareCommand(cmd, connection, null, SQLString, cmdParms);
using (SQLiteDataAdapter adapter = new SQLiteDataAdapter(cmd))
{
DataSet dataSet = new DataSet();
try
{
adapter.Fill(dataSet, "ds");
cmd.Parameters.Clear();
}
catch (SQLiteException exception)
{
throw new Exception(exception.Message);
}
set2 = dataSet;
}
}
return set2;
}
}
}

@ -0,0 +1,177 @@
using System;
using System.Collections.Specialized;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
public class IniFile
{
public string FileName;
[DllImport("kernel32")]
private static extern bool WritePrivateProfileString(string section, string key, string val, string filePath);
[DllImport("kernel32")]
private static extern int GetPrivateProfileString(string section, string key, string def, byte[] retVal, int size, string filePath);
public IniFile(string AFileName)
{
FileInfo fileInfo = new FileInfo(AFileName);
if (!fileInfo.Exists)
{
StreamWriter streamWriter = new StreamWriter(AFileName, false, Encoding.Default);
try
{
streamWriter.Write("#配置档案");
streamWriter.Close();
}
catch
{
throw new ApplicationException("Ini文件不存在");
}
}
FileName = fileInfo.FullName;
}
public void WriteString(string Section, string Ident, string Value)
{
if (!WritePrivateProfileString(Section, Ident, Value, FileName))
{
throw new ApplicationException("写Ini文件出错");
}
}
public string ReadString(string Section, string Ident, string Default="")
{
byte[] array = new byte[65535];
int privateProfileString = GetPrivateProfileString(Section, Ident, Default, array, array.GetUpperBound(0), FileName);
string @string = Encoding.GetEncoding(0).GetString(array, 0, privateProfileString);
return @string.Trim();
}
public int ReadInteger(string Section, string Ident, int Default)
{
string value = ReadString(Section, Ident, Convert.ToString(Default));
try
{
return Convert.ToInt32(value);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
return Default;
}
}
public void WriteInteger(string Section, string Ident, int Value)
{
WriteString(Section, Ident, Value.ToString());
}
public bool ReadBool(string Section, string Ident, bool Default)
{
try
{
return Convert.ToBoolean(ReadString(Section, Ident, Convert.ToString(Default)));
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
return Default;
}
}
public void WriteBool(string Section, string Ident, bool Value)
{
WriteString(Section, Ident, Convert.ToString(Value));
}
public void ReadSection(string Section, StringCollection Idents)
{
byte[] array = new byte[16384];
int privateProfileString = GetPrivateProfileString(Section, null, null, array, array.GetUpperBound(0), FileName);
GetStringsFromBuffer(array, privateProfileString, Idents);
}
private void GetStringsFromBuffer(byte[] Buffer, int bufLen, StringCollection Strings)
{
Strings.Clear();
if (bufLen == 0)
{
return;
}
int num = 0;
for (int i = 0; i < bufLen; i++)
{
if (Buffer[i] == 0 && i - num > 0)
{
string @string = Encoding.GetEncoding(0).GetString(Buffer, num, i - num);
Strings.Add(@string);
num = i + 1;
}
}
}
public void ReadSections(StringCollection SectionList)
{
byte[] array = new byte[65535];
int num = 0;
num = GetPrivateProfileString(null, null, null, array, array.GetUpperBound(0), FileName);
GetStringsFromBuffer(array, num, SectionList);
}
public void ReadSectionValues(string Section, NameValueCollection Values)
{
StringCollection stringCollection = new StringCollection();
ReadSection(Section, stringCollection);
Values.Clear();
StringEnumerator enumerator = stringCollection.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
string current = enumerator.Current;
Values.Add(current, ReadString(Section, current, ""));
}
}
finally
{
IDisposable disposable = enumerator as IDisposable;
if (disposable != null)
{
disposable.Dispose();
}
}
}
public void EraseSection(string Section)
{
if (!WritePrivateProfileString(Section, null, null, FileName))
{
throw new ApplicationException("无法清除Ini文件中的Section");
}
}
public void DeleteKey(string Section, string Ident)
{
WritePrivateProfileString(Section, Ident, null, FileName);
}
public void UpdateFile()
{
WritePrivateProfileString(null, null, null, FileName);
}
public bool ValueExists(string Section, string Ident)
{
StringCollection stringCollection = new StringCollection();
ReadSection(Section, stringCollection);
return stringCollection.IndexOf(Ident) > -1;
}
~IniFile()
{
UpdateFile();
}
}

@ -0,0 +1,36 @@
namespace Maticsoft.DBUtility
{
using System;
using System.Configuration;
public class PubConstant
{
//ini配置文件路径.
public static string config_file = Environment.CurrentDirectory + "\\ZWGXPICK_SYS.ini";
public static string GetConnectionString(string configName)
{
string text = ConfigurationManager.AppSettings[configName];
string str2 = ConfigurationManager.AppSettings["ConStringEncrypt"];
if (str2 == "true")
{
text = DESEncrypt.Decrypt(text);
}
return text;
}
public static string ConnectionString
{
get
{
string text = ConfigurationManager.AppSettings["ConnectionString"];
string str2 = ConfigurationManager.AppSettings["ConStringEncrypt"];
if (str2 == "true")
{
text = DESEncrypt.Decrypt(text);
}
return text;
}
}
}
}

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.props" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{97D88B49-5203-468E-B253-97D17A45A60D}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ZWGXPICK_SYS.DBUtility</RootNamespace>
<AssemblyName>ZWGXPICK_SYS.DBUtility</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.4\lib\net40\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.4\lib\net40\EntityFramework.SqlServer.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.configuration" />
<Reference Include="System.Data" />
<Reference Include="System.Data.SQLite, Version=1.0.115.5, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.5\lib\net40\System.Data.SQLite.dll</HintPath>
</Reference>
<Reference Include="System.Web" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ZWGXPICK\DBUtility\DbHelperSQLite.cs" />
<Compile Include="ZWGXPICK\DBUtility\DESEncrypt.cs" />
<Compile Include="ZWGXPICK\DBUtility\IniFile.cs" />
<Compile Include="ZWGXPICK\DBUtility\PubConstant.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.props'))" />
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" />
<Error Condition="!Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.5\build\net40\Stub.System.Data.SQLite.Core.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.5\build\net40\Stub.System.Data.SQLite.Core.NetFramework.targets'))" />
</Target>
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
<Import Project="..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.5\build\net40\Stub.System.Data.SQLite.Core.NetFramework.targets" Condition="Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.5\build\net40\Stub.System.Data.SQLite.Core.NetFramework.targets')" />
</Project>

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EntityFramework" version="6.4.4" targetFramework="net40" requireReinstallation="true" />
<package id="Stub.System.Data.SQLite.Core.NetFramework" version="1.0.115.5" targetFramework="net40" requireReinstallation="true" />
<package id="System.Data.SQLite" version="1.0.115.5" targetFramework="net40" />
<package id="System.Data.SQLite.Core" version="1.0.115.5" targetFramework="net40" />
<package id="System.Data.SQLite.EF6" version="1.0.115.5" targetFramework="net40" requireReinstallation="true" />
<package id="System.Data.SQLite.Linq" version="1.0.115.5" targetFramework="net40" requireReinstallation="true" />
</packages>

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ZWGXZWGXPICK_SYS.Model")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ZWGXZWGXPICK_SYS.Model")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("e63102b9-b1ce-47e3-abd1-d9a4d4458b63")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{E63102B9-B1CE-47E3-ABD1-D9A4D4458B63}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ZWGXPICK_SYS.Model</RootNamespace>
<AssemblyName>ZWGXPICK_SYS.Model</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ZWGXPICK_SYS\Model\POINT_LOCATION_TEACHING.cs" />
<Compile Include="ZWGXPICK_SYS\Model\PRODUCT_GLOBAL_CONFIG.cs" />
<Compile Include="ZWGXPICK_SYS\Model\PRODUCT_ITEM_CONFIG.cs" />
<Compile Include="ZWGXPICK_SYS\Model\ALARM_LOG.cs" />
<Compile Include="ZWGXPICK_SYS\Model\SYS\SYS_USER.cs" />
<Compile Include="ZWGXPICK_SYS\Model\WEIGHT_LOG.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ZWGXPICK_SYS.DBUtility\ZWGXPICK_SYS.DBUtility.csproj">
<Project>{97D88B49-5203-468E-B253-97D17A45A60D}</Project>
<Name>ZWGXPICK_SYS.DBUtility</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

@ -0,0 +1,15 @@
using System;
namespace ZWGXPICK_SYS.Model
{
// 报警日志Model.
public class ALARM_LOG
{
public int id { get; set; } //唯一ID,系统主键
public string log_date { get; set; } //日期
public string log_time { get; set; } //时间
public string log_classify { get; set; }//日志分类
public string log_content { get; set; } //报警内容
public int status { get; set; } //日志状态,0:默认
}
}

@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ZWGXPICK_SYS.Model
{
// 点位位置.
public class PointLocation
{
public double x {get; set;} //X
public double y {get; set;} //Y
public double z {get; set;} //Z
public double u {get; set;} //U
}
// 点位配置,这个也可以直接写ini
public class POINT_LOCATION_TEACHING
{
public double speed {get; set;} //速度
public double location {get; set;} //点位
public double step_length {get; set;} //步距
public string command { get; set; } //命令
}
}

@ -0,0 +1,32 @@
using Maticsoft.DBUtility;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ZWGXPICK_SYS.Model
{
// 生产全局参数设置,这个不建表,直接存ini更方便.
public class PRODUCT_GLOBAL_CONFIG
{
public int id {get; set;} //系统唯一编号.
public string product_model {get; set;} //产品型号
public int weight_mode {get; set;} //称重模式
public int clear_blurr {get; set;} //是否去毛刺
public int get_thing_method {get; set;} //取件方式
public int get_thing_tool_type {get; set;} //取件工具
public int weight_interval1 {get; set;} //称重频率
public int weight_interval2 {get; set;} //称重频率(每x次称重y次)
public int clear_model_interval1 {get; set;} //清模频率
public int clear_model_interval2 {get; set; }//清模频率2
public int blow_mode {get; set;} //吹气开关
public bool Load()
{
IniFile ini = new IniFile(PubConstant.config_file);
return true;
}
}
}

@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ZWGXPICK_SYS.Model
{
// 产品配置表Model.
public class PRODUCT_ITEM_CONFIG
{
public int id { get; set; } //唯一ID
public string product_name { get; set; } //产品名称
public int boat_dish_type { get; set; } //舟皿类型
public int product_type { get; set; } //产品类型
public double boat_dish_length { get; set; } //舟皿长度(X方向)
public double boat_dish_width { get; set; } //舟皿宽度(Y方向)
public int boat_slot_num { get; set; } //舟皿槽数(Y方向)
public double product_length { get; set; } //产品长度(X方向)
public double product_width { get; set; } //产品宽度(Y方向)
public double circular_boat_radius { get; set; } //圆形舟皿半径
public double central_hole_radius { get; set; } //中心孔半径
public int matrix_type { get; set; } //阵列方式
public int place_type { get; set; } //摆放方式
public int x_direction_num { get; set; } //X方向数量
public int y_direction_num { get; set; } //Y方向数量
public int is_rotation { get; set; } //产品是否旋转
public double standard_weight { get; set; } //标准重量
public double qualified_allow_error { get; set; } //合格允许误差
public double single_weight_allow_error { get; set; } //单重调整允许误差
public double boat_first_point_x { get; set; } //摆舟首坐标X
public double boat_first_point_y { get; set; } //摆舟首坐标Y
public double boat_dash_center_x { get; set; } //舟皿中心坐标X
public double boat_dish_center_y { get; set; } //舟皿中心坐标Y
public int status { get; set; } //记录状态,0:默认
}
}

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ZWGXPICK_SYS.Model.SYS
{
// 系统用户表Model
public class SYS_USER
{
public int id { get; set; } //唯一ID
public string uid { get; set; } //用户ID
public string pwd { get; set; } //用户密码
public int type { get; set; } //用户类型
public int status { get; set; } //用户状态,0:默认
}
}

@ -0,0 +1,15 @@
using System;
namespace ZWGXPICK_SYS.Model
{
// 称重日志信息表Model.
public class WEIGHT_LOG
{
public int id { get; set; } //唯一ID
public string product_model { get; set; } //产品型号
public string product_date { get; set; } //称重日期
public string product_time { get; set; } //称重时间
public string weight { get; set; } //重量
public int is_qualified { get; set; } //合格/不合格
}
}

@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ZWGXPICK_SYS.SerialPort
{
/// <summary>
/// 消息事件参数
/// </summary>
public class MessageEventArgs : EventArgs
{
public bool IsError { get; set; } = false;
public string Message { get; set; }
public MessageEventArgs(bool isError = false, string message = "")
{
this.IsError = isError;
this.Message = message;
}
}
}

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("ZWGXPICK_SYS.SerialPort")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ZWGXPICK_SYS.SerialPort")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("05ea0779-793d-4b43-89d2-56d044efb0cb")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

@ -0,0 +1,244 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO.Ports;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using System.Text;
using System.Threading.Tasks;
using SerialPort = System.IO.Ports.SerialPort;
namespace ZWGXPICK_SYS.SerialPort
{
/// <summary>
/// 串口通讯工具
/// </summary>
public class SerialPortUtils
{
private System.IO.Ports.SerialPort SerialPort;
/// <summary>
/// 串口名称
/// </summary>
public string ComName { get; private set; }
/// <summary>
/// 波特率
/// </summary>
public int ComBaud { get; private set; }
/// <summary>
/// 数据位
/// </summary>
public int DataBits { get; private set; }
/// <summary>
/// 接收数据长度
/// </summary>
public int ReceivedBytesThreshold { get; set; }
/// <summary>
/// 停止位
/// </summary>
public StopBits StopBits { get; private set; }
/// <summary>
/// 校验位
/// </summary>
public Parity Parity { get; private set; }
public event EventHandler<byte[]> SerialDataReceived;
public event EventHandler<MessageEventArgs> SerialMessage;
#region builder
private SerialPortUtils(SerialPortUtilsBuilder builder)
{
ComName = builder.comName;
ComBaud = builder.comBaud;
DataBits = builder.dataBits;
StopBits = builder.stopBits;
Parity = builder.parity;
ReceivedBytesThreshold = builder.receivedBytesThreshold;
}
public static SerialPortUtilsBuilder Builder(string comName)
{
return new SerialPortUtilsBuilder(comName);
}
public class SerialPortUtilsBuilder
{
internal string comName;
internal int comBaud = 9600;
internal int dataBits = 8;
internal StopBits stopBits = System.IO.Ports.StopBits.One;
internal int receivedBytesThreshold = 1;
public Parity parity = Parity.None;
public SerialPortUtilsBuilder(string comName)
{
this.comName = comName;
}
public SerialPortUtilsBuilder ComBaud(int comBaud)
{
this.comBaud = comBaud;
return this;
}
public SerialPortUtilsBuilder DataBits(int dataBits)
{
this.dataBits = dataBits;
return this;
}
public SerialPortUtilsBuilder StopBits(StopBits stopBits)
{
this.stopBits = stopBits;
return this;
}
public SerialPortUtilsBuilder StopBits(Parity parity)
{
this.parity = parity;
return this;
}
public SerialPortUtilsBuilder ReceivedBytesThreshold(int receivedBytesThreshold)
{
this.receivedBytesThreshold = receivedBytesThreshold;
return this;
}
public SerialPortUtils Build()
{
return new SerialPortUtils(this);
}
}
#endregion builder
/// <summary>
/// 获取当前电脑的串口列表
/// </summary>
/// <returns></returns>
public static string[] GetPortNames()
{
return System.IO.Ports.SerialPort.GetPortNames();
}
public bool Open()
{
try
{
if (SerialPort == null || !SerialPort.IsOpen)
{
SerialPort = new System.IO.Ports.SerialPort();
SerialPort.PortName = ComName;
SerialPort.BaudRate = ComBaud;
SerialPort.DataBits = DataBits;
SerialPort.StopBits = StopBits;
SerialPort.Parity = Parity;
SerialPort.ReceivedBytesThreshold = ReceivedBytesThreshold;
SerialPort.Open();
//串口数据接收事件实现
SerialPort.DataReceived += new SerialDataReceivedEventHandler(ReceiveData);
}
return true;
}
catch (Exception ex)
{
PrintMessage(true, $"打开串口连接异常:", ex);
}
return false;
}
public void Close()
{
try
{
if (SerialPort.IsOpen)
{
SerialPort.Close();
PrintMessage(true, $"关闭串口连接:");
}
}
catch (Exception ex)
{
PrintMessage(true, $"关闭串口连接异常:", ex);
}
}
public bool IsOpen
{
get
{
return SerialPort.IsOpen;
}
}
public void ReceiveData(object sender, SerialDataReceivedEventArgs e)
{
try
{
System.IO.Ports.SerialPort _SerialPort = sender as System.IO.Ports.SerialPort;
int _bytesToRead = _SerialPort.BytesToRead;
byte[] recvData = new byte[_bytesToRead];
_SerialPort.Read(recvData, 0, _bytesToRead);
SerialDataReceived?.Invoke(this, recvData);
PrintMessage(false, $"接收到数据【{e.EventType}】:" + BitConverter.ToString(recvData));
}
catch (Exception ex)
{
PrintMessage(true, $"接收数据异常:", ex);
}
}
public bool SendData(byte[] data)
{
try
{
if (SerialPort == null || !SerialPort.IsOpen)
{
Open();
}
if (!SerialPort.IsOpen)
{
PrintMessage(true, $"发送数据异常,串口连接没有正常打开");
return false;
}
SerialPort.Write(data, 0, data.Length);
PrintMessage(false, $"发送数据:" + BitConverter.ToString(data));
return true;
}
catch (Exception ex)
{
PrintMessage(true, $"发送数据异常:", ex);
return false;
}
}
//触发消息事件
private void PrintMessage(bool isError, string title, Exception ex = null)
{
string info = $"端口{ComName},波特率{ComBaud},{title}{(ex == null ? "" : "")}{ex?.Message}";
SerialMessage?.Invoke(this, new MessageEventArgs(isError: isError, message: info));
}
}
}

@ -0,0 +1,106 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Remoting.Messaging;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;
namespace ZWGXPICK_SYS.SerialPort
{
/// <summary>
/// 称重设备
/// </summary>
public class WeightEquipment
{
private SerialPortUtils serialPortUtils;
//发送请求
private byte[] sendCode = new byte[] { 0xFF, 0x03, 0x00, 0x00, 0x00, 0x02, 0xD1, 0xD5 };
//置零
private byte[] restZero = new byte[] { 0xFF, 0x06, 0x00, 0x07, 0x00, 0x02, 0xAC, 0x14 };
public event EventHandler<MessageEventArgs> MessageSend = null;
public event EventHandler<WeightModel> WeightSend = null;
public WeightEquipment(string comName, int comBaud, int ReceivedBytesThreshold = 9)
{
serialPortUtils = SerialPortUtils.Builder(comName).ComBaud(comBaud).ReceivedBytesThreshold(ReceivedBytesThreshold).Build();
serialPortUtils.SerialDataReceived += SerialPortUtils_SerialDataReceived;
serialPortUtils.SerialMessage += SerialPortUtils_SerialMessage;
}
/// <summary>
/// 打开连接
/// </summary>
/// <returns></returns>
public bool Open()
{
var val = serialPortUtils.Open();
return val;
}
/// <summary>
/// 关闭连接
/// </summary>
public void Close()
{
serialPortUtils.Close();
}
public bool IsOpen()
{
return serialPortUtils.IsOpen;
}
/// <summary>
/// 置零
/// </summary>
/// <returns></returns>
public bool Rset()
{
return serialPortUtils.SendData(restZero);
}
public bool Send()
{
return serialPortUtils.SendData(sendCode);
}
//接收数据
private void SerialPortUtils_SerialDataReceived(object sender, byte[] e)
{
if (e.Length != 9)
{
MessageSend?.Invoke(this, new MessageEventArgs(true, $"接收数据长度不正确,长度为{e.Length}字节 "));
return;
}
//是否为重量数据
//var value = Convert.ToInt32(e[2].ToString("x2") + e[3].ToString("x2"), 16);
var weight = Math.Round((e[3] * 16 * 16 + e[4]) / 100m, 2);
WeightSend?.Invoke(this, new WeightModel
{
COMName = serialPortUtils.ComName,
Weight = weight,
Nuit = "克",
});
}
// 消息提醒
private void SerialPortUtils_SerialMessage(object sender, MessageEventArgs e)
{
MessageSend?.Invoke(this, e);
}
//触发错误消息事件
/*private void PrintMessage(bool isError, string title, byte[] value = null)
{
string error = $"端口{serialPortUtils.ComName},波特率{serialPortUtils.ComBaud},{title}{(value != null ? ":" + BitConverter.ToString(value) : "")}";
MessageSend?.Invoke(this, new MessageEventArgs(isError: isError, message: error));
}*/
}
}

@ -0,0 +1,107 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Remoting.Messaging;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;
namespace ZWGXPICK_SYS.SerialPort
{
/// <summary>
/// 称重设备
/// </summary>
public class WeightEquipment
{
private SerialPortUtils serialPortUtils;
//控制指令格式 D+(字符)+0x0D+0x0A
private byte[] controlFormat = new byte[] { Convert.ToByte('D'), 0, 0x0D, 0x0A };
public event EventHandler<MessageEventArgs> MessageSend = null;
public event EventHandler<WeightModel> WeightSend = null;
public WeightEquipment(string comName, int comBaud)
{
serialPortUtils = SerialPortUtils.Builder(comName).ComBaud(comBaud).Build();
serialPortUtils.SerialDataReceived += SerialPortUtils_SerialDataReceived;
serialPortUtils.SerialMessage += SerialPortUtils_SerialMessage;
}
/// <summary>
/// 打开连接
/// </summary>
/// <returns></returns>
public bool Open()
{
var val = serialPortUtils.Open();
return val;
}
/// <summary>
/// 关闭连接
/// </summary>
public void Close()
{
serialPortUtils.Close();
}
/// <summary>
/// 置零
/// </summary>
/// <returns></returns>
public bool Rset()
{
controlFormat[1] = Convert.ToByte('Z');
return serialPortUtils.SendData(controlFormat);
}
//接收数据
private void SerialPortUtils_SerialDataReceived(object sender, byte[] e)
{
if (e.Length != 20)
{
PrintMessage(true, "接收数据长度不正确", e);
}
//是否为重量数据
//获取head1 OL--超载 ST--稳定 US--不稳定
var head1 = new byte[2];
Array.Copy(e, head1, 2);
//获取head2 NT--净重模式 GS--毛重模式
var head2 = new byte[2];
Array.Copy(e, 4, head2, 0, 2);
var head1Str = Encoding.ASCII.GetString(head1);
if (head1Str.Equals("OL") || head1Str.Equals("ST") || head1Str.Equals("US"))
{
//data
var data = new byte[8];
Array.Copy(e, 7, data, 0, 7);
decimal.TryParse(Encoding.ASCII.GetString(data), out var weight);
//unit
var unit = new byte[4];
Array.Copy(e, 15, unit, 0, 4);
WeightSend?.Invoke(this, new WeightModel
{
COMName = serialPortUtils.ComName,
Weight = weight,
Nuit = Encoding.ASCII.GetString(unit),
Head1 = head1Str,
Head2 = Encoding.ASCII.GetString(head2),
});
}
PrintMessage(true, "接收数据", e);
}
// 错误数据
private void SerialPortUtils_SerialMessage(object sender, MessageEventArgs e)
{
MessageSend?.Invoke(this, e);
}
//触发错误消息事件
private void PrintMessage(bool isError, string title, byte[] value = null)
{
string error = $"端口{serialPortUtils.ComName},波特率{serialPortUtils.ComBaud},{title}{(value != null ? ":" + Encoding.ASCII.GetString(value) : "")}";
MessageSend?.Invoke(this, new MessageEventArgs(isError: isError, message: error));
}
}
}

@ -0,0 +1,186 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ZWGXPICK_SYS.SerialPort
{
/// <summary>
/// 重量设备聚合类
/// </summary>
public class WeightEquipmentAggregation
{
private int comBaud;
private string[] comNames;
private decimal standard;
private decimal tolerance;
private decimal range;
private List<WeightEquipment> weightEquipments;
private List<WeightModel> WeightModels;
public event EventHandler<MessageEventArgs> MessageSend;
public event EventHandler<List<WeightModel>> WeightSend;
public event EventHandler<bool> SuccessSend;
public void Init(int comBaud, string[] comNames, decimal standard, decimal tolerance, decimal range)
{
this.comBaud = comBaud;
this.comNames = comNames;
this.standard = standard;
this.tolerance = tolerance;
this.range = range;
int id = 0;
//如果重复初始化,就先关闭连接
if (weightEquipments != null && weightEquipments.Count > 0)
{
Close();
}
weightEquipments = new List<WeightEquipment>();
WeightModels = new List<WeightModel>();
foreach (var comName in comNames)
{
var weightEquipment = new WeightEquipment(comName, comBaud, 9);
weightEquipment.WeightSend += WeightEquipment_WeightSend;
weightEquipment.MessageSend += WeightEquipment_MessageSend;
weightEquipments.Add(weightEquipment);
WeightModels.Add(new WeightModel
{
ID = ++id,
COMName = comName
});
}
WeightSend?.Invoke(this, WeightModels);
}
/// <summary>
/// 打开称重设备连接
/// </summary>
public bool Open()
{
var result = new List<bool>();
weightEquipments?.ForEach(item => result.Add(item.Open()));
return result.Where(f => f).Count() == weightEquipments.Count;
}
/// <summary>
/// 称重设备置零
/// </summary>
public bool Rest()
{
var result = new List<bool>();
weightEquipments?.ForEach(item => result.Add(item.Rset()));
return result.Where(f => f).Count() == weightEquipments.Count;
}
/// <summary>
/// 发送获取重量命令
/// </summary>
/// <returns></returns>
public bool Send()
{
var result = new List<bool>();
weightEquipments?.ForEach(item => result.Add(item.Send()));
return result.Where(f => f).Count() == weightEquipments.Count;
}
/// <summary>
/// 关闭称重设备
/// </summary>
public void Close()
{
weightEquipments?.ForEach(item => item.Close());
}
public bool IsOpen()
{
if (weightEquipments == null || weightEquipments.Count == 0)
{
return false;
}
var result = new List<bool>();
weightEquipments?.ForEach(item => result.Add(item.IsOpen()));
return result.Where(f => f).Count() == weightEquipments.Count;
}
//获取错误信息
private void WeightEquipment_MessageSend(object sender, MessageEventArgs e)
{
MessageSend?.Invoke(this, e);
saveLog(e.Message);
}
//获取重量信息
private void WeightEquipment_WeightSend(object sender, WeightModel e)
{
var weight = WeightModels.Where(f => f.COMName == e.COMName).FirstOrDefault();
if (weight != null)
{
weight.Weight = e.Weight;
weight.Nuit = e.Nuit;
//weight.Head1 = e.Head1;
//weight.Head2 = e.Head2;
}
//如果数据稳定 则进行计算
if (WeightModels.Where(f =>!string.IsNullOrEmpty(f.Nuit)).Count() == WeightModels.Count)
{
var val = Calculation();
//发送重量计算结果
SuccessSend?.Invoke(this, val);
}
WeightSend?.Invoke(this, WeightModels);
}
//根据重量计算是否合格
public bool Calculation()
{
var res = Calculation(WeightModels, standard, tolerance, range);
MessageSend?.Invoke(this, new MessageEventArgs(message: "称重计算结果为:" + res));
return res;
}
public bool Calculation(List<WeightModel> WeightModels, decimal standard, decimal tolerance, decimal range)
{
if (standard > 0 && tolerance >= 0 && range >= 0)
{
//过滤小于0.5的重量数据
var actualWeightModels = WeightModels.Where(f => f.Weight > 0.5m);
//是否均在公差范围之内
if (actualWeightModels.Where(f => f.Weight <= standard + tolerance && f.Weight >= standard - tolerance).Count() == actualWeightModels.Count())
{
//是否在极差范围之内
var maxOne = actualWeightModels.Select(f => f.Weight).Max();
var minOne = actualWeightModels.Select(f => f.Weight).Min();
if (maxOne - minOne <= range)
{
return true;
}
}
}
return false;
}
//记录日志
private void saveLog(string str)
{
string logDir = Environment.CurrentDirectory + "\\Logs\\";
if (Directory.Exists(logDir))
{
Directory.CreateDirectory(logDir);
}
string logFile = $"{logDir}weightEquipments_{DateTime.Today.ToString("yyyy-MM-dd")}.log";
string text = $"【{DateTime.Now.ToLongTimeString()}】{str}{Environment.NewLine}" ;
try
{
File.AppendAllText(logFile, text);
}
catch (Exception ex) { }
}
}
}

@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ZWGXPICK_SYS.SerialPort
{
/// <summary>
/// 重量model
/// </summary>
public class WeightModel
{
/// <summary>
/// ID
/// </summary>
public int ID { get; set; }
/// <summary>
/// COM名称设备
/// </summary>
public string COMName { get; set; }
/// <summary>
/// 重量
/// </summary>
public decimal Weight { get; set; }
/// <summary>
/// 单位
/// </summary>
public string Nuit { get; set; }
//public string Head1 { get; set; }
//public string Head2 { get; set; }
public string Message { get; set; }
//public bool IsGetValue { get; set; }
}
}

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{05EA0779-793D-4B43-89D2-56D044EFB0CB}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ZWGXPICK_SYS.SerialPort</RootNamespace>
<AssemblyName>ZWGXPICK_SYS.SerialPort</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.IO.Ports, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Ports.6.0.0\lib\net461\System.IO.Ports.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="MessageEventArgs.cs" />
<Compile Include="SerialPortUtils.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="WeightEquipment.cs" />
<Compile Include="WeightEquipmentAggregation.cs" />
<Compile Include="WeightModel.cs" />
<None Include="WeightEquipment.old" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="System.IO.Ports" version="6.0.0" targetFramework="net48" />
</packages>

@ -0,0 +1,67 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.3.32819.101
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZWGXPICK_SYS", "ZWGXPICK_SYS\ZWGXPICK_SYS.csproj", "{2E0AD820-6B31-4895-AD0F-FFC52FD2CB63}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZWGXPICK_SYS.DBUtility", "ZWGXPICK_SYS.DBUtility\ZWGXPICK_SYS.DBUtility.csproj", "{97D88B49-5203-468E-B253-97D17A45A60D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZWGXPICK_SYS.Model", "ZWGXPICK_SYS.Model\ZWGXPICK_SYS.Model.csproj", "{E63102B9-B1CE-47E3-ABD1-D9A4D4458B63}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZWGXPICK_SYS.DAL", "ZWGXPICK_SYS.DAL\ZWGXPICK_SYS.DAL.csproj", "{7357684A-0246-4A72-8189-4724BDFFA5D1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EPSON_SOCKET", "EPSON_SOCKET\EPSON_SOCKET.csproj", "{50011230-779E-484E-9FED-1CF3086FA14E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "test_db_dal", "Test_db_dal\test_db_dal.csproj", "{27C7CE26-9122-4A49-AB68-4818ADF279DF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZWGXPICK_SYS.SerialPort", "ZWGXPICK_SYS.SerialPort\ZWGXPICK_SYS.SerialPort.csproj", "{05EA0779-793D-4B43-89D2-56D044EFB0CB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "test_serialPort", "test_serialPort\test_serialPort.csproj", "{F3D367EA-BA7F-44C9-91CD-409AA53C024B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2E0AD820-6B31-4895-AD0F-FFC52FD2CB63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2E0AD820-6B31-4895-AD0F-FFC52FD2CB63}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2E0AD820-6B31-4895-AD0F-FFC52FD2CB63}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2E0AD820-6B31-4895-AD0F-FFC52FD2CB63}.Release|Any CPU.Build.0 = Release|Any CPU
{97D88B49-5203-468E-B253-97D17A45A60D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{97D88B49-5203-468E-B253-97D17A45A60D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{97D88B49-5203-468E-B253-97D17A45A60D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{97D88B49-5203-468E-B253-97D17A45A60D}.Release|Any CPU.Build.0 = Release|Any CPU
{E63102B9-B1CE-47E3-ABD1-D9A4D4458B63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E63102B9-B1CE-47E3-ABD1-D9A4D4458B63}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E63102B9-B1CE-47E3-ABD1-D9A4D4458B63}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E63102B9-B1CE-47E3-ABD1-D9A4D4458B63}.Release|Any CPU.Build.0 = Release|Any CPU
{7357684A-0246-4A72-8189-4724BDFFA5D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7357684A-0246-4A72-8189-4724BDFFA5D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7357684A-0246-4A72-8189-4724BDFFA5D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7357684A-0246-4A72-8189-4724BDFFA5D1}.Release|Any CPU.Build.0 = Release|Any CPU
{50011230-779E-484E-9FED-1CF3086FA14E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{50011230-779E-484E-9FED-1CF3086FA14E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{50011230-779E-484E-9FED-1CF3086FA14E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{50011230-779E-484E-9FED-1CF3086FA14E}.Release|Any CPU.Build.0 = Release|Any CPU
{27C7CE26-9122-4A49-AB68-4818ADF279DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{27C7CE26-9122-4A49-AB68-4818ADF279DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{27C7CE26-9122-4A49-AB68-4818ADF279DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{27C7CE26-9122-4A49-AB68-4818ADF279DF}.Release|Any CPU.Build.0 = Release|Any CPU
{05EA0779-793D-4B43-89D2-56D044EFB0CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{05EA0779-793D-4B43-89D2-56D044EFB0CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{05EA0779-793D-4B43-89D2-56D044EFB0CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{05EA0779-793D-4B43-89D2-56D044EFB0CB}.Release|Any CPU.Build.0 = Release|Any CPU
{F3D367EA-BA7F-44C9-91CD-409AA53C024B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F3D367EA-BA7F-44C9-91CD-409AA53C024B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F3D367EA-BA7F-44C9-91CD-409AA53C024B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F3D367EA-BA7F-44C9-91CD-409AA53C024B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {36C80AB3-D610-4CEE-9C61-EF38465508A2}
EndGlobalSection
EndGlobal

@ -0,0 +1,106 @@
namespace ZWGXPICK_SYS
{
partial class Alarm_Log_Form
{
/// <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.dataGridView1 = new System.Windows.Forms.DataGridView();
this.label3 = new System.Windows.Forms.Label();
this.btnClear = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// dataGridView1
//
this.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Location = new System.Drawing.Point(1, 53);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.ReadOnly = true;
this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView1.Size = new System.Drawing.Size(863, 414);
this.dataGridView1.TabIndex = 193;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("微软雅黑", 20F, System.Drawing.FontStyle.Bold);
this.label3.ForeColor = System.Drawing.Color.Black;
this.label3.Location = new System.Drawing.Point(358, 2);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(123, 36);
this.label3.TabIndex = 193;
this.label3.Text = "报警数据";
//
// btnClear
//
this.btnClear.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClear.Location = new System.Drawing.Point(684, 4);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(188, 45);
this.btnClear.TabIndex = 197;
this.btnClear.Text = "清空数据(&C)";
this.btnClear.UseVisualStyleBackColor = true;
this.btnClear.Click += new System.EventHandler(this.btnClear_Click);
//
// panel1
//
this.panel1.Controls.Add(this.label3);
this.panel1.Location = new System.Drawing.Point(1, 2);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(677, 45);
this.panel1.TabIndex = 196;
//
// Alarm_Log_Form
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
this.ClientSize = new System.Drawing.Size(884, 481);
this.Controls.Add(this.btnClear);
this.Controls.Add(this.panel1);
this.Controls.Add(this.dataGridView1);
this.Name = "Alarm_Log_Form";
this.Text = "报警信息查询";
this.Load += new System.EventHandler(this.Alarm_Log_Form_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button btnClear;
private System.Windows.Forms.Panel panel1;
}
}

@ -0,0 +1,113 @@
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;
using ZWGXZWGXPICK_SYS.DAL;
namespace ZWGXPICK_SYS
{
public partial class Alarm_Log_Form : Form
{
private float X;
private float Y;
public Alarm_Log_Form()
{
InitializeComponent();
}
private void setTag(Control cons)
{
foreach (Control con in cons.Controls)
{
con.Tag = con.Width + ":" + con.Height + ":" + con.Left + ":" + con.Top + ":" + con.Font.Size;
if (con.Controls.Count > 0)
setTag(con);
}
}
private void setControls(float newx, float newy, Control cons)
{
foreach (Control con in cons.Controls)
{
if (con.Tag == null) continue;
string[] mytag = con.Tag.ToString().Split(new char[] { ':' });
float a = Convert.ToSingle(mytag[0]) * newx;
con.Width = (int)a;
a = Convert.ToSingle(mytag[1]) * newy;
con.Height = (int)(a);
a = Convert.ToSingle(mytag[2]) * newx;
con.Left = (int)(a);
a = Convert.ToSingle(mytag[3]) * newy;
con.Top = (int)(a);
Single currentSize = Convert.ToSingle(mytag[4]) * Math.Min(newx, newy);
con.Font = new Font(con.Font.Name, currentSize, con.Font.Style, con.Font.Unit);
if (con.Controls.Count > 0)
{
setControls(newx, newy, con);
}
}
}
void Form1_Resize(object sender, EventArgs e)
{
float newx = (this.Width) / X;
float newy = this.Height / Y;
setControls(newx, newy, this);
// this.Text = this.Width.ToString() + " " + this.Height.ToString();
}
private void Alarm_Log_Form_Load(object sender, EventArgs e)
{
this.Resize += new EventHandler(Form1_Resize);
X = this.Width;
Y = this.Height;
setTag(this);
Form1_Resize(new object(), new EventArgs());//x,y可在实例化时赋值,最后这句是新加的在MDI时有用
this.CenterToScreen();
// 刷新列表显示数据.
updateListView();
}
private void updateListView()
{
// 显示所有日志数据.
DataSet list = new ALARM_LOG().GetList("");
DataTable dtfmt = list.Tables[0];
// 去除掉不必要的列不显示.
dtfmt.DefaultView.Sort = "id desc";
dtfmt.Columns.Remove("id");
dtfmt.Columns.Remove("status");
dtfmt.Columns["log_date"].ColumnName = "日期";
dtfmt.Columns["log_time"].ColumnName = "时间";
dtfmt.Columns["log_classify"].ColumnName = "报警分类";
dtfmt.Columns["log_content"].ColumnName = "报警内容";
this.dataGridView1.DataSource = dtfmt;
this.dataGridView1.DefaultCellStyle.ForeColor = Color.Red;
this.dataGridView1.DefaultCellStyle.Font = new Font("Microsoft YaHei", 10, FontStyle.Bold);
this.dataGridView1.ColumnHeadersDefaultCellStyle.Font = new Font("Microsoft YaHei", 10, FontStyle.Bold);
}
private void btnClear_Click(object sender, EventArgs e)
{
DialogResult dr = MessageBox.Show("您好,是否确认删除所有报警日志,清除后将不可恢复!?", "删除报警日志", MessageBoxButtons.YesNo);
if (DialogResult.Yes == dr)
{
new ALARM_LOG().DeleteAll();
updateListView();
}
}
}
}

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,185 @@
using EPSON_SOCKET;
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 ZWGXPICK_SYS
{
public partial class Android_IO_Form : Form
{
private int curIndex = 0;
private EPSON_SOCKET.EPSON_SOCKET epsonSocket1 = null;
public Android_IO_Form(EPSON_SOCKET.EPSON_SOCKET epsonSocket)
{
InitializeComponent();
this.epsonSocket1 = epsonSocket;
this.epsonSocket1.rec_data_refresh += this.epsonSocket_rec_data_refresh;
}
// 窗口关闭保存参数.
private void Android_IO_Form_FormClosing(object sender, FormClosingEventArgs e)
{
this.epsonSocket1.rec_data_refresh -= this.epsonSocket_rec_data_refresh;
}
private void Android_IO_Form_Load(object sender, EventArgs e)
{
this.CenterToScreen();
btnrefresh_Click(sender,e);
}
private void btnrefresh_Click(object sender, EventArgs e)
{
this.progressBar1.Maximum = 24 + 16;
this.progressBar1.Value = 0;
this.progressBar1.Show();
this.curIndex = 0;
// 发送所有输入查询指令.
string cmd = String.Format("$execute,\"print \"ri{0}=\", sw({0})\"", 0);
if (this.epsonSocket1.IsConnection)
this.epsonSocket1.tcp_send(cmd);
/*
//发送所有输出查询指令.
for (int i = 0; i < 16; i++)
{
string cmd = String.Format("$execute,\"print \"ro{0}=\", oport({0})\"", i);
if (this.epsonSocket1.IsConnection)
this.epsonSocket1.tcp_send(cmd);
System.Threading.Thread.Sleep(500);
Application.DoEvents();
}
*/
}
// 响应不同的点击命令.
private void RO0_CheckedChanged(object sender, EventArgs e)
{
}
private void RO0_Click(object sender, EventArgs e)
{
CheckBox obj = (CheckBox)sender;
String ctrlName = obj.Name;
ctrlName = ctrlName.Replace("RO", "");
int nIndex = 0; int.TryParse(ctrlName, out nIndex);
int nChecked = ((obj.Checked == true) ? 1 : 0);
// 生成命令并发送.
String cmd = String.Format("$setio,{0},{1}", nIndex, nChecked);
if (this.epsonSocket1.IsConnection)
this.epsonSocket1.tcp_send(cmd);
// 更新控件显示颜色.
obj.BackColor = Color.FromArgb(192, 192, 255);
if (obj.Checked) obj.BackColor = Color.Red;
// 自动刷新状态.
btnrefresh_Click(sender, e);
}
// 接收到数据的响应函数.
private void epsonSocket_rec_data_refresh(object sender, EventArgs e)
{
EventArgsCmd cmd = (EventArgsCmd)e;
if (cmd == null) return;
String str = cmd.Str;
String[] result = str.Split(',');
switch (cmd.Cmd)
{
case "execute":
{
if (str.IndexOf("execute,ri") >= 0)
{
String[] code = result[1].Split('=');
if (code.Length >= 2) updateRIStatus(code[0], code[1]);
String temp = code[1].Replace("RI", "");
int nIndex = 0; int.TryParse(temp, out nIndex);
this.curIndex++;
this.progressBar1.Value++;
if (this.curIndex < 24)
{
string send = String.Format("$execute,\"print \"ri{0}=\", sw({0})\"", this.curIndex);
if (this.epsonSocket1.IsConnection)
this.epsonSocket1.tcp_send(send);
}
else
{
// 发送指令2
this.curIndex = 0;
string send = String.Format("$execute,\"print \"ro{0}=\", oport({0})\"", this.curIndex);
if (this.epsonSocket1.IsConnection)
this.epsonSocket1.tcp_send(send);
}
}
else if (str.IndexOf("execute,ro") >= 0)
{
String[] code = result[1].Split('=');
if (code.Length >= 2) updateROStatus(code[0], code[1]);
String temp = code[1].Replace("RO", "");
int nIndex = 0; int.TryParse(temp, out nIndex);
this.curIndex++;
this.progressBar1.Value++;
if (this.curIndex < 16)
{
// 发送指令2
string send = String.Format("$execute,\"print \"ro{0}=\", oport({0})\"", this.curIndex);
if (this.epsonSocket1.IsConnection)
this.epsonSocket1.tcp_send(send);
}
else
{
this.progressBar1.Hide();
}
}
}
break;
default:
break;
}
}
// 更新控件状态.
private void updateRIStatus(string ctrlName,string sChecked)
{
Control[] controls = this.Controls.Find(ctrlName.ToUpper(), true);
if ((controls == null) || (controls.Length <= 0))
{
return;
}
Label obj = (Label)controls[0];
if (obj != null)
{
obj.Tag = sChecked;
int nChecked = 0; int.TryParse(sChecked,out nChecked);
obj.BackColor = Color.FromArgb(192, 192, 255);
if (nChecked > 0) obj.BackColor = Color.Red;
}
}
// 更新输出控件状态.
private void updateROStatus(String ctrlName, string sChecked)
{
CheckBox obj = (CheckBox)this.Controls.Find(ctrlName.ToUpper(), true)[0];
if (obj != null)
{
int nChecked = 0; int.TryParse(sChecked, out nChecked);
obj.Checked = (nChecked > 0) ? true : false;
obj.BackColor = Color.FromArgb(192, 192, 255);
if (nChecked > 0) obj.BackColor = Color.Red;
}
}
}
}

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
</configuration>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,74 @@
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 ZWGXPICK_SYS
{
public partial class Dash_Change_Form : Form
{
private float X;
private float Y;
public Dash_Change_Form()
{
InitializeComponent();
}
private void Dash_ChangeParam_Form_Load(object sender, EventArgs e)
{
this.Resize += new EventHandler(Form1_Resize);
X = this.Width;
Y = this.Height;
setTag(this);
Form1_Resize(new object(), new EventArgs());//x,y可在实例化时赋值,最后这句是新加的在MDI时有用
this.CenterToScreen();
}
private void setTag(Control cons)
{
foreach (Control con in cons.Controls)
{
con.Tag = con.Width + ":" + con.Height + ":" + con.Left + ":" + con.Top + ":" + con.Font.Size;
if (con.Controls.Count > 0)
setTag(con);
}
}
private void setControls(float newx, float newy, Control cons)
{
foreach (Control con in cons.Controls)
{
if (con.Tag == null) continue;
string[] mytag = con.Tag.ToString().Split(new char[] { ':' });
float a = Convert.ToSingle(mytag[0]) * newx;
con.Width = (int)a;
a = Convert.ToSingle(mytag[1]) * newy;
con.Height = (int)(a);
a = Convert.ToSingle(mytag[2]) * newx;
con.Left = (int)(a);
a = Convert.ToSingle(mytag[3]) * newy;
con.Top = (int)(a);
Single currentSize = Convert.ToSingle(mytag[4]) * Math.Min(newx, newy);
con.Font = new Font(con.Font.Name, currentSize, con.Font.Style, con.Font.Unit);
if (con.Controls.Count > 0)
{
setControls(newx, newy, con);
}
}
}
void Form1_Resize(object sender, EventArgs e)
{
float newx = (this.Width) / X;
float newy = this.Height / Y;
setControls(newx, newy, this);
// this.Text = this.Width.ToString() + " " + this.Height.ToString();
}
}
}

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

@ -0,0 +1,146 @@
namespace ZWGXPICK_SYS
{
partial class frmAndroidIP
{
/// <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.label1 = new System.Windows.Forms.Label();
this.txtIpAddress = new System.Windows.Forms.TextBox();
this.txtAdminPort = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.btnOk = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.txtDataPort = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 14);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(81, 27);
this.label1.TabIndex = 0;
this.label1.Text = "IP地址: ";
//
// txtIpAddress
//
this.txtIpAddress.Location = new System.Drawing.Point(126, 11);
this.txtIpAddress.Name = "txtIpAddress";
this.txtIpAddress.Size = new System.Drawing.Size(235, 34);
this.txtIpAddress.TabIndex = 1;
//
// txtAdminPort
//
this.txtAdminPort.Location = new System.Drawing.Point(126, 53);
this.txtAdminPort.Name = "txtAdminPort";
this.txtAdminPort.Size = new System.Drawing.Size(235, 34);
this.txtAdminPort.TabIndex = 3;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 56);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(103, 27);
this.label2.TabIndex = 2;
this.label2.Text = "控制端口: ";
//
// btnOk
//
this.btnOk.Location = new System.Drawing.Point(126, 136);
this.btnOk.Name = "btnOk";
this.btnOk.Size = new System.Drawing.Size(102, 42);
this.btnOk.TabIndex = 4;
this.btnOk.Text = "确定(&O)";
this.btnOk.UseVisualStyleBackColor = true;
this.btnOk.Click += new System.EventHandler(this.btnOK_Click);
//
// btnCancel
//
this.btnCancel.Location = new System.Drawing.Point(259, 136);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(102, 42);
this.btnCancel.TabIndex = 4;
this.btnCancel.Text = "取消(&C)";
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(12, 96);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(103, 27);
this.label3.TabIndex = 2;
this.label3.Text = "数据端口: ";
//
// txtDataPort
//
this.txtDataPort.Location = new System.Drawing.Point(126, 93);
this.txtDataPort.Name = "txtDataPort";
this.txtDataPort.Size = new System.Drawing.Size(235, 34);
this.txtDataPort.TabIndex = 3;
//
// frmAndroidIP
//
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 27F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
this.ClientSize = new System.Drawing.Size(373, 204);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnOk);
this.Controls.Add(this.txtDataPort);
this.Controls.Add(this.label3);
this.Controls.Add(this.txtAdminPort);
this.Controls.Add(this.label2);
this.Controls.Add(this.txtIpAddress);
this.Controls.Add(this.label1);
this.Font = new System.Drawing.Font("Microsoft YaHei", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Margin = new System.Windows.Forms.Padding(6);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "frmAndroidIP";
this.Text = "机器人参数配置";
this.Load += new System.EventHandler(this.FrmAndroidIP_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtIpAddress;
private System.Windows.Forms.TextBox txtAdminPort;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button btnOk;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtDataPort;
}
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,80 @@
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 ZWGXPICK_SYS
{
public partial class PLC_IO_Form : Form
{
public PLC_IO_Form()
{
InitializeComponent();
}
private float X;
private float Y;
private void setTag(Control cons)
{
foreach (Control con in cons.Controls)
{
con.Tag = con.Width + ":" + con.Height + ":" + con.Left + ":" + con.Top + ":" + con.Font.Size;
if (con.Controls.Count > 0)
setTag(con);
}
}
private void setControls(float newx, float newy, Control cons)
{
foreach (Control con in cons.Controls)
{
if (con.Tag == null) continue;
string[] mytag = con.Tag.ToString().Split(new char[] { ':' });
float a = Convert.ToSingle(mytag[0]) * newx;
con.Width = (int)a;
a = Convert.ToSingle(mytag[1]) * newy;
con.Height = (int)(a);
a = Convert.ToSingle(mytag[2]) * newx;
con.Left = (int)(a);
a = Convert.ToSingle(mytag[3]) * newy;
con.Top = (int)(a);
Single currentSize = Convert.ToSingle(mytag[4]) * Math.Min(newx, newy);
con.Font = new Font(con.Font.Name, currentSize, con.Font.Style, con.Font.Unit);
if (con.Controls.Count > 0)
{
setControls(newx, newy, con);
}
}
}
void Form1_Resize(object sender, EventArgs e)
{
float newx = (this.Width) / X;
float newy = this.Height / Y;
setControls(newx, newy, this);
// this.Text = this.Width.ToString() + " " + this.Height.ToString();
}
private void PLC_IO_Form_Load(object sender, EventArgs e)
{
this.Resize += new EventHandler(Form1_Resize);
X = this.Width;
Y = this.Height;
setTag(this);
Form1_Resize(new object(), new EventArgs());//x,y可在实例化时赋值,最后这句是新加的在MDI时有用
this.CenterToScreen();
}
}
}

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>61</value>
</metadata>
</root>

@ -0,0 +1,720 @@
namespace ZWGXPICK_SYS
{
partial class Point_Data_Form
{
/// <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.panel2 = new System.Windows.Forms.Panel();
this.btnZplus = new System.Windows.Forms.Button();
this.btnZsub = new System.Windows.Forms.Button();
this.btnXplus = new System.Windows.Forms.Button();
this.btnXsub = new System.Windows.Forms.Button();
this.btnUsub = new System.Windows.Forms.Button();
this.btnUplus = new System.Windows.Forms.Button();
this.btnYsub = new System.Windows.Forms.Button();
this.btnYplus = new System.Windows.Forms.Button();
this.panel3 = new System.Windows.Forms.Panel();
this.RO6 = new System.Windows.Forms.CheckBox();
this.RO5 = new System.Windows.Forms.CheckBox();
this.btnMotoOff = new System.Windows.Forms.Button();
this.btnMotoOn = new System.Windows.Forms.Button();
this.btnSetSpeed = new System.Windows.Forms.Button();
this.panel4 = new System.Windows.Forms.Panel();
this.panel6 = new System.Windows.Forms.Panel();
this.label15 = new System.Windows.Forms.Label();
this.txtRealTimePointU = new System.Windows.Forms.TextBox();
this.txtRealTimePointZ = new System.Windows.Forms.TextBox();
this.txtRealTimePointY = new System.Windows.Forms.TextBox();
this.txtRealTimePointX = new System.Windows.Forms.TextBox();
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.panel5 = new System.Windows.Forms.Panel();
this.txtCurrentPointU = new System.Windows.Forms.TextBox();
this.txtCurrentPointZ = new System.Windows.Forms.TextBox();
this.txtCurrentPointY = new System.Windows.Forms.TextBox();
this.txtCurrentPointX = new System.Windows.Forms.TextBox();
this.label6 = 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.btnRealtimePoint = new System.Windows.Forms.Button();
this.btnCurrentPoint = new System.Windows.Forms.Button();
this.combCmd = new System.Windows.Forms.ComboBox();
this.combPoint = new System.Windows.Forms.ComboBox();
this.txtStepLength = new System.Windows.Forms.TextBox();
this.txtSpeed = new System.Windows.Forms.TextBox();
this.btnTeach = new System.Windows.Forms.Button();
this.btnSavePoint = new System.Windows.Forms.Button();
this.btnExecute = new System.Windows.Forms.Button();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.panel2.SuspendLayout();
this.panel3.SuspendLayout();
this.panel4.SuspendLayout();
this.panel6.SuspendLayout();
this.panel5.SuspendLayout();
this.SuspendLayout();
//
// panel2
//
this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel2.Controls.Add(this.btnZplus);
this.panel2.Controls.Add(this.btnZsub);
this.panel2.Controls.Add(this.btnXplus);
this.panel2.Controls.Add(this.btnXsub);
this.panel2.Controls.Add(this.btnUsub);
this.panel2.Controls.Add(this.btnUplus);
this.panel2.Controls.Add(this.btnYsub);
this.panel2.Controls.Add(this.btnYplus);
this.panel2.Location = new System.Drawing.Point(2, 1);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(353, 307);
this.panel2.TabIndex = 232;
//
// btnZplus
//
this.btnZplus.Enabled = false;
this.btnZplus.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnZplus.Image = global::ZWGXPICK_SYS.Properties.Resources.top;
this.btnZplus.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
this.btnZplus.Location = new System.Drawing.Point(264, 10);
this.btnZplus.Name = "btnZplus";
this.btnZplus.Size = new System.Drawing.Size(74, 68);
this.btnZplus.TabIndex = 204;
this.btnZplus.Text = "Z+";
this.btnZplus.UseVisualStyleBackColor = true;
this.btnZplus.Click += new System.EventHandler(this.btnZplus_Click);
//
// btnZsub
//
this.btnZsub.Enabled = false;
this.btnZsub.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnZsub.Image = global::ZWGXPICK_SYS.Properties.Resources.down;
this.btnZsub.ImageAlign = System.Drawing.ContentAlignment.BottomCenter;
this.btnZsub.Location = new System.Drawing.Point(264, 152);
this.btnZsub.Name = "btnZsub";
this.btnZsub.Size = new System.Drawing.Size(74, 68);
this.btnZsub.TabIndex = 203;
this.btnZsub.Text = "Z-";
this.btnZsub.UseVisualStyleBackColor = true;
this.btnZsub.Click += new System.EventHandler(this.btnZsub_Click);
//
// btnXplus
//
this.btnXplus.Enabled = false;
this.btnXplus.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnXplus.Image = global::ZWGXPICK_SYS.Properties.Resources.left;
this.btnXplus.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnXplus.Location = new System.Drawing.Point(16, 87);
this.btnXplus.Name = "btnXplus";
this.btnXplus.Size = new System.Drawing.Size(74, 68);
this.btnXplus.TabIndex = 202;
this.btnXplus.Text = " X+";
this.btnXplus.UseVisualStyleBackColor = true;
this.btnXplus.Click += new System.EventHandler(this.btnXplus_Click);
//
// btnXsub
//
this.btnXsub.Enabled = false;
this.btnXsub.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnXsub.Image = global::ZWGXPICK_SYS.Properties.Resources.right;
this.btnXsub.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.btnXsub.Location = new System.Drawing.Point(181, 87);
this.btnXsub.Name = "btnXsub";
this.btnXsub.Size = new System.Drawing.Size(74, 68);
this.btnXsub.TabIndex = 201;
this.btnXsub.Text = "X-";
this.btnXsub.UseVisualStyleBackColor = true;
this.btnXsub.Click += new System.EventHandler(this.btnXsub_Click);
//
// btnUsub
//
this.btnUsub.Enabled = false;
this.btnUsub.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnUsub.Image = global::ZWGXPICK_SYS.Properties.Resources.right_rotation;
this.btnUsub.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
this.btnUsub.Location = new System.Drawing.Point(186, 224);
this.btnUsub.Name = "btnUsub";
this.btnUsub.Size = new System.Drawing.Size(74, 68);
this.btnUsub.TabIndex = 200;
this.btnUsub.Text = "U-";
this.btnUsub.UseVisualStyleBackColor = true;
this.btnUsub.Click += new System.EventHandler(this.btnUsub_Click);
//
// btnUplus
//
this.btnUplus.Enabled = false;
this.btnUplus.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnUplus.Image = global::ZWGXPICK_SYS.Properties.Resources.left_rotation;
this.btnUplus.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
this.btnUplus.Location = new System.Drawing.Point(14, 224);
this.btnUplus.Name = "btnUplus";
this.btnUplus.Size = new System.Drawing.Size(74, 68);
this.btnUplus.TabIndex = 200;
this.btnUplus.Text = "U+";
this.btnUplus.UseVisualStyleBackColor = true;
this.btnUplus.Click += new System.EventHandler(this.btnUplus_Click);
//
// btnYsub
//
this.btnYsub.Enabled = false;
this.btnYsub.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnYsub.Image = global::ZWGXPICK_SYS.Properties.Resources.top;
this.btnYsub.ImageAlign = System.Drawing.ContentAlignment.BottomCenter;
this.btnYsub.Location = new System.Drawing.Point(100, 17);
this.btnYsub.Name = "btnYsub";
this.btnYsub.Size = new System.Drawing.Size(74, 68);
this.btnYsub.TabIndex = 200;
this.btnYsub.Text = "Y-";
this.btnYsub.UseVisualStyleBackColor = true;
this.btnYsub.Click += new System.EventHandler(this.btnYsub_Click);
//
// btnYplus
//
this.btnYplus.Enabled = false;
this.btnYplus.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnYplus.Image = global::ZWGXPICK_SYS.Properties.Resources.down;
this.btnYplus.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
this.btnYplus.Location = new System.Drawing.Point(100, 152);
this.btnYplus.Name = "btnYplus";
this.btnYplus.Size = new System.Drawing.Size(74, 68);
this.btnYplus.TabIndex = 199;
this.btnYplus.Text = "Y+";
this.btnYplus.UseVisualStyleBackColor = true;
this.btnYplus.Click += new System.EventHandler(this.btnYplus_Click);
//
// panel3
//
this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel3.Controls.Add(this.RO6);
this.panel3.Controls.Add(this.RO5);
this.panel3.Controls.Add(this.btnMotoOff);
this.panel3.Controls.Add(this.btnMotoOn);
this.panel3.Controls.Add(this.btnSetSpeed);
this.panel3.Location = new System.Drawing.Point(361, 1);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(199, 308);
this.panel3.TabIndex = 233;
//
// RO6
//
this.RO6.Appearance = System.Windows.Forms.Appearance.Button;
this.RO6.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red;
this.RO6.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.RO6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.RO6.Location = new System.Drawing.Point(3, 228);
this.RO6.Name = "RO6";
this.RO6.Size = new System.Drawing.Size(191, 52);
this.RO6.TabIndex = 240;
this.RO6.Text = "RO6气爪";
this.RO6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.RO6.UseVisualStyleBackColor = true;
this.RO6.Click += new System.EventHandler(this.RO0_Click);
//
// RO5
//
this.RO5.Appearance = System.Windows.Forms.Appearance.Button;
this.RO5.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red;
this.RO5.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.RO5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.RO5.Location = new System.Drawing.Point(3, 171);
this.RO5.Name = "RO5";
this.RO5.Size = new System.Drawing.Size(191, 52);
this.RO5.TabIndex = 241;
this.RO5.Text = "RO5真空";
this.RO5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.RO5.UseVisualStyleBackColor = true;
this.RO5.Click += new System.EventHandler(this.RO0_Click);
//
// btnMotoOff
//
this.btnMotoOff.Enabled = false;
this.btnMotoOff.Font = new System.Drawing.Font("微软雅黑", 12F);
this.btnMotoOff.Location = new System.Drawing.Point(3, 114);
this.btnMotoOff.Name = "btnMotoOff";
this.btnMotoOff.Size = new System.Drawing.Size(191, 52);
this.btnMotoOff.TabIndex = 205;
this.btnMotoOff.Text = "电机关(&F)";
this.btnMotoOff.UseVisualStyleBackColor = true;
this.btnMotoOff.Click += new System.EventHandler(this.btnMotoOff_Click);
//
// btnMotoOn
//
this.btnMotoOn.Enabled = false;
this.btnMotoOn.Font = new System.Drawing.Font("微软雅黑", 12F);
this.btnMotoOn.Location = new System.Drawing.Point(3, 58);
this.btnMotoOn.Name = "btnMotoOn";
this.btnMotoOn.Size = new System.Drawing.Size(191, 52);
this.btnMotoOn.TabIndex = 205;
this.btnMotoOn.Text = "电机开(&O)";
this.btnMotoOn.UseVisualStyleBackColor = true;
this.btnMotoOn.Click += new System.EventHandler(this.btnMotoOn_Click);
//
// btnSetSpeed
//
this.btnSetSpeed.Font = new System.Drawing.Font("微软雅黑", 12F);
this.btnSetSpeed.Location = new System.Drawing.Point(3, 3);
this.btnSetSpeed.Name = "btnSetSpeed";
this.btnSetSpeed.Size = new System.Drawing.Size(191, 52);
this.btnSetSpeed.TabIndex = 239;
this.btnSetSpeed.Text = "设置速度(&S)";
this.btnSetSpeed.UseVisualStyleBackColor = true;
this.btnSetSpeed.Click += new System.EventHandler(this.btnSetSpeed_Click);
//
// panel4
//
this.panel4.Controls.Add(this.panel6);
this.panel4.Controls.Add(this.panel5);
this.panel4.Controls.Add(this.btnRealtimePoint);
this.panel4.Controls.Add(this.btnCurrentPoint);
this.panel4.Controls.Add(this.combCmd);
this.panel4.Controls.Add(this.combPoint);
this.panel4.Controls.Add(this.txtStepLength);
this.panel4.Controls.Add(this.txtSpeed);
this.panel4.Controls.Add(this.btnTeach);
this.panel4.Controls.Add(this.btnSavePoint);
this.panel4.Controls.Add(this.btnExecute);
this.panel4.Controls.Add(this.label5);
this.panel4.Controls.Add(this.label4);
this.panel4.Controls.Add(this.label2);
this.panel4.Controls.Add(this.label1);
this.panel4.Location = new System.Drawing.Point(2, 314);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(558, 256);
this.panel4.TabIndex = 234;
//
// panel6
//
this.panel6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel6.Controls.Add(this.label15);
this.panel6.Controls.Add(this.txtRealTimePointU);
this.panel6.Controls.Add(this.txtRealTimePointZ);
this.panel6.Controls.Add(this.txtRealTimePointY);
this.panel6.Controls.Add(this.txtRealTimePointX);
this.panel6.Controls.Add(this.label10);
this.panel6.Controls.Add(this.label9);
this.panel6.Controls.Add(this.label8);
this.panel6.Controls.Add(this.label7);
this.panel6.Location = new System.Drawing.Point(371, 4);
this.panel6.Name = "panel6";
this.panel6.Size = new System.Drawing.Size(178, 180);
this.panel6.TabIndex = 262;
//
// label15
//
this.label15.AutoSize = true;
this.label15.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label15.Location = new System.Drawing.Point(4, 4);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(99, 25);
this.label15.TabIndex = 268;
this.label15.Text = "实时坐标: ";
//
// txtRealTimePointU
//
this.txtRealTimePointU.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txtRealTimePointU.Location = new System.Drawing.Point(56, 137);
this.txtRealTimePointU.Name = "txtRealTimePointU";
this.txtRealTimePointU.Size = new System.Drawing.Size(109, 33);
this.txtRealTimePointU.TabIndex = 267;
//
// txtRealTimePointZ
//
this.txtRealTimePointZ.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txtRealTimePointZ.Location = new System.Drawing.Point(56, 104);
this.txtRealTimePointZ.Name = "txtRealTimePointZ";
this.txtRealTimePointZ.Size = new System.Drawing.Size(109, 33);
this.txtRealTimePointZ.TabIndex = 266;
//
// txtRealTimePointY
//
this.txtRealTimePointY.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txtRealTimePointY.Location = new System.Drawing.Point(56, 71);
this.txtRealTimePointY.Name = "txtRealTimePointY";
this.txtRealTimePointY.Size = new System.Drawing.Size(109, 33);
this.txtRealTimePointY.TabIndex = 265;
//
// txtRealTimePointX
//
this.txtRealTimePointX.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txtRealTimePointX.Location = new System.Drawing.Point(56, 39);
this.txtRealTimePointX.Name = "txtRealTimePointX";
this.txtRealTimePointX.Size = new System.Drawing.Size(109, 33);
this.txtRealTimePointX.TabIndex = 264;
//
// label10
//
this.label10.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label10.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label10.Location = new System.Drawing.Point(3, 138);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(48, 30);
this.label10.TabIndex = 263;
this.label10.Text = "U";
//
// label9
//
this.label9.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label9.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label9.Location = new System.Drawing.Point(3, 105);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(48, 30);
this.label9.TabIndex = 262;
this.label9.Text = "Z";
//
// label8
//
this.label8.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label8.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label8.Location = new System.Drawing.Point(3, 72);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(48, 30);
this.label8.TabIndex = 261;
this.label8.Text = "Y";
//
// label7
//
this.label7.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label7.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label7.Location = new System.Drawing.Point(3, 40);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(48, 30);
this.label7.TabIndex = 260;
this.label7.Text = "X:";
//
// panel5
//
this.panel5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel5.Controls.Add(this.txtCurrentPointU);
this.panel5.Controls.Add(this.txtCurrentPointZ);
this.panel5.Controls.Add(this.txtCurrentPointY);
this.panel5.Controls.Add(this.txtCurrentPointX);
this.panel5.Controls.Add(this.label6);
this.panel5.Controls.Add(this.label11);
this.panel5.Controls.Add(this.label12);
this.panel5.Controls.Add(this.label13);
this.panel5.Controls.Add(this.label14);
this.panel5.Location = new System.Drawing.Point(190, 4);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(175, 180);
this.panel5.TabIndex = 261;
//
// txtCurrentPointU
//
this.txtCurrentPointU.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txtCurrentPointU.Location = new System.Drawing.Point(56, 135);
this.txtCurrentPointU.Name = "txtCurrentPointU";
this.txtCurrentPointU.Size = new System.Drawing.Size(109, 33);
this.txtCurrentPointU.TabIndex = 272;
//
// txtCurrentPointZ
//
this.txtCurrentPointZ.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txtCurrentPointZ.Location = new System.Drawing.Point(56, 101);
this.txtCurrentPointZ.Name = "txtCurrentPointZ";
this.txtCurrentPointZ.Size = new System.Drawing.Size(109, 33);
this.txtCurrentPointZ.TabIndex = 271;
//
// txtCurrentPointY
//
this.txtCurrentPointY.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txtCurrentPointY.Location = new System.Drawing.Point(56, 68);
this.txtCurrentPointY.Name = "txtCurrentPointY";
this.txtCurrentPointY.Size = new System.Drawing.Size(109, 33);
this.txtCurrentPointY.TabIndex = 270;
//
// txtCurrentPointX
//
this.txtCurrentPointX.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txtCurrentPointX.Location = new System.Drawing.Point(56, 36);
this.txtCurrentPointX.Name = "txtCurrentPointX";
this.txtCurrentPointX.Size = new System.Drawing.Size(109, 33);
this.txtCurrentPointX.TabIndex = 269;
//
// label6
//
this.label6.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label6.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label6.Location = new System.Drawing.Point(3, 135);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(48, 30);
this.label6.TabIndex = 268;
this.label6.Text = "U";
//
// label11
//
this.label11.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label11.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label11.Location = new System.Drawing.Point(3, 102);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(48, 30);
this.label11.TabIndex = 267;
this.label11.Text = "Z";
//
// label12
//
this.label12.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label12.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label12.Location = new System.Drawing.Point(3, 70);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(48, 30);
this.label12.TabIndex = 266;
this.label12.Text = "Y";
//
// label13
//
this.label13.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label13.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label13.Location = new System.Drawing.Point(3, 36);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(48, 30);
this.label13.TabIndex = 265;
this.label13.Text = "X:";
//
// label14
//
this.label14.AutoSize = true;
this.label14.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label14.Location = new System.Drawing.Point(4, 4);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(99, 25);
this.label14.TabIndex = 232;
this.label14.Text = "当前点位: ";
//
// btnRealtimePoint
//
this.btnRealtimePoint.Font = new System.Drawing.Font("微软雅黑", 10F);
this.btnRealtimePoint.Location = new System.Drawing.Point(280, 194);
this.btnRealtimePoint.Name = "btnRealtimePoint";
this.btnRealtimePoint.Size = new System.Drawing.Size(83, 50);
this.btnRealtimePoint.TabIndex = 251;
this.btnRealtimePoint.Text = "实时点位(&T)";
this.btnRealtimePoint.UseVisualStyleBackColor = true;
this.btnRealtimePoint.Click += new System.EventHandler(this.btnRealtimePoint_Click);
//
// btnCurrentPoint
//
this.btnCurrentPoint.Font = new System.Drawing.Font("微软雅黑", 10F);
this.btnCurrentPoint.Location = new System.Drawing.Point(192, 194);
this.btnCurrentPoint.Name = "btnCurrentPoint";
this.btnCurrentPoint.Size = new System.Drawing.Size(83, 50);
this.btnCurrentPoint.TabIndex = 251;
this.btnCurrentPoint.Text = "当前点位(&R)";
this.btnCurrentPoint.UseVisualStyleBackColor = true;
this.btnCurrentPoint.Click += new System.EventHandler(this.btnCurrentPoint_Click);
//
// combCmd
//
this.combCmd.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.combCmd.Font = new System.Drawing.Font("微软雅黑", 12F);
this.combCmd.FormattingEnabled = true;
this.combCmd.Location = new System.Drawing.Point(75, 139);
this.combCmd.Name = "combCmd";
this.combCmd.Size = new System.Drawing.Size(109, 29);
this.combCmd.TabIndex = 250;
//
// combPoint
//
this.combPoint.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.combPoint.Font = new System.Drawing.Font("微软雅黑", 10F);
this.combPoint.FormattingEnabled = true;
this.combPoint.Location = new System.Drawing.Point(75, 107);
this.combPoint.Name = "combPoint";
this.combPoint.Size = new System.Drawing.Size(109, 27);
this.combPoint.TabIndex = 249;
//
// txtStepLength
//
this.txtStepLength.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txtStepLength.Location = new System.Drawing.Point(75, 68);
this.txtStepLength.Name = "txtStepLength";
this.txtStepLength.Size = new System.Drawing.Size(109, 33);
this.txtStepLength.TabIndex = 248;
//
// txtSpeed
//
this.txtSpeed.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txtSpeed.Location = new System.Drawing.Point(75, 36);
this.txtSpeed.Name = "txtSpeed";
this.txtSpeed.Size = new System.Drawing.Size(109, 33);
this.txtSpeed.TabIndex = 247;
//
// btnTeach
//
this.btnTeach.Font = new System.Drawing.Font("微软雅黑", 10F);
this.btnTeach.Location = new System.Drawing.Point(371, 194);
this.btnTeach.Name = "btnTeach";
this.btnTeach.Size = new System.Drawing.Size(83, 50);
this.btnTeach.TabIndex = 246;
this.btnTeach.Text = "示教(&T)";
this.btnTeach.UseVisualStyleBackColor = true;
this.btnTeach.Click += new System.EventHandler(this.btnTeach_Click);
//
// btnSavePoint
//
this.btnSavePoint.Font = new System.Drawing.Font("微软雅黑", 10F);
this.btnSavePoint.Location = new System.Drawing.Point(461, 195);
this.btnSavePoint.Name = "btnSavePoint";
this.btnSavePoint.Size = new System.Drawing.Size(83, 50);
this.btnSavePoint.TabIndex = 246;
this.btnSavePoint.Text = "保存(&S)";
this.btnSavePoint.UseVisualStyleBackColor = true;
this.btnSavePoint.Click += new System.EventHandler(this.btnSavePoint_Click);
//
// btnExecute
//
this.btnExecute.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnExecute.Location = new System.Drawing.Point(17, 194);
this.btnExecute.Name = "btnExecute";
this.btnExecute.Size = new System.Drawing.Size(159, 47);
this.btnExecute.TabIndex = 239;
this.btnExecute.Text = "执行";
this.btnExecute.UseVisualStyleBackColor = true;
this.btnExecute.Click += new System.EventHandler(this.btnExecute_Click);
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label5.Location = new System.Drawing.Point(11, 143);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(61, 25);
this.label5.TabIndex = 234;
this.label5.Text = "命令: ";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label4.Location = new System.Drawing.Point(8, 109);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(61, 25);
this.label4.TabIndex = 233;
this.label4.Text = "点位: ";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.Location = new System.Drawing.Point(10, 76);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(61, 25);
this.label2.TabIndex = 232;
this.label2.Text = "步距: ";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(9, 44);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(61, 25);
this.label1.TabIndex = 231;
this.label1.Text = "速度: ";
//
// Point_Data_Form
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
this.ClientSize = new System.Drawing.Size(564, 591);
this.Controls.Add(this.panel4);
this.Controls.Add(this.panel3);
this.Controls.Add(this.panel2);
this.Name = "Point_Data_Form";
this.Text = "点位设置";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Point_Data_Form_FormClosing);
this.Load += new System.EventHandler(this.Point_Data_Form_Load);
this.panel2.ResumeLayout(false);
this.panel3.ResumeLayout(false);
this.panel4.ResumeLayout(false);
this.panel4.PerformLayout();
this.panel6.ResumeLayout(false);
this.panel6.PerformLayout();
this.panel5.ResumeLayout(false);
this.panel5.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Button btnZplus;
private System.Windows.Forms.Button btnZsub;
private System.Windows.Forms.Button btnXplus;
private System.Windows.Forms.Button btnXsub;
private System.Windows.Forms.Button btnYsub;
private System.Windows.Forms.Button btnYplus;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Panel panel4;
private System.Windows.Forms.Button btnCurrentPoint;
private System.Windows.Forms.ComboBox combCmd;
private System.Windows.Forms.ComboBox combPoint;
private System.Windows.Forms.TextBox txtStepLength;
private System.Windows.Forms.TextBox txtSpeed;
private System.Windows.Forms.Button btnSavePoint;
private System.Windows.Forms.Button btnExecute;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Panel panel5;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.TextBox txtCurrentPointU;
private System.Windows.Forms.TextBox txtCurrentPointZ;
private System.Windows.Forms.TextBox txtCurrentPointY;
private System.Windows.Forms.TextBox txtCurrentPointX;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Panel panel6;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.TextBox txtRealTimePointU;
private System.Windows.Forms.TextBox txtRealTimePointZ;
private System.Windows.Forms.TextBox txtRealTimePointY;
private System.Windows.Forms.TextBox txtRealTimePointX;
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.Button btnTeach;
private System.Windows.Forms.Button btnMotoOff;
private System.Windows.Forms.Button btnMotoOn;
private System.Windows.Forms.Button btnUsub;
private System.Windows.Forms.Button btnUplus;
private System.Windows.Forms.Button btnSetSpeed;
private System.Windows.Forms.Button btnRealtimePoint;
private System.Windows.Forms.CheckBox RO6;
private System.Windows.Forms.CheckBox RO5;
}
}

@ -0,0 +1,505 @@
using EPSON_SOCKET;
using Maticsoft.DBUtility;
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 ZWGXPICK_SYS
{
public partial class Point_Data_Form : Form
{
private float X;
private float Y;
private bool isDirty = false; // 数据是否需要保存.
private EPSON_SOCKET.EPSON_SOCKET epsonSocket1 = null;
public Point_Data_Form(EPSON_SOCKET.EPSON_SOCKET epsonSocket)
{
InitializeComponent();
this.epsonSocket1 = epsonSocket;
this.epsonSocket1.rec_data_refresh += this.epsonSocket_rec_data_refresh;
}
// 窗口关闭保存参数.
private void Point_Data_Form_FormClosing(object sender, FormClosingEventArgs e)
{
// 当前是否是脏数据.
if (this.isDirty)
{
// 确认是否保存
DialogResult dr = MessageBox.Show("您好,当前示教点未保存,是否现在保存?", "保存", MessageBoxButtons.YesNo);
if (dr == DialogResult.Yes)
{
btnSavePoint_Click(sender, e);
System.Threading.Thread.Sleep(500);
}
}
// 去掉事件响应并保存参数.
this.epsonSocket1.rec_data_refresh -= this.epsonSocket_rec_data_refresh;
SaveConfigToIni();
}
private void setTag(Control cons)
{
foreach (Control con in cons.Controls)
{
con.Tag = con.Width + ":" + con.Height + ":" + con.Left + ":" + con.Top + ":" + con.Font.Size;
if (con.Controls.Count > 0)
setTag(con);
}
}
private void setControls(float newx, float newy, Control cons)
{
foreach (Control con in cons.Controls)
{
if (con.Tag == null) continue;
string[] mytag = con.Tag.ToString().Split(new char[] { ':' });
float a = Convert.ToSingle(mytag[0]) * newx;
con.Width = (int)a;
a = Convert.ToSingle(mytag[1]) * newy;
con.Height = (int)(a);
a = Convert.ToSingle(mytag[2]) * newx;
con.Left = (int)(a);
a = Convert.ToSingle(mytag[3]) * newy;
con.Top = (int)(a);
Single currentSize = Convert.ToSingle(mytag[4]) * Math.Min(newx, newy);
con.Font = new Font(con.Font.Name, currentSize, con.Font.Style, con.Font.Unit);
if (con.Controls.Count > 0)
{
setControls(newx, newy, con);
}
}
}
void Form1_Resize(object sender, EventArgs e)
{
float newx = (this.Width) / X;
float newy = this.Height / Y;
setControls(newx, newy, this);
// this.Text = this.Width.ToString() + " " + this.Height.ToString();
}
private void Point_Data_Form_Load(object sender, EventArgs e)
{
this.TopMost = true;
this.Resize += new EventHandler(Form1_Resize);
X = this.Width;
Y = this.Height;
String[] cnNames = { "等待位", "取件低位", "取件高位", "去毛刺低位", "去毛刺高位", "天平低位", "天平高位", "废品位", "取样低位", "取样高位", "摆件低件", "摆件高位", "安全位", "", "", "", "", "", "", "", "", "", "", "", "", "", "" };
// initialize the combo box item.
for (int i = 0; i <= 20; i++)
{
string str = String.Format("p({0})", i);
if (!String.IsNullOrEmpty(cnNames[i]))
{
str += "-" + cnNames[i].ToString();
}
combPoint.Items.Add(str);
}
// add the special item.
combCmd.Items.Add("move");
combCmd.Items.Add("go");
combPoint.SelectedIndex = 0;
combCmd.SelectedIndex = 0;
setTag(this);
Form1_Resize(new object(), new EventArgs());//x,y可在实例化时赋值,最后这句是新加的在MDI时有用
this.CenterToScreen();
LoadConfigFromIni();
}
// 从Ini加载相应的点位配置信息.
private void LoadConfigFromIni()
{
IniFile ini = new IniFile(PubConstant.config_file);
this.txtSpeed.Text = ini.ReadString("point", "txtSpeed", "");
this.txtStepLength.Text = ini.ReadString("point", "txtStepLength", "");
this.combPoint.SelectedIndex = ini.ReadInteger("point", "combPoint", 0);
this.combCmd.SelectedIndex = ini.ReadInteger("point", "combCmd", 0);
// this.txtCurrentPointX.Text = ini.ReadString("point", "txtPointX", "");
// this.txtCurrentPointY.Text = ini.ReadString("point", "txtPointY", "");
// this.txtCurrentPointZ.Text = ini.ReadString("point", "txtPointZ", "");
// this.txtCurrentPointU.Text = ini.ReadString("point", "txtPointU", "");
}
// 将点位配置信息保存到Ini中去.
private void SaveConfigToIni()
{
IniFile ini = new IniFile(PubConstant.config_file);
ini.WriteString("point", "txtSpeed", this.txtSpeed.Text);
ini.WriteString("point", "txtStepLength", this.txtStepLength.Text);
ini.WriteInteger("point", "combPoint", this.combPoint.SelectedIndex);
ini.WriteInteger("point", "combCmd", this.combCmd.SelectedIndex);
// ini.WriteString("point", "txtPointX", this.txtCurrentPointX.Text);
// ini.WriteString("point", "txtPointY", this.txtCurrentPointY.Text);
// ini.WriteString("point", "txtPointZ", this.txtCurrentPointZ.Text);
// ini.WriteString("point", "txtPointU", this.txtCurrentPointU.Text);
}
// 电机开.
private void btnMotoOn_Click(object sender, EventArgs e)
{
if (this.epsonSocket1 == null) return;
if (this.epsonSocket1.IsConnection)
{
// 发送电机开命令.
this.epsonSocket1.tcp_send("$setmotorson,1");
}
// 启动后续按钮可以工作.
this.btnMotoOff.Enabled = true;
// 停用所有按钮.
this.btnXplus.Enabled = true;
this.btnXsub.Enabled = true;
//Y
this.btnYplus.Enabled = true;
this.btnYsub.Enabled = true;
//Z
this.btnZplus.Enabled = true;
this.btnZsub.Enabled = true;
//U
this.btnUplus.Enabled = true;
this.btnUsub.Enabled = true;
}
// 电机关.
private void btnMotoOff_Click(object sender, EventArgs e)
{
// 关闭控制端口.
if (this.epsonSocket1.IsConnection)
{
// 发送电机关命令.
this.epsonSocket1.tcp_send("$setmotorsoff,1");
}
// 启动后续按钮可以工作.
this.btnMotoOff.Enabled = false;
// 停用所有按钮.
this.btnXplus.Enabled = false;
this.btnXsub.Enabled = false;
//Y
this.btnYplus.Enabled = false;
this.btnYsub.Enabled = false;
//Z
this.btnZplus.Enabled = false;
this.btnZsub.Enabled = false;
//U
this.btnUplus.Enabled = false;
this.btnUsub.Enabled = false;
}
// X+
private void btnXplus_Click(object sender, EventArgs e)
{
if (this.epsonSocket1.IsConnection)
{
int nSpeed = 0;int.TryParse(this.txtSpeed.Text, out nSpeed);
int stepLength = 0; int.TryParse(this.txtStepLength.Text, out stepLength);
if (stepLength <= 0) stepLength = 1;
string cmd = String.Format("$execute,\"power low; speed {0}; accel {0},{0}; speeds {0} * 2000 / 100; accels {0} * 25000 / 100,{0} * 25000 / 100; go here+x({1})\"",
nSpeed, stepLength);
this.epsonSocket1.tcp_send(cmd);
}
}
// X-
private void btnXsub_Click(object sender, EventArgs e)
{
if (this.epsonSocket1.IsConnection)
{
int nSpeed = 0; int.TryParse(this.txtSpeed.Text, out nSpeed);
int stepLength = 0; int.TryParse(this.txtStepLength.Text, out stepLength);
if (stepLength <= 0) stepLength = 1;
string cmd = String.Format("$execute,\"power low; speed {0}; accel {0},{0}; speeds {0} * 2000 / 100; accels {0} * 25000 / 100,{0} * 25000 / 100; go here-x({1})\"",
nSpeed, stepLength);
this.epsonSocket1.tcp_send(cmd);
}
}
// Y+
private void btnYplus_Click(object sender, EventArgs e)
{
if (this.epsonSocket1.IsConnection)
{
int nSpeed = 0; int.TryParse(this.txtSpeed.Text, out nSpeed);
int stepLength = 0; int.TryParse(this.txtStepLength.Text, out stepLength);
if (stepLength <= 0) stepLength = 1;
string cmd = String.Format("$execute,\"power low; speed {0}; accel {0},{0}; speeds {0} * 2000 / 100; accels {0} * 25000 / 100,{0} * 25000 / 100; go here+y({1})\"",
nSpeed, stepLength);
this.epsonSocket1.tcp_send(cmd);
}
}
// Y-
private void btnYsub_Click(object sender, EventArgs e)
{
if (this.epsonSocket1.IsConnection)
{
int nSpeed = 0; int.TryParse(this.txtSpeed.Text, out nSpeed);
int stepLength = 0; int.TryParse(this.txtStepLength.Text, out stepLength);
if (stepLength <= 0) stepLength = 1;
string cmd = String.Format("$execute,\"power low; speed {0}; accel {0},{0}; speeds {0} * 2000 / 100; accels {0} * 25000 / 100,{0} * 25000 / 100; go here-y({1})\"",
nSpeed, stepLength);
this.epsonSocket1.tcp_send(cmd);
}
}
// Z+
private void btnZplus_Click(object sender, EventArgs e)
{
if (this.epsonSocket1.IsConnection)
{
int nSpeed = 0; int.TryParse(this.txtSpeed.Text, out nSpeed);
int stepLength = 0; int.TryParse(this.txtStepLength.Text, out stepLength);
if (stepLength <= 0) stepLength = 1;
string cmd = String.Format("$execute,\"power low; speed {0}; accel {0},{0}; speeds {0} * 2000 / 100; accels {0} * 25000 / 100,{0} * 25000 / 100; go here+z({1})\"",
nSpeed, stepLength);
this.epsonSocket1.tcp_send(cmd);
}
}
// Z-
private void btnZsub_Click(object sender, EventArgs e)
{
if (this.epsonSocket1.IsConnection)
{
int nSpeed = 0; int.TryParse(this.txtSpeed.Text, out nSpeed);
int stepLength = 0; int.TryParse(this.txtStepLength.Text, out stepLength);
if (stepLength <= 0) stepLength = 1;
string cmd = String.Format("$execute,\"power low; speed {0}; accel {0},{0}; speeds {0} * 2000 / 100; accels {0} * 25000 / 100,{0} * 25000 / 100; go here-z({1})\"",
nSpeed, stepLength);
this.epsonSocket1.tcp_send(cmd);
}
}
// U+
private void btnUplus_Click(object sender, EventArgs e)
{
if (this.epsonSocket1.IsConnection)
{
int nSpeed = 0; int.TryParse(this.txtSpeed.Text, out nSpeed);
int stepLength = 0; int.TryParse(this.txtStepLength.Text, out stepLength);
if (stepLength <= 0) stepLength = 1;
string cmd = String.Format("$execute,\"power low; speed {0}; accel {0},{0}; speeds {0} * 2000 / 100; accels {0} * 25000 / 100,{0} * 25000 / 100; go here+u({1})\"",
nSpeed, stepLength);
this.epsonSocket1.tcp_send(cmd);
}
}
// U-
private void btnUsub_Click(object sender, EventArgs e)
{
if (this.epsonSocket1.IsConnection)
{
int nSpeed = 0; int.TryParse(this.txtSpeed.Text, out nSpeed);
int stepLength = 0; int.TryParse(this.txtStepLength.Text, out stepLength);
if (stepLength <= 0) stepLength = 1;
string cmd = String.Format("$execute,\"power low; speed {0}; accel {0},{0}; speeds {0} * 2000 / 100; accels {0} * 25000 / 100,{0} * 25000 / 100; go here-u({1})\"",
nSpeed, stepLength);
this.epsonSocket1.tcp_send(cmd);
}
}
// 速度设置.
private void btnSetSpeed_Click(object sender, EventArgs e)
{
string txtSpeed = this.txtSpeed.Text;
if (String.IsNullOrEmpty(txtSpeed))
{
MessageBox.Show("对不起,请先输入正确的速度值!");
return;
}
// 发送命令给机器人.
if (this.epsonSocket1.IsConnection)
{
string cmd = String.Format("$execute,\"speed {0}\"", txtSpeed);
this.epsonSocket1.tcp_send(cmd);
}
// 启动后续按钮可以工作.
this.btnMotoOn.Enabled = true;
}
// 执行速度设定
private void btnExecute_Click(object sender, EventArgs e)
{
if (this.epsonSocket1==null) return;
if (this.epsonSocket1.IsConnection)
{
String point = this.combPoint.Text;
if (point.IndexOf("-") > 0)
{
String[] arr = point.Split('-');
point = arr[0];
}
int nSpeed = 0; int.TryParse(this.txtSpeed.Text, out nSpeed);
if (nSpeed <= 0) nSpeed = 1;
String cmdType = this.combCmd.Text;
String cmd = String.Format("$execute,\"power low; speed {0}; accel {0},{0}; speeds {0} * 2000 / 100; accels {0} * 25000 / 100,{0} * 25000 / 100; {1} {2}\"", nSpeed, cmdType, point);
this.epsonSocket1.tcp_send(cmd);
}
}
// 读取点位置(&R)
private void btnCurrentPoint_Click(object sender, EventArgs e)
{
if (this.epsonSocket1.IsConnection)
{
string point = this.combPoint.Text;
if (point.IndexOf("-") > 0)
{
String[] arr = point.Split('-');
point = arr[0];
}
String cmd = String.Format("$execute,\"print \"current; \",\"x=\", CX({0}), \";\", \"y=\", CY({0}), \";\", \"z=\", CZ({0}), \";\", \"u=\", CU({0})\"", point);
this.epsonSocket1.tcp_send(cmd);
}
}
// 读取实时点位(&T)
private void btnRealtimePoint_Click(object sender, EventArgs e)
{
if (this.epsonSocket1.IsConnection)
{
string point = this.combPoint.Text;
if (point.IndexOf("-") > 0)
{
String[] arr = point.Split('-');
point = arr[0];
}
String cmd = String.Format("$execute,\"print \"x=\", CX(here), \";\", \"y=\", CY(here), \";\", \"z=\", CZ(here), \";\", \"u=\", CU(here)\"");
this.epsonSocket1.tcp_send(cmd);
}
}
// 示教(&T)
private void btnTeach_Click(object sender, EventArgs e)
{
if (this.epsonSocket1.IsConnection)
{
String point = this.combPoint.Text;
if (point.IndexOf("-") > 0)
{
String[] arr = point.Split('-');
point = arr[0];
}
String cmd = String.Format("$execute,\"{0} = Here\"", point);
this.epsonSocket1.tcp_send(cmd);
this.isDirty = true;
}
}
// 保存(&S)
private void btnSavePoint_Click(object sender, EventArgs e)
{
if (this.epsonSocket1.IsConnection)
{
this.epsonSocket1.tcp_send("$execute,\"SavePoints \"robot1.pts\"\"");
this.isDirty = false;
}
}
// 接收到数据的响应函数.
private void epsonSocket_rec_data_refresh(object sender, EventArgs e)
{
EventArgsCmd cmd = (EventArgsCmd)e;
if (cmd == null) return;
String str = cmd.Str;
String[] result = str.Split(',');
switch (cmd.Cmd)
{
case "execute":
{
if (str.IndexOf("execute,current,x=")>=0)
{
// 获取当前点位数据.
Vector3d vec = EventArgsCmd.ParseVector3d(str);
this.txtCurrentPointX.Text = vec.X.ToString();
this.txtCurrentPointY.Text = vec.Y.ToString();
this.txtCurrentPointZ.Text = vec.Z.ToString();
this.txtCurrentPointU.Text = vec.U.ToString();
}
if (str.IndexOf("execute,x=") >= 0)
{
// 获取点位数据.
Vector3d vec = EventArgsCmd.ParseVector3d(str);
this.txtRealTimePointX.Text = vec.X.ToString();
this.txtRealTimePointY.Text = vec.Y.ToString();
this.txtRealTimePointZ.Text = vec.Z.ToString();
this.txtRealTimePointU.Text = vec.U.ToString();
}
} break;
default:
break;
}
}
// 点击响应事件.
private void RO0_Click(object sender, EventArgs e)
{
CheckBox obj = (CheckBox)sender;
String ctrlName = obj.Name;
ctrlName = ctrlName.Replace("RO", "");
int nIndex = 0; int.TryParse(ctrlName, out nIndex);
int nChecked = ((obj.Checked == true) ? 1 : 0);
// 生成命令并发送.
String cmd = String.Format("$setio,{0},{1}", nIndex, nChecked);
if (this.epsonSocket1.IsConnection)
this.epsonSocket1.tcp_send(cmd);
// 更新控件显示颜色.
obj.BackColor = Color.FromArgb(192, 192, 255);
if (obj.Checked) obj.BackColor = Color.Red;
}
// // RO5真空.
// private void btnRO5Empty_Click(object sender, EventArgs e)
// {
// String cmd = String.Format("$setio,5,1");
// if (this.epsonSocket1.IsConnection)
// this.epsonSocket1.tcp_send(cmd);
// }
//
}
}

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>42</value>
</metadata>
</root>

@ -0,0 +1,909 @@
namespace ZWGXPICK_SYS
{
partial class Product_Data_Form
{
/// <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.panel1 = new System.Windows.Forms.Panel();
this.panel5 = new System.Windows.Forms.Panel();
this.btnSelectProduct = new System.Windows.Forms.Button();
this.lstProdSet = new System.Windows.Forms.ListBox();
this.panel3 = new System.Windows.Forms.Panel();
this.txt_boat_dish_center_y = new System.Windows.Forms.TextBox();
this.label24 = new System.Windows.Forms.Label();
this.txt_boat_dash_center_x = new System.Windows.Forms.TextBox();
this.label25 = new System.Windows.Forms.Label();
this.txt_central_hole_radius = new System.Windows.Forms.TextBox();
this.label22 = new System.Windows.Forms.Label();
this.txt_circular_boat_radius = new System.Windows.Forms.TextBox();
this.label23 = new System.Windows.Forms.Label();
this.cb_is_rotation = new System.Windows.Forms.ComboBox();
this.label21 = new System.Windows.Forms.Label();
this.txt_boat_first_point_y = new System.Windows.Forms.TextBox();
this.label20 = new System.Windows.Forms.Label();
this.txt_y_direction_num = new System.Windows.Forms.TextBox();
this.label17 = new System.Windows.Forms.Label();
this.txt_qualified_allow_error = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
this.txt_product_width = new System.Windows.Forms.TextBox();
this.txt_boat_slot_num = new System.Windows.Forms.TextBox();
this.txt_boat_dish_width = new System.Windows.Forms.TextBox();
this.cb_matrix_type = new System.Windows.Forms.ComboBox();
this.label8 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.lbl_product_width = new System.Windows.Forms.Label();
this.txt_boat_first_point_x = new System.Windows.Forms.TextBox();
this.label19 = new System.Windows.Forms.Label();
this.txt_x_direction_num = new System.Windows.Forms.TextBox();
this.label16 = new System.Windows.Forms.Label();
this.txt_single_weight_allow_error = new System.Windows.Forms.TextBox();
this.txt_standard_weight = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.txt_product_length = new System.Windows.Forms.TextBox();
this.txt_boat_dish_length = new System.Windows.Forms.TextBox();
this.cb_place_type = new System.Windows.Forms.ComboBox();
this.label9 = new System.Windows.Forms.Label();
this.lbl_boat_slot_num = new System.Windows.Forms.Label();
this.lbl_boat_dash_length = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.cb_product_type = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.cb_boat_dish_type = new System.Windows.Forms.ComboBox();
this.label2 = new System.Windows.Forms.Label();
this.txt_product_name = new System.Windows.Forms.TextBox();
this.label18 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.label3 = new System.Windows.Forms.Label();
this.panel4 = new System.Windows.Forms.Panel();
this.panel6 = new System.Windows.Forms.Panel();
this.btnCopy = new System.Windows.Forms.Button();
this.btnDelete = new System.Windows.Forms.Button();
this.btnNew = new System.Windows.Forms.Button();
this.btnSave = new System.Windows.Forms.Button();
this.btnEmulation = new System.Windows.Forms.Button();
this.txtPlaceNums = new System.Windows.Forms.TextBox();
this.txtColNo = new System.Windows.Forms.TextBox();
this.txtRowNo = new System.Windows.Forms.TextBox();
this.label15 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.picMatrixLayout = new System.Windows.Forms.PictureBox();
this.panel1.SuspendLayout();
this.panel5.SuspendLayout();
this.panel3.SuspendLayout();
this.panel2.SuspendLayout();
this.panel4.SuspendLayout();
this.panel6.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picMatrixLayout)).BeginInit();
this.SuspendLayout();
//
// panel1
//
this.panel1.Controls.Add(this.panel5);
this.panel1.Controls.Add(this.panel3);
this.panel1.Location = new System.Drawing.Point(4, 1);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(485, 680);
this.panel1.TabIndex = 236;
//
// panel5
//
this.panel5.Controls.Add(this.btnSelectProduct);
this.panel5.Controls.Add(this.lstProdSet);
this.panel5.Location = new System.Drawing.Point(3, 3);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(481, 208);
this.panel5.TabIndex = 229;
//
// btnSelectProduct
//
this.btnSelectProduct.Font = new System.Drawing.Font("Microsoft YaHei", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSelectProduct.Location = new System.Drawing.Point(374, 2);
this.btnSelectProduct.Name = "btnSelectProduct";
this.btnSelectProduct.Size = new System.Drawing.Size(108, 111);
this.btnSelectProduct.TabIndex = 229;
this.btnSelectProduct.Text = "选择(&S)";
this.btnSelectProduct.UseVisualStyleBackColor = true;
this.btnSelectProduct.Click += new System.EventHandler(this.btnSelectProduct_Click);
//
// lstProdSet
//
this.lstProdSet.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lstProdSet.FormattingEnabled = true;
this.lstProdSet.ItemHeight = 21;
this.lstProdSet.Location = new System.Drawing.Point(3, -3);
this.lstProdSet.Name = "lstProdSet";
this.lstProdSet.Size = new System.Drawing.Size(369, 193);
this.lstProdSet.TabIndex = 2;
this.lstProdSet.SelectedIndexChanged += new System.EventHandler(this.lstProdSet_SelectedIndexChanged);
//
// panel3
//
this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel3.Controls.Add(this.txt_boat_dish_center_y);
this.panel3.Controls.Add(this.label24);
this.panel3.Controls.Add(this.txt_boat_dash_center_x);
this.panel3.Controls.Add(this.label25);
this.panel3.Controls.Add(this.txt_central_hole_radius);
this.panel3.Controls.Add(this.label22);
this.panel3.Controls.Add(this.txt_circular_boat_radius);
this.panel3.Controls.Add(this.label23);
this.panel3.Controls.Add(this.cb_is_rotation);
this.panel3.Controls.Add(this.label21);
this.panel3.Controls.Add(this.txt_boat_first_point_y);
this.panel3.Controls.Add(this.label20);
this.panel3.Controls.Add(this.txt_y_direction_num);
this.panel3.Controls.Add(this.label17);
this.panel3.Controls.Add(this.txt_qualified_allow_error);
this.panel3.Controls.Add(this.label11);
this.panel3.Controls.Add(this.txt_product_width);
this.panel3.Controls.Add(this.txt_boat_slot_num);
this.panel3.Controls.Add(this.txt_boat_dish_width);
this.panel3.Controls.Add(this.cb_matrix_type);
this.panel3.Controls.Add(this.label8);
this.panel3.Controls.Add(this.label6);
this.panel3.Controls.Add(this.lbl_product_width);
this.panel3.Controls.Add(this.txt_boat_first_point_x);
this.panel3.Controls.Add(this.label19);
this.panel3.Controls.Add(this.txt_x_direction_num);
this.panel3.Controls.Add(this.label16);
this.panel3.Controls.Add(this.txt_single_weight_allow_error);
this.panel3.Controls.Add(this.txt_standard_weight);
this.panel3.Controls.Add(this.label12);
this.panel3.Controls.Add(this.label10);
this.panel3.Controls.Add(this.txt_product_length);
this.panel3.Controls.Add(this.txt_boat_dish_length);
this.panel3.Controls.Add(this.cb_place_type);
this.panel3.Controls.Add(this.label9);
this.panel3.Controls.Add(this.lbl_boat_slot_num);
this.panel3.Controls.Add(this.lbl_boat_dash_length);
this.panel3.Controls.Add(this.label4);
this.panel3.Controls.Add(this.cb_product_type);
this.panel3.Controls.Add(this.label1);
this.panel3.Controls.Add(this.cb_boat_dish_type);
this.panel3.Controls.Add(this.label2);
this.panel3.Controls.Add(this.txt_product_name);
this.panel3.Controls.Add(this.label18);
this.panel3.Location = new System.Drawing.Point(3, 213);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(482, 466);
this.panel3.TabIndex = 2;
//
// txt_boat_dish_center_y
//
this.txt_boat_dish_center_y.BackColor = System.Drawing.SystemColors.Window;
this.txt_boat_dish_center_y.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txt_boat_dish_center_y.Location = new System.Drawing.Point(385, 434);
this.txt_boat_dish_center_y.Name = "txt_boat_dish_center_y";
this.txt_boat_dish_center_y.Size = new System.Drawing.Size(96, 29);
this.txt_boat_dish_center_y.TabIndex = 275;
//
// label24
//
this.label24.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label24.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label24.Location = new System.Drawing.Point(262, 434);
this.label24.Name = "label24";
this.label24.Size = new System.Drawing.Size(122, 28);
this.label24.TabIndex = 274;
this.label24.Text = "舟皿中心坐标Y:";
//
// txt_boat_dash_center_x
//
this.txt_boat_dash_center_x.BackColor = System.Drawing.SystemColors.InactiveBorder;
this.txt_boat_dash_center_x.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txt_boat_dash_center_x.Location = new System.Drawing.Point(151, 436);
this.txt_boat_dash_center_x.Name = "txt_boat_dash_center_x";
this.txt_boat_dash_center_x.Size = new System.Drawing.Size(109, 29);
this.txt_boat_dash_center_x.TabIndex = 273;
//
// label25
//
this.label25.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label25.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label25.Location = new System.Drawing.Point(3, 436);
this.label25.Name = "label25";
this.label25.Size = new System.Drawing.Size(147, 29);
this.label25.TabIndex = 272;
this.label25.Text = "舟皿中心坐标X:";
//
// txt_central_hole_radius
//
this.txt_central_hole_radius.BackColor = System.Drawing.SystemColors.Window;
this.txt_central_hole_radius.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txt_central_hole_radius.Location = new System.Drawing.Point(122, 220);
this.txt_central_hole_radius.Name = "txt_central_hole_radius";
this.txt_central_hole_radius.Size = new System.Drawing.Size(359, 29);
this.txt_central_hole_radius.TabIndex = 271;
//
// label22
//
this.label22.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label22.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label22.Location = new System.Drawing.Point(3, 220);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(147, 29);
this.label22.TabIndex = 270;
this.label22.Text = "中心孔半径:";
//
// txt_circular_boat_radius
//
this.txt_circular_boat_radius.BackColor = System.Drawing.SystemColors.InactiveBorder;
this.txt_circular_boat_radius.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txt_circular_boat_radius.Location = new System.Drawing.Point(122, 189);
this.txt_circular_boat_radius.Name = "txt_circular_boat_radius";
this.txt_circular_boat_radius.Size = new System.Drawing.Size(359, 29);
this.txt_circular_boat_radius.TabIndex = 269;
//
// label23
//
this.label23.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label23.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label23.Location = new System.Drawing.Point(3, 189);
this.label23.Name = "label23";
this.label23.Size = new System.Drawing.Size(147, 29);
this.label23.TabIndex = 268;
this.label23.Text = "圆形舟皿半径:";
//
// cb_is_rotation
//
this.cb_is_rotation.BackColor = System.Drawing.SystemColors.Window;
this.cb_is_rotation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cb_is_rotation.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cb_is_rotation.FormattingEnabled = true;
this.cb_is_rotation.Items.AddRange(new object[] {
"否",
"是"});
this.cb_is_rotation.Location = new System.Drawing.Point(122, 311);
this.cb_is_rotation.Name = "cb_is_rotation";
this.cb_is_rotation.Size = new System.Drawing.Size(138, 29);
this.cb_is_rotation.TabIndex = 267;
//
// label21
//
this.label21.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label21.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label21.Location = new System.Drawing.Point(2, 312);
this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(118, 28);
this.label21.TabIndex = 266;
this.label21.Text = "产品是否旋转:";
//
// txt_boat_first_point_y
//
this.txt_boat_first_point_y.BackColor = System.Drawing.SystemColors.Window;
this.txt_boat_first_point_y.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txt_boat_first_point_y.Location = new System.Drawing.Point(385, 403);
this.txt_boat_first_point_y.Name = "txt_boat_first_point_y";
this.txt_boat_first_point_y.Size = new System.Drawing.Size(96, 29);
this.txt_boat_first_point_y.TabIndex = 265;
//
// label20
//
this.label20.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label20.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label20.Location = new System.Drawing.Point(262, 404);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(122, 28);
this.label20.TabIndex = 264;
this.label20.Text = "去边角个数Y:";
//
// txt_y_direction_num
//
this.txt_y_direction_num.BackColor = System.Drawing.SystemColors.Window;
this.txt_y_direction_num.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txt_y_direction_num.Location = new System.Drawing.Point(385, 282);
this.txt_y_direction_num.Name = "txt_y_direction_num";
this.txt_y_direction_num.Size = new System.Drawing.Size(96, 29);
this.txt_y_direction_num.TabIndex = 263;
//
// label17
//
this.label17.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label17.Font = new System.Drawing.Font("Microsoft YaHei", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label17.Location = new System.Drawing.Point(262, 282);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(122, 28);
this.label17.TabIndex = 262;
this.label17.Text = "Y方向取件数量:";
//
// txt_qualified_allow_error
//
this.txt_qualified_allow_error.BackColor = System.Drawing.SystemColors.Window;
this.txt_qualified_allow_error.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txt_qualified_allow_error.Location = new System.Drawing.Point(385, 342);
this.txt_qualified_allow_error.Name = "txt_qualified_allow_error";
this.txt_qualified_allow_error.Size = new System.Drawing.Size(96, 29);
this.txt_qualified_allow_error.TabIndex = 261;
//
// label11
//
this.label11.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label11.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label11.Location = new System.Drawing.Point(262, 342);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(122, 28);
this.label11.TabIndex = 260;
this.label11.Text = "合格允许误差:";
//
// txt_product_width
//
this.txt_product_width.BackColor = System.Drawing.SystemColors.Window;
this.txt_product_width.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txt_product_width.Location = new System.Drawing.Point(122, 158);
this.txt_product_width.Name = "txt_product_width";
this.txt_product_width.Size = new System.Drawing.Size(359, 29);
this.txt_product_width.TabIndex = 259;
//
// txt_boat_slot_num
//
this.txt_boat_slot_num.BackColor = System.Drawing.SystemColors.Window;
this.txt_boat_slot_num.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txt_boat_slot_num.Location = new System.Drawing.Point(385, 96);
this.txt_boat_slot_num.Name = "txt_boat_slot_num";
this.txt_boat_slot_num.Size = new System.Drawing.Size(96, 29);
this.txt_boat_slot_num.TabIndex = 258;
//
// txt_boat_dish_width
//
this.txt_boat_dish_width.BackColor = System.Drawing.SystemColors.Window;
this.txt_boat_dish_width.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txt_boat_dish_width.Location = new System.Drawing.Point(151, 96);
this.txt_boat_dish_width.Name = "txt_boat_dish_width";
this.txt_boat_dish_width.Size = new System.Drawing.Size(109, 29);
this.txt_boat_dish_width.TabIndex = 258;
//
// cb_matrix_type
//
this.cb_matrix_type.BackColor = System.Drawing.SystemColors.Window;
this.cb_matrix_type.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cb_matrix_type.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cb_matrix_type.FormattingEnabled = true;
this.cb_matrix_type.Items.AddRange(new object[] {
"先X后Y",
"先Y后X"});
this.cb_matrix_type.Location = new System.Drawing.Point(122, 251);
this.cb_matrix_type.Name = "cb_matrix_type";
this.cb_matrix_type.Size = new System.Drawing.Size(138, 29);
this.cb_matrix_type.TabIndex = 257;
this.cb_matrix_type.SelectedIndexChanged += new System.EventHandler(this.cb_matrix_type_SelectedIndexChanged);
//
// label8
//
this.label8.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label8.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label8.Location = new System.Drawing.Point(3, 251);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(118, 28);
this.label8.TabIndex = 256;
this.label8.Text = "阵列方式:";
//
// label6
//
this.label6.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label6.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label6.Location = new System.Drawing.Point(3, 65);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(147, 29);
this.label6.TabIndex = 255;
this.label6.Text = "舟皿长度(X方向):";
//
// lbl_product_width
//
this.lbl_product_width.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.lbl_product_width.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbl_product_width.Location = new System.Drawing.Point(3, 158);
this.lbl_product_width.Name = "lbl_product_width";
this.lbl_product_width.Size = new System.Drawing.Size(147, 29);
this.lbl_product_width.TabIndex = 254;
this.lbl_product_width.Text = "产品宽度(Y方向):";
//
// txt_boat_first_point_x
//
this.txt_boat_first_point_x.BackColor = System.Drawing.SystemColors.InactiveBorder;
this.txt_boat_first_point_x.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txt_boat_first_point_x.Location = new System.Drawing.Point(151, 404);
this.txt_boat_first_point_x.Name = "txt_boat_first_point_x";
this.txt_boat_first_point_x.Size = new System.Drawing.Size(109, 29);
this.txt_boat_first_point_x.TabIndex = 253;
//
// label19
//
this.label19.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label19.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label19.Location = new System.Drawing.Point(3, 404);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(147, 29);
this.label19.TabIndex = 252;
this.label19.Text = "去边角个数X:";
//
// txt_x_direction_num
//
this.txt_x_direction_num.BackColor = System.Drawing.SystemColors.InactiveBorder;
this.txt_x_direction_num.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txt_x_direction_num.Location = new System.Drawing.Point(122, 281);
this.txt_x_direction_num.Name = "txt_x_direction_num";
this.txt_x_direction_num.Size = new System.Drawing.Size(138, 29);
this.txt_x_direction_num.TabIndex = 251;
//
// label16
//
this.label16.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label16.Font = new System.Drawing.Font("Microsoft YaHei", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label16.Location = new System.Drawing.Point(2, 282);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(118, 28);
this.label16.TabIndex = 250;
this.label16.Text = "X方向取件数量:";
//
// txt_single_weight_allow_error
//
this.txt_single_weight_allow_error.BackColor = System.Drawing.SystemColors.InactiveBorder;
this.txt_single_weight_allow_error.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txt_single_weight_allow_error.Location = new System.Drawing.Point(151, 373);
this.txt_single_weight_allow_error.Name = "txt_single_weight_allow_error";
this.txt_single_weight_allow_error.Size = new System.Drawing.Size(330, 29);
this.txt_single_weight_allow_error.TabIndex = 249;
//
// txt_standard_weight
//
this.txt_standard_weight.BackColor = System.Drawing.SystemColors.InactiveBorder;
this.txt_standard_weight.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txt_standard_weight.Location = new System.Drawing.Point(122, 342);
this.txt_standard_weight.Name = "txt_standard_weight";
this.txt_standard_weight.Size = new System.Drawing.Size(138, 29);
this.txt_standard_weight.TabIndex = 248;
//
// label12
//
this.label12.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label12.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label12.Location = new System.Drawing.Point(3, 373);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(147, 29);
this.label12.TabIndex = 247;
this.label12.Text = "单重调整允许误差:";
//
// label10
//
this.label10.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label10.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label10.Location = new System.Drawing.Point(2, 342);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(118, 28);
this.label10.TabIndex = 246;
this.label10.Text = "标准重量:";
//
// txt_product_length
//
this.txt_product_length.BackColor = System.Drawing.SystemColors.InactiveBorder;
this.txt_product_length.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txt_product_length.Location = new System.Drawing.Point(122, 127);
this.txt_product_length.Name = "txt_product_length";
this.txt_product_length.Size = new System.Drawing.Size(359, 29);
this.txt_product_length.TabIndex = 245;
//
// txt_boat_dish_length
//
this.txt_boat_dish_length.BackColor = System.Drawing.SystemColors.InactiveBorder;
this.txt_boat_dish_length.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txt_boat_dish_length.Location = new System.Drawing.Point(151, 65);
this.txt_boat_dish_length.Name = "txt_boat_dish_length";
this.txt_boat_dish_length.Size = new System.Drawing.Size(330, 29);
this.txt_boat_dish_length.TabIndex = 244;
//
// cb_place_type
//
this.cb_place_type.BackColor = System.Drawing.SystemColors.InactiveBorder;
this.cb_place_type.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cb_place_type.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cb_place_type.FormattingEnabled = true;
this.cb_place_type.Items.AddRange(new object[] {
"对齐摆放",
"插空摆放"});
this.cb_place_type.Location = new System.Drawing.Point(385, 252);
this.cb_place_type.Name = "cb_place_type";
this.cb_place_type.Size = new System.Drawing.Size(96, 29);
this.cb_place_type.TabIndex = 243;
this.cb_place_type.SelectedIndexChanged += new System.EventHandler(this.cb_place_type_SelectedIndexChanged);
//
// label9
//
this.label9.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label9.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label9.Location = new System.Drawing.Point(262, 252);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(122, 28);
this.label9.TabIndex = 242;
this.label9.Text = "摆放方式:";
//
// lbl_boat_slot_num
//
this.lbl_boat_slot_num.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.lbl_boat_slot_num.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbl_boat_slot_num.Location = new System.Drawing.Point(262, 98);
this.lbl_boat_slot_num.Name = "lbl_boat_slot_num";
this.lbl_boat_slot_num.Size = new System.Drawing.Size(122, 28);
this.lbl_boat_slot_num.TabIndex = 241;
this.lbl_boat_slot_num.Text = "槽数(Y方向):";
//
// lbl_boat_dash_length
//
this.lbl_boat_dash_length.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.lbl_boat_dash_length.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbl_boat_dash_length.Location = new System.Drawing.Point(3, 96);
this.lbl_boat_dash_length.Name = "lbl_boat_dash_length";
this.lbl_boat_dash_length.Size = new System.Drawing.Size(147, 29);
this.lbl_boat_dash_length.TabIndex = 241;
this.lbl_boat_dash_length.Text = "舟皿宽度(Y方向):";
//
// label4
//
this.label4.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label4.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label4.Location = new System.Drawing.Point(3, 127);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(147, 29);
this.label4.TabIndex = 240;
this.label4.Text = "产品长度(X方向):";
//
// cb_product_type
//
this.cb_product_type.BackColor = System.Drawing.SystemColors.Window;
this.cb_product_type.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cb_product_type.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cb_product_type.FormattingEnabled = true;
this.cb_product_type.Items.AddRange(new object[] {
"矩形",
"三角形"});
this.cb_product_type.Location = new System.Drawing.Point(385, 34);
this.cb_product_type.Name = "cb_product_type";
this.cb_product_type.Size = new System.Drawing.Size(96, 29);
this.cb_product_type.TabIndex = 239;
this.cb_product_type.SelectedIndexChanged += new System.EventHandler(this.cb_product_type_SelectedIndexChanged);
//
// label1
//
this.label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label1.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(262, 35);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(122, 28);
this.label1.TabIndex = 238;
this.label1.Text = "产品类型:";
//
// cb_boat_dish_type
//
this.cb_boat_dish_type.BackColor = System.Drawing.SystemColors.InactiveBorder;
this.cb_boat_dish_type.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cb_boat_dish_type.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cb_boat_dish_type.FormattingEnabled = true;
this.cb_boat_dish_type.Items.AddRange(new object[] {
"平板舟皿",
"槽形舟皿",
"圆形舟皿"});
this.cb_boat_dish_type.Location = new System.Drawing.Point(122, 35);
this.cb_boat_dish_type.Name = "cb_boat_dish_type";
this.cb_boat_dish_type.Size = new System.Drawing.Size(138, 29);
this.cb_boat_dish_type.TabIndex = 234;
this.cb_boat_dish_type.SelectedIndexChanged += new System.EventHandler(this.cb_boat_dish_type_SelectedIndexChanged);
//
// label2
//
this.label2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label2.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Location = new System.Drawing.Point(3, 35);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(118, 28);
this.label2.TabIndex = 233;
this.label2.Text = "舟皿类型:";
//
// txt_product_name
//
this.txt_product_name.BackColor = System.Drawing.SystemColors.InactiveBorder;
this.txt_product_name.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txt_product_name.Location = new System.Drawing.Point(122, 3);
this.txt_product_name.Name = "txt_product_name";
this.txt_product_name.Size = new System.Drawing.Size(359, 29);
this.txt_product_name.TabIndex = 232;
//
// label18
//
this.label18.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label18.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label18.Location = new System.Drawing.Point(3, 4);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(118, 28);
this.label18.TabIndex = 231;
this.label18.Text = "产品名称:";
//
// panel2
//
this.panel2.Controls.Add(this.label3);
this.panel2.Location = new System.Drawing.Point(491, 1);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(521, 53);
this.panel2.TabIndex = 237;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Microsoft YaHei", 20F, System.Drawing.FontStyle.Bold);
this.label3.Location = new System.Drawing.Point(191, 3);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(123, 36);
this.label3.TabIndex = 193;
this.label3.Text = "产品参数";
//
// panel4
//
this.panel4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel4.Controls.Add(this.panel6);
this.panel4.Controls.Add(this.txtPlaceNums);
this.panel4.Controls.Add(this.txtColNo);
this.panel4.Controls.Add(this.txtRowNo);
this.panel4.Controls.Add(this.label15);
this.panel4.Controls.Add(this.label14);
this.panel4.Controls.Add(this.label13);
this.panel4.Controls.Add(this.picMatrixLayout);
this.panel4.Location = new System.Drawing.Point(491, 56);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(522, 625);
this.panel4.TabIndex = 238;
//
// panel6
//
this.panel6.Controls.Add(this.btnCopy);
this.panel6.Controls.Add(this.btnDelete);
this.panel6.Controls.Add(this.btnNew);
this.panel6.Controls.Add(this.btnSave);
this.panel6.Controls.Add(this.btnEmulation);
this.panel6.Location = new System.Drawing.Point(3, 561);
this.panel6.Name = "panel6";
this.panel6.Size = new System.Drawing.Size(518, 62);
this.panel6.TabIndex = 241;
//
// btnCopy
//
this.btnCopy.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCopy.Location = new System.Drawing.Point(99, 3);
this.btnCopy.Name = "btnCopy";
this.btnCopy.Size = new System.Drawing.Size(96, 55);
this.btnCopy.TabIndex = 245;
this.btnCopy.Text = "复制(&O)";
this.btnCopy.UseVisualStyleBackColor = true;
this.btnCopy.Click += new System.EventHandler(this.btnCopy_Click);
//
// btnDelete
//
this.btnDelete.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnDelete.Location = new System.Drawing.Point(195, 3);
this.btnDelete.Name = "btnDelete";
this.btnDelete.Size = new System.Drawing.Size(96, 55);
this.btnDelete.TabIndex = 244;
this.btnDelete.Text = "删除(&D)";
this.btnDelete.UseVisualStyleBackColor = true;
this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
//
// btnNew
//
this.btnNew.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnNew.Location = new System.Drawing.Point(3, 3);
this.btnNew.Name = "btnNew";
this.btnNew.Size = new System.Drawing.Size(96, 55);
this.btnNew.TabIndex = 242;
this.btnNew.Text = "新建(&C)";
this.btnNew.UseVisualStyleBackColor = true;
this.btnNew.Click += new System.EventHandler(this.btnNew_Click);
//
// btnSave
//
this.btnSave.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSave.Location = new System.Drawing.Point(291, 3);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(96, 55);
this.btnSave.TabIndex = 243;
this.btnSave.Text = "保存(&A)";
this.btnSave.UseVisualStyleBackColor = true;
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// btnEmulation
//
this.btnEmulation.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnEmulation.Location = new System.Drawing.Point(391, 3);
this.btnEmulation.Name = "btnEmulation";
this.btnEmulation.Size = new System.Drawing.Size(123, 55);
this.btnEmulation.TabIndex = 241;
this.btnEmulation.Text = "计算/仿真(&E)";
this.btnEmulation.UseVisualStyleBackColor = true;
this.btnEmulation.Click += new System.EventHandler(this.btnEmulation_Click);
//
// txtPlaceNums
//
this.txtPlaceNums.BackColor = System.Drawing.SystemColors.Window;
this.txtPlaceNums.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtPlaceNums.Location = new System.Drawing.Point(432, 2);
this.txtPlaceNums.Name = "txtPlaceNums";
this.txtPlaceNums.Size = new System.Drawing.Size(85, 29);
this.txtPlaceNums.TabIndex = 232;
//
// txtColNo
//
this.txtColNo.BackColor = System.Drawing.SystemColors.Window;
this.txtColNo.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtColNo.Location = new System.Drawing.Point(209, 2);
this.txtColNo.Name = "txtColNo";
this.txtColNo.Size = new System.Drawing.Size(85, 29);
this.txtColNo.TabIndex = 231;
//
// txtRowNo
//
this.txtRowNo.BackColor = System.Drawing.SystemColors.Window;
this.txtRowNo.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtRowNo.Location = new System.Drawing.Point(63, 2);
this.txtRowNo.Name = "txtRowNo";
this.txtRowNo.Size = new System.Drawing.Size(79, 29);
this.txtRowNo.TabIndex = 230;
//
// label15
//
this.label15.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label15.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label15.Location = new System.Drawing.Point(300, 2);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(129, 29);
this.label15.TabIndex = 229;
this.label15.Text = "实际摆放个数:";
//
// label14
//
this.label14.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label14.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label14.Location = new System.Drawing.Point(147, 2);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(59, 29);
this.label14.TabIndex = 228;
this.label14.Text = "列数:";
//
// label13
//
this.label13.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label13.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label13.Location = new System.Drawing.Point(2, 2);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(59, 29);
this.label13.TabIndex = 227;
this.label13.Text = "行数:";
//
// picMatrixLayout
//
this.picMatrixLayout.BackColor = System.Drawing.Color.White;
this.picMatrixLayout.Image = global::ZWGXPICK_SYS.Properties.Resources.zhuobiao1;
this.picMatrixLayout.InitialImage = null;
this.picMatrixLayout.Location = new System.Drawing.Point(0, 34);
this.picMatrixLayout.Name = "picMatrixLayout";
this.picMatrixLayout.Size = new System.Drawing.Size(520, 524);
this.picMatrixLayout.TabIndex = 210;
this.picMatrixLayout.TabStop = false;
this.picMatrixLayout.Paint += new System.Windows.Forms.PaintEventHandler(this.picMatrixLayout_Paint);
//
// Product_Data_Form
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
this.ClientSize = new System.Drawing.Size(1014, 687);
this.Controls.Add(this.panel4);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.Name = "Product_Data_Form";
this.Text = "产品参数(单位尺寸:mm)";
this.Load += new System.EventHandler(this.Product_Data_Form_Load);
this.Resize += new System.EventHandler(this.Product_Data_Form_Resize);
this.panel1.ResumeLayout(false);
this.panel5.ResumeLayout(false);
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.panel4.ResumeLayout(false);
this.panel4.PerformLayout();
this.panel6.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picMatrixLayout)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.TextBox txt_product_name;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.ComboBox cb_boat_dish_type;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ComboBox cb_product_type;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txt_boat_first_point_x;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.TextBox txt_x_direction_num;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.TextBox txt_product_length;
private System.Windows.Forms.TextBox txt_boat_dish_length;
private System.Windows.Forms.ComboBox cb_place_type;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label lbl_boat_dash_length;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox txt_boat_first_point_y;
private System.Windows.Forms.Label label20;
private System.Windows.Forms.TextBox txt_y_direction_num;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.TextBox txt_product_width;
private System.Windows.Forms.TextBox txt_boat_dish_width;
private System.Windows.Forms.ComboBox cb_matrix_type;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label lbl_product_width;
private System.Windows.Forms.Panel panel4;
private System.Windows.Forms.TextBox txtPlaceNums;
private System.Windows.Forms.TextBox txtColNo;
private System.Windows.Forms.TextBox txtRowNo;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.PictureBox picMatrixLayout;
private System.Windows.Forms.ComboBox cb_is_rotation;
private System.Windows.Forms.Label label21;
private System.Windows.Forms.TextBox txt_central_hole_radius;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.TextBox txt_circular_boat_radius;
private System.Windows.Forms.Label label23;
private System.Windows.Forms.TextBox txt_boat_dish_center_y;
private System.Windows.Forms.Label label24;
private System.Windows.Forms.TextBox txt_boat_dash_center_x;
private System.Windows.Forms.Label label25;
private System.Windows.Forms.TextBox txt_qualified_allow_error;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.TextBox txt_single_weight_allow_error;
private System.Windows.Forms.TextBox txt_standard_weight;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox txt_boat_slot_num;
private System.Windows.Forms.Label lbl_boat_slot_num;
private System.Windows.Forms.Panel panel5;
private System.Windows.Forms.Button btnSelectProduct;
private System.Windows.Forms.ListBox lstProdSet;
private System.Windows.Forms.Panel panel6;
private System.Windows.Forms.Button btnCopy;
private System.Windows.Forms.Button btnDelete;
private System.Windows.Forms.Button btnNew;
private System.Windows.Forms.Button btnSave;
private System.Windows.Forms.Button btnEmulation;
}
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

@ -0,0 +1,58 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using ZWGXPICK_SYS.SerialPort;
namespace ZWGXPICK_SYS
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
#region 测试
//List<WeightModel> list = new List<WeightModel>();
//list.Add(new WeightModel
//{
// ID=1,
// COMName="COM1",
// Weight=0m,
// Nuit="克"
//});
//list.Add(new WeightModel
//{
// ID = 2,
// COMName = "COM2",
// Weight = 5.75m,
// Nuit = "克"
//});
//list.Add(new WeightModel
//{
// ID = 3,
// COMName = "COM3",
// Weight = 5.73m,
// Nuit = "克"
//});
//list.Add(new WeightModel
//{
// ID = 4,
// COMName = "COM4",
// Weight = 5.64m,
// Nuit = "克"
//});
//var weightEquipmentAggregation = new WeightEquipmentAggregation();
//var value = weightEquipmentAggregation.Calculation(list, 5.7m, 0.2m, 0.2m);
//Console.WriteLine(value);
#endregion
}
}
}

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("ZWGXPICK_SYS")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ZWGXPICK_SYS")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("2e0ad820-6b31-4895-ad0f-ffc52fd2cb63")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

@ -0,0 +1,153 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace ZWGXPICK_SYS.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ZWGXPICK_SYS.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap down {
get {
object obj = ResourceManager.GetObject("down", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap left {
get {
object obj = ResourceManager.GetObject("left", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap left_rotation {
get {
object obj = ResourceManager.GetObject("left_rotation", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap logo {
get {
object obj = ResourceManager.GetObject("logo", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap right {
get {
object obj = ResourceManager.GetObject("right", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap right_rotation {
get {
object obj = ResourceManager.GetObject("right_rotation", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap top {
get {
object obj = ResourceManager.GetObject("top", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap zhuobiao {
get {
object obj = ResourceManager.GetObject("zhuobiao", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap zhuobiao1 {
get {
object obj = ResourceManager.GetObject("zhuobiao1", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

@ -0,0 +1,148 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="left_rotation" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\left_rotation.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="right_rotation" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\right_rotation.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="right" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\right.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="left" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\left.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="down" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="zhuobiao" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\zhuobiao.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="top" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\top.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="logo" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\logo.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="zhuobiao1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\zhuobiao.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace ZWGXPICK_SYS.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.3.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

@ -0,0 +1,45 @@
namespace PCHMITEST
{
partial class UserControl1
{
/// <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.SuspendLayout();
//
// UserControl1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Name = "UserControl1";
this.Size = new System.Drawing.Size(686, 493);
this.ResumeLayout(false);
}
#endregion
}
}

@ -0,0 +1,20 @@
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;
namespace PCHMITEST
{
public partial class UserControl1 : UserControl
{
public UserControl1()
{
InitializeComponent();
}
}
}

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

@ -0,0 +1,106 @@
namespace ZWGXPICK_SYS
{
partial class Weight_Data_Form
{
/// <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.dataGridView1 = new System.Windows.Forms.DataGridView();
this.panel1 = new System.Windows.Forms.Panel();
this.label3 = new System.Windows.Forms.Label();
this.btnClear = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// dataGridView1
//
this.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Location = new System.Drawing.Point(12, 54);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.ReadOnly = true;
this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView1.Size = new System.Drawing.Size(860, 416);
this.dataGridView1.TabIndex = 193;
//
// panel1
//
this.panel1.Controls.Add(this.label3);
this.panel1.Location = new System.Drawing.Point(3, 3);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(677, 45);
this.panel1.TabIndex = 194;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("微软雅黑", 20F, System.Drawing.FontStyle.Bold);
this.label3.ForeColor = System.Drawing.Color.Black;
this.label3.Location = new System.Drawing.Point(358, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(123, 36);
this.label3.TabIndex = 193;
this.label3.Text = "称重数据";
//
// btnClear
//
this.btnClear.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClear.Location = new System.Drawing.Point(686, 3);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(188, 45);
this.btnClear.TabIndex = 195;
this.btnClear.Text = "清空数据(&C)";
this.btnClear.UseVisualStyleBackColor = true;
this.btnClear.Click += new System.EventHandler(this.btnClear_Click);
//
// Weight_Data_Form
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
this.ClientSize = new System.Drawing.Size(884, 481);
this.Controls.Add(this.btnClear);
this.Controls.Add(this.panel1);
this.Controls.Add(this.dataGridView1);
this.Name = "Weight_Data_Form";
this.Text = "称重数据";
this.Load += new System.EventHandler(this.Weight_Data_Form_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button btnClear;
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save