@@ -11,83 +11,37 @@ namespace BizHawk.Client.DiscoHawk
11
11
{
12
12
public class MainDiscoForm : Form
13
13
{
14
- private readonly Button btnAbout ;
15
-
16
14
private readonly RadioButton ccdOutputButton ;
17
15
18
16
private readonly RadioButton chdOutputButton ;
19
17
20
- private readonly ColumnHeader columnHeader1 ;
21
-
22
- private readonly Button ExitButton ;
23
-
24
- private readonly GroupBox groupBox1 ;
25
-
26
- private readonly GroupBox groupBox2 ;
27
-
28
- private readonly Label label1 ;
29
-
30
- private readonly Label label2 ;
31
-
32
- private readonly Label label3 ;
33
-
34
- private readonly Label label4 ;
35
-
36
- private readonly Label label6 ;
37
-
38
- private readonly Label label7 ;
39
-
40
18
private readonly Panel lblMagicDragArea ;
41
19
42
20
private readonly Panel lblMp3ExtractMagicArea ;
43
21
44
22
private readonly ListView lvCompareTargets ;
45
23
46
- private readonly RadioButton radioButton1 ;
47
-
48
- private readonly RadioButton radioButton2 ;
49
-
50
24
// Release TODO:
51
25
// An input (queue) list
52
26
// An outputted list showing new file name
53
27
// Progress bar should show file being converted
54
28
// Add disc button, which puts it on the progress cue (converts it)
55
29
public MainDiscoForm ( )
56
30
{
57
- ListViewItem listViewItem1 = new ( "BizHawk" ) ;
58
- ListViewItem listViewItem2 = new ( "Mednafen" ) ;
59
- ExitButton = new ( ) ;
60
- lblMagicDragArea = new ( ) ;
61
- label1 = new ( ) ;
62
- lblMp3ExtractMagicArea = new ( ) ;
63
- label2 = new ( ) ;
64
- btnAbout = new ( ) ;
65
- radioButton1 = new ( ) ;
66
- groupBox1 = new ( ) ;
67
- label4 = new ( ) ;
68
- label3 = new ( ) ;
69
- radioButton2 = new ( ) ;
70
- groupBox2 = new ( ) ;
71
- ccdOutputButton = new ( ) ;
72
- chdOutputButton = new ( ) ;
73
- label6 = new ( ) ;
74
- label7 = new ( ) ;
75
- lvCompareTargets = new ( ) ;
76
- columnHeader1 = new ( ) ;
77
- lblMagicDragArea . SuspendLayout ( ) ;
78
- lblMp3ExtractMagicArea . SuspendLayout ( ) ;
79
- groupBox1 . SuspendLayout ( ) ;
80
- groupBox2 . SuspendLayout ( ) ;
81
31
SuspendLayout ( ) ;
82
32
33
+ Button ExitButton = new ( ) ;
83
34
ExitButton . Location = new ( 434 , 414 ) ;
84
35
ExitButton . Name = "ExitButton" ;
85
36
ExitButton . Size = new ( 75 , 23 ) ;
86
37
ExitButton . TabIndex = 0 ;
87
38
ExitButton . Text = "E&xit" ;
88
39
ExitButton . UseVisualStyleBackColor = true ;
89
- ExitButton . Click += ExitButton_Click ;
40
+ ExitButton . Click += ( _ , _ ) => Close ( ) ;
90
41
42
+ lblMagicDragArea = new ( ) ;
43
+ lblMagicDragArea . SuspendLayout ( ) ;
44
+ Label label1 = new ( ) ;
91
45
lblMagicDragArea . AllowDrop = true ;
92
46
lblMagicDragArea . BorderStyle = BorderStyle . Fixed3D ;
93
47
lblMagicDragArea . Controls . Add ( label1 ) ;
@@ -104,6 +58,9 @@ public MainDiscoForm()
104
58
label1 . TabIndex = 0 ;
105
59
label1 . Text = "Drag here to HAWK your disc - dump it out as a clean CCD/CHD" ;
106
60
61
+ lblMp3ExtractMagicArea = new ( ) ;
62
+ lblMp3ExtractMagicArea . SuspendLayout ( ) ;
63
+ Label label2 = new ( ) ;
107
64
lblMp3ExtractMagicArea . AllowDrop = true ;
108
65
lblMp3ExtractMagicArea . BorderStyle = BorderStyle . Fixed3D ;
109
66
lblMp3ExtractMagicArea . Controls . Add ( label2 ) ;
@@ -120,14 +77,16 @@ public MainDiscoForm()
120
77
label2 . TabIndex = 0 ;
121
78
label2 . Text = "Drag a disc here to extract the audio tracks to MP3" ;
122
79
80
+ Button btnAbout = new ( ) ;
123
81
btnAbout . Location = new ( 353 , 414 ) ;
124
82
btnAbout . Name = "btnAbout" ;
125
83
btnAbout . Size = new ( 75 , 23 ) ;
126
84
btnAbout . TabIndex = 3 ;
127
85
btnAbout . Text = "&About" ;
128
86
btnAbout . UseVisualStyleBackColor = true ;
129
- btnAbout . Click += BtnAbout_Click ;
87
+ btnAbout . Click += ( _ , _ ) => new About ( ) . ShowDialog ( ) ;
130
88
89
+ RadioButton radioButton1 = new ( ) ;
131
90
radioButton1 . AutoSize = true ;
132
91
radioButton1 . Checked = true ;
133
92
radioButton1 . Location = new ( 6 , 19 ) ;
@@ -138,6 +97,11 @@ public MainDiscoForm()
138
97
radioButton1 . Text = "BizHawk" ;
139
98
radioButton1 . UseVisualStyleBackColor = true ;
140
99
100
+ GroupBox groupBox1 = new ( ) ;
101
+ groupBox1 . SuspendLayout ( ) ;
102
+ Label label4 = new ( ) ;
103
+ Label label3 = new ( ) ;
104
+ RadioButton radioButton2 = new ( ) ;
141
105
groupBox1 . Controls . Add ( label4 ) ;
142
106
groupBox1 . Controls . Add ( label3 ) ;
143
107
groupBox1 . Controls . Add ( radioButton2 ) ;
@@ -171,6 +135,10 @@ public MainDiscoForm()
171
135
radioButton2 . Text = "Mednafen" ;
172
136
radioButton2 . UseVisualStyleBackColor = true ;
173
137
138
+ GroupBox groupBox2 = new ( ) ;
139
+ groupBox2 . SuspendLayout ( ) ;
140
+ ccdOutputButton = new ( ) ;
141
+ chdOutputButton = new ( ) ;
174
142
groupBox2 . Controls . Add ( ccdOutputButton ) ;
175
143
groupBox2 . Controls . Add ( chdOutputButton ) ;
176
144
groupBox2 . Enabled = true ;
@@ -201,6 +169,7 @@ public MainDiscoForm()
201
169
chdOutputButton . Text = "CHD" ;
202
170
chdOutputButton . UseVisualStyleBackColor = true ;
203
171
172
+ Label label6 = new ( ) ;
204
173
label6 . AutoSize = true ;
205
174
label6 . Enabled = false ;
206
175
label6 . Location = new ( 9 , 324 ) ;
@@ -209,21 +178,23 @@ public MainDiscoForm()
209
178
label6 . TabIndex = 2 ;
210
179
label6 . Text = "Compare Reading To:" ;
211
180
181
+ Label label7 = new ( ) ;
212
182
label7 . AutoSize = true ;
213
183
label7 . Location = new ( 358 , 12 ) ;
214
184
label7 . Name = "label7" ;
215
185
label7 . Size = new ( 70 , 13 ) ;
216
186
label7 . TabIndex = 10 ;
217
187
label7 . Text = "- Operations -" ;
218
188
219
- lvCompareTargets . Columns . Add ( columnHeader1 ) ;
189
+ lvCompareTargets = new ( ) ;
190
+ lvCompareTargets . Columns . Add ( new ColumnHeader ( ) ) ;
220
191
lvCompareTargets . Enabled = false ;
221
192
lvCompareTargets . FullRowSelect = true ;
222
193
lvCompareTargets . GridLines = true ;
223
194
lvCompareTargets . HeaderStyle = ColumnHeaderStyle . None ;
224
195
lvCompareTargets . HideSelection = false ;
225
- lvCompareTargets . Items . Add ( listViewItem1 ) ;
226
- lvCompareTargets . Items . Add ( listViewItem2 ) ;
196
+ lvCompareTargets . Items . Add ( "BizHawk" ) ;
197
+ lvCompareTargets . Items . Add ( "Mednafen" ) ;
227
198
lvCompareTargets . Location = new ( 9 , 340 ) ;
228
199
lvCompareTargets . Name = "lvCompareTargets" ;
229
200
lvCompareTargets . Size = new ( 121 , 97 ) ;
@@ -251,7 +222,7 @@ public MainDiscoForm()
251
222
MinimizeBox = false ;
252
223
Name = "MainDiscoForm" ;
253
224
Text = "DiscoHawk" ;
254
- Load += MainDiscoForm_Load ;
225
+ Load += ( _ , _ ) => lvCompareTargets . Columns [ 0 ] . Width = lvCompareTargets . ClientSize . Width ;
255
226
lblMagicDragArea . ResumeLayout ( performLayout : false ) ;
256
227
lblMp3ExtractMagicArea . ResumeLayout ( performLayout : false ) ;
257
228
groupBox1 . ResumeLayout ( performLayout : false ) ;
@@ -262,16 +233,6 @@ public MainDiscoForm()
262
233
PerformLayout ( ) ;
263
234
}
264
235
265
- private void MainDiscoForm_Load ( object sender , EventArgs e )
266
- {
267
- lvCompareTargets . Columns [ 0 ] . Width = lvCompareTargets . ClientSize . Width ;
268
- }
269
-
270
- private void ExitButton_Click ( object sender , EventArgs e )
271
- {
272
- Close ( ) ;
273
- }
274
-
275
236
private void lblMagicDragArea_DragDrop ( object sender , DragEventArgs e )
276
237
{
277
238
lblMagicDragArea . AllowDrop = false ;
@@ -406,10 +367,5 @@ private void LblMp3ExtractMagicArea_DragDrop(object sender, DragEventArgs e)
406
367
Cursor = Cursors . Default ;
407
368
}
408
369
}
409
-
410
- private void BtnAbout_Click ( object sender , EventArgs e )
411
- {
412
- new About ( ) . ShowDialog ( ) ;
413
- }
414
370
}
415
371
}
0 commit comments