コード例 #1
0
ファイル: Cafeteria.cs プロジェクト: krisiivanova24/Kophibuck
        private void button3_Click(object sender, EventArgs e)
        {
            AllVariants child = new AllVariants(this.firstname, this.lastname, this.address, this.phone_number);

            child.FormClosed += new FormClosedEventHandler(child_FormClosed); //add handler to catch when child form is closed
            child.Show();                                                     //show child
            this.Hide();                                                      //hide parent
        }
コード例 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            Database database = new Database();

            database.SignUpNewClient(textBox1.Text, textBox2.Text, textBox3.Text, textBox4.Text);
            AllVariants child = new AllVariants(textBox1.Text, textBox2.Text, textBox3.Text, textBox4.Text);

            child.FormClosed += new FormClosedEventHandler(child_FormClosed); //add handler to catch when child form is closed
            child.Show();                                                     //show child
            this.Hide();                                                      //hide parent
        }
コード例 #3
0
ファイル: Form1.cs プロジェクト: krisiivanova24/Kophibuck
        private void button1_Click(object sender, EventArgs e)
        {
            Database      database = new Database();
            List <string> vs       = database.SignIn(textBox1.Text, textBox2.Text);

            if (vs.Count != 0)
            {
                AllVariants child = new AllVariants(vs[0], vs[1], vs[2], vs[3]);  //create new isntance of form
                child.FormClosed += new FormClosedEventHandler(child_FormClosed); //add handler to catch when child form is closed
                child.Show();                                                     //show child
                this.Hide();                                                      //hide parent
            }
        }