Example #1
0
        public SyncTimer()
        {
            ogcsTimer       = new Timer();
            ogcsTimer.Tag   = "AutoSyncTimer";
            ogcsTimer.Tick += new EventHandler(ogcsTimer_Tick);

            //Refresh synchronizations (last and next)
            LastSyncDate = Settings.Instance.LastSyncDate;
            Forms.Main.Instance.LastSyncVal = LastSyncDate.ToLongDateString() + " @ " + LastSyncDate.ToLongTimeString();
            SetNextSync(getResyncInterval());
        }
        public void Initialise()
        {
            this.Tag      = "AutoSyncTimer";
            this.Tick    += new EventHandler(ogcsTimer_Tick);
            this.Interval = int.MaxValue;

            //Refresh synchronizations (last and next)
            this.LastSyncDate = Settings.Instance.LastSyncDate;
            Forms.Main.Instance.LastSyncVal = LastSyncDate.ToLongDateString() + " @ " + LastSyncDate.ToLongTimeString();
            SetNextSync();
        }