Added narrator announcement when a function is removed (#1136)
This commit is contained in:
@@ -4562,4 +4562,8 @@
|
||||
<value>Match app theme</value>
|
||||
<comment>This is the automation name text for the Graph settings option to set graph to match the app theme</comment>
|
||||
</data>
|
||||
<data name="FunctionRemovedAnnouncement" xml:space="preserve">
|
||||
<value>Function removed</value>
|
||||
<comment>Announcement used in Graphing Calculator when a function is removed from the function list</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
@@ -4,9 +4,13 @@
|
||||
#include "pch.h"
|
||||
#include "EquationInputArea.xaml.h"
|
||||
#include "Utils/VisualTree.h"
|
||||
#include "CalcViewModel/Common/AppResourceProvider.h"
|
||||
#include "CalcViewModel/Common/Automation/NarratorAnnouncement.h"
|
||||
#include "CalcViewModel/Common/Automation/NarratorNotifier.h"
|
||||
|
||||
using namespace CalculatorApp;
|
||||
using namespace CalculatorApp::Common;
|
||||
using namespace CalculatorApp::Common::Automation;
|
||||
using namespace GraphControl;
|
||||
using namespace CalculatorApp::ViewModel;
|
||||
using namespace CalculatorApp::Controls;
|
||||
@@ -199,6 +203,12 @@ void EquationInputArea::EquationTextBox_RemoveButtonClicked(Object ^ sender, Rou
|
||||
}
|
||||
|
||||
Equations->RemoveAt(index);
|
||||
|
||||
auto narratorNotifier = ref new NarratorNotifier();
|
||||
auto announcement = CalculatorAnnouncement::GetFunctionRemovedAnnouncement(
|
||||
AppResourceProvider::GetInstance()->GetResourceString(L"FunctionRemovedAnnouncement"));
|
||||
narratorNotifier->Announce(announcement);
|
||||
|
||||
int lastIndex = Equations->Size - 1;
|
||||
|
||||
if (Equations->Size <= 1)
|
||||
|
Reference in New Issue
Block a user