private void ShowSummaryData() { if (release == null || ifRefresh) { ReleaseP.Visibility = Visibility.Collapsed; ShowProgressBar(); Task.Factory.StartNew(() => { release = VSTSService.GetARelease(releaseId); }).ContinueWith(async(Task t) => { await this.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { summarySP.DataContext = release; artifactsLV.ItemsSource = release.Artifacts; headerTB.Text = release.Name; HideProgressBar(); ReleaseP.Visibility = Visibility.Visible; }); }); } else { summarySP.DataContext = release; HideProgressBar(); ReleaseP.Visibility = Visibility.Visible; } }
private void ShowLogsData() { ShowProgressBar(); if (ifRefresh || release == null) { Task.Factory.StartNew(() => { release = VSTSService.GetARelease(releaseId); }).ContinueWith(async(Task t) => { await this.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { envPickerCB.ItemsSource = release.Environments; envPickerCB.SelectedIndex = 0; HideProgressBar(); }); }); } else { ShowProgressBar(); envPickerCB.ItemsSource = release.Environments; HideProgressBar(); } }
private void ShowApprovalsData() { if (ifRefresh || release == null || approvalsList == null || approvalsList.Count < 1) { ShowProgressBar(); Task.Factory.StartNew(() => { if (release == null) { release = VSTSService.GetARelease(releaseId); } approvalsList = getApprovalListFromRelease(release); }).ContinueWith(async(Task t) => { await this.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { approvalsLV.ItemsSource = approvalsList; HideProgressBar(); }); }); } else { ShowProgressBar(); approvalsLV.ItemsSource = approvalsList; HideProgressBar(); } }
private void ShowEnvironmentsData() { if (ifRefresh || release == null) { Task.Factory.StartNew(() => { release = VSTSService.GetARelease(releaseId); }).ContinueWith(async(Task t) => { await this.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { environmentsLV.ItemsSource = release.Environments; ifRefresh = false; }); }); } else { environmentsLV.ItemsSource = release.Environments; } }