From 2e889843b4c171f2d6ad8e0d53084040703d11f6 Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期一, 09 十一月 2026 13:18:21 +0800
Subject: [PATCH] docs: CAN 总线级应答器 + 硬件调试页多标签多会话 设计规格

---
 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