Move Settings deep link logic to Microsoft.PowerToys.Common.UI (#13749)

* Move Settings deep link logic to Microsoft.PowerToys.Common.UI

* Spellcheck

* Introduce enum

* Remove PT path arg
This commit is contained in:
Stefan Markovic
2021-10-12 10:35:52 +02:00
committed by GitHub
parent 0ca9b1be48
commit 7e8e954de7
4 changed files with 79 additions and 22 deletions

View File

@@ -13,6 +13,7 @@ using System.Windows.Controls;
using System.Windows.Input;
using FancyZonesEditor.Models;
using FancyZonesEditor.Utils;
using Microsoft.PowerToys.Common.UI;
using ModernWpf.Controls;
namespace FancyZonesEditor
@@ -521,15 +522,7 @@ namespace FancyZonesEditor
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
{
}
SettingsDeepLink.OpenSettings(SettingsDeepLink.SettingsWindow.FancyZones);
}
}
}