mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-13 01:56:50 -07:00
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:
parent
2ff7bb4089
commit
a6384269bc
43 changed files with 449 additions and 1249 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue