using CommunityToolkit.Mvvm.Input; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Media; namespace SummaryModule.Pops.N2Purge; partial class N2PurgeSelectorViewModel : ObservableObject, IPopAware { public ImageSource? ImageSource { get; set; } = (DrawingImage)Application.Current.Resources["Icon_N2_Purge"]; public string? Title { get; set; } = "Sequence Select"; public Action? RequestClose { get; set; } public bool CanClose() { return true; } public void OnClose() { } public void OnPop(object? state) { this.Mode = "N2 Purge Mode"; } [ObservableProperty] private string? _Mode; [RelayCommand] private void Switch(string para) { this.Mode = para; } [RelayCommand] private void Apply() { this.RequestClose?.Invoke(); } }