Пример #1
0
        private void btnAddressSubmit_Click(object sender, EventArgs e)
        {
            address address = new address();

            if (address.street == null)
            {
                city         = tb_city.Text.ToString().ToLower();
                this.Visible = false;
                address addressForm = new address();
                addressForm.Show();
            }
            else
            {
                finalForm final = new finalForm();
                final.Show();
                this.Visible = false;
            }
        }
        } //this is the method with the logic to hide ALL letters. The logic to show letters is in the method show letters.

        private void btnAddressSubmit_Click(object sender, EventArgs e)  //the submit button logic. Makes current form invisible and then opens the next form.
        {
            street       = tb_address.Text.ToString().ToLower();
            this.Visible = false;
            finalForm final = new finalForm();

            final.Show();
            citiesForm form = new citiesForm();

            //logic to determine what to do next based on what information is missing
            if (citiesForm.city == null)
            {
                street       = tb_address.Text.ToString().ToLower();
                this.Visible = false;
                form.Show();
            }
            else
            {
                final.Show();
                this.Visible = false;
            }
        }