Пример #1
0
        private void ProductInfoForm_Click(object sender, EventArgs e)
        {
            Button clickHandler = sender as Button;

            //Debug.WriteLine(clickHandler.Tag.ToString());
            switch (clickHandler.Tag.ToString())
            {
            case "Another":
                SelectForm selectForm = new SelectForm();
                selectForm.productInfoForm = this;
                selectForm.Show();
                this.Hide();
                break;

            case "Cancel":
                DialogResult result = MessageBox.Show("Are You Sure you want to exit?", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

                if (result == DialogResult.Yes)
                {
                    Application.Exit();
                }

                break;

            case "Next":
                OrderForm orderForm = new OrderForm(this.productDetails);
                orderForm.productInfoForm = this;
                orderForm.Show();
                this.Hide();
                break;
            }
        }
Пример #2
0
        private void showSelectForm()
        {
            SelectForm selectForm = new SelectForm();

            selectForm.Show();
            this.Hide();
        }