Пример #1
0
 private void StartButton_Click(object sender, EventArgs e)
 {
     if (_oldAppForm == null)
     {
         _oldAppForm = new OldAppForm();
         _oldAppForm.Show();
         _oldAppForm.FormClosed += new FormClosedEventHandler(OldAppForm_FormClosed);
     }
     else
     {
         MessageBox.Show("App already startet.", "Start", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
Пример #2
0
 private void OldAppForm_FormClosed(object sender, FormClosedEventArgs e)
 {
     this._oldAppForm.Dispose();
     this._oldAppForm = null;
 }