public bool TestSourceControlConnection() { bool result = SourceControlUI.TestConnection(WorkSpace.Instance.Solution.SourceControl, eSourceControlContext.ConnectionDetailsPage, false); Mouse.OverrideCursor = null; return(result); }
private async Task GetProjetList() { try { downloadProjBtn.IsEnabled = false; if (SolutionsGrid.DataSourceList != null) { SolutionsGrid.DataSourceList.Clear(); } xProcessingIcon.Visibility = Visibility.Visible; if (SourceControlIntegration.BusyInProcessWhileDownloading) { Reporter.ToUser(eUserMsgKey.StaticInfoMessage, "Please wait for current process to end."); return; } SourceControlIntegration.BusyInProcessWhileDownloading = true; SourceControlIntegration.CreateConfigFile(mSourceControl); if (SourceControlUI.TestConnection(mSourceControl, SourceControlConnDetailsPage.eSourceControlContext.DownloadProjectPage, true) == false) { SourceControlIntegration.BusyInProcessWhileDownloading = false; Mouse.OverrideCursor = null; return; } await Task.Run(() => SourceControlSolutions = SourceControlIntegration.GetProjectsList(mSourceControl) ); SolutionsGrid.DataSourceList = SourceControlSolutions; SetGridView(); Mouse.OverrideCursor = null; ConnectionConfigurationsExpender.IsExpanded = false; ConnectionDetailsExpender.IsExpanded = false; } catch (Exception e) { Mouse.OverrideCursor = null; Reporter.ToUser(eUserMsgKey.FailedToGetProjectsListFromSVN, e.Message); } finally { xProcessingIcon.Visibility = Visibility.Collapsed; SourceControlIntegration.BusyInProcessWhileDownloading = false; if (SolutionsGrid.DataSourceList != null) { if (SolutionsGrid.DataSourceList.Count > 0) { downloadProjBtn.IsEnabled = true; } } } }
private async Task GetProjetList() { try { if (!IsImportSolution) { downloadProjBtn.IsEnabled = false; } if (SolutionsGrid.DataSourceList != null) { SolutionsGrid.DataSourceList.Clear(); } xProcessingIcon.Visibility = Visibility.Visible; if (SourceControlIntegration.BusyInProcessWhileDownloading) { Reporter.ToUser(eUserMsgKey.StaticInfoMessage, "Please wait for current process to end."); return; } SourceControlIntegration.BusyInProcessWhileDownloading = true; SourceControlIntegration.CreateConfigFile(mSourceControl); if (SourceControlUI.TestConnection(mSourceControl, SourceControlConnDetailsPage.eSourceControlContext.DownloadProjectPage, true) == false) { SourceControlIntegration.BusyInProcessWhileDownloading = false; Mouse.OverrideCursor = null; return; } await Task.Run(() => SourceControlSolutions = SourceControlIntegration.GetProjectsList(mSourceControl) ); SolutionsGrid.DataSourceList = SourceControlSolutions; SolutionsGrid.grdMain.SelectedCellsChanged += GrdMain_SelectedCellsChanged; SolutionsGrid.grdMain.SelectedItem = SolutionsGrid.DataSourceList[0]; SetGridView(); Mouse.OverrideCursor = null; ConnectionConfigurationsExpender.IsExpanded = false; ConnectionDetailsExpender.IsExpanded = false; //Changed to save password only after successful Connect and search repositories WorkSpace.Instance.UserProfile.UserProfileOperations.SaveUserProfile(); } catch (Exception e) { Mouse.OverrideCursor = null; Reporter.ToUser(eUserMsgKey.FailedToGetProjectsListFromSVN, e.Message); } finally { xProcessingIcon.Visibility = Visibility.Collapsed; SourceControlIntegration.BusyInProcessWhileDownloading = false; if (SolutionsGrid.DataSourceList != null) { if (SolutionsGrid.DataSourceList.Count > 0) { if (!IsImportSolution) { downloadProjBtn.IsEnabled = true; } else { DownloadButton.Visibility = Visibility.Visible; } } } } }