using CommunityToolkit.Mvvm.Input; using HandyControl.Tools.Extension; using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; namespace Sinvo.EplanHpD.Plugin.WPFUI.View.Dialog { public class NotSavedWarningViewModel : INotifyPropertyChanged, IDialogResultable { public event PropertyChangedEventHandler PropertyChanged; public void OnChange([CallerMemberName] string propName = null) { PropertyChanged?.Invoke(propName, new PropertyChangedEventArgs(propName)); } private Dictionary _notSavedLectotypeList = []; public Dictionary NotSavedLectotypeList { get => _notSavedLectotypeList; set { _notSavedLectotypeList = value; OnChange(); } } public bool Result { get ; set ; } public Action CloseAction { get; set; } internal void Close(bool result) { Result = result; CloseAction?.Invoke(); } } }