ViewModelProperties namespaces converted to static member properties. (#306)
This commit is contained in:
committed by
Stephanie Anderl
parent
4b6b8fa8fa
commit
3bff99b323
@@ -389,11 +389,11 @@ void Calculator::EnsureProgrammer()
|
||||
void Calculator::OnCalcPropertyChanged(_In_ Object^ sender, _In_ PropertyChangedEventArgs^ e)
|
||||
{
|
||||
String^ prop = e->PropertyName;
|
||||
if (e->PropertyName->Equals(CalculatorViewModelProperties::IsMemoryEmpty))
|
||||
if (prop == StandardCalculatorViewModel::IsMemoryEmptyPropertyName)
|
||||
{
|
||||
UpdateMemoryState();
|
||||
}
|
||||
else if (e->PropertyName->Equals(CalculatorViewModelProperties::IsInError))
|
||||
else if (prop == StandardCalculatorViewModel::IsInErrorPropertyName)
|
||||
{
|
||||
OnIsInErrorPropertyChanged();
|
||||
}
|
||||
|
@@ -68,7 +68,7 @@ void CalculatorProgrammerBitFlipPanel::UnsubscribePropertyChanged()
|
||||
|
||||
void CalculatorProgrammerBitFlipPanel::OnPropertyChanged(Object^ sender, PropertyChangedEventArgs^ e)
|
||||
{
|
||||
if (e->PropertyName == CalculatorViewModelProperties::BinaryDisplayValue)
|
||||
if (e->PropertyName == StandardCalculatorViewModel::BinaryDisplayValuePropertyName)
|
||||
{
|
||||
UpdateCheckedStates();
|
||||
}
|
||||
|
@@ -102,7 +102,7 @@ void CalculatorProgrammerRadixOperators::IsErrorVisualState::set(bool value)
|
||||
|
||||
void CalculatorProgrammerRadixOperators::OnViewModelPropertyChanged(Object^ sender, PropertyChangedEventArgs^ e)
|
||||
{
|
||||
if (e->PropertyName == CalculatorViewModelProperties::OpenParenthesisCount && closeParenthesisButton->FocusState != ::FocusState::Unfocused)
|
||||
if (e->PropertyName == StandardCalculatorViewModel::OpenParenthesisCountPropertyName && closeParenthesisButton->FocusState != ::FocusState::Unfocused)
|
||||
{
|
||||
Model->SetOpenParenthesisCountNarratorAnnouncement();
|
||||
}
|
||||
|
@@ -109,7 +109,7 @@ void CalculatorScientificOperators::SetOperatorRowVisibility()
|
||||
|
||||
void CalculatorScientificOperators::OnViewModelPropertyChanged(Object^ sender, PropertyChangedEventArgs^ e)
|
||||
{
|
||||
if (e->PropertyName == CalculatorViewModelProperties::OpenParenthesisCount && closeParenthesisButton->FocusState != ::FocusState::Unfocused)
|
||||
if (e->PropertyName == StandardCalculatorViewModel::OpenParenthesisCountPropertyName && closeParenthesisButton->FocusState != ::FocusState::Unfocused)
|
||||
{
|
||||
Model->SetOpenParenthesisCountNarratorAnnouncement();
|
||||
}
|
||||
|
@@ -105,9 +105,9 @@ void MainPage::OnNavigatedTo(NavigationEventArgs^ e)
|
||||
else
|
||||
{
|
||||
ApplicationDataContainer^ localSettings = ApplicationData::Current->LocalSettings;
|
||||
if (localSettings->Values->HasKey(ApplicationViewModelProperties::Mode))
|
||||
if (localSettings->Values->HasKey(ApplicationViewModel::ModePropertyName))
|
||||
{
|
||||
initialMode = NavCategory::Deserialize(localSettings->Values->Lookup(ApplicationViewModelProperties::Mode));
|
||||
initialMode = NavCategory::Deserialize(localSettings->Values->Lookup(ApplicationViewModel::ModePropertyName));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,7 +122,8 @@ void MainPage::WindowSizeChanged(_In_ Platform::Object^ /*sender*/, _In_ Windows
|
||||
|
||||
void MainPage::OnAppPropertyChanged(_In_ Platform::Object^ sender, _In_ Windows::UI::Xaml::Data::PropertyChangedEventArgs^ e)
|
||||
{
|
||||
if (e->PropertyName->Equals(ApplicationViewModelProperties::Mode))
|
||||
String^ propertyName = e->PropertyName;
|
||||
if (propertyName == ApplicationViewModel::ModePropertyName)
|
||||
{
|
||||
ViewMode newValue = m_model->Mode;
|
||||
ViewMode previousMode = m_model->PreviousMode;
|
||||
@@ -186,7 +187,7 @@ void MainPage::OnAppPropertyChanged(_In_ Platform::Object^ sender, _In_ Windows:
|
||||
SetTitleBarControlColors();
|
||||
SetDefaultFocus();
|
||||
}
|
||||
else if (e->PropertyName->Equals(ApplicationViewModelProperties::CategoryName))
|
||||
else if (propertyName == ApplicationViewModel::CategoryNamePropertyName)
|
||||
{
|
||||
SetHeaderAutomationName();
|
||||
AnnounceCategoryName();
|
||||
|
@@ -95,7 +95,7 @@ void SupplementaryResults::OnLoaded(Object^ sender, RoutedEventArgs^ e)
|
||||
|
||||
void SupplementaryResults::OnConverterPropertyChanged(Object^ /*sender*/, PropertyChangedEventArgs^ e)
|
||||
{
|
||||
if (e->PropertyName == UnitConverterViewModelProperties::SupplementaryResults)
|
||||
if (e->PropertyName == UnitConverterViewModel::SupplementaryResultsPropertyName)
|
||||
{
|
||||
RefreshData();
|
||||
}
|
||||
|
@@ -82,16 +82,16 @@ UnitConverter::UnitConverter() :
|
||||
void UnitConverter::OnPropertyChanged(_In_ Object^ sender, _In_ PropertyChangedEventArgs^ e)
|
||||
{
|
||||
String^ propertyName = e->PropertyName;
|
||||
if (propertyName->Equals(UnitConverterViewModelProperties::NetworkBehavior) ||
|
||||
propertyName->Equals(UnitConverterViewModelProperties::CurrencyDataLoadFailed))
|
||||
if (propertyName == UnitConverterViewModel::NetworkBehaviorPropertyName ||
|
||||
propertyName == UnitConverterViewModel::CurrencyDataLoadFailedPropertyName)
|
||||
{
|
||||
OnNetworkBehaviorChanged();
|
||||
}
|
||||
else if (propertyName->Equals(UnitConverterViewModelProperties::CurrencyDataIsWeekOld))
|
||||
else if (propertyName == UnitConverterViewModel::CurrencyDataIsWeekOldPropertyName)
|
||||
{
|
||||
SetCurrencyTimestampFontWeight();
|
||||
}
|
||||
else if (propertyName->Equals(UnitConverterViewModelProperties::IsCurrencyLoadingVisible))
|
||||
else if (propertyName == UnitConverterViewModel::IsCurrencyLoadingVisiblePropertyName)
|
||||
{
|
||||
OnIsDisplayVisibleChanged();
|
||||
}
|
||||
|
Reference in New Issue
Block a user