Beispiel #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            var form = Application.OpenForms.OfType <AddForm>().FirstOrDefault();

            if (form != null)
            {
                form.Activate();
            }
            else
            {
                form = new AddForm();
                form.Show();
            }
        }
Beispiel #2
0
 private void addButton_Click(object sender, EventArgs e)
 {
     AddForm addForm = new AddForm();
     addForm.Show();
 }