mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 19:57:07 +02:00
Allow unsafe codes in Release build.
This commit is contained in:
@@ -76,25 +76,6 @@ namespace Wox.Plugin.FindFile
|
|||||||
{
|
{
|
||||||
List<Result> contextMenus = new List<Result>();
|
List<Result> contextMenus = new List<Result>();
|
||||||
|
|
||||||
contextMenus.Add(new Result()
|
|
||||||
{
|
|
||||||
Title = "Open",
|
|
||||||
Action = _ =>
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Process.Start(record.FullPath);
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
context.API.ShowMsg("Can't open " + record.FullPath, string.Empty, string.Empty);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
IcoPath = "Images/open.png"
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!record.IsFolder)
|
if (!record.IsFolder)
|
||||||
{
|
{
|
||||||
contextMenus.Add(new Result()
|
contextMenus.Add(new Result()
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
<DefineConstants>TRACE</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="log4net, Version=1.2.13.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
<Reference Include="log4net, Version=1.2.13.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||||
|
|||||||
@@ -47,18 +47,7 @@ namespace Wox.Plugin.SystemPlugins.Program
|
|||||||
{
|
{
|
||||||
new Result()
|
new Result()
|
||||||
{
|
{
|
||||||
Title = "Open",
|
Title = "Run As Administrator",
|
||||||
Action = _ =>
|
|
||||||
{
|
|
||||||
context.API.HideApp();
|
|
||||||
context.API.ShellRun(c.ExecutePath);
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
IcoPath = "Images/open.png"
|
|
||||||
},
|
|
||||||
new Result()
|
|
||||||
{
|
|
||||||
Title = "Open With Administrator",
|
|
||||||
Action = _ =>
|
Action = _ =>
|
||||||
{
|
{
|
||||||
context.API.HideApp();
|
context.API.HideApp();
|
||||||
|
|||||||
Reference in New Issue
Block a user