From c39b6196509ee07d5799cd2a6611700995948f5b Mon Sep 17 00:00:00 2001 From: patrick.xu <patrick.xu@broconcentric.com> Date: 星期三, 29 十二月 2021 14:23:45 +0800 Subject: [PATCH] 抽样时日期比对添加年数配置修改 --- MainForm.cs | 29 +++++++++++++++++++++-------- 1 files changed, 21 insertions(+), 8 deletions(-) diff --git a/MainForm.cs b/MainForm.cs index 9355a5c..3c791e3 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -137,6 +137,8 @@ this.KeyPreview = true; this.KeyPress += MainForm_KeyPress; + Trace.TraceInformation("閿洏浜嬩欢宸插姞杞�"); + hcXyView.Focus(); } @@ -144,16 +146,28 @@ CarrierBarcodeCtrl cBarcodeCtrl = null; private void MainForm_KeyPress(object sender, KeyPressEventArgs e) { - if (e.KeyChar == 27) + try { - hcXyView.Focus(); - } - else - { - if (allowBarcodeFlag) + if (e.KeyChar == 27) { - cBarcodeCtrl.AddChar(e.KeyChar); + hcXyView.Focus(); } + else + { + if (allowBarcodeFlag) + { + Trace.TraceInformation($"閿洏杈撳叆锛歿e.KeyChar}"); + cBarcodeCtrl.AddChar(e.KeyChar); + } + else + { + Trace.TraceInformation($"褰撳墠涓嶅厑璁告寜閿緭鍏ワ細{e.KeyChar}"); + } + } + } + catch (Exception ex) + { + Trace.TraceError($"閿洏浜嬩欢寮傚父锛歿ex.Message}"); } } #endregion @@ -946,7 +960,6 @@ if ((bool)item.value) { //opc.Write(OPCInputTag.UnloadTrayReady, false); - allowBarcodeFlag = false; } break; -- Gitblit v1.8.0