mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-09 12:46:47 +02:00
Remove ShellRun
1. Remove ShellRun using p/invoke 2. Remove ResolveShortcut when open contanning folder 3. fix #88
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user