Merge master into feature/GraphingCalculator branch (#660)

This commit is contained in:
Pepe Rivera
2019-09-05 15:01:12 -07:00
committed by GitHub
parent 1c9755d38a
commit 41fbcfe9c5
199 changed files with 5809 additions and 2925 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);
}