Example #1
0
        void currentSession_BlockReceived(object sender, BlockReceivedEventArgs e)
        {
            if (this.InvokeRequired)
            {
                this.Invoke(blockReceivedHandler, new object[] { sender, e });
            }
            else
            {
                string receivedBlock = currentSession.ReadBlock();

                /*
                 * if (_connectionSettings.TerminalType==TerminalType.CharacterBuffer)
                 * {
                 *  if (receivedBlock.IndexOf("\x1b\x5bJ") != -1)
                 *  {
                 *      ClearText();
                 *      receivedBlock = receivedBlock.Substring(receivedBlock.IndexOf("\x1b\x5bJ") + 1);
                 *  }
                 *
                 *  AppendText(receivedBlock);
                 *  MoveCursorToEnd();
                 * }
                 * else*/
                {
                    terminalBuffer.Write(receivedBlock);
                    ShowTerminalBuffer();
                }
            }
        }