From 5bbdd56a23f4f7b13f1a9fc6648a7d0ca9c44a4d Mon Sep 17 00:00:00 2001 From: Nicolas Jager <nicolas.jager@savoirfairelinux.com> Date: Tue, 13 Dec 2016 10:47:27 -0500 Subject: [PATCH] debug : adds DEBUG_ON flag - if DEBUG_ON is set to true, the console can be opened by hitting F5. Otherwise the console cannot be opened by the user. Change-Id: Icceb8e708cca14ec0d73e4267e5c461ca8961b20 Tuleap: #790 --- Globals.h | 1 + MainPage.xaml.cpp | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Globals.h b/Globals.h index 56533c7..c92d2dd 100644 --- a/Globals.h +++ b/Globals.h @@ -26,4 +26,5 @@ public enum class ContactStatus { READY }; +constexpr bool DEBUG_ON = false; } \ No newline at end of file diff --git a/MainPage.xaml.cpp b/MainPage.xaml.cpp index a91d192..f0ef381 100644 --- a/MainPage.xaml.cpp +++ b/MainPage.xaml.cpp @@ -107,10 +107,11 @@ MainPage::MainPage() void MainPage::OnKeyDown(KeyRoutedEventArgs^ e) { - if (e->Key == VirtualKey::F5) { - _outerSplitView_->OpenPaneLength = Window::Current->Bounds.Width; - _outerSplitView_->IsPaneOpen = !_outerSplitView_->IsPaneOpen; - } + if (DEBUG_ON) + if (e->Key == VirtualKey::F5) { + _outerSplitView_->OpenPaneLength = Window::Current->Bounds.Width; + _outerSplitView_->IsPaneOpen = !_outerSplitView_->IsPaneOpen; + } } void RingClientUWP::MainPage::_toggleSmartBoxButton__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) -- GitLab