private void clearToolStripMenuItem_Click(object sender, EventArgs e)
{
DialogResult UserResponse = new DialogResult();
if (txtPage.Modified)
{
UserResponse = MessageBox.Show("Would you like to clear the contents of your documents? This action cannot be undone.", "Warning", MessageBoxButtons.YesNoCancel);
}
if (txtPage.Modified & UserResponse == DialogResult.Cancel)
{
return;
}
else if (txtPage.Modified & UserResponse == DialogResult.Yes)
{
txtPage.Clear();
}
}