From 4cac1b533e133fdc8b3def90a0f998820f51907a Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期三, 26 三月 2025 17:57:59 +0800
Subject: [PATCH] 优化UI,新增日志自动删除;

---
 Plugin.TestResult/InfoWindow.xaml.cs |   30 +++++++-----------------------
 1 files changed, 7 insertions(+), 23 deletions(-)

diff --git a/Plugin.TestResult/InfoWindow.xaml.cs b/Plugin.TestResult/InfoWindow.xaml.cs
index bb085f8..9c74852 100644
--- a/Plugin.TestResult/InfoWindow.xaml.cs
+++ b/Plugin.TestResult/InfoWindow.xaml.cs
@@ -1,37 +1,20 @@
-锘縰sing Plugin.TestResult_WPF.Model;
+锘縰sing Panuon.WPF.UI;
+using Plugin.TestResult_WPF.Model;
 using System.Collections.ObjectModel;
-using System.ComponentModel;
-using System.Runtime.CompilerServices;
-using System.Windows;
 
 namespace Plugin.TestResult_WPF
 {
     /// <summary>
     /// InfoWindow.xaml 鐨勪氦浜掗�昏緫
     /// </summary>
-    public partial class InfoWindow : Window, INotifyPropertyChanged
+    public partial class InfoWindow : 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);
         }
 
         private ObservableCollection<Info> _dataSource;
@@ -39,14 +22,15 @@
         public ObservableCollection<Info> dataSource
         {
             get => _dataSource == null ? new ObservableCollection<Info>() : _dataSource;
-            set => RaiseAndSetIfchanged(ref _dataSource, value);
+            set => Set(ref _dataSource, value);
         }
 
         public InfoWindow(string title, ObservableCollection<Info> infos)
         {
             this.title = title;
             this.dataSource = infos;
-            this.DataContext = this;
+            DataContext = this;
+            Topmost = false;
             InitializeComponent();
         }
 

--
Gitblit v1.9.1