Exemplo n.º 1
0
        private async void Update()
        {
            DateChangeable = false;
            Loading        = Visibility.Visible;

            ((App)Application.Current).AppData.Load(displayDate);
            MyDay today = ((App)Application.Current).AppData.AllDays[displayDate];

            Dictionary <string, Software> overView = today.GetOverView();

            DailyTime = await GenerateSumTime(overView);

            OverviewChart = await GenerateChart(today.GetTimeline());

            UpdateTime = LanguageHelper.InquireLocalizedWord("General_LastUpdate") + DateTime.Now.ToString("H:mm");

            Overview.Clear();
            foreach (OverViewItem item in await GenerateList(overView))
            {
                Overview.Add(item);
                MyDeviceHelper.DoEvents();
            }

            DateChangeable = true;
            Loading        = Visibility.Hidden;
        }
Exemplo n.º 2
0
        async void Update()
        {
            busy = true;

            DateTime firstDay = selectedDate.AddDays(-(int)selectedDate.DayOfWeek);

            SeriesCollection tmpChart = await GenerateChart(firstDay);

            List <SummaryListItem> tmpList = await generateList(firstDay);

            OverviewChartLables = generateChartLables(firstDay);
            AverageDailyTime    = generateAverageDailyTime((ChartValues <double>)tmpChart[0].Values);
            SummaryChart        = tmpChart;
            UpdateTime          = LanguageHelper.InquireLocalizedWord("General_LastUpdate") + DateTime.Now.ToString("H:mm");

            SummaryList.Clear();
            foreach (SummaryListItem listItem in tmpList)
            {
                SummaryList.Add(listItem);
                MyDeviceHelper.DoEvents();
            }

            busy = false;
        }