コード例 #1
0
        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");
        }
コード例 #2
0
        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();
        }
コード例 #3
0
        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();
        }
コード例 #4
0
 private void ReloadContent()
 {
     logsList.Reload();
     appsList.Reload();
     usageList.Reload();
     windowsList.Reload();
     categoryList.Reload();
 }
コード例 #5
0
        private void ReloadAll()
        {
            SelectedApp        = null;
            SelectedAppSummary = null;

            appList.Reload();

            windowDurationList.Reset();
            appSummaryList.Reset();
            windowSummaryList.Reset();
        }
コード例 #6
0
        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();
        }
コード例 #7
0
 private void ReloadAll()
 {
     appsList.Reload();
     dailyAppList.Reload();
 }
コード例 #8
0
 private void ReloadAll()
 {
     screenshotList.Reload();
     dailyScreenshotsList.Reload();
 }
コード例 #9
0
 private void ReloadAll()
 {
     usersList.Reload();
     dailyUsageList.Reload();
 }
コード例 #10
0
 private void ReloadAll()
 {
     categoryList.Reload();
     dailyCategoryList.Reload();
 }