From 9e38ea85c8d332c1424752cf68a593e18e20c036 Mon Sep 17 00:00:00 2001 From: "xhm\\HP" <1173131411@qq.com> Date: Thu, 27 Mar 2025 15:30:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9UPH?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DHSoftware/MainWindow.cs | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/DHSoftware/MainWindow.cs b/DHSoftware/MainWindow.cs index 5de03cd..9d4e87a 100644 --- a/DHSoftware/MainWindow.cs +++ b/DHSoftware/MainWindow.cs @@ -16,6 +16,7 @@ using DVPCameraType; using HalconDotNet; using Microsoft.Win32; using OpenCvSharp; +using SqlSugar; using System; using System.CodeDom; using System.Collections.Concurrent; @@ -887,8 +888,9 @@ namespace DHSoftware { return; } - ProductNum_Total++; - CalculateOEE(); + UpdateResult(DateTime.Now, null, product.ProductResult.GetEnumDescription()); + // ProductNum_Total++; + // CalculateOEE(); this.BeginInvoke(new MethodInvoker(delegate () { int currentScrollPosition = richTextBox1.GetPositionFromCharIndex(richTextBox1.TextLength).Y; @@ -992,20 +994,18 @@ namespace DHSoftware }); } - public void SetResult() + public async Task UpdateResult(DateTime dt, object objData, string resultStr) { - //// detectResult.IsPreTreatDone = detectResult.VisionImageSet.PreTreatedFlag - ////2024-02-29 目标检测不能全是NG - //if (IsPreTreatNG || IsObjectDetectNG) - //{ - // return; - //} + // CurrentState = RunState.Running; - //if (IsPreTreatDone && IsMLDetectDone && IsAfterTreatDone) - //{ - // ResultState = ResultState.OK; - // ResultLabel = ResultState.OK.GetEnumDescription(); - //} + ProductNum_Total++; + //AddOKProduct(resultStr); + + + + CalculateOEE(); + + } private void HandleStopButton()