alielie
2025-08-25 c4a3f8db90530a727ffab77c3bb5bb7d782792bf
Plugin.TestResult/ChartWindow.xaml.cs
@@ -1,5 +1,5 @@
using System.ComponentModel;
using System.Runtime.CompilerServices;
using 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();
        }