public override bool Execute() { var tfsUri = ActionContext.GetValue <Uri>("TfsUri"); _ConfigurationController.SetTFSUri(tfsUri); _ConfigurationController.UseLocalAccount(ViewModel.UseLocalAccount); _ConfigurationController.AllowClipboardUsage(ViewModel.EnableClipboard); if (!ViewModel.UseLocalAccount) { _ConfigurationController.SetCustomCredentials(ViewModel.Username, ViewModel.Password, ViewModel.Domain); } if (ViewModel.UseCustomMergeMessage) { _ConfigurationController.EnableCustomMergeMessage(ViewModel.CustomMergeMessage); } else { _ConfigurationController.DisableCustomMergeMessage(); } if (ViewModel.LoadLastSavedStateAtStartup) { _ConfigurationController.LoadLastStateOnStartup(); } else { _ConfigurationController.DisableLoadLastStateOnStartup(); } if (ViewModel.SaveBeforeClose) { _ConfigurationController.SaveStateBeforeClosing(); } else { _ConfigurationController.DisableSaveStateBeforeClosing(); } _ConfigurationController.Save(); return(true); }
public void Save() { _configurationController.Save( _configurationFactory.AppConfigurationFrom(_desktopConfigurations)); }