/// <summary> /// Calls save method on Profile's VM class /// </summary> private void SaveProfileAction() { if (SelectedProfile != null) { if (SelectedProfile.IsDefault) { foreach (var profile in ProfileList.Where(x => x.Name != SelectedProfile.Name)) { profile.IsDefault = false; profile.SaveProfile(false); } Properties.Settings.Default.DefaultProfile = SelectedProfile.Name; } SelectedProfile.SaveProfile(); MainWindowVm.Instance.UpdateProfileListFromProfilesWindow(ProfileList); } }
public MainWindowView() { SaveCommand = new RelayCommand(o => SelectedProfile.SaveProfile()); LoadCommand = new RelayCommand(LoadProfile, CanLoadProfile); }