private void buttonRank_Click(object sender, EventArgs e) { FormRank Rank = new FormRank(); Rank.ShowDialog(); }
private void buttonVerificar_Click(object sender, EventArgs e) { string Letra = textBox1.Text + textBox2.Text + textBox3.Text + textBox4.Text + textBox5.Text + textBox6.Text + textBox7.Text + textBox8.Text; if (labelDica.Text == Adica) { if (Letra == A) { label_A.ForeColor = Color.Green; labelDica.Visible = true; labelDica.Text = Ldica; Limpar(); } } if (labelDica.Text == Ldica) { if (Letra == L) { label_L.ForeColor = Color.Green; labelDica.Visible = true; labelDica.Text = Adica1; Limpar(); } } if (labelDica.Text == Adica1) { if (Letra == A) { label_A2.ForeColor = Color.Green; labelDica.Visible = true; labelDica.Text = Ndica1; Limpar(); } } if (labelDica.Text == Ndica1) { if (Letra == N) { label_N2.ForeColor = Color.Green; labelDica.Visible = true; labelDica.Text = Tdica; Limpar(); } } if (labelDica.Text == Tdica) { if (Letra == T) { label_T.ForeColor = Color.Green; labelDica.Visible = true; labelDica.Text = Udica; Limpar(); } } if (labelDica.Text == Udica) { if (Letra == U) { label_U.ForeColor = Color.Green; labelDica.Text = Rdica; Limpar(); } } if (labelDica.Text == Rdica) { if (Letra == R) { label_R.ForeColor = Color.Green; labelDica.Text = Idica; Limpar(); } } if (labelDica.Text == Idica) { if (Letra == I) { label_I.ForeColor = Color.Green; labelDica.Text = Ndica; Limpar(); } } if (labelDica.Text == Ndica) { if (Letra == N) { label_N.ForeColor = Color.Green; labelDica.Text = Gdica; Limpar(); } } if (labelDica.Text == Gdica) { if (Letra == G) { label_G.ForeColor = Color.Green; Limpar(); timer.Dispose(); Form2 cadastro = new Form2(labelClock.Text); cadastro.ShowDialog(); string nome = cadastro.Name; string tempo = labelClock.Text; if (File.Exists(strPathFile)) { using (StreamWriter sw = File.AppendText(strPathFile)) { sw.WriteLine("\n" + nome + ";" + tempo); } } FormRank Rank = new FormRank(); Rank.ShowDialog(); Limpar(); Parar(); buttonInciar.Image = Properties.Resources.play; labelClock.Text = "00:00:00"; } } }