Beispiel #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));
            }
        }
Beispiel #2
0
 public MonitorPageModel()
 {
     if (IsInDesignMode)
     {
         GeneralPageModel = new GeneralPageModel();
     }
     else
     {
         GeneralPageModel = StorageHelperManager.Load <GeneralPageModel>();
     }
 }
Beispiel #3
0
 public BaseDayActivityAnalysis()
 {
     if (IsInDesignMode)
     {
         Monitor = new Monitor();
         Monitor.StartWatch();
     }
     else
     {
         Monitor = StorageHelperManager.Load <Monitor>();
     }
 }
Beispiel #4
0
 private void AsyncSaveData(object state)
 {
     if (!System.Threading.Monitor.TryEnter(SyncRoot))
     {
         return;
     }
     try
     {
         StorageHelperManager.Save(Monitor?.GetLightClone());
     }
     finally
     {
         System.Threading.Monitor.Exit(SyncRoot);
     }
 }
Beispiel #5
0
        public SettingsPageModel()
        {
            if (IsInDesignMode)
            {
                GeneralPageModel       = new GeneralPageModel();
                ActionPlannerPageModel = new ActionPlannerPageModel();
            }
            else
            {
                GeneralPageModel       = StorageHelperManager.Load <GeneralPageModel>();
                ActionPlannerPageModel = StorageHelperManager.Load <ActionPlannerPageModel>();
                ActionPlannerPageModel.Sync();
            }

            currentViewModel = ActionPlannerPageModel;
        }
Beispiel #6
0
        public DayMonitor(DateTime date)
        {
            Monitor = StorageHelperManager.Load <Monitor>(date);

            Fill();
        }
Beispiel #7
0
 public BaseDayActivityAnalysis(DateTime time)
 {
     Monitor = StorageHelperManager.Load <Monitor>(time);
 }