From 65c304682d974b23accdc91217e3964b1ccafa3c Mon Sep 17 00:00:00 2001 From: David Shoemaker Date: Thu, 10 Oct 2019 13:28:34 -0700 Subject: [PATCH] Active tracing (#702) * Plumebd with data transfer * Getting mainpage to talk to getbitmap. moving share callbacks from mainpage to graphingcalculator * Trying to get bitmap from renderer. * work * Share worked * cleanups * Cleanups progressing * Share working, need loc for title string and user notification incase of a failure. Then add the equations key. * More cleanup, now using share icon image and resources for strings. Still need to do the graph equation key. * Change share to html based start. * Key working, with UL but going to try changing to table. * Fix a html formating error, generating a new UL for each equation. * Switched over to a table for equation key and have color block formating * Updates from PR feedback, using Graphing::IBitmap abstraction. * Update src/Calculator/Views/GraphingCalculator/GraphingCalculator.xaml.h Fixed Co-Authored-By: Pepe Rivera * PR Updates. * Add variables to the graph key. * eod * Passive graph value tracing working. * Basic active tracing cursor working. * Move active tracing from graphingcalculator to grapher to save some hops. Also block tracking of the active tracing key's when in the EquationTextBox. * Active tracing working, need to put button on screen for activation. * Added active tracing control button (placeholder image) * Eod * Popup trace value now tracks the highlighted point. * Popup skined * PR Updates. * Update certificate thumbnail so VS2019 doesn't have a build error. * PR comments in process. * PR Updates * PR Updates, change tracing value to use tooltip static resource so we automatically change depending on system values. And changed text formatting of the value to be generic (x,y) value. * PR updates, changed how we detect who has focus so we don't eat keys when not in active tracing. * Additional filtering for the Key Up/Down in the grapher. * Fix bug where active tracing would turn back on after clicking button to turn it off. --- .../Views/GraphingCalculator/GraphingCalculator.xaml.cpp | 5 ++++- .../Views/GraphingCalculator/GraphingCalculator.xaml.h | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Calculator/Views/GraphingCalculator/GraphingCalculator.xaml.cpp b/src/Calculator/Views/GraphingCalculator/GraphingCalculator.xaml.cpp index 80b22f1..fe8ac60 100644 --- a/src/Calculator/Views/GraphingCalculator/GraphingCalculator.xaml.cpp +++ b/src/Calculator/Views/GraphingCalculator/GraphingCalculator.xaml.cpp @@ -34,6 +34,7 @@ using namespace Windows::UI::Popups; constexpr auto sc_ViewModelPropertyName = L"ViewModel"; GraphingCalculator::GraphingCalculator() + : ActiveTracingOn(false) { Equation::RegisterDependencyProperties(); Grapher::RegisterDependencyProperties(); @@ -284,7 +285,9 @@ void GraphingCalculator::OnZoomResetCommand(Object ^ /* parameter */) void GraphingCalculator::OnActiveTracingClick(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e) { - GraphingControl->ActiveTracing = !GraphingControl->ActiveTracing; + // The focus change to this button will have turned off the tracing if it was on + ActiveTracingOn = !ActiveTracingOn; + GraphingControl->ActiveTracing = ActiveTracingOn; } void CalculatorApp::GraphingCalculator::OnGraphLostFocus(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e) diff --git a/src/Calculator/Views/GraphingCalculator/GraphingCalculator.xaml.h b/src/Calculator/Views/GraphingCalculator/GraphingCalculator.xaml.h index 41e0092..1ea90e5 100644 --- a/src/Calculator/Views/GraphingCalculator/GraphingCalculator.xaml.h +++ b/src/Calculator/Views/GraphingCalculator/GraphingCalculator.xaml.h @@ -57,6 +57,8 @@ namespace CalculatorApp void OnActiveTracingClick(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e); void OnGraphLostFocus(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e); void OnLoosingFocus(Windows::UI::Xaml::UIElement ^ sender, Windows::UI::Xaml::Input::LosingFocusEventArgs ^ args); + + bool ActiveTracingOn; }; }