mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
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:
@@ -4,11 +4,10 @@
|
||||
|
||||
using System;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Windows;
|
||||
using ColorPicker.Settings;
|
||||
using ColorPicker.ViewModelContracts;
|
||||
using Microsoft.PowerToys.Common.UI;
|
||||
using Microsoft.PowerToys.Settings.UI.Library.Enumerations;
|
||||
|
||||
namespace ColorPicker.Helpers
|
||||
@@ -189,17 +188,7 @@ namespace ColorPicker.Helpers
|
||||
|
||||
private void ColorEditorViewModel_OpenSettingsRequested(object sender, EventArgs 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=ColorPicker" });
|
||||
}
|
||||
#pragma warning disable CA1031 // Do not catch general exception types
|
||||
catch
|
||||
#pragma warning restore CA1031 // Do not catch general exception types
|
||||
{
|
||||
}
|
||||
SettingsDeepLink.OpenSettings(SettingsDeepLink.SettingsWindow.ColorPicker);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user