示例#1
0
        /// <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);
            }
        }
示例#2
0
 public MainWindowView()
 {
     SaveCommand = new RelayCommand(o => SelectedProfile.SaveProfile());
     LoadCommand = new RelayCommand(LoadProfile, CanLoadProfile);
 }