Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public void Save()
 {
     _configurationController.Save(
         _configurationFactory.AppConfigurationFrom(_desktopConfigurations));
 }