public MainForm() { InitializeComponent(); DS = new DocumentStatus(null, this); FilterForm = new ProfanityForm(this); // Handle the ApplicationExit event to know when the application is exiting. Application.ApplicationExit += new EventHandler(this.OnApplicationExit); }
private void newToolStripMenuItem_Click(object sender, EventArgs e) { DialogResult SC = SaveChanges(); if (SC == DialogResult.Yes) { saveToolStripMenuItem_Click(sender, e); } if ((DS.Changed == false) || (SC == DialogResult.No)) { richTextBox.Clear(); DS = new DocumentStatus(null, this); DS.Changed = false; } }
private void newToolStripMenuItem_Click(object sender, EventArgs e) { DialogResult SC = SaveChanges(); if (SC == DialogResult.Yes) { saveToolStripMenuItem_Click(sender, e); } if ((DS.Changed == false)||(SC == DialogResult.No)) { richTextBox.Clear(); DS = new DocumentStatus(null, this); DS.Changed = false; } }
private void openFileDialog_FileOk(object sender, CancelEventArgs e) { if (SaveChanges() == DialogResult.No) { DS = new DocumentStatus(openFileDialog.FileName, this); DS.Changed = false; } }