Refactoring command args and change the signal instance implement.

This commit is contained in:
qianlifeng
2014-10-21 18:16:05 +08:00
parent 1cf79d8fbc
commit be33ac3c4f
14 changed files with 712 additions and 149 deletions

View File

@@ -392,42 +392,6 @@ namespace Wox
if (selectAll) tbQuery.SelectAll();
}
public void ParseArgs(string[] args)
{
if (args != null && args.Length > 0)
{
switch (args[0].ToLower())
{
case "reloadplugin":
Plugins.Init();
break;
case "query":
if (args.Length > 1)
{
string query = args[1];
tbQuery.Text = query;
tbQuery.SelectAll();
}
break;
case "hidestart":
HideApp();
break;
case "installplugin":
var path = args[1];
if (!File.Exists(path))
{
MessageBox.Show("Plugin " + path + " didn't exist");
return;
}
PluginInstaller.Install(path);
break;
}
}
}
private void MainWindow_OnDeactivated(object sender, EventArgs e)
{
if (UserSettingStorage.Instance.HideWhenDeactive)