예제 #1
0
        public void SetBufferAndCursorIndex(string newBufferText, int cursorIndex)
        {
            if (this.InvokeRequired)
            {
                SetBufferAndCursorIndexCallBack aCall = new SetBufferAndCursorIndexCallBack(SetBufferAndCursorIndex);
                this.Invoke(aCall, new object[] { newBufferText, cursorIndex });
                return;
            }

            this.m_bufferText = newBufferText;
            if (this.m_bufferText.Length == 0)
            {
                this.m_readingTextStart = 0;
                this.m_readingTextRange = 0;
                this.m_cursorIndex      = 0;
            }
            else
            {
                this.m_cursorIndex = cursorIndex;
            }
        }
예제 #2
0
        public void SetBufferAndCursorIndex(string newBufferText, int cursorIndex)
        {
            if (this.InvokeRequired)
            {
                SetBufferAndCursorIndexCallBack aCall = new SetBufferAndCursorIndexCallBack(SetBufferAndCursorIndex);
                this.Invoke(aCall, new object[] { newBufferText, cursorIndex });
                return;
            }

            this.m_bufferText = newBufferText;
            if (this.m_bufferText.Length == 0)
            {
                this.m_readingTextStart = 0;
                this.m_readingTextRange = 0;
                this.m_cursorIndex = 0;
            }
            else {
                this.m_cursorIndex = cursorIndex;
            }
        }