From cd92df8b7b383a6a3218f50b3b62264db8332899 Mon Sep 17 00:00:00 2001
From: kazelee <1847801760@qq.com>
Date: 星期三, 14 五月 2025 17:21:49 +0800
Subject: [PATCH] 引入NETSDKCS,修复版本兼容问题;完成拍照逻辑开发,跑通待调试

---
 Program.cs |   25 +++++++++++--------------
 1 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/Program.cs b/Program.cs
index 40608f4..942c7dd 100644
--- a/Program.cs
+++ b/Program.cs
@@ -13,6 +13,7 @@
 namespace HH.WCS.Mobox3.AnGang {
     internal class Program
     {
+        [STAThread]
         static void Main(string[] args)
         {
             //鍩虹璁剧疆淇℃伅鍒濆鍖�@@ -22,9 +23,12 @@
             //2.0 寮�惎tcp
             StartTcp();
             //3.0 寮�惎S7
-            StartS7();
+            //StartS7();
             //4.0 寮�惎Modbus
-            StartModbus();
+            //StartModbus();
+
+            //寮�惎鐩告満
+            StartSnap();
 
             //5.0 寮�惎绾跨▼
             var rc = HostFactory.Run(x =>
@@ -92,18 +96,6 @@
             //        Console.WriteLine("S7ProductionLineHelper," + item.ProductionLine_IP);
             //    }
             //}
-
-            ////绉伴噸鐨凷7璁惧
-            //var weightPLCDevice = Settings.WeightDevices;
-
-            //if (weightPLCDevice.Count > 0)
-            //{
-            //    foreach (var item in weightPLCDevice)
-            //    {
-            //        new S7Helper(item.WeightDevice_IP, (short)item.WeightDevice_Rack, (short)item.WeightDevice_Slot);
-            //        Console.WriteLine("S7WeightDeviceHelper," + item.WeightDevice_Name);
-            //    }
-            //}
         }
 
         /// <summary>
@@ -122,6 +114,11 @@
             //}
         }
 
+        private static void StartSnap() {
+            //new SnapManager(Settings.Snap);
+            new SnapManager(Settings.Config.Snap[0]);
+        }
+
         public class WorkThread
         {
             public void Start()

--
Gitblit v1.9.1