From 96e1d950f0c8dd57cc8e8f502c16399b76273d9d Mon Sep 17 00:00:00 2001 From: William Date: Wed, 13 Mar 2019 19:14:08 -0400 Subject: [PATCH] Doubled Code Fix --- src/CalcViewModel/Common/KeyboardShortcutManager.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/CalcViewModel/Common/KeyboardShortcutManager.cpp b/src/CalcViewModel/Common/KeyboardShortcutManager.cpp index a6a82109..d7b87c96 100644 --- a/src/CalcViewModel/Common/KeyboardShortcutManager.cpp +++ b/src/CalcViewModel/Common/KeyboardShortcutManager.cpp @@ -82,12 +82,6 @@ namespace CalculatorApp // The button will go into the visual Pressed state with this call VisualStateManager::GoToState(button, "Pressed", true); - // This timer will fire after c_lightUpTime and make the button - // go back to the normal state. - // This timer will only fire once after which it will be destroyed - auto timer = ref new DispatcherTimer(); - timer->Interval = c_lightUpTime; - // This timer will fire after lightUpTime and make the button // go back to the normal state. // This timer will only fire once after which it will be destroyed @@ -95,7 +89,7 @@ namespace CalculatorApp TimeSpan lightUpTime{}; lightUpTime.Duration = 500000L; // Half second (in 100-ns units) timer->Interval = lightUpTime; - + WeakReference timerWeakReference(timer); WeakReference buttonWeakReference(button); timer->Tick += ref new EventHandler(