示例#1
0
 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);
 }
示例#2
0
        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;
            }
        }
示例#3
0
 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;
     }
 }
示例#4
0
 private void openFileDialog_FileOk(object sender, CancelEventArgs e)
 {
     if (SaveChanges() == DialogResult.No)
     {
         DS = new DocumentStatus(openFileDialog.FileName, this);
         DS.Changed = false;
     }
 }