Beispiel #1
1
        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);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
 public void Activate(string[] args)
 {
     if (args.Length == 0 || args[0].ToLower() != "hidestart")
     {
         window.ShowApp();
     }
     window.ParseArgs(args);
 }
Beispiel #4
0
        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);
        }
Beispiel #5
0
        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);
        }
Beispiel #6
0
        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);
        }