forked from VR2VYE/OpenGD77CPS
-
Notifications
You must be signed in to change notification settings - Fork 2
/
DoubleClickGroupBox.cs
78 lines (71 loc) · 1.39 KB
/
DoubleClickGroupBox.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
using System;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
internal class DoubleClickGroupBox : GroupBox
{
bool _DoubleClickSelectCheckBox;
[CompilerGenerated]
public bool method_0()
{
return this._DoubleClickSelectCheckBox;
}
[CompilerGenerated]
public void method_1(bool bool_0)
{
this._DoubleClickSelectCheckBox = bool_0;
}
bool _ClickFocus;
[CompilerGenerated]
public bool method_2()
{
return this._ClickFocus;
}
[CompilerGenerated]
public void method_3(bool bool_0)
{
this._ClickFocus = bool_0;
}
public DoubleClickGroupBox()
{
this.method_1(false);
this.method_3(true);
}
protected override void OnClick(EventArgs e)
{
if (this.method_2())
{
base.Focus();
}
base.OnClick(e);
}
protected override void OnDoubleClick(EventArgs e)
{
if (this.method_0())
{
MouseEventArgs mouseEventArgs = e as MouseEventArgs;
if (mouseEventArgs != null)
{
foreach (object control in base.Controls)
{
CheckBox checkBox = control as CheckBox;
if (checkBox != null && checkBox.Enabled)
{
if (mouseEventArgs.Button == MouseButtons.Left)
{
checkBox.Checked = true;
}
else if (mouseEventArgs.Button == MouseButtons.Right)
{
checkBox.Checked = false;
}
else
{
checkBox.Checked = !checkBox.Checked;
}
}
}
}
}
base.OnDoubleClick(e);
}
}