-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathForm3.cs
More file actions
150 lines (116 loc) · 4.05 KB
/
Copy pathForm3.cs
File metadata and controls
150 lines (116 loc) · 4.05 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
139
140
141
142
143
144
145
146
147
148
149
150
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 static System.Windows.Forms.DataFormats;
using Newtonsoft.Json;
namespace Quiz_matematica
{
public partial class Form3 : Form
{
public Form3()
{
InitializeComponent();
}
public static string userAnswer1, userAnswer2, userAnswer3, userAnswer4, userAnswer5, a, b, c, d, f;
public static int r2, a10;
private void button2_Click(object sender, EventArgs e)
{
userAnswer1 = textBox1.Text.ToLower();
userAnswer2 = textBox2.Text.ToLower();
userAnswer3 = textBox3.Text.ToLower();
userAnswer4 = textBox4.Text.ToLower();
userAnswer5= textBox5.Text.ToLower();
a = textBox1.Text.ToLower();
b = textBox2.Text.ToLower();
c = textBox3.Text.ToLower();
d = textBox4.Text.ToLower();
f = textBox5.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 (userAnswer5 == "v" || userAnswer5 == "V")
{
Form10.pontuacao += 5;
}
if (string.IsNullOrWhiteSpace(textBox1.Text) || string.IsNullOrWhiteSpace(textBox2.Text) || string.IsNullOrWhiteSpace(textBox3.Text) || string.IsNullOrWhiteSpace(textBox4.Text) || string.IsNullOrWhiteSpace(textBox5.Text))
{
MessageBox.Show("Nao te esquecas de responder a todas as questoes!");
}
if (textBox1.Text != null && textBox2.Text != null && textBox3.Text != null && textBox4.Text != null && textBox5.Text != null)
{
r2 = 1;
this.Close();
(new Form7()).Show();
}
}
private void button1_Click(object sender, EventArgs e)
{
Form15 abrir = new Form15();
abrir.Show();
this.Hide();
}
private void Form3_Load(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Maximized;
if (r2 == 1)
{
textBox1.Text = a;
textBox2.Text = b;
textBox3.Text = c;
textBox4.Text = d;
textBox5.Text = f;
}
}
private void button3_Click(object sender, EventArgs e)
{
a10 = 10;
Form1 abrir = new Form1();
abrir.Show();
this.Hide();
}
private void radioButton4_CheckedChanged(object sender, EventArgs e)
{
}
private void radioButton3_CheckedChanged(object sender, EventArgs e)
{
}
private void radioButton2_CheckedChanged(object sender, EventArgs e)
{
}
private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
}
private void label1_Click(object sender, EventArgs e)
{
}
private void label6_Click(object sender, EventArgs e)
{
}
private void textBox5_TextChanged(object sender, EventArgs e)
{
}
public static string data, json;
private void Form3_FormClosing(object sender, FormClosingEventArgs e)
{
}
}
}