mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-09 20:57:22 +02:00
implement issue#8 part 1
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using Microsoft.VisualBasic.ApplicationServices;
|
||||
using Wox.Commands;
|
||||
using Wox.Helper;
|
||||
using StartupEventArgs = System.Windows.StartupEventArgs;
|
||||
|
||||
namespace Wox
|
||||
@@ -66,6 +68,22 @@ namespace Wox
|
||||
{
|
||||
base.OnStartup(e);
|
||||
|
||||
//for install plugin command when wox didn't start up
|
||||
//we shouldn't init MainWindow, just intall plugin and exit.
|
||||
if (e.Args.Length > 0 && e.Args[0].ToLower() == "installplugin")
|
||||
{
|
||||
var path = e.Args[1];
|
||||
if (!File.Exists(path))
|
||||
{
|
||||
MessageBox.Show("Plugin " + path + " didn't exist");
|
||||
return;
|
||||
}
|
||||
PluginInstaller.Install(path);
|
||||
Environment.Exit(0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
window = new MainWindow();
|
||||
if (e.Args.Length == 0 || e.Args[0].ToLower() != "hidestart")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user