mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 19:57:57 +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
|
bsd
|
||||||
bstr
|
bstr
|
||||||
bti
|
bti
|
||||||
|
btn
|
||||||
BTNFACE
|
BTNFACE
|
||||||
Bto
|
Bto
|
||||||
buf
|
buf
|
||||||
|
|||||||
@@ -327,6 +327,21 @@
|
|||||||
ItemsSource="{Binding MonitorInfoForViewModel}" />
|
ItemsSource="{Binding MonitorInfoForViewModel}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</ScrollViewer>
|
</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>
|
</Grid>
|
||||||
|
|
||||||
<ui:ContentDialog x:Name="EditLayoutDialog"
|
<ui:ContentDialog x:Name="EditLayoutDialog"
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Automation;
|
using System.Windows.Automation;
|
||||||
using System.Windows.Automation.Peers;
|
using System.Windows.Automation.Peers;
|
||||||
@@ -516,5 +518,18 @@ namespace FancyZonesEditor
|
|||||||
var numberBoxTextBox = numberBox.Template.FindName(numberBoxTextBoxName, numberBox) as TextBox;
|
var numberBoxTextBox = numberBox.Template.FindName(numberBoxTextBoxName, numberBox) as TextBox;
|
||||||
numberBoxTextBox.SetValue(AutomationProperties.NameProperty, numberBox.GetValue(AutomationProperties.NameProperty));
|
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>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to px.
|
/// Looks up a localized string similar to px.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -377,4 +377,7 @@
|
|||||||
<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>
|
||||||
|
<data name="OpenSettings" xml:space="preserve">
|
||||||
|
<value>Open settings</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
Reference in New Issue
Block a user