-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathForm5.cs
More file actions
138 lines (112 loc) · 3.69 KB
/
Copy pathForm5.cs
File metadata and controls
138 lines (112 loc) · 3.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
using Microsoft.VisualBasic;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml.Linq;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.Button;
namespace Quiz_matematica
{
public partial class Form5 : Form
{
public Form5()
{
InitializeComponent();
}
public static string userAnswer1, userAnswer2, userAnswer3, userAnswer4, a, b, c, d;
public static int r2, a4;
private void button2_Click(object sender, EventArgs e)
{
userAnswer1 = textBox1.Text.ToLower();
userAnswer2 = textBox2.Text.ToLower();
userAnswer3 = textBox3.Text.ToLower();
userAnswer4 = textBox4.Text.ToLower();
a = textBox1.Text.ToLower();
b = textBox2.Text.ToLower();
c = textBox3.Text.ToLower();
d = textBox4.Text.ToLower();
if (userAnswer1 == "v" || userAnswer1 == "V")
{
Form10.pontuacao += 5;
}
if (userAnswer2 == "f" || userAnswer2 == "F")
{
Form10.pontuacao += 5;
}
if (userAnswer3 == "v" || userAnswer3 == "V")
{
Form10.pontuacao += 5;
}
if (userAnswer4 == "f" || userAnswer4 == "F")
{
Form10.pontuacao += 5;
}
if (string.IsNullOrWhiteSpace(textBox1.Text) || string.IsNullOrWhiteSpace(textBox2.Text) || string.IsNullOrWhiteSpace(textBox3.Text) || string.IsNullOrWhiteSpace(textBox4.Text))
{
MessageBox.Show("Não te esqueças de responder a todas as questões!");
}
if (textBox1.Text != null && textBox2.Text != null && textBox3.Text != null && textBox4.Text != null)
{
r2 = 1;
this.Close();
(new Form9()).Show();
}
}
private void button1_Click(object sender, EventArgs e)
{
Form4 abrir = new Form4();
abrir.Show();
this.Hide();
}
private void button3_Click(object sender, EventArgs e)
{
a4 = 4;
Form1 abrir = new Form1();
abrir.Show();
this.Hide();
}
private void Form5_Load(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Maximized;
if (r2 == 1)
{
textBox1.Text = a;
textBox2.Text = b;
textBox3.Text = c;
textBox4.Text = d;
}
}
private void label4_Click(object sender, EventArgs e)
{
}
private void label3_Click(object sender, EventArgs e)
{
}
private void label2_Click(object sender, EventArgs e)
{
}
private void textBox4_TextChanged(object sender, EventArgs e)
{
}
private void textBox3_TextChanged(object sender, EventArgs e)
{
}
private void textBox2_TextChanged(object sender, EventArgs e)
{
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
private void label5_Click(object sender, EventArgs e)
{
}
private void label1_Click(object sender, EventArgs e)
{
}
}
}