-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFilterClass.cs
630 lines (594 loc) · 22.7 KB
/
FilterClass.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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
// Decompiled with JetBrains decompiler
// Type: TransmissionLine.FilterClass
// Assembly: TransmissionLine, Version=3.6.3.5, Culture=neutral, PublicKeyToken=null
// MVID: 92E11920-ED50-4C1F-99A1-3CFB7DCC3364
// Assembly location: C:\Users\Home\AppData\Local\Apps\2.0\477AE5HX.86E\PEE3MCH4.84B\tran..tion_127a55d62cc03faa_0003.0006_03fd5c6fef0309f2\TransmissionLine.exe
using Microsoft.VisualBasic.CompilerServices;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
namespace TransmissionLine
{
[DesignerGenerated]
public class FilterClass : Form
{
private static List<WeakReference> __ENCList = new List<WeakReference>();
private IContainer components;
[AccessedThroughProperty("GroupBox1")]
private GroupBox _GroupBox1;
[AccessedThroughProperty("LowPassCheckBox")]
private CheckBox _LowPassCheckBox;
[AccessedThroughProperty("LowPassQBox")]
private TextBox _LowPassQBox;
[AccessedThroughProperty("Label2")]
private Label _Label2;
[AccessedThroughProperty("Label1")]
private Label _Label1;
[AccessedThroughProperty("LowPassfoBox")]
private TextBox _LowPassfoBox;
[AccessedThroughProperty("GroupBox2")]
private GroupBox _GroupBox2;
[AccessedThroughProperty("Label3")]
private Label _Label3;
[AccessedThroughProperty("Label4")]
private Label _Label4;
[AccessedThroughProperty("HighPassfoBox")]
private TextBox _HighPassfoBox;
[AccessedThroughProperty("HighPassQBox")]
private TextBox _HighPassQBox;
[AccessedThroughProperty("HighPassCheckBox")]
private CheckBox _HighPassCheckBox;
[AccessedThroughProperty("LowPass24dBRadio")]
private RadioButton _LowPass24dBRadio;
[AccessedThroughProperty("LowPass12dBRadio")]
private RadioButton _LowPass12dBRadio;
[AccessedThroughProperty("HighPass24dBRadio")]
private RadioButton _HighPass24dBRadio;
[AccessedThroughProperty("HighPass12dBRadio")]
private RadioButton _HighPass12dBRadio;
private FilterParameters FilterParameterEdit;
[DebuggerNonUserCode]
static FilterClass()
{
}
[DebuggerNonUserCode]
private static void __ENCAddToList(object value)
{
lock (FilterClass.__ENCList)
{
if (FilterClass.__ENCList.Count == FilterClass.__ENCList.Capacity)
{
int index1 = 0;
int num = checked (FilterClass.__ENCList.Count - 1);
int index2 = 0;
while (index2 <= num)
{
if (FilterClass.__ENCList[index2].IsAlive)
{
if (index2 != index1)
FilterClass.__ENCList[index1] = FilterClass.__ENCList[index2];
checked { ++index1; }
}
checked { ++index2; }
}
FilterClass.__ENCList.RemoveRange(index1, checked (FilterClass.__ENCList.Count - index1));
FilterClass.__ENCList.Capacity = FilterClass.__ENCList.Count;
}
FilterClass.__ENCList.Add(new WeakReference(RuntimeHelpers.GetObjectValue(value)));
}
}
[DebuggerNonUserCode]
protected override void Dispose(bool disposing)
{
try
{
if (!disposing || this.components == null)
return;
this.components.Dispose();
}
finally
{
base.Dispose(disposing);
}
}
[DebuggerStepThrough]
private void InitializeComponent()
{
this.GroupBox1 = new GroupBox();
this.LowPass24dBRadio = new RadioButton();
this.LowPass12dBRadio = new RadioButton();
this.Label2 = new Label();
this.Label1 = new Label();
this.LowPassfoBox = new TextBox();
this.LowPassQBox = new TextBox();
this.LowPassCheckBox = new CheckBox();
this.GroupBox2 = new GroupBox();
this.HighPass24dBRadio = new RadioButton();
this.HighPass12dBRadio = new RadioButton();
this.Label3 = new Label();
this.Label4 = new Label();
this.HighPassfoBox = new TextBox();
this.HighPassQBox = new TextBox();
this.HighPassCheckBox = new CheckBox();
this.GroupBox1.SuspendLayout();
this.GroupBox2.SuspendLayout();
this.SuspendLayout();
this.GroupBox1.Controls.Add((Control) this.LowPass24dBRadio);
this.GroupBox1.Controls.Add((Control) this.LowPass12dBRadio);
this.GroupBox1.Controls.Add((Control) this.Label2);
this.GroupBox1.Controls.Add((Control) this.Label1);
this.GroupBox1.Controls.Add((Control) this.LowPassfoBox);
this.GroupBox1.Controls.Add((Control) this.LowPassQBox);
this.GroupBox1.Controls.Add((Control) this.LowPassCheckBox);
GroupBox groupBox1_1 = this.GroupBox1;
Point point1 = new Point(12, 13);
Point point2 = point1;
groupBox1_1.Location = point2;
this.GroupBox1.Name = "GroupBox1";
GroupBox groupBox1_2 = this.GroupBox1;
Size size1 = new Size(186, 99);
Size size2 = size1;
groupBox1_2.Size = size2;
this.GroupBox1.TabIndex = 0;
this.GroupBox1.TabStop = false;
this.GroupBox1.Text = "Low Pass Filter";
this.LowPass24dBRadio.AutoSize = true;
RadioButton lowPass24dBradio1 = this.LowPass24dBRadio;
point1 = new Point(129, 20);
Point point3 = point1;
lowPass24dBradio1.Location = point3;
this.LowPass24dBRadio.Name = "LowPass24dBRadio";
RadioButton lowPass24dBradio2 = this.LowPass24dBRadio;
size1 = new Size(50, 17);
Size size3 = size1;
lowPass24dBradio2.Size = size3;
this.LowPass24dBRadio.TabIndex = 3;
this.LowPass24dBRadio.TabStop = true;
this.LowPass24dBRadio.Text = "24dB";
this.LowPass24dBRadio.UseVisualStyleBackColor = true;
this.LowPass12dBRadio.AutoSize = true;
RadioButton lowPass12dBradio1 = this.LowPass12dBRadio;
point1 = new Point(73, 20);
Point point4 = point1;
lowPass12dBradio1.Location = point4;
this.LowPass12dBRadio.Name = "LowPass12dBRadio";
RadioButton lowPass12dBradio2 = this.LowPass12dBRadio;
size1 = new Size(50, 17);
Size size4 = size1;
lowPass12dBradio2.Size = size4;
this.LowPass12dBRadio.TabIndex = 3;
this.LowPass12dBRadio.TabStop = true;
this.LowPass12dBRadio.Text = "12dB";
this.LowPass12dBRadio.UseVisualStyleBackColor = true;
this.Label2.AutoSize = true;
Label label2_1 = this.Label2;
point1 = new Point(70, 73);
Point point5 = point1;
label2_1.Location = point5;
this.Label2.Name = "Label2";
Label label2_2 = this.Label2;
size1 = new Size(113, 13);
Size size5 = size1;
label2_2.Size = size5;
this.Label2.TabIndex = 2;
this.Label2.Text = "Cut-off Frequency (Hz)";
this.Label1.AutoSize = true;
Label label1_1 = this.Label1;
point1 = new Point(70, 47);
Point point6 = point1;
label1_1.Location = point6;
this.Label1.Name = "Label1";
Label label1_2 = this.Label1;
size1 = new Size(72, 13);
Size size6 = size1;
label1_2.Size = size6;
this.Label1.TabIndex = 2;
this.Label1.Text = "Quality Factor";
TextBox lowPassfoBox1 = this.LowPassfoBox;
point1 = new Point(7, 70);
Point point7 = point1;
lowPassfoBox1.Location = point7;
this.LowPassfoBox.Name = "LowPassfoBox";
TextBox lowPassfoBox2 = this.LowPassfoBox;
size1 = new Size(57, 20);
Size size7 = size1;
lowPassfoBox2.Size = size7;
this.LowPassfoBox.TabIndex = 2;
TextBox lowPassQbox1 = this.LowPassQBox;
point1 = new Point(7, 44);
Point point8 = point1;
lowPassQbox1.Location = point8;
this.LowPassQBox.Name = "LowPassQBox";
TextBox lowPassQbox2 = this.LowPassQBox;
size1 = new Size(57, 20);
Size size8 = size1;
lowPassQbox2.Size = size8;
this.LowPassQBox.TabIndex = 1;
this.LowPassCheckBox.AutoSize = true;
CheckBox lowPassCheckBox1 = this.LowPassCheckBox;
point1 = new Point(7, 20);
Point point9 = point1;
lowPassCheckBox1.Location = point9;
this.LowPassCheckBox.Name = "LowPassCheckBox";
CheckBox lowPassCheckBox2 = this.LowPassCheckBox;
size1 = new Size(59, 17);
Size size9 = size1;
lowPassCheckBox2.Size = size9;
this.LowPassCheckBox.TabIndex = 0;
this.LowPassCheckBox.Text = "On/Off";
this.LowPassCheckBox.UseVisualStyleBackColor = true;
this.GroupBox2.Controls.Add((Control) this.HighPass24dBRadio);
this.GroupBox2.Controls.Add((Control) this.HighPass12dBRadio);
this.GroupBox2.Controls.Add((Control) this.Label3);
this.GroupBox2.Controls.Add((Control) this.Label4);
this.GroupBox2.Controls.Add((Control) this.HighPassfoBox);
this.GroupBox2.Controls.Add((Control) this.HighPassQBox);
this.GroupBox2.Controls.Add((Control) this.HighPassCheckBox);
GroupBox groupBox2_1 = this.GroupBox2;
point1 = new Point(12, 118);
Point point10 = point1;
groupBox2_1.Location = point10;
this.GroupBox2.Name = "GroupBox2";
GroupBox groupBox2_2 = this.GroupBox2;
size1 = new Size(186, 99);
Size size10 = size1;
groupBox2_2.Size = size10;
this.GroupBox2.TabIndex = 0;
this.GroupBox2.TabStop = false;
this.GroupBox2.Text = "High Pass Filter";
this.HighPass24dBRadio.AutoSize = true;
RadioButton highPass24dBradio1 = this.HighPass24dBRadio;
point1 = new Point(129, 20);
Point point11 = point1;
highPass24dBradio1.Location = point11;
this.HighPass24dBRadio.Name = "HighPass24dBRadio";
RadioButton highPass24dBradio2 = this.HighPass24dBRadio;
size1 = new Size(50, 17);
Size size11 = size1;
highPass24dBradio2.Size = size11;
this.HighPass24dBRadio.TabIndex = 6;
this.HighPass24dBRadio.TabStop = true;
this.HighPass24dBRadio.Text = "24dB";
this.HighPass24dBRadio.UseVisualStyleBackColor = true;
this.HighPass12dBRadio.AutoSize = true;
RadioButton highPass12dBradio1 = this.HighPass12dBRadio;
point1 = new Point(73, 20);
Point point12 = point1;
highPass12dBradio1.Location = point12;
this.HighPass12dBRadio.Name = "HighPass12dBRadio";
RadioButton highPass12dBradio2 = this.HighPass12dBRadio;
size1 = new Size(50, 17);
Size size12 = size1;
highPass12dBradio2.Size = size12;
this.HighPass12dBRadio.TabIndex = 6;
this.HighPass12dBRadio.TabStop = true;
this.HighPass12dBRadio.Text = "12dB";
this.HighPass12dBRadio.UseVisualStyleBackColor = true;
this.Label3.AutoSize = true;
Label label3_1 = this.Label3;
point1 = new Point(70, 73);
Point point13 = point1;
label3_1.Location = point13;
this.Label3.Name = "Label3";
Label label3_2 = this.Label3;
size1 = new Size(113, 13);
Size size13 = size1;
label3_2.Size = size13;
this.Label3.TabIndex = 2;
this.Label3.Text = "Cut-off Frequency (Hz)";
this.Label4.AutoSize = true;
Label label4_1 = this.Label4;
point1 = new Point(70, 47);
Point point14 = point1;
label4_1.Location = point14;
this.Label4.Name = "Label4";
Label label4_2 = this.Label4;
size1 = new Size(72, 13);
Size size14 = size1;
label4_2.Size = size14;
this.Label4.TabIndex = 2;
this.Label4.Text = "Quality Factor";
TextBox highPassfoBox1 = this.HighPassfoBox;
point1 = new Point(7, 70);
Point point15 = point1;
highPassfoBox1.Location = point15;
this.HighPassfoBox.Name = "HighPassfoBox";
TextBox highPassfoBox2 = this.HighPassfoBox;
size1 = new Size(57, 20);
Size size15 = size1;
highPassfoBox2.Size = size15;
this.HighPassfoBox.TabIndex = 5;
TextBox highPassQbox1 = this.HighPassQBox;
point1 = new Point(7, 44);
Point point16 = point1;
highPassQbox1.Location = point16;
this.HighPassQBox.Name = "HighPassQBox";
TextBox highPassQbox2 = this.HighPassQBox;
size1 = new Size(57, 20);
Size size16 = size1;
highPassQbox2.Size = size16;
this.HighPassQBox.TabIndex = 4;
this.HighPassCheckBox.AutoSize = true;
CheckBox highPassCheckBox1 = this.HighPassCheckBox;
point1 = new Point(7, 20);
Point point17 = point1;
highPassCheckBox1.Location = point17;
this.HighPassCheckBox.Name = "HighPassCheckBox";
CheckBox highPassCheckBox2 = this.HighPassCheckBox;
size1 = new Size(59, 17);
Size size17 = size1;
highPassCheckBox2.Size = size17;
this.HighPassCheckBox.TabIndex = 3;
this.HighPassCheckBox.Text = "On/Off";
this.HighPassCheckBox.UseVisualStyleBackColor = true;
this.AutoScaleDimensions = new SizeF(6f, 13f);
this.AutoScaleMode = AutoScaleMode.Font;
size1 = new Size(210, 229);
this.ClientSize = size1;
this.Controls.Add((Control) this.GroupBox2);
this.Controls.Add((Control) this.GroupBox1);
this.FormBorderStyle = FormBorderStyle.FixedToolWindow;
this.Name = nameof (FilterClass);
this.RightToLeft = RightToLeft.No;
this.Text = "Filter";
this.GroupBox1.ResumeLayout(false);
this.GroupBox1.PerformLayout();
this.GroupBox2.ResumeLayout(false);
this.GroupBox2.PerformLayout();
this.ResumeLayout(false);
}
internal GroupBox GroupBox1
{
[DebuggerNonUserCode] get => this._GroupBox1;
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set => this._GroupBox1 = value;
}
internal CheckBox LowPassCheckBox
{
[DebuggerNonUserCode] get => this._LowPassCheckBox;
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.LowPassCheckBox_CheckedChanged);
if (this._LowPassCheckBox != null)
this._LowPassCheckBox.CheckedChanged -= eventHandler;
this._LowPassCheckBox = value;
if (this._LowPassCheckBox == null)
return;
this._LowPassCheckBox.CheckedChanged += eventHandler;
}
}
internal TextBox LowPassQBox
{
[DebuggerNonUserCode] get => this._LowPassQBox;
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.LowPassQBox_LostFocus);
if (this._LowPassQBox != null)
this._LowPassQBox.LostFocus -= eventHandler;
this._LowPassQBox = value;
if (this._LowPassQBox == null)
return;
this._LowPassQBox.LostFocus += eventHandler;
}
}
internal Label Label2
{
[DebuggerNonUserCode] get => this._Label2;
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set => this._Label2 = value;
}
internal Label Label1
{
[DebuggerNonUserCode] get => this._Label1;
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set => this._Label1 = value;
}
internal TextBox LowPassfoBox
{
[DebuggerNonUserCode] get => this._LowPassfoBox;
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.LowPassfoBox_LostFocus);
if (this._LowPassfoBox != null)
this._LowPassfoBox.LostFocus -= eventHandler;
this._LowPassfoBox = value;
if (this._LowPassfoBox == null)
return;
this._LowPassfoBox.LostFocus += eventHandler;
}
}
internal GroupBox GroupBox2
{
[DebuggerNonUserCode] get => this._GroupBox2;
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set => this._GroupBox2 = value;
}
internal Label Label3
{
[DebuggerNonUserCode] get => this._Label3;
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set => this._Label3 = value;
}
internal Label Label4
{
[DebuggerNonUserCode] get => this._Label4;
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set => this._Label4 = value;
}
internal TextBox HighPassfoBox
{
[DebuggerNonUserCode] get => this._HighPassfoBox;
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.HighPassfoBox_LostFocus);
if (this._HighPassfoBox != null)
this._HighPassfoBox.LostFocus -= eventHandler;
this._HighPassfoBox = value;
if (this._HighPassfoBox == null)
return;
this._HighPassfoBox.LostFocus += eventHandler;
}
}
internal TextBox HighPassQBox
{
[DebuggerNonUserCode] get => this._HighPassQBox;
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.HighPassQBox_LostFocus);
if (this._HighPassQBox != null)
this._HighPassQBox.LostFocus -= eventHandler;
this._HighPassQBox = value;
if (this._HighPassQBox == null)
return;
this._HighPassQBox.LostFocus += eventHandler;
}
}
internal CheckBox HighPassCheckBox
{
[DebuggerNonUserCode] get => this._HighPassCheckBox;
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.HighPassCheckBox_CheckedChanged);
if (this._HighPassCheckBox != null)
this._HighPassCheckBox.CheckedChanged -= eventHandler;
this._HighPassCheckBox = value;
if (this._HighPassCheckBox == null)
return;
this._HighPassCheckBox.CheckedChanged += eventHandler;
}
}
internal RadioButton LowPass24dBRadio
{
[DebuggerNonUserCode] get => this._LowPass24dBRadio;
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set => this._LowPass24dBRadio = value;
}
internal RadioButton LowPass12dBRadio
{
[DebuggerNonUserCode] get => this._LowPass12dBRadio;
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.LowPass12dBRadio_CheckedChanged);
if (this._LowPass12dBRadio != null)
this._LowPass12dBRadio.CheckedChanged -= eventHandler;
this._LowPass12dBRadio = value;
if (this._LowPass12dBRadio == null)
return;
this._LowPass12dBRadio.CheckedChanged += eventHandler;
}
}
internal RadioButton HighPass24dBRadio
{
[DebuggerNonUserCode] get => this._HighPass24dBRadio;
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set => this._HighPass24dBRadio = value;
}
internal RadioButton HighPass12dBRadio
{
[DebuggerNonUserCode] get => this._HighPass12dBRadio;
[DebuggerNonUserCode, MethodImpl(MethodImplOptions.Synchronized)] set
{
EventHandler eventHandler = new EventHandler(this.HighPass12dBRadio_CheckedChanged);
if (this._HighPass12dBRadio != null)
this._HighPass12dBRadio.CheckedChanged -= eventHandler;
this._HighPass12dBRadio = value;
if (this._HighPass12dBRadio == null)
return;
this._HighPass12dBRadio.CheckedChanged += eventHandler;
}
}
public event FilterClass.FilterParameterUpdatedEventHandler FilterParameterUpdated;
public FilterClass(FilterParameters FilterParameter)
{
FilterClass.__ENCAddToList((object) this);
this.InitializeComponent();
this.FilterParameterFromParent = FilterParameter;
}
public FilterParameters FilterParameterFromParent
{
set
{
this.FilterParameterEdit = value;
this.UpdateValuesOnForm();
}
}
private void UpdateValuesOnForm()
{
this.LowPassCheckBox.Checked = this.FilterParameterEdit.LowPass.Active;
this.LowPassQBox.Text = this.FilterParameterEdit.LowPass.Q.ToString();
this.LowPassfoBox.Text = this.FilterParameterEdit.LowPass.fo.ToString();
this.HighPassCheckBox.Checked = this.FilterParameterEdit.HighPass.Active;
this.HighPassQBox.Text = this.FilterParameterEdit.HighPass.Q.ToString();
this.HighPassfoBox.Text = this.FilterParameterEdit.HighPass.fo.ToString();
if (this.FilterParameterEdit.LowPass.Order == 2)
this.LowPass12dBRadio.Checked = true;
else if (this.FilterParameterEdit.LowPass.Order == 4)
{
this.LowPass24dBRadio.Checked = true;
}
else
{
this.FilterParameterEdit.LowPass.Order = 2;
this.LowPass12dBRadio.Checked = true;
}
if (this.FilterParameterEdit.HighPass.Order == 2)
this.HighPass12dBRadio.Checked = true;
else if (this.FilterParameterEdit.HighPass.Order == 4)
{
this.HighPass24dBRadio.Checked = true;
}
else
{
this.FilterParameterEdit.HighPass.Order = 2;
this.HighPass12dBRadio.Checked = true;
}
}
private void SendValues()
{
FilterParameterUpdatedEventArgs e = new FilterParameterUpdatedEventArgs(this.FilterParameterEdit);
FilterClass.FilterParameterUpdatedEventHandler parameterUpdatedEvent = this.FilterParameterUpdated;
if (parameterUpdatedEvent == null)
return;
parameterUpdatedEvent((object) this, e);
}
private void LowPassQBox_LostFocus(object sender, EventArgs e)
{
this.FilterParameterEdit.LowPass.Q = Conversions.ToDouble(this.LowPassQBox.Text);
this.SendValues();
}
private void HighPassQBox_LostFocus(object sender, EventArgs e)
{
this.FilterParameterEdit.HighPass.Q = Conversions.ToDouble(this.HighPassQBox.Text);
this.SendValues();
}
private void LowPassfoBox_LostFocus(object sender, EventArgs e)
{
this.FilterParameterEdit.LowPass.fo = Conversions.ToDouble(this.LowPassfoBox.Text);
this.SendValues();
}
private void HighPassfoBox_LostFocus(object sender, EventArgs e)
{
this.FilterParameterEdit.HighPass.fo = Conversions.ToDouble(this.HighPassfoBox.Text);
this.SendValues();
}
private void LowPassCheckBox_CheckedChanged(object sender, EventArgs e)
{
this.FilterParameterEdit.LowPass.Active = this.LowPassCheckBox.Checked;
this.SendValues();
}
private void HighPassCheckBox_CheckedChanged(object sender, EventArgs e)
{
this.FilterParameterEdit.HighPass.Active = this.HighPassCheckBox.Checked;
this.SendValues();
}
private void LowPass12dBRadio_CheckedChanged(object sender, EventArgs e)
{
this.FilterParameterEdit.LowPass.Order = !this.LowPass12dBRadio.Checked ? 4 : 2;
this.SendValues();
}
private void HighPass12dBRadio_CheckedChanged(object sender, EventArgs e)
{
this.FilterParameterEdit.HighPass.Order = !this.HighPass12dBRadio.Checked ? 4 : 2;
this.SendValues();
}
public delegate void FilterParameterUpdatedEventHandler(
object Sender,
FilterParameterUpdatedEventArgs e);
}
}