예제 #1
0
        public void AddActiveReminder(EntryType.Reminder newRe)
        {
            activeReminders.Add(newRe);

            //display, etc
            Display.updateDisplay(EntryType.Entries.Reminder);
        }
예제 #2
0
        private void btnAddReminder_Click(object sender, EventArgs e)
        {
            EntryType.Reminder godOuah = new EntryType.Reminder();

            //really weak form validation
            if (tbxName.Text.Equals(Properties.Resources.InactiveNameTbx))
            {
                MessageBox.Show(Properties.Resources.NoNameSetError,
                                Properties.Resources.NoTextError,
                                MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            if (tbxReminder.Text.Equals(Properties.Resources.InactiveReminderTbx))
            {
                MessageBox.Show("You should use an alarm if you're not concerned " +
                                "about having a reminder message!", Properties.Resources.NoTextError,
                                MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            godOuah.Name      = tbxName.Text;
            godOuah.ActiveAt  = dtpReminderTarget.Value;
            godOuah.SoundBite = null;
            godOuah.Running   = false; //don't need this, but maybe we will l8r
            godOuah.Msg       = tbxReminder.Text;

            mainForm.AddActiveReminder(godOuah);

            this.Close();
        }