Commit d9726787 刘韬

优化扫码速度, 添加条码编码匹配

1 个父辈 73681466
正在显示 71 个修改的文件 包含 157 行增加41 行删除
......@@ -34,6 +34,9 @@
<LangVersion>preview</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="Asa.Camera.VisionLib">
<HintPath>..\..\Camera\CameraVisionLib\bin\Debug\Asa.Camera.VisionLib.dll</HintPath>
</Reference>
<Reference Include="Asa.Face.Control, Version=1.0.7916.18557, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\FaceControl\FaceControl\bin\Debug\Asa.Face.Control.dll</HintPath>
......
......@@ -141,7 +141,11 @@ namespace BLL
get => config.Read<bool>(PROMPT_AFTER_PRINTING);
set => config.Write(PROMPT_AFTER_PRINTING, value);
}
public bool AutoPrint
{
get => config.Read<bool>(AUTO_PRINT);
set => config.Write(AUTO_PRINT, value);
}
/// <summary>
/// 启用IO模块
/// </summary>
......@@ -329,5 +333,7 @@ namespace BLL
private const string WEB_SERVICE = "WebService";
private const string LIGHT_SERIAL_PORT = "LightSerialPort";
private const string AUTO_PRINT = "AutoPrint";
}
}
......@@ -74,6 +74,7 @@ namespace BLL
//if (index == -1) return;
//PNPress(extensions[index].Control, EventArgs.Empty);
GetReelid(null, EventArgs.Empty);
if (config.AutoPrint)
PrintLabel(null, EventArgs.Empty);
......
......@@ -87,9 +87,12 @@ namespace BLL
{
return;
}
if (CanPrint())
if (config.AutoPrint)
{
//if (CanPrint())
PrintLabel(null, EventArgs.Empty);
}
}
public void Update()
{
......
......@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Drawing;
using System.Xml;
using CameraVisionLib.Model;
using Model;
namespace BLL
......@@ -128,7 +129,7 @@ namespace BLL
/// <param name="keyword">关键字和对应的内容</param>
/// <param name="isCodeUsed"></param>
/// <returns></returns>
public bool MatchingTemplate(string[] code, string firstMaterial, out string mateName, out Dictionary<string, string> keyword, out bool[] isCodeUsed)
public bool MatchingTemplate(List<BarcodeInfo> code, string firstMaterial, out string mateName, out Dictionary<string, string> keyword, out bool[] isCodeUsed)
{
mateName = "";
keyword = null;
......@@ -152,7 +153,7 @@ namespace BLL
int index = mateTemp[i].Code.FindIndex(match => match.ID == mateTemp[i].PrimaryCode);
if (index == -1) continue;
string text = mateTemp[i].Code[index].Text;
index = Array.FindIndex(code, match => match == text);
index = Array.FindIndex(code.ToArray(), match => match.Text == text);
if (index == -1) continue;
mateName = mateTemp[i].Name;
LogNet.log.Info("带主键[" + text + "]匹配 " + mateTemp[i].Name);
......@@ -270,6 +271,8 @@ namespace BLL
destination = codeMatch.GetType().GetProperties();
for (int i = 0; i < destination.Length; i++)
{
if (node.Attributes[destination[i].Name] == null)
continue;
string val = node.Attributes[destination[i].Name].Value;
if (destination[i].PropertyType == typeof(int))
destination[i].SetValue(codeMatch, Convert.ToInt32(val));
......@@ -356,10 +359,10 @@ namespace BLL
temp.State = TemplateState.Saved;
}
private bool TemplateExtract(int index, string[] code, out Dictionary<string, string> keyword, out bool[] isCodeUsed)
private bool TemplateExtract(int index, List<BarcodeInfo> code, out Dictionary<string, string> keyword, out bool[] isCodeUsed)
{
keyword = new();
isCodeUsed = new bool[code.Length];
isCodeUsed = new bool[code.Count];
int matchCount = 0;
int[] id = mateTemp[index].GetCodeID();
......@@ -369,7 +372,7 @@ namespace BLL
if (codeMatch.Count == 0) continue;
matchCount += codeMatch.Count;
for (int j = 0; j < code.Length; j++)
for (int j = 0; j < code.Count; j++)
{
Dictionary<string, string> matchKey = CodeMatch(code[j], codeMatch);
if (matchKey != null)
......@@ -397,8 +400,8 @@ namespace BLL
Bitmap bmp = CodeOcr(codeTemp, mateTemp[index].Ocr[i], mateTemp[index].Image);
string codeOcr = oCR.GetString(bmp);
Dictionary<string, string> matchKey = CodeMatch(codeOcr, codeMatch);
var x = new BarcodeInfo() {Text=codeOcr };
Dictionary<string, string> matchKey = CodeMatch(x, codeMatch);
if (matchKey != null)
{
foreach (string key in matchKey.Keys)
......@@ -446,7 +449,7 @@ namespace BLL
return ocrRotate;
}
private Dictionary<string, string> CodeMatch(string codeText, List<MaterialCodeMatch> codeMatch)
private Dictionary<string, string> CodeMatch(BarcodeInfo codeinfo, List<MaterialCodeMatch> codeMatch)
{
Dictionary<string, string> key = new();
string code, text;
......@@ -456,11 +459,19 @@ namespace BLL
for (int i = 0; i < codeMatch.Count; i++)
{
int matchCount = 0;
var codeText = codeinfo.Text;
codeText = codeText.Replace("\r", "");
codeText = codeText.Replace("\n", "");
code = codeMatch[i].CaseSensitive ? codeText : codeText.ToUpper();
//Log.Debug("CodeMatch " + codeText + " " + codeMatch[i].Keyword);
//匹配CodeType
if (codeMatch[i].CheckCodeType && !string.IsNullOrEmpty(codeMatch[i].CodeType) && !string.IsNullOrEmpty(codeinfo.CodeType)) {
if (codeinfo.CodeType != codeMatch[i].CodeType)
return null;
}
//开头
if (codeMatch[i].MatchStart)
{
......
此文件类型无法预览
此文件类型无法预览
此文件类型无法预览
此文件类型无法预览
此文件类型无法预览
2ae66913ab37ff0c70bea941d4191eb40b957b11
d3ffcaad8a4967d297a1abe4fb2ce7d50c9b8eea
......@@ -86,3 +86,10 @@ D:\rick\vs\SmartScan\BLL\obj\Debug\BLL.csproj.CopyComplete
D:\rick\vs\SmartScan\BLL\bin\Debug\Newtonsoft.Json.dll
D:\rick\vs\SmartScan\BLL\bin\Debug\Newtonsoft.Json.xml
D:\rick\vs\SmartScan\BLL\bin\Debug\Asa.Face.Control.dll
D:\rick\vs\SmartScan\BLL\bin\Debug\Asa.Camera.VisionLib.dll
D:\rick\vs\SmartScan\BLL\bin\Debug\Basler.Pylon.dll
D:\rick\vs\SmartScan\BLL\bin\Debug\MvCameraControl.Net.dll
D:\rick\vs\SmartScan\BLL\bin\Debug\halcondotnet.dll
D:\rick\vs\SmartScan\BLL\bin\Debug\Asa.Camera.VisionLib.pdb
D:\rick\vs\SmartScan\BLL\bin\Debug\Asa.Camera.VisionLib.xml
D:\rick\vs\SmartScan\BLL\bin\Debug\MvCameraControl.Net.xml
......@@ -13,6 +13,8 @@ namespace Model
public bool MatchMiddle { get; set; } = false;
public bool MatchEnd { get; set; } = false;
public bool MatchSplit { get; set; } = false;
public bool CheckCodeType { get; set; } = false;
public string CodeType { get; set; } = "";
public string StartText { get; set; } = "";
public string MiddleText { get; set; } = "";
public int MiddleTextCount { get; set; } = 1;
......
......@@ -16,15 +16,17 @@ namespace SmartScan
{
private readonly int codeID;
private readonly string codeText;
private readonly string codeType;
private readonly Dictionary<FaceButton, UsrCodeExtractList> matchButton = new();
public FrmCodeExtract(string codeText, int codeID, List<MaterialCodeMatch> match)
public FrmCodeExtract(string codeText, int codeID,string codeType, List<MaterialCodeMatch> match)
{
InitializeComponent();
codeText = codeText.Replace("\r", "");
this.codeText = codeText.Replace("\n", "");
this.codeID = codeID;
this.codeType = codeType;
for (int i = 0; i < match.Count; i++)
AddMatch(match[i]);
......@@ -44,7 +46,7 @@ namespace SmartScan
btn.Click += Btn_Click;
flowLayoutPanel1.Controls.Add(btn);
UsrCodeExtractList list = new(codeText, codeText.Length, match);
UsrCodeExtractList list = new(codeText,codeType, codeText.Length, match);
list.DelClick += List_DelClick;
list.KeyChanged += List_KeyChanged;
matchButton.Add(btn, list);
......
......@@ -334,7 +334,7 @@ namespace SmartScan
{
if (ocrRectIndex == -1) return;
List<MaterialCodeMatch> match = codeMatch.FindAll(s => s.CodeID == codeOcr[ocrRectIndex].ID);
FrmCodeExtract frm = new(codeOcr[ocrRectIndex].Text, codeOcr[ocrRectIndex].ID, match);
FrmCodeExtract frm = new(codeOcr[ocrRectIndex].Text, codeOcr[ocrRectIndex].ID, "", match);
DialogResult dr = frm.ShowDialog();
if (dr == DialogResult.OK)
{
......
......@@ -270,7 +270,7 @@ namespace SmartScan
if (workCodeInfo.Count == 0) return;
originalCodeText = Common.cameraVision.GetBarCodeText(workCodeInfo);
bool rtn = Common.mateEdit.MatchingTemplate(originalCodeText, Common.config.DefaultMaterialName, out string mateName, out workCodeKeyword, out originalCodeIsUsed);
bool rtn = Common.mateEdit.MatchingTemplate(workCodeInfo, Common.config.DefaultMaterialName, out string mateName, out workCodeKeyword, out originalCodeIsUsed);
Common.frmMain.Invoke(delegate ()
{
if (rtn)
......
......@@ -31,6 +31,7 @@ namespace SmartScan
{
this.facePanel1 = new Asa.FaceControl.FacePanel();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.ChkCheckCodeType = new Asa.FaceControl.FaceCheckBox();
this.NudMiddleTextCount = new Asa.FaceControl.FaceNumericUpDown();
this.LblMiddleTextCount = new Asa.FaceControl.FaceLabel();
this.NudSplitPart = new Asa.FaceControl.FaceNumericUpDown();
......@@ -57,6 +58,7 @@ namespace SmartScan
this.NudMaxLength = new Asa.FaceControl.FaceNumericUpDown();
this.BtnDel = new Asa.FaceControl.FaceButton();
this.faceTextBox1 = new Asa.FaceControl.FaceTextBox();
this.LblCodeType = new Asa.FaceControl.FaceLabel();
this.facePanel1.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
......@@ -84,6 +86,8 @@ namespace SmartScan
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 22F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 28F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 22F));
this.tableLayoutPanel1.Controls.Add(this.LblCodeType, 3, 7);
this.tableLayoutPanel1.Controls.Add(this.ChkCheckCodeType, 2, 7);
this.tableLayoutPanel1.Controls.Add(this.NudMiddleTextCount, 1, 4);
this.tableLayoutPanel1.Controls.Add(this.LblMiddleTextCount, 0, 4);
this.tableLayoutPanel1.Controls.Add(this.NudSplitPart, 1, 6);
......@@ -127,6 +131,21 @@ namespace SmartScan
this.tableLayoutPanel1.Size = new System.Drawing.Size(508, 461);
this.tableLayoutPanel1.TabIndex = 43;
//
// ChkCheckCodeType
//
this.ChkCheckCodeType.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.ChkCheckCodeType.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.ChkCheckCodeType.BorderWidth = 0;
this.ChkCheckCodeType.Dock = System.Windows.Forms.DockStyle.Fill;
this.ChkCheckCodeType.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.ChkCheckCodeType.Location = new System.Drawing.Point(256, 353);
this.ChkCheckCodeType.Name = "ChkCheckCodeType";
this.ChkCheckCodeType.Padding = new System.Windows.Forms.Padding(3);
this.ChkCheckCodeType.Size = new System.Drawing.Size(136, 44);
this.ChkCheckCodeType.TabIndex = 51;
this.ChkCheckCodeType.Text = "CheckCodeType";
this.ChkCheckCodeType.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// NudMiddleTextCount
//
this.NudMiddleTextCount.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
......@@ -143,7 +162,7 @@ namespace SmartScan
this.NudMiddleTextCount.Padding = new System.Windows.Forms.Padding(3);
this.NudMiddleTextCount.Size = new System.Drawing.Size(105, 44);
this.NudMiddleTextCount.TabIndex = 50;
this.NudMiddleTextCount.Text = "faceNumericUpDown3";
this.NudMiddleTextCount.Text = "1";
this.NudMiddleTextCount.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.NudMiddleTextCount.Value = 1F;
//
......@@ -178,7 +197,7 @@ namespace SmartScan
this.NudSplitPart.Padding = new System.Windows.Forms.Padding(3);
this.NudSplitPart.Size = new System.Drawing.Size(105, 44);
this.NudSplitPart.TabIndex = 47;
this.NudSplitPart.Text = "faceNumericUpDown3";
this.NudSplitPart.Text = "1";
this.NudSplitPart.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.NudSplitPart.Value = 1F;
this.NudSplitPart.ValueChanged += new System.EventHandler(this.NudSplitPart_ValueChanged);
......@@ -295,7 +314,7 @@ namespace SmartScan
this.NudLength.Padding = new System.Windows.Forms.Padding(3);
this.NudLength.Size = new System.Drawing.Size(107, 44);
this.NudLength.TabIndex = 41;
this.NudLength.Text = "faceNumericUpDown4";
this.NudLength.Text = "1";
this.NudLength.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.NudLength.Value = 1F;
this.NudLength.ValueChanged += new System.EventHandler(this.NudLength_ValueChanged);
......@@ -331,7 +350,7 @@ namespace SmartScan
this.NudStart.Padding = new System.Windows.Forms.Padding(3);
this.NudStart.Size = new System.Drawing.Size(107, 44);
this.NudStart.TabIndex = 40;
this.NudStart.Text = "faceNumericUpDown3";
this.NudStart.Text = "0";
this.NudStart.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.NudStart.Value = 0F;
this.NudStart.ValueChanged += new System.EventHandler(this.NudStart_ValueChanged);
......@@ -504,7 +523,7 @@ namespace SmartScan
this.NudMinLength.Padding = new System.Windows.Forms.Padding(3);
this.NudMinLength.Size = new System.Drawing.Size(107, 44);
this.NudMinLength.TabIndex = 34;
this.NudMinLength.Text = "faceNumericUpDown1";
this.NudMinLength.Text = "0";
this.NudMinLength.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.NudMinLength.Value = 0F;
this.NudMinLength.ValueChanged += new System.EventHandler(this.NudMinLength_ValueChanged);
......@@ -541,7 +560,7 @@ namespace SmartScan
this.NudMaxLength.Padding = new System.Windows.Forms.Padding(3);
this.NudMaxLength.Size = new System.Drawing.Size(107, 44);
this.NudMaxLength.TabIndex = 35;
this.NudMaxLength.Text = "faceNumericUpDown2";
this.NudMaxLength.Text = "0";
this.NudMaxLength.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.NudMaxLength.Value = 0F;
this.NudMaxLength.ValueChanged += new System.EventHandler(this.NudMaxLength_ValueChanged);
......@@ -584,6 +603,21 @@ namespace SmartScan
this.faceTextBox1.Text = "faceTextBox1";
this.faceTextBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// LblCodeType
//
this.LblCodeType.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.LblCodeType.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.LblCodeType.BorderWidth = 0;
this.LblCodeType.Dock = System.Windows.Forms.DockStyle.Fill;
this.LblCodeType.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LblCodeType.Location = new System.Drawing.Point(398, 353);
this.LblCodeType.Name = "LblCodeType";
this.LblCodeType.Padding = new System.Windows.Forms.Padding(3);
this.LblCodeType.Size = new System.Drawing.Size(107, 44);
this.LblCodeType.TabIndex = 52;
this.LblCodeType.Text = "-";
this.LblCodeType.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// UsrCodeExtractList
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
......@@ -627,5 +661,7 @@ namespace SmartScan
private Asa.FaceControl.FaceTextBox faceTextBox1;
private Asa.FaceControl.FaceNumericUpDown NudMiddleTextCount;
private Asa.FaceControl.FaceLabel LblMiddleTextCount;
private Asa.FaceControl.FaceCheckBox ChkCheckCodeType;
private Asa.FaceControl.FaceLabel LblCodeType;
}
}
......@@ -8,17 +8,19 @@ namespace SmartScan
{
private readonly bool changed;
private readonly string codeText;
private readonly string codeType;
public event EventHandler DelClick;
public event KeyChangedHandler KeyChanged;
public delegate void KeyChangedHandler(object sender, string key);
public UsrCodeExtractList(string codeText, int codeLength, Model.MaterialCodeMatch match)
public UsrCodeExtractList(string codeText,string codeType, int codeLength, Model.MaterialCodeMatch match)
{
InitializeComponent();
Language.SetLanguage(this);
changed = true;
this.codeText = codeText;
this.codeType = codeType;
CboKeyword.Items.AddRange(Common.macroKey.ToArray());
CboMatchingSplit.Items.AddRange(Common.CODE_SPLIT);
NudStart.Maximum = codeLength;
......@@ -40,6 +42,11 @@ namespace SmartScan
NudMaxLength.Value = match.MaxLength;
CboKeyword.SelectedText = match.Keyword;
NudStart.Value = match.SubstringStart;
match.CodeType = codeType;
ChkCheckCodeType.Checked = match.CheckCodeType;
LblCodeType.Text = codeType;
if (match.SubstringLength == -1)
{
ChkLengthEnd.Checked = true;
......@@ -78,7 +85,9 @@ namespace SmartScan
MaxLength = Convert.ToInt32(NudMaxLength.Value),
Keyword = CboKeyword.SelectedText,
SubstringStart = Convert.ToInt32(NudStart.Value),
SubstringLength = ChkLengthEnd.Checked ? -1 : Convert.ToInt32(NudLength.Value)
SubstringLength = ChkLengthEnd.Checked ? -1 : Convert.ToInt32(NudLength.Value),
CheckCodeType = ChkCheckCodeType.Checked,
CodeType = LblCodeType.Text
};
return match;
}
......
......@@ -255,7 +255,7 @@ namespace SmartScan
MaterialCode code = mateCopy[mateIndex].Code[codeIndex];
List <MaterialCodeMatch> match = mateCopy[mateIndex].Match.FindAll(s => s.CodeID == code.ID);
FrmCodeExtract frm = new(code.Text, code.ID, match);
FrmCodeExtract frm = new(code.Text, code.ID, code.CodeType, match);
DialogResult dr = frm.ShowDialog();
if (dr == DialogResult.OK)
{
......
......@@ -49,6 +49,7 @@ namespace SmartScan
this.RdoOriginal = new Asa.FaceControl.FaceRadioBox();
this.LblHistoryImage = new Asa.FaceControl.FaceLabel();
this.ChkPromptAfterPrinting = new Asa.FaceControl.FaceCheckBox();
this.ChkAutoPrint = new Asa.FaceControl.FaceCheckBox();
this.facePanel1.SuspendLayout();
this.SuspendLayout();
//
......@@ -57,6 +58,7 @@ namespace SmartScan
this.facePanel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.facePanel1.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.facePanel1.BorderWidth = 2;
this.facePanel1.Controls.Add(this.ChkAutoPrint);
this.facePanel1.Controls.Add(this.ChkPromptAfterPrinting);
this.facePanel1.Controls.Add(this.ChkTriggerOpenLight);
this.facePanel1.Controls.Add(this.LblDefaultMate);
......@@ -81,7 +83,7 @@ namespace SmartScan
this.facePanel1.Name = "facePanel1";
this.facePanel1.Padding = new System.Windows.Forms.Padding(3);
this.facePanel1.ShowText = false;
this.facePanel1.Size = new System.Drawing.Size(794, 589);
this.facePanel1.Size = new System.Drawing.Size(794, 614);
this.facePanel1.TabIndex = 0;
this.facePanel1.Text = "facePanel1";
this.facePanel1.TitleFont = new System.Drawing.Font("宋体", 12F);
......@@ -93,7 +95,7 @@ namespace SmartScan
this.ChkTriggerOpenLight.BorderWidth = 0;
this.ChkTriggerOpenLight.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.ChkTriggerOpenLight.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.ChkTriggerOpenLight.Location = new System.Drawing.Point(261, 491);
this.ChkTriggerOpenLight.Location = new System.Drawing.Point(261, 486);
this.ChkTriggerOpenLight.Name = "ChkTriggerOpenLight";
this.ChkTriggerOpenLight.Padding = new System.Windows.Forms.Padding(3);
this.ChkTriggerOpenLight.Size = new System.Drawing.Size(453, 35);
......@@ -136,7 +138,7 @@ namespace SmartScan
this.ChkPrintCompletedClear.BorderWidth = 0;
this.ChkPrintCompletedClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.ChkPrintCompletedClear.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.ChkPrintCompletedClear.Location = new System.Drawing.Point(261, 368);
this.ChkPrintCompletedClear.Location = new System.Drawing.Point(261, 366);
this.ChkPrintCompletedClear.Name = "ChkPrintCompletedClear";
this.ChkPrintCompletedClear.Padding = new System.Windows.Forms.Padding(3);
this.ChkPrintCompletedClear.Size = new System.Drawing.Size(453, 35);
......@@ -151,7 +153,7 @@ namespace SmartScan
this.ChkOpenMaximize.BorderWidth = 0;
this.ChkOpenMaximize.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.ChkOpenMaximize.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.ChkOpenMaximize.Location = new System.Drawing.Point(261, 450);
this.ChkOpenMaximize.Location = new System.Drawing.Point(261, 446);
this.ChkOpenMaximize.Name = "ChkOpenMaximize";
this.ChkOpenMaximize.Padding = new System.Windows.Forms.Padding(3);
this.ChkOpenMaximize.Size = new System.Drawing.Size(453, 35);
......@@ -180,7 +182,7 @@ namespace SmartScan
this.ChkOpenEnterWork.BorderWidth = 0;
this.ChkOpenEnterWork.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.ChkOpenEnterWork.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.ChkOpenEnterWork.Location = new System.Drawing.Point(261, 409);
this.ChkOpenEnterWork.Location = new System.Drawing.Point(261, 406);
this.ChkOpenEnterWork.Name = "ChkOpenEnterWork";
this.ChkOpenEnterWork.Padding = new System.Windows.Forms.Padding(3);
this.ChkOpenEnterWork.Size = new System.Drawing.Size(453, 35);
......@@ -195,7 +197,7 @@ namespace SmartScan
this.ChkLabelEmptyCheck.BorderWidth = 0;
this.ChkLabelEmptyCheck.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.ChkLabelEmptyCheck.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.ChkLabelEmptyCheck.Location = new System.Drawing.Point(261, 327);
this.ChkLabelEmptyCheck.Location = new System.Drawing.Point(261, 326);
this.ChkLabelEmptyCheck.Name = "ChkLabelEmptyCheck";
this.ChkLabelEmptyCheck.Padding = new System.Windows.Forms.Padding(3);
this.ChkLabelEmptyCheck.Size = new System.Drawing.Size(453, 35);
......@@ -360,7 +362,7 @@ namespace SmartScan
this.ChkPromptAfterPrinting.BorderWidth = 0;
this.ChkPromptAfterPrinting.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.ChkPromptAfterPrinting.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.ChkPromptAfterPrinting.Location = new System.Drawing.Point(261, 532);
this.ChkPromptAfterPrinting.Location = new System.Drawing.Point(261, 526);
this.ChkPromptAfterPrinting.Name = "ChkPromptAfterPrinting";
this.ChkPromptAfterPrinting.Padding = new System.Windows.Forms.Padding(3);
this.ChkPromptAfterPrinting.Size = new System.Drawing.Size(453, 35);
......@@ -368,6 +370,21 @@ namespace SmartScan
this.ChkPromptAfterPrinting.Text = "打印完成后提示";
this.ChkPromptAfterPrinting.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// ChkAutoPrint
//
this.ChkAutoPrint.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.ChkAutoPrint.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.ChkAutoPrint.BorderWidth = 0;
this.ChkAutoPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.ChkAutoPrint.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.ChkAutoPrint.Location = new System.Drawing.Point(261, 566);
this.ChkAutoPrint.Name = "ChkAutoPrint";
this.ChkAutoPrint.Padding = new System.Windows.Forms.Padding(3);
this.ChkAutoPrint.Size = new System.Drawing.Size(453, 35);
this.ChkAutoPrint.TabIndex = 18;
this.ChkAutoPrint.Text = "自动打印";
this.ChkAutoPrint.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// UsrWorkMode
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
......@@ -401,6 +418,7 @@ namespace SmartScan
private Asa.FaceControl.FaceLabel LblDefaultMate;
private Asa.FaceControl.FaceListBox LstMate;
private Asa.FaceControl.FaceCheckBox ChkTriggerOpenLight;
private Asa.FaceControl.FaceCheckBox ChkAutoPrint;
private Asa.FaceControl.FaceCheckBox ChkPromptAfterPrinting;
}
}
......@@ -31,6 +31,7 @@ namespace SmartScan
ChkOpenMaximize.Checked = Common.config.OpenMaximize;
ChkTriggerOpenLight.Checked = Common.config.TriggerOpenLight;
ChkPromptAfterPrinting.Checked = Common.config.PromptAfterPrinting;
ChkAutoPrint.Checked = Common.config.AutoPrint;
//默认标签
LstLabel.Items.AddRange(Common.labelEdit.Name);
......@@ -100,10 +101,9 @@ namespace SmartScan
Common.config.PrintCompletedClear = ChkPrintCompletedClear.Checked;
Common.config.TriggerOpenLight = ChkTriggerOpenLight.Checked;
Common.config.PromptAfterPrinting = ChkPromptAfterPrinting.Checked;
Common.config.AutoPrint = ChkAutoPrint.Checked;
Common.config.Save();
}
}
}
......@@ -44,6 +44,9 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Camera\CameraVisionLib\bin\Debug\Asa.Camera.VisionLib.dll</HintPath>
</Reference>
<Reference Include="Asa.Face">
<HintPath>..\..\AutoCountMachine-Single\AutoCountMachine-Single\bin\Debug\Asa.Face.dll</HintPath>
</Reference>
<Reference Include="Asa.Face.Control, Version=1.0.7916.18557, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\FaceControl\FaceControl\bin\Debug\Asa.Face.Control.dll</HintPath>
......
......@@ -5,6 +5,6 @@
</StartArguments>
</PropertyGroup>
<PropertyGroup>
<ProjectView>ShowAllFiles</ProjectView>
<ProjectView>ProjectFiles</ProjectView>
</PropertyGroup>
</Project>
\ No newline at end of file
此文件类型无法预览
69
\ No newline at end of file
105
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<appSettings>
<Language>简体中文</Language>
<Language>English</Language>
<PrinterName>Microsoft Print to PDF</PrinterName>
<PrintLandscape>False</PrintLandscape>
<HistoryImage>Original</HistoryImage>
......@@ -34,4 +34,5 @@
<TriggerOpenLight>True</TriggerOpenLight>
<WebService>
</WebService>
<AutoPrint>True</AutoPrint>
</appSettings>
\ No newline at end of file
......@@ -67,6 +67,7 @@
<ChkOpenMaximize Text="Open software maximized window" Font="Arial,12,," />
<ChkTriggerOpenLight Text="Turn on light after triggering device" Font="Arial,12,," />
<ChkPromptAfterPrinting Text="Prompt message after identification is complete" Font="Arial,12,," />
<ChkAutoPrint Text="Auto Print" Font="Arial,12,," />
<LstPrinter Text="" Font="Arial,12,," />
<LstLabel Text="" Font="Arial,12,," />
<LblDefaultMate Text="First matching template" Font="Arial,12,B," />
......@@ -137,6 +138,7 @@
<LblStart Text="Part code start" Font="Arial,12,," />
<LblLength Text="Part code length" Font="Arial,12,," />
<ChkLengthEnd Text="Code ending" Font="Arial,12,," />
<ChkCheckCodeType Text="Match barcode encode type" Font="Arial,12,," />
<BtnDel Text="Delete" Font="Arial,12,," />
</UsrCodeExtractList>
<FrmAbout Text="About" Font="Arial,24,B,">
......
......@@ -67,6 +67,7 @@
<ChkOpenMaximize Text="打开软件最大化窗口" Font="微软雅黑,12,," />
<ChkTriggerOpenLight Text="触发信号后在打开光源" Font="微软雅黑,12,," />
<ChkPromptAfterPrinting Text="识别完成后提示" Font="微软雅黑,12,," />
<ChkAutoPrint Text="自动打印" Font="微软雅黑,12,," />
<LstPrinter Text="" Font="微软雅黑,12,," />
<LstLabel Text="" Font="微软雅黑,12,," />
<LblDefaultMate Text="优先匹配模板" Font="微软雅黑,12,B," />
......@@ -137,6 +138,7 @@
<LblStart Text="内容截取起始位" Font="微软雅黑,12,," />
<LblLength Text="内容截取长度" Font="微软雅黑,12,," />
<ChkLengthEnd Text="截取至结尾" Font="微软雅黑,12,," />
<ChkCheckCodeType Text="匹配条码编码类型" Font="微软雅黑,12,," />
<BtnDel Text="删除" Font="微软雅黑,12,," />
</UsrCodeExtractList>
<FrmAbout Text="关于" Font="微软雅黑,24,B,">
......
此文件的差异太大,无法显示。
此文件的差异太大,无法显示。
......@@ -9,6 +9,6 @@
<Code ID="6" Text="9D1719" CodeType="Code 128" CenterX="2790.001" CenterY="1902.333" Angle="87.47466" Width="425.98" Height="88.04156" Distance="2871.111" />
<Code ID="7" Text="31PRC0603FR-0710KL&#xD;&#xA;32P232270461003L&#xD;&#xA;1T34G144022438G1550822&#xD;&#xA;Q0005000&#xD;&#xA;9D17141715&#xD;&#xA;26 111&#xD;&#xA;LFP0018" CodeType="Data Matrix ECC 200" CenterX="673.8337" CenterY="1810.76" Angle="0" Width="368.0999" Height="357.5132" Distance="0" />
<Code ID="8" Text="RS000212,5000,170508" CodeType="Data Matrix ECC 200" CenterX="1201.504" CenterY="741.2564" Angle="0" Width="192.9552" Height="191.6358" Distance="0" />
<Match CodeID="1" Keyword="PART" MatchStart="True" MatchMiddle="False" MatchEnd="False" MatchSplit="False" StartText="30PRC" MiddleText="" MiddleTextCount="1" EndText="" SplitText="" CaseSensitive="False" MatchMinLength="False" MatchMaxLength="False" MinLength="0" MaxLength="0" SubstringStart="0" SubstringLength="-1" SplitPart="1" />
<Match CodeID="3" Keyword="QTY" MatchStart="True" MatchMiddle="False" MatchEnd="False" MatchSplit="False" StartText="Q" MiddleText="" MiddleTextCount="1" EndText="" SplitText="" CaseSensitive="False" MatchMinLength="False" MatchMaxLength="False" MinLength="0" MaxLength="0" SubstringStart="1" SubstringLength="-1" SplitPart="1" />
<Match CodeID="3" Keyword="QTY" MatchStart="True" MatchMiddle="False" MatchEnd="False" MatchSplit="False" CheckCodeType="False" CodeType="" StartText="Q" MiddleText="" MiddleTextCount="1" EndText="" SplitText="" CaseSensitive="False" MatchMinLength="False" MatchMaxLength="False" MinLength="0" MaxLength="0" SubstringStart="1" SubstringLength="-1" SplitPart="1" />
<Match CodeID="1" Keyword="PART" MatchStart="True" MatchMiddle="False" MatchEnd="False" MatchSplit="False" CheckCodeType="True" CodeType="Code 128" StartText="30PRC" MiddleText="" MiddleTextCount="1" EndText="" SplitText="" CaseSensitive="False" MatchMinLength="False" MatchMaxLength="False" MinLength="0" MaxLength="0" SubstringStart="0" SubstringLength="-1" SplitPart="1" />
</Material>
\ No newline at end of file
......@@ -8,6 +8,6 @@
<Code ID="5" Text="91168273" CodeType="Code 128" CenterX="1432.333" CenterY="1743.333" Angle="-106.4887" Width="373.5278" Height="102.1858" Distance="1868.234" />
<Code ID="6" Text="4LCHINA" CodeType="Code 128" CenterX="2050.959" CenterY="1848.443" Angle="-110.6699" Width="535.8144" Height="102.411" Distance="2571.407" />
<Code ID="7" Text="/PS54-64-80209/1PT523W476M035APE100/Q1000/2029S70CY/V1223/S05803193/4LCN" CodeType="Data Matrix ECC 200" CenterX="2055.339" CenterY="1289.525" Angle="0" Width="33.10242" Height="112.0428" Distance="0" />
<Match CodeID="3" Keyword="PART" MatchStart="True" MatchMiddle="False" MatchEnd="False" MatchSplit="False" StartText="P" MiddleText="" MiddleTextCount="1" EndText="" SplitText="" CaseSensitive="False" MatchMinLength="False" MatchMaxLength="False" MinLength="0" MaxLength="0" SubstringStart="1" SubstringLength="-1" SplitPart="1" />
<Match CodeID="0" Keyword="QTY" MatchStart="True" MatchMiddle="False" MatchEnd="False" MatchSplit="False" StartText="Q" MiddleText="" MiddleTextCount="1" EndText="" SplitText="" CaseSensitive="False" MatchMinLength="False" MatchMaxLength="True" MinLength="0" MaxLength="6" SubstringStart="1" SubstringLength="-1" SplitPart="1" />
<Match CodeID="3" Keyword="PART" MatchStart="True" MatchMiddle="False" MatchEnd="False" MatchSplit="False" CheckCodeType="False" CodeType="" StartText="P" MiddleText="" MiddleTextCount="1" EndText="" SplitText="" CaseSensitive="False" MatchMinLength="False" MatchMaxLength="False" MinLength="0" MaxLength="0" SubstringStart="1" SubstringLength="-1" SplitPart="1" />
<Match CodeID="0" Keyword="QTY" MatchStart="True" MatchMiddle="False" MatchEnd="False" MatchSplit="False" CheckCodeType="False" CodeType="Code 128" StartText="Q" MiddleText="" MiddleTextCount="1" EndText="" SplitText="" CaseSensitive="False" MatchMinLength="False" MatchMaxLength="True" MinLength="0" MaxLength="6" SubstringStart="1" SubstringLength="-1" SplitPart="1" />
</Material>
\ No newline at end of file
......@@ -9,6 +9,10 @@
<level value="Debug"/>
<appender-ref ref="VisionLib"/>
</logger>
<root>
<level value="Debug"/>
<appender-ref ref="VisionLib"/>
</root>
<appender name="SmartScan" type="log4net.Appender.RollingFileAppender">
<param name="File" value="Logs\\SmartScan.log" />
<param name="Encoding" value="UTF-8"/>
......
......@@ -9,6 +9,10 @@
<level value="Debug"/>
<appender-ref ref="VisionLib"/>
</logger>
<root>
<level value="Debug"/>
<appender-ref ref="VisionLib"/>
</root>
<appender name="SmartScan" type="log4net.Appender.RollingFileAppender">
<param name="File" value="Logs\\SmartScan.log" />
<param name="Encoding" value="UTF-8"/>
......
a0e03d0d2ba6d87d76ccae0a1e72703b1564a0a5
ec99df8ebbf296d4bcc52a6b9e7098bbe68f3a07
......@@ -162,3 +162,4 @@ D:\rick\vs\SmartScan\SmartScan\bin\Debug\halcondotnet.dll
D:\rick\vs\SmartScan\SmartScan\bin\Debug\Asa.Camera.VisionLib.pdb
D:\rick\vs\SmartScan\SmartScan\bin\Debug\Asa.Camera.VisionLib.xml
D:\rick\vs\SmartScan\SmartScan\bin\Debug\MvCameraControl.Net.xml
D:\rick\vs\SmartScan\SmartScan\bin\Debug\Asa.Face.dll
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!