protected override void OnStartup(StartupEventArgs e) { 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") { window.ShowApp(); } window.ParseArgs(e.Args); }
protected override void OnStartup(StartupEventArgs e) { this.DispatcherUnhandledException += ErrorReporting.DispatcherUnhandledException; 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; } if (e.Args.Length > 0 && e.Args[0].ToLower() == "plugindebugger") { var path = e.Args[1]; PluginLoader.Plugins.ActivatePluginDebugger(path); } window = new MainWindow(); if (e.Args.Length == 0 || e.Args[0].ToLower() != "hidestart") { window.ShowApp(); } window.ParseArgs(e.Args); }
public void Activate(string[] args) { if (args.Length == 0 || args[0].ToLower() != "hidestart") { window.ShowApp(); } window.ParseArgs(args); }
protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); window = new MainWindow(); if (e.Args.Length == 0 || e.Args[0].ToLower() != "starthide") { window.ShowApp(); } window.ParseArgs(e.Args); }
protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); window = new MainWindow(); if (e.Args.Length == 0 || e.Args[0].ToLower() != "hidestart") { window.ShowApp(); } window.ParseArgs(e.Args); }
void ctlHotkey_OnHotkeyChanged(object sender, System.EventArgs e) { if (ctlHotkey.CurrentHotkeyAvailable) { MainWindow.SetHotkey(ctlHotkey.CurrentHotkey, delegate { if (!MainWindow.IsVisible) { MainWindow.ShowApp(); } else { MainWindow.HideApp(); } }); MainWindow.RemoveHotkey(UserSettingStorage.Instance.Hotkey); UserSettingStorage.Instance.Hotkey = ctlHotkey.CurrentHotkey.ToString(); UserSettingStorage.Instance.Save(); } }