コード例 #1
0
        private void addCustomerToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //Function for going to Form 3, which is reading in a customer to the database| from drop down menu
            customerAddForm addCustomer = new customerAddForm();

            if (Application.OpenForms[addCustomer.Name] == null)
            {
                addCustomer.Show();
            }
            else
            {
                Application.OpenForms[addCustomer.Name].Focus();
            }
        }
コード例 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            //Function for going to Form 3, which is reading in a customer to the database
            customerAddForm addCustomer = new customerAddForm();

            if (Application.OpenForms[addCustomer.Name] == null)
            {
                addCustomer.Show();
            }
            else
            {
                Application.OpenForms[addCustomer.Name].Focus();
            }
        }