예제 #1
0
        public void AddElement(EquationElement.ElementType type, String character, bool removeEmpty)
        {
            EquationElement equationElement = new EquationElement(type, character);

            elements.Insert(cursorIndex + 1, equationElement);

            cursorIndex++;

            CursorUpdate();
        }
예제 #2
0
        public void AddElement(EquationElement.ElementType type, String element)
        {
            int index = cursorIndex + 1;

            /*
            if (index >= 0 && index < elements.Count && elements.ElementAt(index).GetCharacter() == '□')
            {
                elements.RemoveAt(cursorIndex + 1);
            }
            */

            AddElement(type, element, element.Length == 1);

            if (element.Contains("□"))
            {
                cursorIndex = cursorIndex - 1 - (element.Length - 1 - element.IndexOf("□"));

                CursorUpdate();
            }
        }
예제 #3
0
        public void SetElement(int index, EquationElement.ElementType type, String character)
        {
            elements[index] = new EquationElement(type, character);

            CursorUpdate();
        }
예제 #4
0
        public void InsertElement(int index, EquationElement.ElementType type, String character)
        {
            elements.Insert(index, new EquationElement(type, character));

            cursorIndex++;

            CursorUpdate();
        }