private void cmdErase_Click(object sender, EventArgs e)
{
if (MessageBox.Show("Are you sure you wish to erase all your notes, including those saved?", "Are you sure?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
{
richNotes.Clear();
try
{
File.Delete(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\NCCCodeNavi.rtf");
UpdateNotesStatus("Deleted " + Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\NCCCodeNavi.rtf");
richNotes.Clear();
bNotesPending = false;
}
catch (Exception)
{
UpdateNotesStatus("Error deleting file");
}
}
}