Beispiel #1
0
        public void AppendText(string text)
        {
            if (chatInputText.Length + text.Length > len)
            {
                text = text.Substring(0, len - chatInputText.Length);
            }
            if (text == "")
            {
                return;
            }

            if (caretPos == -1)
            {
                chatInputText.InsertAt(chatInputText.Length, text);
            }
            else
            {
                chatInputText.InsertAt(caretPos, text);
                caretPos += text.Length;
                if (caretPos >= chatInputText.Length)
                {
                    caretPos = -1;
                }
            }
            Dispose();
            Init();
        }