/// <summary> /// Implementation of SaveCommand. /// Sets status to true, saves the selected heavy modifications, and triggers the ReadyToClose event. /// </summary> public void SaveImplementation() { HeavyModificationsViewModel.Save(); Status = true; IcParameters.Instance.Update(); ReadyToClose?.Invoke(this, EventArgs.Empty); }
/// <summary> /// Initializes a new instance of the <see cref="HeavyModificationsWindowViewModel"/> class. /// </summary> /// <param name="dialogService">Dialog service for opening dialogs from view model.</param> public HeavyModificationsWindowViewModel(IDialogService dialogService) { HeavyModificationsViewModel = new HeavyModificationsViewModel(dialogService); SaveCommand = ReactiveCommand.Create(SaveImplementation); CancelCommand = ReactiveCommand.Create(CancelImplementation); Status = false; }