From 559890c482f5973f06aafdfec9550fee5ba3c7f2 Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期一, 09 十一月 2026 17:02:15 +0800
Subject: [PATCH] feat: CAN 模拟器 TCP 化 + 多设备并发调试 + 后台生命周期管理

---
 Plugin.BurnIn/DataTable.xaml.cs |   73 ++++++++++++++++++++++++++++--------
 1 files changed, 57 insertions(+), 16 deletions(-)

diff --git a/Plugin.BurnIn/DataTable.xaml.cs b/Plugin.BurnIn/DataTable.xaml.cs
index f9ad8ac..7cf2998 100644
--- a/Plugin.BurnIn/DataTable.xaml.cs
+++ b/Plugin.BurnIn/DataTable.xaml.cs
@@ -1,4 +1,5 @@
 锘縰sing HMI.Base;
+using HMI.Core.Manager;
 using HMI.Core.Setting;
 using HMI.Core.Util;
 using HMI.LogUtil;
@@ -584,12 +585,12 @@
                 GetSingleCell(cellIndex).SetInfos(new Info
                 {
                     step = values[0],
-                    value = values[1],
-                    limitUp = values[2],
-                    limitDown = values[3],
-                    unit = values[4],
-                    result = values[5],
-                    updateTime = values[6]
+                    value = values[2],
+                    unit = values[3],
+                    limitUp = values[4],
+                    limitDown = values[5],
+                    result = values[6],
+                    updateTime = values[7]
                 });
             });
             //session.Send("1");
@@ -599,17 +600,10 @@
         {
             infoTable.UpdateNumber(infoTable.okCount + ok, infoTable.ngCount + ng);
 
-            if (ParamSetting.ProbeByModel)
-            {
-
-            }
-            else
-            {
-                IniFileHelper.WriteIniData($"Oven_{index}", "Pass", infoTable.okCount.ToString(),
+            IniFileHelper.WriteIniData($"Oven_{index}", "Pass", infoTable.okCount.ToString(),
                    this.CountIniPath);
-                IniFileHelper.WriteIniData($"Oven_{index}", "Fail", infoTable.ngCount.ToString(),
-                    this.CountIniPath);
-            }
+            IniFileHelper.WriteIniData($"Oven_{index}", "Fail", infoTable.ngCount.ToString(),
+                this.CountIniPath);
         }
 
         /// <summary>
@@ -883,5 +877,52 @@
             string key = $"StationHMI.UUTHMI[{this.index}].Abort";
             parent.executionWrapper?.SetStationGlobalValue(key, 0, true);
         }
+
+        private void MenuItem_Click(object sender, RoutedEventArgs e)
+        {
+            string manualDebugSeq = ParameterManager.GetCommonParameterByName("ManualDebugSeqPath")?.Value;
+            if (string.IsNullOrEmpty(manualDebugSeq))
+            {
+                MsgBoxHelper2.Error("璇峰厛璁剧疆鎵嬪姩璋冭瘯搴忓垪璺緞[ManualDebugSeqPath]!");
+                return;
+            }
+            string modelPath = parent.testModelFile;
+            var win = new ManualDebugWindow(manualDebugSeq, modelPath, true, cells, mainGrid.Columns)
+            {
+                CellCount = cells.Length,
+                Title = $"{this.title}鎵嬪姩璋冭瘯",
+                Owner = Window.GetWindow(this),
+                OvenIndex = this.index,
+                OvenName = this.title,
+                CellName = this.title,
+                CellIndex = -1
+            };
+            win.ShowDialog();
+        }
+        private void ContextMenu_Closed(object sender, RoutedEventArgs e)
+        {
+            this.ContextMenu = null;
+        }
+
+        private void control_PreviewMouseRightButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
+        {
+            if (!parent.inManualDebugMode)
+            {
+                return;
+            }
+            ContextMenu contextMenu = new ContextMenu();
+            contextMenu.Closed += ContextMenu_Closed;
+
+            var item = new MenuItem
+            {
+                IsCheckable = false,
+                Name = "manualDebugItem",
+                Header = this.lang("鎵嬪姩璋冭瘯"),
+            };
+            item.Click += MenuItem_Click;
+            contextMenu.Items.Add(item);
+
+            this.ContextMenu = contextMenu;
+        }
     }
 }

--
Gitblit v1.9.1