mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
fix: Start as Admin Error: Unable to open app when running elevated (#2411)
* fixed run-elevated error and powerpreview settings not working * removed EXTENDED_STARTUPINFO_PRESENT flag * removed test string * Update Microsoft.PowerToys.Settings.UnitTest.csproj * Rename PowerLauncher.cs to PowerLauncherViewModelTest.cs
This commit is contained in:
@@ -41,19 +41,27 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
[JsonPropertyName("powertoys_version")]
|
||||
public string PowertoysVersion { get; set; }
|
||||
|
||||
[JsonPropertyName("action_name")]
|
||||
public string CustomActionName { get; set; }
|
||||
|
||||
[JsonPropertyName("enabled")]
|
||||
public EnabledModules Enabled { get; set; }
|
||||
|
||||
[JsonPropertyName("download_updates_automatically")]
|
||||
public bool AutoDownloadUpdates { get; set; }
|
||||
|
||||
public GeneralSettings()
|
||||
{
|
||||
this.Packaged = false;
|
||||
this.Startup = false;
|
||||
this.IsAdmin = false;
|
||||
this.IsElevated = false;
|
||||
this.AutoDownloadUpdates = false;
|
||||
this.Theme = "system";
|
||||
this.SystemTheme = "light";
|
||||
this.PowertoysVersion = "v0.15.3";
|
||||
this.Enabled = new EnabledModules();
|
||||
this.CustomActionName = string.Empty;
|
||||
}
|
||||
|
||||
// converts the current to a json string.
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
{
|
||||
public class GeneralSettingsCustomAction
|
||||
{
|
||||
[JsonPropertyName("action")]
|
||||
public OutGoingGeneralSettings GeneralSettingsAction { get; set; }
|
||||
|
||||
public GeneralSettingsCustomAction()
|
||||
{
|
||||
}
|
||||
|
||||
public GeneralSettingsCustomAction(OutGoingGeneralSettings action)
|
||||
{
|
||||
GeneralSettingsAction = action;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonSerializer.Serialize(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,9 +2,6 @@
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
@@ -12,14 +9,16 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
{
|
||||
public class PowerPreviewProperties
|
||||
{
|
||||
public BoolProperty IDS_PREVPANE_SVG_BOOL_TOGGLE_CONTROLL { get; set; }
|
||||
[JsonPropertyName("svg-previewer-toggle-setting")]
|
||||
public BoolProperty EnableSvg { get; set; }
|
||||
|
||||
public BoolProperty PREVPANE_MD_BOOL_TOGGLE_CONTROLL_ID { get; set; }
|
||||
[JsonPropertyName("md-previewer-toggle-setting")]
|
||||
public BoolProperty EnableMd { get; set; }
|
||||
|
||||
public PowerPreviewProperties()
|
||||
{
|
||||
IDS_PREVPANE_SVG_BOOL_TOGGLE_CONTROLL = new BoolProperty();
|
||||
PREVPANE_MD_BOOL_TOGGLE_CONTROLL_ID = new BoolProperty();
|
||||
EnableSvg = new BoolProperty();
|
||||
EnableMd = new BoolProperty();
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
|
||||
@@ -15,7 +15,6 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
|
||||
public SndModuleSettings()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public SndModuleSettings(T settings)
|
||||
|
||||
@@ -12,12 +12,16 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
{
|
||||
public class SndPowerPreviewSettings
|
||||
{
|
||||
[JsonPropertyName("File Explorer Preview")]
|
||||
public PowerPreviewSettings File_Explorer_Preview { get; set; }
|
||||
[JsonPropertyName("File Explorer")]
|
||||
public PowerPreviewSettings FileExplorerPreviewSettings { get; set; }
|
||||
|
||||
public SndPowerPreviewSettings()
|
||||
{
|
||||
}
|
||||
|
||||
public SndPowerPreviewSettings(PowerPreviewSettings settings)
|
||||
{
|
||||
File_Explorer_Preview = settings;
|
||||
FileExplorerPreviewSettings = settings;
|
||||
}
|
||||
|
||||
public string ToJsonString()
|
||||
|
||||
Reference in New Issue
Block a user