mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
[Settings UI] Updated General Settings (#2676)
* updated general settings view * moved text to string resource * Update App.xaml.cs * set run-elevated as a start-up argument
This commit is contained in:
@@ -31,6 +31,16 @@ namespace Microsoft.PowerToys.Settings.UI.Runner
|
||||
{
|
||||
Program.GetTwoWayIPCManager().Send(msg);
|
||||
});
|
||||
|
||||
// send IPC Message
|
||||
shellPage.SetRestartAdminSndMessageCallback(msg =>
|
||||
{
|
||||
Program.GetTwoWayIPCManager().Send(msg);
|
||||
System.Windows.Application.Current.Shutdown(); // close application
|
||||
});
|
||||
|
||||
shellPage.SetElevationStatus(Program.IsElevated);
|
||||
shellPage.Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
using System;
|
||||
using System.Windows;
|
||||
using interop;
|
||||
using Windows.UI.Popups;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Runner
|
||||
{
|
||||
@@ -13,6 +14,8 @@ namespace Microsoft.PowerToys.Settings.UI.Runner
|
||||
// Create an instance of the IPC wrapper.
|
||||
private static TwoWayPipeMessageIPCManaged ipcmanager;
|
||||
|
||||
public static bool IsElevated { get; set; }
|
||||
|
||||
[STAThread]
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
@@ -21,8 +24,17 @@ namespace Microsoft.PowerToys.Settings.UI.Runner
|
||||
App app = new App();
|
||||
app.InitializeComponent();
|
||||
|
||||
if (args.Length > 1)
|
||||
if (args.Length > 3)
|
||||
{
|
||||
if (args[4] == "true")
|
||||
{
|
||||
IsElevated = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
IsElevated = false;
|
||||
}
|
||||
|
||||
ipcmanager = new TwoWayPipeMessageIPCManaged(args[1], args[0], null);
|
||||
ipcmanager.Start();
|
||||
app.Run();
|
||||
|
||||
Reference in New Issue
Block a user