Пример #1
0
        public DayMonitor()
        {
            if (IsInDesignMode)
            {
                Monitor = new Monitor();

                Fill();
            }
            else
            {
                Monitor      = StorageHelperManager.Load <Monitor>();
                ReportsModel = StorageHelperManager.Load <ReportsModel>(Monitor.Date);

                DayActivityAnalysis      = new DayActivityAnalysis(Monitor);
                DayActivityCommonAnalyse = new DayActivityCommonAnalyse(Monitor);

                if (IsUsingTimer)
                {
                    return;
                }
                IsUsingTimer = true;

                StartSaves(TimeSpan.FromSeconds(10.0));
            }
        }
Пример #2
0
        private void Fill()
        {
            if (Monitor == null)
            {
                DayActivityAnalysis      = null;
                DayActivityCommonAnalyse = null;
                ReportsModel             = new ReportsModel();
                return;
            }

            DayActivityAnalysis      = new DayActivityAnalysis(Monitor);
            DayActivityCommonAnalyse = new DayActivityCommonAnalyse(Monitor);

            FillReportDayModel();
        }