Example #1
0
        /// <summary>
        /// Executes the specified plugin host.
        /// </summary>
        /// <param name="pluginHost">The plugin host.</param>
        /// <param name="currentDirectory">The current directory.</param>
        /// <param name="args">The args.</param>
        public override void Execute(IPluginHost pluginHost, DroidExplorer.Core.IO.LinuxDirectoryInfo currentDirectory, string[] args)
        {
            Arguments arguments = new Arguments(args ?? new string[] { });
            string    file      = string.Empty;

            if (arguments.Contains("file"))
            {
                file = arguments["file"];
            }
            ShellConsole console = new ShellConsole(pluginHost);

            console.Top  = Screen.PrimaryScreen.WorkingArea.Top;
            console.Left = Screen.PrimaryScreen.WorkingArea.Left;

            if (!string.IsNullOrEmpty(file))
            {
                console.Run(file);
            }
            if (pluginHost != null && pluginHost.GetHostWindow() != null)
            {
                console.Show();
            }
            else
            {
                console.ShowInTaskbar = true;
                console.ShowDialog();
            }
        }
Example #2
0
        static void Main(string[] args)
        {
            //实例化shell并启动主循环
            ShellConsole shell = new ShellConsole();

            shell.MainLoop();
        }