public ProfileSettingsViewModel() { ButtonClickedToClose = ButtonClickedToClose.None; AddProfileCommand = new DelegateCommand(AddProfileExcecute); DeleteProfileCommand = new DelegateCommand(DeleteProfileExcecute, DeleteProfileCanExcecute); RenameProfileCommand = new DelegateCommand(RenameProfileExcecute, RenameProfileCanExcecute); SaveButtonCommand = new DelegateCommand(SaveExcecute); }
private void SaveExcecute(object obj) { ButtonClickedToClose = ButtonClickedToClose.Save; var actionResultDict = ProfileChecker.ProfileCheckDict(Settings.ConversionProfiles); if (!actionResultDict) { if (!QueryIgnoreDefectiveProfiles(actionResultDict)) { ButtonClickedToClose = ButtonClickedToClose.None; return; //Cancel if user wants to edit defective profiles } } Settings.ApplicationSettings.LastUsedProfileGuid = CurrentProfile.Guid; RaiseCloseView(true); }