示例#1
0
        /*
         *      public static void TestPutChar() {
         *              TestPutChar(1, "aaaaz ", 0, 'い');
         *              TestPutChar(2, "aあ\uFFFFaz ", 0, 'い');
         *              TestPutChar(3, "あ\uFFFFあ\uFFFFz ", 0, 'b');
         *              TestPutChar(4, "あ\uFFFFあ\uFFFFz ", 0, 'い');
         *              TestPutChar(5, "あ\uFFFFあ\uFFFFz ", 1, 'b');
         *              TestPutChar(6, "あ\uFFFFaaz ", 1, 'い');
         *              TestPutChar(7, "あ\uFFFFあ\uFFFFz ", 1, 'い');
         *      }*/
        private static void TestPutChar(int num, string initial, int col, char ch)
        {
            GLineManipulator m = new GLineManipulator(10);

            m._text       = initial.ToCharArray();
            m.CaretColumn = col;
            Debug.WriteLine(String.Format("Test{0}  [{1}] col={2} char={3}", num, SafeString(m._text), m.CaretColumn, ch));
            m.PutChar(ch, TextDecoration.Default);
            Debug.WriteLine(String.Format("Result [{0}] col={1}", SafeString(m._text), m.CaretColumn));
        }
示例#2
0
 /// <summary>
 /// ����̑ΏۂɂȂ�h�L�������g�ƕ����̃G���R�[�f�B���O��w�肵�č\�z
 /// </summary>
 public AbstractTerminal(ConnectionTag tag, ICharDecoder decoder)
 {
     _tag = tag;
     _decoder = decoder;
     _terminalMode = TerminalMode.Normal;
     _currentdecoration = TextDecoration.Default;
     _manipulator = new GLineManipulator(80);
     _bufferForMacro = new StringBuilder();
     _signalForMacro = new AutoResetEvent(false);
 }
示例#3
0
        public void Dump(string title)
        {
            Debug.WriteLine("<<<< DEBUG DUMP [" + title + "] >>>>");
            Debug.WriteLine(String.Format("[size={0} top={1} current={2} caret={3} first={4} last={5} region={6},{7}]", _size, TopLineNumber, CurrentLineNumber, _caretColumn, FirstLineNumber, LastLineNumber, _scrollingTop, _scrollingBottom));
            GLine gl    = FindLineOrEdge(TopLineNumber);
            int   count = 0;

            while (gl != null && count++ < _connection.TerminalHeight)
            {
                Debug.Write(String.Format("{0,3}", gl.ID));
                Debug.Write(":");
                Debug.Write(GLineManipulator.SafeString(gl.Text));
                Debug.Write(":");
                Debug.WriteLine(gl.EOLType);
                gl = gl.NextLine;
            }
        }
示例#4
0
 private static void TestPutChar(int num, string initial, int col, char ch)
 {
     GLineManipulator m = new GLineManipulator(10);
     m._text = initial.ToCharArray();
     m.CaretColumn = col;
     Debug.WriteLine(String.Format("Test{0}  [{1}] col={2} char={3}", num, SafeString(m._text), m.CaretColumn, ch));
     m.PutChar(ch, TextDecoration.Default);
     Debug.WriteLine(String.Format("Result [{0}] col={1}", SafeString(m._text), m.CaretColumn));
 }