예제 #1
0
        private void btnGo_Click(object sender, EventArgs e)
        {
            if (txtLastName.Text == "" || txtFirstName.Text == "")
            {
                MessageBox.Show("Please enter your full name", "Error");
            }
            else
            {
                StreamWriter sw = File.CreateText("Result.txt");
                sw.WriteLine(txtLastName.Text + " " + txtFirstName.Text);
                index = cbLevel.SelectedIndex;
                if (index == 0)
                {
                    sw.WriteLine("1st level");
                    level = 1;
                }
                else
                {
                    sw.WriteLine("2nd level");
                    level = 2;
                }

                Choose choose = new Choose();
                choose.Show();
                this.Hide();
                sw.Close();
            }
        }
예제 #2
0
 private void timer3_Tick(object sender, EventArgs e)
 {
     secondsLeave++;
     if (secondsLeave == 3)
     {
         Choose choose = new Choose();
         choose.Show();
         this.Close();
     }
 }
예제 #3
0
 private void timer3_Tick(object sender, EventArgs e)
 {
     endSeconds++;
     if (endSeconds == 3)
     {
         Choose seconds = new Choose();
         seconds.Show();
         this.Close();
     }
 }
예제 #4
0
 private void timer2_Tick(object sender, EventArgs e)
 {
     numberOfSeconds++;
     if (numberOfSeconds == 3)
     {
         Choose choose = new Choose();
         choose.Show();
         this.Close();
     }
 }