From e3868d4d61ded0e76fc8fe3fdacdd9e6d9113cf1 Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期一, 13 十月 2025 08:50:15 +0800
Subject: [PATCH] 优化HMI;
---
Plugin.TestResult/DataTable.xaml.cs | 24 ++++++++++++++++++++++--
1 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/Plugin.TestResult/DataTable.xaml.cs b/Plugin.TestResult/DataTable.xaml.cs
index 54364f4..84911cd 100644
--- a/Plugin.TestResult/DataTable.xaml.cs
+++ b/Plugin.TestResult/DataTable.xaml.cs
@@ -6,7 +6,6 @@
using Plugin.TestResult_WPF.Util;
using SuperSocket.SocketBase.Protocol;
using System;
-using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
@@ -222,6 +221,12 @@
private void ScanWindow_Click(object sender, RoutedEventArgs e)
{
+ if (!parent.IsRunning)
+ {
+ MsgBoxHelper.WarnMessage(this, "璇峰厛鐐瑰嚮鍙充晶鍚姩鎸夐挳鍚姩娴嬭瘯绋嬪簭锛�", null, MessageBoxButton.OK);
+ return;
+ }
+
if (scanner != null)
{
scanner.Activate();
@@ -371,7 +376,7 @@
private void TcpServer_NewRequestReceived(TcpSession session, StringRequestInfo requestInfo)
{
string msg = requestInfo.Body;
- ViewControl.Logger.Info($"TCP Data From {session.RemoteEndPoint}: {msg}.");
+ //ViewControl.Logger.Info($"TCP Data From {session.RemoteEndPoint}: {msg}.");
string[] datas_10015 = msg.Split(';');
int cellIndex = int.Parse(datas_10015[1]);
@@ -524,6 +529,13 @@
private void ClearAllSnr_Click(object sender, RoutedEventArgs e)
{
+ var str = $"StationState.Start_{title}";
+ if (parent.engine.Globals.GetValBoolean(str, 0) == true)
+ {
+ MsgBoxHelper.Error(Window.GetWindow(this), "绋嬪簭杩愯涓紝涓嶈兘娓呯┖鏉$爜");
+ return;
+ }
+
if (MsgBoxHelper.WarnMessage(Window.GetWindow(this), LangUtil.Get("Tr.MakeSureClearAllSNR")) == MessageBoxResult.OK)
{
try
@@ -544,5 +556,13 @@
}
}
}
+
+ private void Button_Click_2(object sender, RoutedEventArgs e)
+ {
+ if (MsgBoxHelper.WarnMessage(Window.GetWindow(this), "纭畾瑕佸仠姝㈣鐐変綅鐨勮�佸寲娴嬭瘯鍚楋紵") == MessageBoxResult.OK)
+ {
+ parent.SetStartFlag(this.index, false);
+ }
+ }
}
}
--
Gitblit v1.9.1