Exemple #1
0
        public void SaveTodayDate(double download, double upload)
        {
            if (newData.Date == default(DateTime) || newData.Date == DateTime.Today.Date)
            {
                newData.Date     = DateTime.Today.Date;
                newData.Download = download;
                newData.Upload   = upload;
            }
            else
            {
                oldData = newData.CopyWithoutSynch();
                oldData.Synchronized = false;

                newData.ResetData();
            }
            SaveInSettings();
            StartSynchronizing();
        }
Exemple #2
0
        public Synchronizer()
        {
            LoadFromSettings();

            if (newData.Date == default(DateTime))
            {
                oldData.Synchronized = true;
            }
            else if (newData.Date != DateTime.Today.Date)
            {
                oldData = newData.CopyWithoutSynch();
                oldData.Synchronized = false;

                newData.ResetData();

                SaveInSettings();
            }

            StartSynchronizing();
        }