Exemplo n.º 1
0
        public ProfileSettingsViewModel()
        {
            ButtonClickedToClose = ButtonClickedToClose.None;

            AddProfileCommand    = new DelegateCommand(AddProfileExcecute);
            DeleteProfileCommand = new DelegateCommand(DeleteProfileExcecute, DeleteProfileCanExcecute);
            RenameProfileCommand = new DelegateCommand(RenameProfileExcecute, RenameProfileCanExcecute);

            SaveButtonCommand = new DelegateCommand(SaveExcecute);
        }
Exemplo n.º 2
0
        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);
        }