mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-14 19:49:15 +08:00
29 lines
683 B
C#
29 lines
683 B
C#
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Windows;
|
|
using Wox.Core.Plugin;
|
|
|
|
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;
|
|
}
|
|
PluginManager.InstallPlugin(path);
|
|
}
|
|
}
|
|
}
|
|
} |