Remove() 공개 메소드

public Remove ( int offset, int length ) : void
offset int
length int
리턴 void
예제 #1
0
        public void Remove(int offset, int length)
        {
            //if (readOnly) {
            //	return;
            //}
            OnDocumentAboutToBeChanged(new DocumentEventArgs(this, offset, length));
            undoStack.Push(new UndoableDelete(this, offset, GetText(offset, length)));

            textBufferStrategy.Remove(offset, length);
            lineTrackingStrategy.Remove(offset, length);

            OnDocumentChanged(new DocumentEventArgs(this, offset, length));
        }
        public void Remove(int offset, int length)
        {
            if (!ReadOnly)
            {
                DocumentAboutToBeChanged?.Invoke(this, new DocumentEventArgs()
                {
                    Document = this, Offset = offset, Length = length
                });
                UndoStack.Push(new UndoableDelete(this, offset, GetText(offset, length)));

                TextBuffer.Remove(offset, length);
                LineManager.Remove(offset, length);

                DocumentChanged?.Invoke(this, new DocumentEventArgs()
                {
                    Document = this, Offset = offset, Length = length
                });
            }
        }