Narrator is not providing any confirmation after activating Keep on top button (#1300)

* Narrator is not providing any confirmation after activating Keep on top button #1173
This commit is contained in:
Vignesh M 2020-07-14 05:32:08 +05:30 committed by GitHub
parent 64df01cecc
commit ca53d01e4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 35 additions and 0 deletions

View File

@ -27,6 +27,7 @@ namespace CalculatorApp::Common::Automation
StringReference GraphViewChanged(L"GraphViewChanged");
StringReference FunctionRemoved(L"FunctionRemoved");
StringReference GraphViewBestFitChanged(L"GraphViewBestFitChanged");
StringReference AlwaysOnTop(L"AlwaysOnTop");
}
}
@ -180,3 +181,12 @@ NarratorAnnouncement ^ CalculatorAnnouncement::GetGraphViewBestFitChangedAnnounc
AutomationNotificationKind::ActionCompleted,
AutomationNotificationProcessing::MostRecent);
}
NarratorAnnouncement ^ CalculatorAnnouncement::GetAlwaysOnTopChangedAnnouncement(String ^ announcement)
{
return ref new NarratorAnnouncement(
announcement,
CalculatorActivityIds::AlwaysOnTop,
AutomationNotificationKind::ActionCompleted,
AutomationNotificationProcessing::ImportantMostRecent);
}

View File

@ -73,5 +73,7 @@ public
static NarratorAnnouncement ^ GetFunctionRemovedAnnouncement(Platform::String ^ announcement);
static NarratorAnnouncement ^ GetAlwaysOnTopChangedAnnouncement(Platform::String ^ announcement);
};
}

View File

@ -41,6 +41,8 @@ namespace
StringReference DisplayValuePropertyName(L"DisplayValue");
StringReference CalculationResultAutomationNamePropertyName(L"CalculationResultAutomationName");
StringReference IsBitFlipCheckedPropertyName(L"IsBitFlipChecked");
StringReference CalcAlwaysOnTop(L"CalcAlwaysOnTop");
StringReference CalcBackToFullView(L"CalcBackToFullView");
}
namespace CalculatorResourceKeys
@ -1162,6 +1164,19 @@ void StandardCalculatorViewModel::OnPropertyChanged(String ^ propertyname)
TraceLogger::GetInstance()->UpdateButtonUsage(
IsBitFlipChecked ? NumbersAndOperatorsEnum::BitflipButton : NumbersAndOperatorsEnum::FullKeypadButton, ViewMode::Programmer);
}
else if (propertyname == IsAlwaysOnTopPropertyName)
{
String ^ announcement;
if (IsAlwaysOnTop)
{
announcement = AppResourceProvider::GetInstance()->GetResourceString(CalcAlwaysOnTop);
}
else
{
announcement = AppResourceProvider::GetInstance()->GetResourceString(CalcBackToFullView);
}
Announcement = CalculatorAnnouncement::GetAlwaysOnTopChangedAnnouncement(announcement);
}
}
void StandardCalculatorViewModel::SetCalculatorType(ViewMode targetState)

View File

@ -4715,4 +4715,12 @@
<value>Memory list</value>
<comment>Automation name for the group of controls for memory list.</comment>
</data>
<data name="CalcAlwaysOnTop" xml:space="preserve">
<value>Calculator always on top</value>
<comment>Announcement to indicate calculator window is always shown on top.</comment>
</data>
<data name="CalcBackToFullView" xml:space="preserve">
<value>Calculator back to full view</value>
<comment>Announcement to indicate calculator window is now back to full view.</comment>
</data>
</root>