2014-10-21 18:16:05 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Windows;
|
2014-12-27 12:34:51 +08:00
|
|
|
|
using Wox.Core.Plugin;
|
2014-10-21 18:16:05 +08:00
|
|
|
|
using Wox.Helper;
|
|
|
|
|
|
|
|
|
|
namespace Wox.CommandArgs
|
|
|
|
|
{
|
|
|
|
|
public class InstallPluginCommandArg : ICommandArg
|
|
|
|
|
{
|
|
|
|
|
public string Command
|
|
|
|
|
{
|
|
|
|
|
get { return "installplugin"; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Execute(IList<string> args)
|
|
|
|
|
{
|
|
|
|
|
if (args.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
var path = args[0];
|
|
|
|
|
if (!File.Exists(path))
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("Plugin " + path + " didn't exist");
|
|
|
|
|
return;
|
|
|
|
|
}
|
2014-12-27 12:34:51 +08:00
|
|
|
|
PluginManager.InstallPlugin(path);
|
2014-10-21 18:16:05 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|