From 32304b0a0a2e4af174c0feea96d2387bb75a2556 Mon Sep 17 00:00:00 2001
From: C3032 <caoxingqi@shlanbao.cn>
Date: 星期三, 18 三月 2026 16:03:44 +0800
Subject: [PATCH] 新增:读码器功能模块,集成华睿读码器并初步实现读码功能

---
 LB_SmartVision/Forms/Pages/ProcessPage/ProcessPage.cs |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/LB_SmartVision/Forms/Pages/ProcessPage/ProcessPage.cs b/LB_SmartVision/Forms/Pages/ProcessPage/ProcessPage.cs
index ce25c32..f57158a 100644
--- a/LB_SmartVision/Forms/Pages/ProcessPage/ProcessPage.cs
+++ b/LB_SmartVision/Forms/Pages/ProcessPage/ProcessPage.cs
@@ -333,6 +333,16 @@
                         LogInfo?.Invoke(string.Format("娴佺▼[{0}]姝ラ\"{1}\"鍔犺浇澶辫触浜�", this.Text, ProcessName), LogInfoType.ERROR);
                     process.strProcessName = ProcessName;
                 }
+                else if (process is LB_VisionProcesses.Processes.BarcodeReaderProcess)
+                {
+                    LB_VisionProcesses.BarcodeReaders.BarcodeReaderForm barcodeForm 
+                        = new LB_VisionProcesses.BarcodeReaders.BarcodeReaderForm((LB_VisionProcesses.Processes.BarcodeReaderProcess)process, ProcessPath);
+                    barcodeForm.ShowDialog();
+
+                    if (!(process.Load(ProcessPath)))
+                        LogInfo?.Invoke(string.Format("娴佺▼[{0}]姝ラ\"{1}\"鍔犺浇澶辫触浜�", this.Text, ProcessName), LogInfoType.ERROR);
+                    process.strProcessName = ProcessName;
+                }
                 else if (ClassName.Contains("CommunicatorConfig") && process is CommunicatorConfig)
                 {
                     LB_VisionProcesses.Communicators.CommunicatorForm communicatorForm
@@ -370,7 +380,11 @@
 
                 ProcessRunBll.UpdataInputsAndOutputs(ProcessName, process);
             }
-            catch (Exception ex) { Debug.WriteLine(ex.Message); }
+            catch (Exception ex) 
+            { 
+                Debug.WriteLine(ex.Message);
+                MessageBox.Show($"鎵撳紑閰嶇疆鐣岄潰澶辫触: {ex.Message}\n{ex.StackTrace}", "閿欒", MessageBoxButtons.OK, MessageBoxIcon.Error);
+            }
         }
 
         private void AddBranch(string ProcessName)

--
Gitblit v1.9.3