Updated Calculator diagnostic data collection per the specification (#572)

- Removed unneeded diagnostic events and code
- Added and consolidated events into the events defined in the spec
This commit is contained in:
Stephanie Anderl 2019-07-17 18:09:39 -07:00 committed by Matt Cooley
commit a6384269bc
43 changed files with 449 additions and 1249 deletions

View file

@ -6,6 +6,7 @@
#include "pch.h"
#include "UnitConverter.xaml.h"
#include "CalcViewModel/Common/TraceLogger.h"
#include "CalcViewModel/UnitConverterViewModel.h"
#include "Controls/CalculationResult.h"
#include "Controls/CalculatorButton.h"
@ -245,7 +246,7 @@ void UnitConverter::OnCopyMenuItemClicked(_In_ Object ^ sender, _In_ RoutedEvent
void UnitConverter::OnPasteMenuItemClicked(_In_ Object ^ sender, _In_ RoutedEventArgs ^ e)
{
CopyPasteManager::GetStringToPaste(Model->Mode, CategoryGroupType::Converter).then([this](String ^ pastedString) {
Model->OnPaste(pastedString, Model->Mode);
Model->OnPaste(pastedString);
});
}
@ -368,3 +369,10 @@ void CalculatorApp::UnitConverter::SupplementaryResultsPanelInGrid_SizeChanged(P
// We add 0.01 to be sure to not create an infinite loop with SizeChanged events cascading due to float approximation
RowDltrUnits->MinHeight = max(48.0, e->NewSize.Height + 0.01);
}
void CalculatorApp::UnitConverter::OnVisualStateChanged(Platform::Object ^ sender, Windows::UI::Xaml::VisualStateChangedEventArgs ^ e)
{
auto mode = NavCategory::Deserialize(Model->CurrentCategory->GetModelCategory().id);
auto state = std::wstring(e->NewState->Name->Begin());
TraceLogger::GetInstance().LogVisualStateChanged(mode, state);
}