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