Пример #1
0
        //ポップアップ対象の行を集めて構築。ここは受信スレッドでの実行であることに注意
        private void ProcessCommandResult(int end_line_id)
        {
            List <GLine>     result = new List <GLine>();
            TerminalDocument doc    = _terminal.GetDocument();
            GLine            line   = doc.FindLineOrNull(_commandStartLineID);

            while (line != null && line.ID <= end_line_id)
            {
                //Debug.WriteLine("P]"+new string(line.Text, 0, line.DisplayLength));
                result.Add(line);
                line = line.NextLine;
            }

            //何かとれていたら実行
            if (result.Count > 0)
            {
                _currentProcessor.EndCommand(result);
            }
            else
            {
                Debug.WriteLineIf(DebugOpt.CommandPopup, String.Format("Ignored for 0-length, start={0} end={1}", _commandStartLineID, end_line_id));
            }

            _currentProcessor = null;
        }
Пример #2
0
        public void StartCommandResultProcessor(ICommandResultProcessor processor, string command_body, bool start_with_linebreak)
        {
            _currentProcessor   = processor;
            _commandStartLineID = _lastPromptLine.ID + 1;
            string command = _lastCommand;

            if (!String.IsNullOrEmpty(command_body))
            {
                command += command_body;
                _terminal.TerminalHost.TerminalTransmission.SendString(command.ToCharArray());
            }

            _state = State.Fetch; //コマンド本体送信した時点で取得を開始
            processor.StartCommand(_terminal, command, _lastPromptLine);
            //Enterを送信してコマンド実行開始
            if (start_with_linebreak)
            {
                _terminal.TerminalHost.TerminalTransmission.SendLineBreak();
            }
        }
Пример #3
0
 //コマンド結果の処理割り込み
 public void ProcessCommandResult(ICommandResultProcessor processor, bool start_with_linebreak)
 {
     _commandResultRecognizer.StartCommandResultProcessor(processor, start_with_linebreak);
 }
Пример #4
0
 //外部からも実行可能なコマンド処理ポイント
 public void StartCommandResultProcessor(ICommandResultProcessor processor, bool start_with_linebreak)
 {
     StartCommandResultProcessor(processor, null, start_with_linebreak); //改行のみでスタート
 }
Пример #5
0
 //�R�}���h���ʂ̏������荞��
 public void ProcessCommandResult(ICommandResultProcessor processor, bool start_with_linebreak)
 {
     _commandResultRecognizer.StartCommandResultProcessor(processor, start_with_linebreak);
 }
Пример #6
0
        //�|�b�v�A�b�v�Ώۂ̍s��W�߂č\�z�B�����͎�M�X���b�h�ł̎��s�ł��邱�Ƃɒ���
        private void ProcessCommandResult(int end_line_id)
        {
            List<GLine> result = new List<GLine>();
            TerminalDocument doc = _terminal.GetDocument();
            GLine line = doc.FindLineOrNull(_commandStartLineID);
            while (line != null && line.ID <= end_line_id) {
                //Debug.WriteLine("P]"+new string(line.Text, 0, line.DisplayLength));
                result.Add(line);
                line = line.NextLine;
            }

            //�����Ƃ�Ă�������s
            if (result.Count > 0)
                _currentProcessor.EndCommand(result);
            else
                Debug.WriteLineIf(DebugOpt.CommandPopup, String.Format("Ignored for 0-length, start={0} end={1}", _commandStartLineID, end_line_id));

            _currentProcessor = null;
        }
Пример #7
0
        public void StartCommandResultProcessor(ICommandResultProcessor processor, string command_body, bool start_with_linebreak)
        {
            _currentProcessor = processor;
            _commandStartLineID = _lastPromptLine.ID + 1;
            string command = _lastCommand;
            if (!String.IsNullOrEmpty(command_body)) {
                command += command_body;
                _terminal.TerminalHost.TerminalTransmission.SendString(command.ToCharArray());
            }

            _state = State.Fetch; //�R�}���h�{�̑��M�������_�Ŏ擾��J�n
            processor.StartCommand(_terminal, command, _lastPromptLine);
            //Enter�𑗐M���ăR�}���h���s�J�n
            if (start_with_linebreak)
                _terminal.TerminalHost.TerminalTransmission.SendLineBreak();
        }
Пример #8
0
 //�O���������s�”\�ȃR�}���h�����|�C���g
 public void StartCommandResultProcessor(ICommandResultProcessor processor, bool start_with_linebreak)
 {
     StartCommandResultProcessor(processor, null, start_with_linebreak); //���s�݂̂ŃX�^�[�g
 }
Пример #9
0
        public void StartCommandResultProcessor(ICommandResultProcessor processor, string command_body, bool start_with_linebreak)
        {
            _currentProcessor = processor;
            _commandStartLineID = _lastPromptLine.ID + 1;
            string command = _lastCommand;
            if (!String.IsNullOrEmpty(command_body)) {
                command += command_body;
                _terminal.TerminalHost.TerminalTransmission.SendString(command.ToCharArray());
            }

            _state = State.Fetch; //コマンド本体送信した時点で取得を開始
            processor.StartCommand(_terminal, command, _lastPromptLine);
            //Enterを送信してコマンド実行開始
            if (start_with_linebreak)
                _terminal.TerminalHost.TerminalTransmission.SendLineBreak();
        }
Пример #10
0
 //外部からも実行可能なコマンド処理ポイント
 public void StartCommandResultProcessor(ICommandResultProcessor processor, bool start_with_linebreak)
 {
     StartCommandResultProcessor(processor, null, start_with_linebreak); //改行のみでスタート
 }