Alsing.SourceCode.SyntaxDocument.Remove C# (CSharp) Метод

Remove() публичный Метод

Remove a row at specified row index
public Remove ( int index, bool storeUndo, bool raiseChanged ) : void
index int index of the row that should be removed
storeUndo bool true if and undo action should be added to the undo stack
raiseChanged bool
Результат void
        public void Remove(int index, bool storeUndo, bool raiseChanged)
        {
            Row r = this[index];

            if (storeUndo)
            {
                var ra = new TextRange();

                if (index != Count - 1)
                {
                    ra.FirstColumn = 0;
                    ra.FirstRow = index;
                    ra.LastRow = index + 1;
                    ra.LastColumn = 0;
                }
                else
                {
                    ra.FirstColumn = r.PrevRow.Text.Length;
                    ra.FirstRow = index - 1;
                    ra.LastRow = index;
                    ra.LastColumn = r.Text.Length;
                }
                PushUndoBlock(UndoAction.DeleteRange, GetRange(ra), ra.FirstColumn, ra.FirstRow);
            }


            rows.RemoveAt(index);
            if (r.InKeywordQueue)
                KeywordQueue.Remove(r);

            if (r.InQueue)
                ParseQueue.Remove(r);

            //this.ResetVisibleRows ();
            OnRowDeleted(r);
            if (raiseChanged)
                OnChange();
        }

Same methods

SyntaxDocument::Remove ( int index ) : void
SyntaxDocument::Remove ( int index, bool StoreUndo ) : void