-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathToolStripCheckBox.cs
More file actions
55 lines (47 loc) · 1.67 KB
/
ToolStripCheckBox.cs
File metadata and controls
55 lines (47 loc) · 1.67 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
// Decompiled with JetBrains decompiler
// Type: OculusTrayTool.ToolStripCheckBox
// Assembly: OculusTrayTool, Version=0.87.8.0, Culture=neutral, PublicKeyToken=null
// MVID: E8946A27-16D6-4BF6-9D7B-70CB25A977E0
// Assembly location: C:\Program Files (x86)\Oculus Tray Tool\OculusTrayTool.exe
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Windows.Forms.Design;
#nullable disable
namespace OculusTrayTool
{
[ToolStripItemDesignerAvailability(ToolStripItemDesignerAvailability.ToolStrip | ToolStripItemDesignerAvailability.StatusStrip)]
public class ToolStripCheckBox : MyCustomToolStripControlHost
{
public ToolStripCheckBox()
: base((Control) new CheckBox())
{
this.BackColor = Color.Transparent;
}
public CheckBox CheckBoxControl => this.Control as CheckBox;
public bool Checked
{
get => this.CheckBoxControl.Checked;
set => this.CheckBoxControl.Checked = value;
}
protected override void OnSubscribeControlEvents(Control c)
{
base.OnSubscribeControlEvents(c);
((CheckBox) c).CheckedChanged += new EventHandler(this.OnCheckedChanged);
}
protected override void OnUnsubscribeControlEvents(Control c)
{
base.OnUnsubscribeControlEvents(c);
((CheckBox) c).CheckedChanged -= new EventHandler(this.OnCheckedChanged);
}
public event EventHandler CheckedChanged;
private void OnCheckedChanged(object sender, EventArgs e)
{
// ISSUE: reference to a compiler-generated field
EventHandler checkedChangedEvent = this.CheckedChanged;
if (checkedChangedEvent == null)
return;
checkedChangedEvent((object) this, e);
}
}
}