| | |
| | | using System.ComponentModel; |
| | | using System.Runtime.CompilerServices; |
| | | using HMI.Core.Util; |
| | | using Panuon.WPF.UI; |
| | | using System.Windows; |
| | | |
| | | namespace Plugin.TestResult_WPF |
| | |
| | | /// <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(); |
| | | } |