From fbd5eb6da7786573a37326a10f09c722288cc657 Mon Sep 17 00:00:00 2001
From: TD <Administrator@PC-20240810NGQJ>
Date: Fri, 28 Mar 2025 08:35:29 +0800
Subject: [PATCH] 1

---
 DHSoftware/MainWindow.cs | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/DHSoftware/MainWindow.cs b/DHSoftware/MainWindow.cs
index 8754f09..4056b3b 100644
--- a/DHSoftware/MainWindow.cs
+++ b/DHSoftware/MainWindow.cs
@@ -591,7 +591,7 @@ namespace DHSoftware
             //计数清零
             PieceCount = 0;
 
-
+            Thread.Sleep(100);
             if (PLC?.Enable == true)
             {
                 PLC.OnNewPieces -= MainMotion_NewPieces;
@@ -605,7 +605,18 @@ namespace DHSoftware
                     cam.SnapshotCount = 0;
                 }
             });
-
+            Cameras.ForEach(d => {
+                if (d is CameraBase cam)
+                {
+                    cam.SnapshotCount = 0;
+                }
+            });
+            HKCameras.ForEach(d => {
+                if (d is CameraBase cam)
+                {
+                    cam.SnapshotCount = 0;
+                }
+            });
             //PrepareBatchNO();
             // isInPositionChecking = false;
             //isFullTrayChecking = false;