示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            //calls event for that type of flag
            frmInput frmInput = new frmInput();
            Flags    flags    = new Flags();

            if (frmInput.Variables.Chosen == "Texas")
            {
                flags.TexasFlag(pictureBox1, ClientRectangle);
            }
            if (frmInput.Variables.Chosen == "America")
            {
                flags.AmericaFlag(pictureBox1, ClientRectangle);
            }
            if (frmInput.Variables.Chosen == "Turkey")
            {
                flags.TurkeyFlag(pictureBox1, ClientRectangle);
            }
            if (frmInput.Variables.Chosen == "United Kingdom")
            {
                flags.UKFlag(pictureBox1, ClientRectangle);
            }
            if (frmInput.Variables.Chosen == "Greece")
            {
                flags.GreeceFlag(pictureBox1, ClientRectangle);
            }
            btnShow.Visible = false;
            btnBack.Visible = true;
            btnBack.Focus();
        }
示例#2
0
        private void btnBack_Click_1(object sender, EventArgs e)
        {
            //closes output form and opens input form
            this.Hide();
            var frmInput = new frmInput();

            frmInput.Closed += (s, args) => this.Close();
            frmInput.Show();
        }