Ejemplo n.º 1
0
        void timerEvent(Object source, System.Timers.ElapsedEventArgs e)
        {
            remindRange = remindRange.updateRemindList();
            if (remindRange == null)
            {
                return;
            }

            for (int i = 0; i < remindRange.remindList.Count; ++i)
            {
                Remind   remind       = remindRange.remindList[i];
                DateTime current_time = DateTime.Now;
                DateTime remind_time  = remind.getDateTime();
                TimeSpan delta        = current_time - remind_time;
                if ((delta.TotalSeconds >= 0) && (delta.TotalSeconds < 60))
                {
                    remindRange.removeMessage(i);
                    System.Windows.Forms.MessageBox.Show(remind.getMessage());
                }
            }
        }
Ejemplo n.º 2
0
        public void deleteRemind(Remind remind)
        {
            RemindRange allReminds = new RemindRange();

            allReminds.removeMessage(remind.getId());
        }