CalcViewModel code cleaning (#754)

* move KeyboardShortcutManager, ValidationConverter and ViewState to Calculator
* remove dead code listed in #753
* remove Microsoft.UI.Xaml nuget package from CalcViewModel
This commit is contained in:
Rudy Huyn 2020-01-07 13:59:51 -08:00 committed by Matt Cooley
parent 712bdb1b7c
commit 2d177e5160
31 changed files with 77 additions and 378 deletions

View file

@ -71,7 +71,6 @@ namespace CalculatorApp
OBSERVABLE_PROPERTY_R(bool, IsUnaryOperatorEnabled);
OBSERVABLE_PROPERTY_R(bool, IsNegateEnabled);
OBSERVABLE_PROPERTY_RW(bool, IsDecimalEnabled);
OBSERVABLE_PROPERTY_R(bool, IsCurrentViewPinned);
OBSERVABLE_PROPERTY_R(Windows::Foundation::Collections::IVector<MemoryItemViewModel ^> ^, MemorizedNumbers);
OBSERVABLE_NAMED_PROPERTY_RW(bool, IsMemoryEmpty);
OBSERVABLE_PROPERTY_R(bool, IsFToEChecked);
@ -209,7 +208,6 @@ namespace CalculatorApp
{
if (m_isEditingEnabled != value)
{
// Numbers::Common::KeyboardShortcutManager::IsCalculatorInEditingMode = value;
m_isEditingEnabled = value;
bool currentEditToggleValue = !m_isEditingEnabled;
IsBinaryOperatorEnabled = currentEditToggleValue;
@ -262,7 +260,6 @@ namespace CalculatorApp
void OnMemoryAdd(Platform::Object ^ memoryItemPosition);
void OnMemorySubtract(Platform::Object ^ memoryItemPosition);
void OnMemoryClear(_In_ Platform::Object ^ memoryItemPosition);
void OnPinUnpinCommand(Platform::Object ^ parameter);
void OnInputChanged();
void DisplayPasteError();
@ -332,7 +329,6 @@ namespace CalculatorApp
Platform::String ^ m_localizedOpenParenthesisCountChangedAutomationFormat;
Platform::String ^ m_localizedNoRightParenthesisAddedFormat;
bool m_pinned;
bool m_isOperandEnabled;
bool m_isEditingEnabled;
bool m_isStandard;
@ -372,12 +368,8 @@ namespace CalculatorApp
bool IsOpnd(CalculationManager::Command command);
bool IsRecoverableCommand(CalculationManager::Command command);
CalculationManager::CommandType GetSelectedTokenType(_In_ unsigned int);
void SaveEditedCommand(_In_ unsigned int index, _In_ CalculationManager::Command command);
bool IsViewPinned();
void SetViewPinnedState(bool pinned);
CalculatorApp::Common::ViewMode GetCalculatorMode();
friend class CalculatorDisplay;