private void toolStripMenuItem1_Click(object sender, EventArgs e) { BLIO.Log("Toolstrip option clicked: Permanentely delete (" + rem.Id + ")"); if (RemindMeBox.Show("Are you really sure you wish to permanentely delete \"" + rem.Name + "\" ?", RemindMeBoxReason.YesNo) == DialogResult.Yes) { BLIO.Log("Permanentely deleting reminder with id " + rem.Id + " ..."); BLReminder.PermanentelyDeleteReminder(rem); BLIO.Log("Reminder permanentely deleted."); this.Reminder = null; UCReminders.Instance.UpdateCurrentPage(); new Thread(() => { //Log an entry to the database, for data! try { BLOnlineDatabase.PermanentelyDeleteCount++; } catch (ArgumentException ex) { BLIO.Log("Exception at BLOnlineDatabase.PermanentelyDeleteCount++. -> " + ex.Message); BLIO.WriteError(ex, ex.Message, true); } }).Start(); } else { BLIO.Log("Permanent deletion of reminder " + rem.Id + " cancelled."); } }
private void toolStripMenuItem1_Click(object sender, EventArgs e) { if (RemindMeBox.Show("Are you really sure you wish to permanentely delete \"" + rem.Name + "\" ?", RemindMeBoxReason.YesNo) == DialogResult.Yes) { BLIO.Log("Permanentely deleting reminder with id " + rem.Id + " ..."); this.Visible = false; BLReminder.PermanentelyDeleteReminder(rem); BLIO.Log("Reminder permanentely deleted."); UCReminders.GetInstance().UpdateCurrentPage(); UCReminders.GetInstance().RefreshPage(); } }