Remove ShellRun

1. Remove ShellRun using p/invoke
2. Remove ResolveShortcut when open contanning folder
3. fix #88
This commit is contained in:
bao-qian
2016-01-03 23:18:51 +00:00
parent 99a7453f28
commit 38b3c82ece
9 changed files with 40 additions and 449 deletions

View File

@@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
@@ -904,24 +903,6 @@ namespace Wox
pnlResult.Visibility = Visibility.Collapsed;
}
public bool ShellRun(string cmd, bool runAsAdministrator = false)
{
try
{
if (string.IsNullOrEmpty(cmd))
throw new ArgumentNullException();
WindowsShellRun.Start(cmd, runAsAdministrator);
return true;
}
catch (Exception ex)
{
string errorMsg = string.Format(InternationalizationManager.Instance.GetTranslation("couldnotStartCmd"), cmd);
ShowMsg(errorMsg, ex.Message, null);
}
return false;
}
private void MainWindow_OnDrop(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop))