From b544d5cccd76735e034c8055918a50927b437474 Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期二, 10 十一月 2026 08:29:04 +0800
Subject: [PATCH] fix: 维护模式重复进入失败与按钮灰死 + Broker 并发验证用例
---
HMI.DataViewer/DataViewer.xaml.cs | 22 +++-------------------
1 files changed, 3 insertions(+), 19 deletions(-)
diff --git a/HMI.DataViewer/DataViewer.xaml.cs b/HMI.DataViewer/DataViewer.xaml.cs
index 283734b..d704535 100644
--- a/HMI.DataViewer/DataViewer.xaml.cs
+++ b/HMI.DataViewer/DataViewer.xaml.cs
@@ -1,6 +1,7 @@
锘縰sing HMI.Base;
using HMI.Core.Util;
using HMI.DataViewer.Entity;
+using HMI.UI.Converter;
using HMI.UI.Util;
using NPOI.SS.Formula.Functions;
using NPOI.SS.UserModel;
@@ -19,22 +20,7 @@
namespace HMI.DataViewer
{
- public class DefaultValueConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- if (value is DateTime date)
- {
- return date.ToString("yyyy-MM-dd HH:mm:ss");
- }
- return value.ToString();
- }
-
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- return value;
- }
- }
+
/// <summary>
/// UserControl1.xaml 鐨勪氦浜掗�昏緫
@@ -65,8 +51,6 @@
}
private Dictionary<string, DataBase_Setting> Map = new Dictionary<string, DataBase_Setting>();
-
- private IValueConverter defaultConverter = new DefaultValueConverter();
private void Button_Click(object sender, RoutedEventArgs e)
{
@@ -285,7 +269,7 @@
Header = header,
Binding = new System.Windows.Data.Binding(bindingPath)
{
- Converter = defaultConverter
+ Converter = DateStrConverter.Instance
},
Width = new DataGridLength(1, DataGridLengthUnitType.Star)
};
--
Gitblit v1.9.1