private void reminderToolStripMenuItem_Click(object sender, EventArgs e) { SavableReminder newRmd = SetRemindersForm.Show(rmd); if (newRmd != null) { newRmd.OnElapsed += OnRemind; newRmd.OnElapsing += OnElapsing; newRmd.OnElapsedComplete += delegate(Reminder r, bool excluded) { SavableReminder rr = (SavableReminder)r; rr.Save(this.FileName + ".rmd"); return(true); }; newRmd.Save(FileName + ".rmd"); newRmd.Start(); rmd = newRmd; } else { if (NotifierMenuItem.Tag != null) { NotifierMenuItem.Text = (string)NotifierMenuItem.Tag; } } }
public static SavableReminder Show(SavableReminder rmd) { SavableReminder rlt; SetRemindersForm instance = new SetRemindersForm(); instance.SetConfigs(rmd); if (instance.ShowDialog() == DialogResult.OK) { if (rmd != null) { rmd.Reset(); } rlt = instance.Rmd; } else { rlt = null; } return rlt; }
public static SavableReminder Show(SavableReminder rmd) { SavableReminder rlt; SetRemindersForm instance = new SetRemindersForm(); instance.SetConfigs(rmd); if (instance.ShowDialog() == DialogResult.OK) { if (rmd != null) { rmd.Reset(); } rlt = instance.Rmd; } else { rlt = null; } return(rlt); }