diff --git a/BizHawk.Client.EmuHawk/CustomControls/ToolStripEx.cs b/BizHawk.Client.EmuHawk/CustomControls/ToolStripEx.cs
index bfe6182d4b..1149c41b73 100644
--- a/BizHawk.Client.EmuHawk/CustomControls/ToolStripEx.cs
+++ b/BizHawk.Client.EmuHawk/CustomControls/ToolStripEx.cs
@@ -8,30 +8,18 @@ using System.Windows.Forms;
///
public class ToolStripEx : ToolStrip
{
- private bool clickThrough = true;
-
///
/// Gets or sets whether the ToolStripEx honors item clicks when its containing form does
/// not have input focus.
///
- public bool ClickThrough
- {
- get
- {
- return clickThrough;
- }
- set
- {
- clickThrough = value;
- }
- }
+ public bool ClickThrough { get; set; } = true;
protected override void WndProc(ref Message m)
{
base.WndProc(ref m);
- if (clickThrough &&
- m.Msg == NativeConstants.WM_MOUSEACTIVATE &&
- m.Result == (IntPtr)NativeConstants.MA_ACTIVATEANDEAT)
+ if (ClickThrough
+ && m.Msg == NativeConstants.WM_MOUSEACTIVATE
+ && m.Result == (IntPtr)NativeConstants.MA_ACTIVATEANDEAT)
{
m.Result = (IntPtr)NativeConstants.MA_ACTIVATE;
}
@@ -43,30 +31,18 @@ public class ToolStripEx : ToolStrip
///
public class MenuStripEx : MenuStrip
{
- private bool clickThrough = true;
-
///
/// Gets or sets whether the ToolStripEx honors item clicks when its containing form does
/// not have input focus.
///
- public bool ClickThrough
- {
- get
- {
- return clickThrough;
- }
- set
- {
- clickThrough = value;
- }
- }
+ public bool ClickThrough { get; set; } = true;
protected override void WndProc(ref Message m)
{
base.WndProc(ref m);
- if (clickThrough &&
- m.Msg == NativeConstants.WM_MOUSEACTIVATE &&
- m.Result == (IntPtr)NativeConstants.MA_ACTIVATEANDEAT)
+ if (ClickThrough
+ && m.Msg == NativeConstants.WM_MOUSEACTIVATE
+ && m.Result == (IntPtr)NativeConstants.MA_ACTIVATEANDEAT)
{
m.Result = (IntPtr)NativeConstants.MA_ACTIVATE;
}
@@ -78,30 +54,18 @@ public class MenuStripEx : MenuStrip
///
public class StatusStripEx : StatusStrip
{
- private bool clickThrough = true;
-
///
/// Gets or sets whether the ToolStripEx honors item clicks when its containing form does
/// not have input focus.
///
- public bool ClickThrough
- {
- get
- {
- return clickThrough;
- }
- set
- {
- clickThrough = value;
- }
- }
+ public bool ClickThrough { get; set; } = true;
protected override void WndProc(ref Message m)
{
base.WndProc(ref m);
- if (clickThrough &&
- m.Msg == NativeConstants.WM_MOUSEACTIVATE &&
- m.Result == (IntPtr)NativeConstants.MA_ACTIVATEANDEAT)
+ if (ClickThrough
+ && m.Msg == NativeConstants.WM_MOUSEACTIVATE
+ && m.Result == (IntPtr)NativeConstants.MA_ACTIVATEANDEAT)
{
m.Result = (IntPtr)NativeConstants.MA_ACTIVATE;
}