示例#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());
                }
            }
        }
示例#2
0
 public void setData(Remind remindToShow)
 {
     dateAndTime.Value  = remindToShow.getDateTime();
     RemindMessage.Text = remindToShow.getMessage();
 }
示例#3
0
        public void addRemind(Remind remind)
        {
            RemindRange allReminds = new RemindRange();

            allReminds.addMessage(remind.getDateTime(), remind.getMessage());
        }