Пример #1
0
        private void SetChildPresenterSourceControlProviders(ISourceControlProvider provider)
        {
            if (Provider.CurrentBranch == null)
            {
                ViewModel_ErrorThrown(null,
                                      new ErrorEventArgs(RubberduckUI.SourceControl_NoBranchesTitle, RubberduckUI.SourceControl_NoBranchesMessage, NotificationType.Error));

                _config.Repositories.Remove(_config.Repositories.FirstOrDefault(repo => repo.Id == _vbe.ActiveVBProject.HelpFile));
                _configService.Save(_config);

                _provider = null;
                Status    = RubberduckUI.Offline;
                return;
            }

            foreach (var tab in TabItems)
            {
                tab.ViewModel.Provider = provider;
            }
        }
        private void UpdateSettings()
        {
            _config.UserName     = UserName;
            _config.EmailAddress = EmailAddress;
            _config.DefaultRepositoryLocation = DefaultRepositoryLocation;

            _configService.Save(_config);

            RaiseErrorEvent(RubberduckUI.SourceControl_UpdateSettingsTitle,
                            RubberduckUI.SourceControl_UpdateSettingsMessage, NotificationType.Info);
        }