mirror of
https://github.com/microsoft/PowerToys
synced 2025-09-04 00:15:11 +00:00
Announce opening Edit Layout dialog (#13963)
This commit is contained in:
@@ -217,7 +217,7 @@ namespace FancyZonesEditor
|
|||||||
name = name.TrimEnd();
|
name = name.TrimEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
AnnounceSuccessfulLayoutCreation(name);
|
Announce(name, FancyZonesEditor.Properties.Resources.Layout_Creation_Announce);
|
||||||
int maxCustomIndex = 0;
|
int maxCustomIndex = 0;
|
||||||
foreach (LayoutModel customModel in MainWindowSettingsModel.CustomModels)
|
foreach (LayoutModel customModel in MainWindowSettingsModel.CustomModels)
|
||||||
{
|
{
|
||||||
@@ -249,12 +249,12 @@ namespace FancyZonesEditor
|
|||||||
App.FancyZonesEditorIO.SerializeZoneSettings();
|
App.FancyZonesEditorIO.SerializeZoneSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AnnounceSuccessfulLayoutCreation(string name)
|
private void Announce(string name, string message)
|
||||||
{
|
{
|
||||||
if (AutomationPeer.ListenerExists(AutomationEvents.MenuOpened))
|
if (AutomationPeer.ListenerExists(AutomationEvents.MenuOpened))
|
||||||
{
|
{
|
||||||
var peer = UIElementAutomationPeer.FromElement(_createLayoutAnnounce);
|
var peer = UIElementAutomationPeer.FromElement(_createLayoutAnnounce);
|
||||||
AutomationProperties.SetName(_createLayoutAnnounce, name + " " + FancyZonesEditor.Properties.Resources.Layout_Creation_Announce);
|
AutomationProperties.SetName(_createLayoutAnnounce, name + " " + message);
|
||||||
peer?.RaiseAutomationEvent(AutomationEvents.MenuOpened);
|
peer?.RaiseAutomationEvent(AutomationEvents.MenuOpened);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -454,6 +454,7 @@ namespace FancyZonesEditor
|
|||||||
|
|
||||||
private void Dialog_Opened(ContentDialog sender, ContentDialogOpenedEventArgs args)
|
private void Dialog_Opened(ContentDialog sender, ContentDialogOpenedEventArgs args)
|
||||||
{
|
{
|
||||||
|
Announce(sender.Name, FancyZonesEditor.Properties.Resources.Edit_Layout_Open_Announce);
|
||||||
_openedDialog = sender;
|
_openedDialog = sender;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -284,6 +284,15 @@ namespace FancyZonesEditor.Properties {
|
|||||||
return ResourceManager.GetString("Edit_Layout", resourceCulture);
|
return ResourceManager.GetString("Edit_Layout", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to opened.
|
||||||
|
/// </summary>
|
||||||
|
public static string Edit_Layout_Open_Announce {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Edit_Layout_Open_Announce", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Edit zones.
|
/// Looks up a localized string similar to Edit zones.
|
||||||
|
@@ -374,6 +374,9 @@
|
|||||||
<data name="Edit_Layout" xml:space="preserve">
|
<data name="Edit_Layout" xml:space="preserve">
|
||||||
<value>Edit layout</value>
|
<value>Edit layout</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Edit_Layout_Open_Announce" xml:space="preserve">
|
||||||
|
<value>opened</value>
|
||||||
|
</data>
|
||||||
<data name="Layout_Creation_Announce" xml:space="preserve">
|
<data name="Layout_Creation_Announce" xml:space="preserve">
|
||||||
<value>custom layout was created successfully.</value>
|
<value>custom layout was created successfully.</value>
|
||||||
</data>
|
</data>
|
||||||
|
Reference in New Issue
Block a user