[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:
Niels Laute
2021-10-11 17:39:01 +02:00
committed by GitHub
parent 0ab0fb5dd4
commit 85eddfc536
5 changed files with 46 additions and 3 deletions

View File

@@ -184,6 +184,7 @@ Browsable
bsd
bstr
bti
btn
BTNFACE
Bto
buf

View File

@@ -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="&#xe713;"
FontFamily="Segoe MDL2 Assets"
AutomationProperties.Name="{x:Static props:Resources.OpenSettings}" />
</Button.Content>
</Button>
</Grid>
<ui:ContentDialog x:Name="EditLayoutDialog"

View File

@@ -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
{
}
}
}
}

View File

@@ -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>

View File

@@ -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>