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/ChartWindow.xaml.cs | 24 +++++-------------------
1 files changed, 5 insertions(+), 19 deletions(-)
diff --git a/Plugin.TestResult/ChartWindow.xaml.cs b/Plugin.TestResult/ChartWindow.xaml.cs
index a49535f..8e0e55f 100644
--- a/Plugin.TestResult/ChartWindow.xaml.cs
+++ b/Plugin.TestResult/ChartWindow.xaml.cs
@@ -1,5 +1,5 @@
-锘縰sing System.ComponentModel;
-using System.Runtime.CompilerServices;
+锘縰sing HMI.Core.Util;
+using Panuon.WPF.UI;
using System.Windows;
namespace Plugin.TestResult_WPF
@@ -7,32 +7,18 @@
/// <summary>
/// ChartWindow.xaml 鐨勪氦浜掗�昏緫
/// </summary>
- public partial class ChartWindow : Window, INotifyPropertyChanged
+ public partial class ChartWindow : WindowX
{
- #region ...
- public event PropertyChangedEventHandler PropertyChanged;
-
- public virtual void RaisePropertyChanged(string name)
- {
- PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
- }
-
- public void RaiseAndSetIfchanged<T>(ref T old, T @new, [CallerMemberName] string propertyName = null)
- {
- old = @new;
- if (propertyName != null) RaisePropertyChanged(propertyName);
- }
- #endregion
private string _title;
public string title
{
get => _title;
- set => RaiseAndSetIfchanged(ref _title, value);
+ set => Set(ref _title, value);
}
public ChartWindow(string title)
{
- this.title = $"{title}璇︾粏鏇茬嚎";
+ this.title = $"{title}{this.lang("Tr.DetailChart")}";
this.DataContext = this;
InitializeComponent();
}
--
Gitblit v1.9.1