示例#1
0
        private void Execute(ISender client, DoShellExecute message)
        {
            string input = message.Command;

            if ((_prc == null || _prc.HasExited) && input == "exit")
            {
                return;
            }

            if (input == "exit")
            {
                Dispose();
            }
            else
            {
                ExecuteCommand(input);
            }
        }
        private void Execute(ISender client, DoShellExecute message)
        {
            string input = message.Command;

            if (_shell == null && input == "exit")
            {
                return;
            }
            if (_shell == null)
            {
                _shell = new Shell(_client);
            }

            if (input == "exit")
            {
                _shell.Dispose();
            }
            else
            {
                _shell.ExecuteCommand(input);
            }
        }
示例#3
0
        public static void HandleDoShellExecute(DoShellExecute command, Client client)
        {
            string input = command.Command;

            if (_shell == null && input == "exit")
            {
                return;
            }
            if (_shell == null)
            {
                _shell = new Shell();
            }

            if (input == "exit")
            {
                CloseShell();
            }
            else
            {
                _shell.ExecuteCommand(input);
            }
        }