public void TestAsyncReload() { propertyChanged = false; asyncProperty.Reload(); var result = asyncProperty.Result; Assert.IsTrue(result == default(int), "Default result value"); while (propertyChanged == false) { } result = asyncProperty.Result; Assert.IsTrue(result == 1, "Result value mismatch"); }
private void SelectedWindowChanged() { if (windowSummaryList.Result == null) { WindowDurationList.Reset(); IsChartVisible = false; return; } if (windowSummaryList.Result.Where(w => w.IsSelected).Count() == 0) { IsChartVisible = false; return; } IsChartVisible = true; long ticks = 0; foreach (var window in windowSummaryList.Result.Where(w => w.IsSelected)) { ticks += window.Duration; } if (ticks == 0) { return; } var timeSpan = new TimeSpan(ticks); SelectedWindowsDuration = string.Format("Selected: {0:D2}:{1:D2}:{2:D2}", timeSpan.Hours, timeSpan.Minutes, timeSpan.Seconds); windowDurationList.Reload(); }
private void SelectedAppChanged() { IsChartVisible = false; if (AppSummaryList.Result == null) { return; } long ticks = 0; var selectedApps = AppSummaryList.Result.Where(a => a.IsSelected); if (selectedApps.Count() == 0) { windowSummaryList.Reset(); return; } foreach (var app in selectedApps) { ticks += app.Duration; } if (ticks == 0) { return; } var timeSpan = new TimeSpan(ticks); SelectedAppsDuration = string.Format("Selected: {0:D2}:{1:D2}:{2:D2}", timeSpan.Hours, timeSpan.Minutes, timeSpan.Seconds); windowSummaryList.Reload(); }
private void ReloadContent() { logsList.Reload(); appsList.Reload(); usageList.Reload(); windowsList.Reload(); categoryList.Reload(); }
private void ReloadAll() { SelectedApp = null; SelectedAppSummary = null; appList.Reload(); windowDurationList.Reset(); appSummaryList.Reset(); windowSummaryList.Reset(); }
private async Task DeleteSelectedScreenhsots() { if (selectedItem == null) { return; } var selectedShots = selectedItem.Images.Where(s => s.IsSelected); var count = selectedShots.Count(); await screenshotService.DeleteScreenshotsAsync(selectedShots); InfoContent = $"Deleted {count} " + (count == 1 ? "image" : "images"); logList.Reload(); }
private void ReloadAll() { appsList.Reload(); dailyAppList.Reload(); }
private void ReloadAll() { screenshotList.Reload(); dailyScreenshotsList.Reload(); }
private void ReloadAll() { usersList.Reload(); dailyUsageList.Reload(); }
private void ReloadAll() { categoryList.Reload(); dailyCategoryList.Reload(); }