From f61f1022e164aa91a9298619f9d05244de6cd72b Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Wed, 30 Oct 2019 14:30:03 -0700 Subject: [PATCH] Collapse the "offset" line in the info window for non-DEBUG --- SourceGen/WpfGui/MainWindow.xaml | 3 ++- SourceGen/WpfGui/MainWindow.xaml.cs | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/SourceGen/WpfGui/MainWindow.xaml b/SourceGen/WpfGui/MainWindow.xaml index 9fdc345..64cae76 100644 --- a/SourceGen/WpfGui/MainWindow.xaml +++ b/SourceGen/WpfGui/MainWindow.xaml @@ -740,7 +740,8 @@ limitations under the License. + Text="{Binding InfoOffsetText, FallbackValue=[offset: +123456]}" + Visibility="{Binding InfoShowDebug, Converter={StaticResource BoolToVis}}"/> diff --git a/SourceGen/WpfGui/MainWindow.xaml.cs b/SourceGen/WpfGui/MainWindow.xaml.cs index c4d6f40..1bfad6b 100644 --- a/SourceGen/WpfGui/MainWindow.xaml.cs +++ b/SourceGen/WpfGui/MainWindow.xaml.cs @@ -1768,6 +1768,16 @@ namespace SourceGen.WpfGui { } private string mInfoPanelDetail1; + public bool InfoShowDebug { + get { +#if DEBUG + return true; +#else + return false; +#endif + } + } + //public string InfoPanelMonoContents { // get { return mInfoPanelMonoContents; } // set { mInfoPanelMonoContents = value; OnPropertyChanged(); }