private async void UpdateAvailableWorkspaces()
        {
            IEnumerable <Workspace> workspacesWithSettings = await Task.Run(() => tfsContext.GetWorkspaces().Where(w => w != TargetWorkspace && settingsService.HasSettings(tfsContext.SelectedProfile, w)));

            AvailableWorkspaces.Clear();
            AvailableWorkspaces.AddRange(workspacesWithSettings.Distinct().ToList());
            CopyCommand.RaiseCanExecuteChanged();
        }
 private Task CopySettingsFromCurrentProfileTo(WorkingProfile newProfile)
 {
     return(Task.Run(() =>
     {
         var settingsService = Settings;
         foreach (var workspace in TfsContext.GetWorkspaces())
         {
             settingsService.CopySettings(SelectedProfile, workspace, newProfile, workspace);
         }
     }));
 }
Esempio n. 3
0
        private void LoadWorkspaces()
        {
            var isConnected = tfsContext.IsTfsConnected;

            elementHost.Enabled = comboBoxWorkspaceSelect.Enabled = isConnected;
            if (isConnected)
            {
                comboBoxWorkspaceSelect.Items.Clear();
                comboBoxWorkspaceSelect.Items.AddRange(tfsContext.GetWorkspaces());
                comboBoxWorkspaceSelect.SelectedItem = tfsContext.SelectedWorkspace;
            }
        }