Allow unsafe codes in Release build.

This commit is contained in:
qianlifeng
2014-10-24 16:48:14 +08:00
parent f399ef8f69
commit a7dfb9cb97
3 changed files with 2 additions and 31 deletions

View File

@@ -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()

View File

@@ -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">

View File

@@ -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();