Commit 1287733b LN

查看托盘信息增加刷新按钮。纠正ok的托盘继续判断。

1 个父辈 5eee79a1
......@@ -97,6 +97,12 @@
<Compile Include="FrmDisableTray.Designer.cs">
<DependentUpon>FrmDisableTray.cs</DependentUpon>
</Compile>
<Compile Include="FrmTrayInfo.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmTrayInfo.Designer.cs">
<DependentUpon>FrmTrayInfo.cs</DependentUpon>
</Compile>
<Compile Include="FrmIOMsg.cs">
<SubType>Form</SubType>
</Compile>
......@@ -185,6 +191,9 @@
<DependentUpon>FrmDisableTray.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="FrmTrayInfo.resx">
<DependentUpon>FrmTrayInfo.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmIOMsg.resx">
<DependentUpon>FrmIOMsg.cs</DependentUpon>
</EmbeddedResource>
......
......@@ -981,24 +981,27 @@ namespace OnlineStore.AssemblyLine
private void btnTrayInfo_Click(object sender, EventArgs e)
{
string msg = "";
//string msg = "";
List<TrayInfo> tray = TrayManager.getTrayList();
LogUtil.info("-------------------开始打印托盘信息:");
msg += "-------------------开始打印托盘信息:\r\n";
foreach (TrayInfo t in tray)
{
string disstr = gouStr;
if (TrayDisableManager.DisableTray(t.TrayCode))
{
disstr = "✘";
}
LogUtil.info(disstr + t.ToStr());
msg += disstr + t.ToStr() + "\r\n";
}
LogUtil.info("-------------------结束打印托盘信息");
msg += "-------------------结束打印托盘信息";
MessageBox.Show(msg, "托盘信息列表");
//List<TrayInfo> tray = TrayManager.getTrayList();
//LogUtil.info("-------------------开始打印托盘信息:");
//msg += "-------------------开始打印托盘信息:\r\n";
//foreach (TrayInfo t in tray)
//{
// string disstr = gouStr;
// if (TrayDisableManager.DisableTray(t.TrayCode))
// {
// disstr = "✘";
// }
// LogUtil.info(disstr + t.ToStr());
// msg += disstr + t.ToStr() + "\r\n";
//}
//LogUtil.info("-------------------结束打印托盘信息");
//msg += "-------------------结束打印托盘信息";
//MessageBox.Show(msg, "托盘信息列表");
FrmTrayInfo frm = new FrmTrayInfo();
frm.ShowDialog();
}
//private void btnClearTray_Click(object sender, EventArgs e)
......
namespace OnlineStore.AssemblyLine
{
partial class FrmTrayInfo
{
/// <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.btnUpdate = new System.Windows.Forms.Button();
this.btnExit = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// btnUpdate
//
this.btnUpdate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnUpdate.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUpdate.Location = new System.Drawing.Point(173, 89);
this.btnUpdate.Name = "btnUpdate";
this.btnUpdate.Size = new System.Drawing.Size(115, 33);
this.btnUpdate.TabIndex = 4;
this.btnUpdate.Text = "刷新";
this.btnUpdate.UseVisualStyleBackColor = true;
this.btnUpdate.Click += new System.EventHandler(this.btnUpdate_Click);
//
// btnExit
//
this.btnExit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnExit.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnExit.Location = new System.Drawing.Point(294, 89);
this.btnExit.Name = "btnExit";
this.btnExit.Size = new System.Drawing.Size(115, 33);
this.btnExit.TabIndex = 5;
this.btnExit.Text = "确定";
this.btnExit.UseVisualStyleBackColor = true;
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(21, 17);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(43, 17);
this.label1.TabIndex = 0;
this.label1.Text = "label1";
//
// panel1
//
this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel1.AutoSize = true;
this.panel1.Controls.Add(this.label1);
this.panel1.Location = new System.Drawing.Point(15, 13);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(386, 57);
this.panel1.TabIndex = 6;
//
// FrmTrayInfo
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoSize = true;
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.ClientSize = new System.Drawing.Size(428, 132);
this.Controls.Add(this.panel1);
this.Controls.Add(this.btnExit);
this.Controls.Add(this.btnUpdate);
this.Name = "FrmTrayInfo";
this.Text = "托盘信息列表";
this.Load += new System.EventHandler(this.FrmTrayInfo_Load);
this.SizeChanged += new System.EventHandler(this.FrmTrayInfo_SizeChanged);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button btnUpdate;
private System.Windows.Forms.Button btnExit;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Panel panel1;
}
}
\ No newline at end of file

using OnlineStore.Common;
using OnlineStore.DeviceLibrary;
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace OnlineStore.AssemblyLine
{
internal partial class FrmTrayInfo : FrmBase
{
public FrmTrayInfo()
{
InitializeComponent();
}
private string _contentText = "暂无信息!";
public string ContentText
{
get { return _contentText; }
set { _contentText = value; }
}
private string gouStr = "✔";
private void FrmTrayInfo_Load(object sender, EventArgs e)
{
loadMsg();
}
private string getMsg()
{
string msg = "";
List<TrayInfo> tray = TrayManager.getTrayList();
LogUtil.info("-------------------开始打印托盘信息:");
msg += "-------------------开始打印托盘信息:\r\n";
foreach (TrayInfo t in tray)
{
string disstr = gouStr;
if (TrayDisableManager.DisableTray(t.TrayCode))
{
disstr = "✘";
}
LogUtil.info(disstr + t.ToStr());
msg += disstr + t.ToStr() + "\r\n";
}
LogUtil.info("-------------------结束打印托盘信息");
msg += "-------------------结束打印托盘信息";
return msg;
}
private void loadMsg()
{
this._contentText = getMsg();
if (this._contentText.Trim() != "")
{
this.label1.Text = this._contentText;
}
}
private void btnUpdate_Click(object sender, EventArgs e)
{
loadMsg();
}
private void btnExit_Click(object sender, EventArgs e)
{
this.Close();
}
private void FrmTrayInfo_SizeChanged(object sender, EventArgs e)
{
this.Left = Screen.PrimaryScreen.Bounds.Width / 2 - this.Width / 2;//桌面的宽度的一半减去自身宽的的一半
this.Top = Screen.PrimaryScreen.Bounds.Height / 2 - this.Height / 2;//桌面的高度的一半减去自身高度的一半
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
{"TrayCode":0,"IsFull":false,"InOrOutStore":0,"ShowMsg":"","LastUpdateTime":"2022-05-07T14:22:10.9519037+08:00","InoutPar":{"WareCode":"","PosId":"","TrayNumber":0,"PlateH":0,"PlateW":0,"InStoreNg":false,"NgMsg":"","urgentReel":false,"cutReel":false,"smallReel":false,"rfid":"","rfidLoc":0}}
{"TrayCode":33,"IsFull":true,"InOrOutStore":2,"ShowMsg":"","LastUpdateTime":"2021-06-17T09:27:26.4680579+08:00","InoutPar":{"WareCode":"R04192021042623416","PosId":"4D2592AA0010","TrayNumber":33,"PlateH":8,"PlateW":7,"InStoreNg":false,"NgMsg":"","urgentReel":false,"cutReel":false,"smallReel":true,"rfid":"228624-1D","rfidLoc":-1}}
{"TrayCode":3,"IsFull":true,"InOrOutStore":2,"ShowMsg":"","LastUpdateTime":"2021-06-17T09:26:39.5078183+08:00","InoutPar":{"WareCode":"R02472021050802490","PosId":"4D0717AA0020","TrayNumber":3,"PlateH":8,"PlateW":7,"InStoreNg":false,"NgMsg":"","urgentReel":false,"cutReel":false,"smallReel":true,"rfid":"228624-0D","rfidLoc":-1}}
{"TrayCode":35,"IsFull":true,"InOrOutStore":2,"ShowMsg":"","LastUpdateTime":"2021-06-17T09:27:48.2105894+08:00","InoutPar":{"WareCode":"R02472021013000187","PosId":"4D1303AA0015","TrayNumber":35,"PlateH":8,"PlateW":7,"InStoreNg":false,"NgMsg":"","urgentReel":false,"cutReel":false,"smallReel":true,"rfid":"228624-1D","rfidLoc":-1}}
{"TrayCode":8,"IsFull":true,"InOrOutStore":2,"ShowMsg":"","LastUpdateTime":"2021-06-17T09:27:37.1653115+08:00","InoutPar":{"WareCode":"R04192020112331598","PosId":"4D0708DD0019","TrayNumber":8,"PlateH":8,"PlateW":7,"InStoreNg":false,"NgMsg":"","urgentReel":false,"cutReel":false,"smallReel":true,"rfid":"228624-0D","rfidLoc":-1}}
{"TrayCode":9,"IsFull":true,"InOrOutStore":2,"ShowMsg":"","LastUpdateTime":"2021-06-17T09:26:06.3309281+08:00","InoutPar":{"WareCode":"R02472021042610961","PosId":"4D0117CC0013","TrayNumber":9,"PlateH":8,"PlateW":7,"InStoreNg":false,"NgMsg":"","urgentReel":true,"cutReel":false,"smallReel":true,"rfid":"1-0B","rfidLoc":-1}}
{"TrayCode":14,"IsFull":true,"InOrOutStore":2,"ShowMsg":"","LastUpdateTime":"2021-06-17T09:27:39.6202826+08:00","InoutPar":{"WareCode":"R31682021020500976","PosId":"4D1710AA0016","TrayNumber":14,"PlateH":8,"PlateW":7,"InStoreNg":false,"NgMsg":"","urgentReel":false,"cutReel":false,"smallReel":true,"rfid":"228624-1D","rfidLoc":-1}}
{"TrayCode":19,"IsFull":true,"InOrOutStore":2,"ShowMsg":"","LastUpdateTime":"2021-06-17T09:27:00.7463478+08:00","InoutPar":{"WareCode":"R02472021042611204","PosId":"4D0108DD0019","TrayNumber":19,"PlateH":8,"PlateW":7,"InStoreNg":false,"NgMsg":"","urgentReel":true,"cutReel":false,"smallReel":true,"rfid":"1-0B","rfidLoc":-1}}
{"TrayCode":20,"IsFull":true,"InOrOutStore":2,"ShowMsg":"","LastUpdateTime":"2021-06-17T09:26:55.4206046+08:00","InoutPar":{"WareCode":"R33232021033100382","PosId":"4D0211AA0003","TrayNumber":20,"PlateH":8,"PlateW":7,"InStoreNg":false,"NgMsg":"","urgentReel":false,"cutReel":false,"smallReel":true,"rfid":"228624-1D","rfidLoc":-1}}
{"TrayCode":21,"IsFull":true,"InOrOutStore":2,"ShowMsg":"","LastUpdateTime":"2021-06-17T09:27:41.1177713+08:00","InoutPar":{"WareCode":"R02472021042701058","PosId":"4D1515AA0004","TrayNumber":21,"PlateH":8,"PlateW":7,"InStoreNg":false,"NgMsg":"","urgentReel":false,"cutReel":false,"smallReel":true,"rfid":"228624-1D","rfidLoc":-1}}
{"TrayCode":23,"IsFull":true,"InOrOutStore":2,"ShowMsg":"","LastUpdateTime":"2021-06-17T09:27:47.5598848+08:00","InoutPar":{"WareCode":"R01042021041454440","PosId":"4D0209CC0025","TrayNumber":23,"PlateH":8,"PlateW":7,"InStoreNg":false,"NgMsg":"","urgentReel":false,"cutReel":false,"smallReel":true,"rfid":"228624-2D","rfidLoc":-1}}
{"TrayCode":24,"IsFull":true,"InOrOutStore":2,"ShowMsg":"","LastUpdateTime":"2021-06-17T09:27:22.0462759+08:00","InoutPar":{"WareCode":"R31682021012802555","PosId":"4D1208CC0028","TrayNumber":24,"PlateH":8,"PlateW":7,"InStoreNg":false,"NgMsg":"","urgentReel":false,"cutReel":false,"smallReel":true,"rfid":"228624-1D","rfidLoc":-1}}
{"TrayCode":25,"IsFull":true,"InOrOutStore":2,"ShowMsg":"","LastUpdateTime":"2021-06-17T09:27:25.2098347+08:00","InoutPar":{"WareCode":"R04192020112050904","PosId":"4D1819BB0013","TrayNumber":25,"PlateH":8,"PlateW":7,"InStoreNg":false,"NgMsg":"","urgentReel":false,"cutReel":false,"smallReel":true,"rfid":"228624-1D","rfidLoc":-1}}
{"TrayCode":27,"IsFull":true,"InOrOutStore":2,"ShowMsg":"","LastUpdateTime":"2021-06-17T09:27:44.7303129+08:00","InoutPar":{"WareCode":"R02472021042610899","PosId":"4D0117CC0023","TrayNumber":27,"PlateH":8,"PlateW":7,"InStoreNg":false,"NgMsg":"","urgentReel":true,"cutReel":false,"smallReel":true,"rfid":"1-0B","rfidLoc":-1}}
{"TrayCode":28,"IsFull":true,"InOrOutStore":2,"ShowMsg":"","LastUpdateTime":"2021-06-17T09:27:31.6496496+08:00","InoutPar":{"WareCode":"R02472021032900405","PosId":"4D1405DD0003","TrayNumber":28,"PlateH":8,"PlateW":7,"InStoreNg":false,"NgMsg":"","urgentReel":false,"cutReel":false,"smallReel":true,"rfid":"228624-2D","rfidLoc":-1}}
......@@ -165,7 +165,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info("RFID [ " + Config.CameraName_1_RFID + " ] 读到数据 " + data.NumStr());
//获取托盘信息
TrayInfo tray = TrayManager.GetTrayInfo(trayNum);
if (tray.InoutPar.ManualJudgeNG)
if (tray.InoutPar.ManualJudgeNG||tray.InoutPar.Corrected)
{
//扫码
(bool result, string barcode) = CodeManager.ReelCheckCameraScan(new List<string> { Config.CameraName_1 }, Name);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!