mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 03:07:56 +01:00
[FZ Editor] Open settings (#13727)
* Deeplink support * Fixes * Typo fix * Update MainWindow.xaml.cs Co-authored-by: Laute <Niels.Laute@philips.com>
This commit is contained in:
1
.github/actions/spell-check/expect.txt
vendored
1
.github/actions/spell-check/expect.txt
vendored
@@ -184,6 +184,7 @@ Browsable
|
||||
bsd
|
||||
bstr
|
||||
bti
|
||||
btn
|
||||
BTNFACE
|
||||
Bto
|
||||
buf
|
||||
|
||||
@@ -327,6 +327,21 @@
|
||||
ItemsSource="{Binding MonitorInfoForViewModel}" />
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
<Button Click="SettingsBtn_Click"
|
||||
x:Name="settingsBtn"
|
||||
Margin="8"
|
||||
Foreground="{DynamicResource SystemControlBackgroundAccentBrush}"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Bottom"
|
||||
AutomationProperties.Name="{x:Static props:Resources.OpenSettings}"
|
||||
ToolTip="{x:Static props:Resources.OpenSettings}"
|
||||
Style="{StaticResource IconOnlyButtonStyle}">
|
||||
<Button.Content>
|
||||
<TextBlock Text=""
|
||||
FontFamily="Segoe MDL2 Assets"
|
||||
AutomationProperties.Name="{x:Static props:Resources.OpenSettings}" />
|
||||
</Button.Content>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
<ui:ContentDialog x:Name="EditLayoutDialog"
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Automation.Peers;
|
||||
@@ -516,5 +518,18 @@ namespace FancyZonesEditor
|
||||
var numberBoxTextBox = numberBox.Template.FindName(numberBoxTextBoxName, numberBox) as TextBox;
|
||||
numberBoxTextBox.SetValue(AutomationProperties.NameProperty, numberBox.GetValue(AutomationProperties.NameProperty));
|
||||
}
|
||||
|
||||
private void SettingsBtn_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
var assemblyPath = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
|
||||
var fullPath = Directory.GetParent(assemblyPath).FullName;
|
||||
Process.Start(new ProcessStartInfo(fullPath + "\\..\\PowerToys.exe") { Arguments = "--open-settings=FancyZones" });
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -596,6 +596,15 @@ namespace FancyZonesEditor.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Open settings.
|
||||
/// </summary>
|
||||
public static string OpenSettings {
|
||||
get {
|
||||
return ResourceManager.GetString("OpenSettings", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to px.
|
||||
/// </summary>
|
||||
|
||||
@@ -338,7 +338,7 @@
|
||||
</data>
|
||||
<data name="KeyboardControlsName" xml:space="preserve">
|
||||
<value>Keyboard Navigation:</value>
|
||||
</data>
|
||||
</data>
|
||||
<data name="KeyboardControlsDescription" xml:space="preserve">
|
||||
<value>
|
||||
- [Shift]+S to split currently focused zone.
|
||||
@@ -346,7 +346,7 @@
|
||||
- Tab to cycle zones and resizers.
|
||||
- Delete to remove the focused resizer.
|
||||
- Arrows to move the focused resizer.</value>
|
||||
</data>
|
||||
</data>
|
||||
<data name="SplitterDescription" xml:space="preserve">
|
||||
<value>Hold Shift key for vertical split.</value>
|
||||
<comment>A segmenter visual for splitting one item into two. This would be the vertical line. Shift key is referring to key on keyboard</comment>
|
||||
@@ -374,7 +374,10 @@
|
||||
<data name="Edit_Layout" xml:space="preserve">
|
||||
<value>Edit layout</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>
|
||||
</data>
|
||||
<data name="OpenSettings" xml:space="preserve">
|
||||
<value>Open settings</value>
|
||||
</data>
|
||||
</root>
|
||||
Reference in New Issue
Block a user