From ec99b19c68587896e38fb0e78b884e01f0050270 Mon Sep 17 00:00:00 2001 From: mbnq Date: Mon, 23 Sep 2024 17:18:57 +0200 Subject: [PATCH] #if DEBUG --- core/mbConsole.cs | 23 +++++++++++------------ core/mbControlPanel.cs | 14 ++++++++++++-- core/mbSplashScreen.Designer.cs | 10 +++++----- 3 files changed, 28 insertions(+), 19 deletions(-) diff --git a/core/mbConsole.cs b/core/mbConsole.cs index 549f75d..fff5e0a 100644 --- a/core/mbConsole.cs +++ b/core/mbConsole.cs @@ -134,13 +134,12 @@ private void InitializeComponent() "test" }, - #if DEBUG - Enabled = true, - #else - Enabled = false, - Text = " Input n/a in Release version", - #endif - +#if DEBUG + Enabled = true, +#else + Enabled = false, + Text = " Input n/a in Release version", +#endif MaxLength = 128, ForeColor = Color.White, BackColor = Color.Black, @@ -170,11 +169,11 @@ private void InitializeComponent() displayTexts.Add("CPU: -- %"); displayTextVisibility.Add(true); - #if DEBUG - displayTexts.Add("Debug: --"); - #else - displayTexts.Add(""); - #endif +#if DEBUG + displayTexts.Add("Debug: --"); +#else + displayTexts.Add(""); +#endif displayTextVisibility.Add(true); diff --git a/core/mbControlPanel.cs b/core/mbControlPanel.cs index 1aad2cd..0ac2f25 100644 --- a/core/mbControlPanel.cs +++ b/core/mbControlPanel.cs @@ -644,7 +644,14 @@ MaterialSwitch CreateCheckBox(string text, bool isEnabled, EventHandler checkedC mbPanelForTab2.Controls.Add(mbSplashCheckBox); mbPanelForTab2.Controls.Add(mbAOnTopCheckBox); mbPanelForTab2.Controls.Add(mbAutoSaveCheckbox); + +#if DEBUG mbPanelForTab2.Controls.Add(mbDebugonCheckbox); +#else + mbIsDebugOn = false; + mbFnc.mbSpacer2(mbPanelForTab2.Controls, 20, ""); +#endif + mbPanelForTab2.Controls.Add(mbEnableZoomModeCheckBox); mbFnc.mbSpacer2(mbPanelForTab2.Controls, 20, ""); @@ -667,13 +674,16 @@ MaterialSwitch CreateCheckBox(string text, bool isEnabled, EventHandler checkedC mbPanelForTab3.Controls.Add(mbMbToolsDropDown); mbFnc.mbSpacer2(mbPanelForTab3.Controls, 20, ""); + +#if DEBUG mbPanelForTab3.Controls.Add(debugTestButton); +#endif mbTab3.Controls.Add(mbPanelForTab3); /* --- --- --- --- --- --- --- --- --- --- */ - #endregion +#endregion #region ToolTips /* --- --- --- Tooltips --- --- --- */ @@ -727,7 +737,7 @@ void mbCreateToolTip(Control inputControl, string inputText = "Missing ToolTip T #endregion } /* --- --- --- --- --- --- --- --- --- --- --- */ - #endregion +#endregion #region Custom Overlay Crosshair diff --git a/core/mbSplashScreen.Designer.cs b/core/mbSplashScreen.Designer.cs index c9966ee..6007085 100644 --- a/core/mbSplashScreen.Designer.cs +++ b/core/mbSplashScreen.Designer.cs @@ -97,11 +97,11 @@ public void InitializeSplashScreen() this.labelVersionInfo2.AutoSize = true; this.labelVersionInfo2.TabIndex = 0; - #if DEBUG - this.labelVersionInfo2.Text = $"RED.PRO v.{Program.mbVersion} Debug"; - #else - this.labelVersionInfo2.Text = $"RED.PRO v.{Program.mbVersion}"; - #endif +#if DEBUG + this.labelVersionInfo2.Text = $"RED.PRO v.{Program.mbVersion} Debug"; +#else + this.labelVersionInfo2.Text = $"RED.PRO v.{Program.mbVersion}"; +#endif // Add the label to the form this.Controls.Add(this.labelVersionInfo);