-
Notifications
You must be signed in to change notification settings - Fork 0
/
Form3.cs
130 lines (120 loc) · 3.43 KB
/
Form3.cs
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
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;
namespace lab003
{
public partial class Form3 : Form
{
int m = 0;
public Form3()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
if (radioButton1.Checked)
{
label9.Text = "Correct";
m = m + 1;
}
else if (radioButton2.Checked || radioButton3.Checked || radioButton4.Checked)
{
label9.Text = "Incorrect";
label9.ForeColor = Color.Red;
}
else
{
label9.Text = "Unchecked";
label9.ForeColor = Color.Blue;
}
if (radioButton5.Checked)
{
label11.Text = "Correct";
m = m + 1;
}
else if (radioButton7.Checked || radioButton6.Checked || radioButton8.Checked)
{
label11.Text = "Incorrect";
label11.ForeColor = Color.Red;
}
else
{
label11.Text = "Unchecked";
label11.ForeColor = Color.Blue;
}
if (radioButton12.Checked)
{
label12.Text = "Correct";
m = m + 1;
}
else if (radioButton9.Checked || radioButton11.Checked || radioButton10.Checked)
{
label12.Text = "Incorrect";
label12.ForeColor = Color.Red;
}
else
{
label12.Text = "Unchecked";
label12.ForeColor = Color.Blue;
}
if (radioButton15.Checked)
{
label13.Text = "Correct";
m = m + 1;
}
else if (radioButton14.Checked || radioButton13.Checked || radioButton16.Checked)
{
label13.Text = "Incorrect";
label13.ForeColor = Color.Red;
}
else
{
label13.Text = "Unchecked";
label13.ForeColor = Color.Blue;
}
if (radioButton20.Checked)
{
label14.Text = "Correct";
m = m + 1;
}
else if (radioButton17.Checked || radioButton18.Checked || radioButton19.Checked)
{
label14.Text = "Incorrect";
label14.ForeColor = Color.Red;
}
else
{
label14.Text = "Unchecked";
label14.ForeColor = Color.Blue;
}
label15.Text = m.ToString() + "/5";
}
private void button3_Click(object sender, EventArgs e)
{
Form1 check = new Form1();
check.Show();
Hide();
Refresh();
}
private void button2_Click(object sender, EventArgs e)
{
Form1 check = new Form1();
check.Show();
Hide();
Refresh();
}
private void button4_Click(object sender, EventArgs e)
{
Form1 check = new Form1();
check.Show();
Hide();
Refresh();
}
}
}