예제 #1
0
        private void MoveIndices(object sender, LineManagerEventArgs e)
        {
            bool flag = false;

            this.OnBeforeChanged();
            for (int i = 0; i < this.bookmark.Count; i++)
            {
                int num = (int)this.bookmark[i];
                if (e.LinesMoved < 0 && num + 1 >= e.LineStart && num + 1 < e.LineStart - e.LinesMoved)
                {
                    this.bookmark.RemoveAt(i);
                    i--;
                    flag = true;
                }
                else
                {
                    if (num >= e.LineStart + 1 || (e.LinesMoved < 0 && num > e.LineStart))
                    {
                        flag             = true;
                        this.bookmark[i] = num + e.LinesMoved;
                    }
                }
            }
            if (flag)
            {
                this.OnChanged();
            }
        }
예제 #2
0
        private void MoveIndices(object sender, LineManagerEventArgs e)
        {
            bool flag = false;

            this.OnBeforeChanged();
            for (int i = 0; i < this.lines.Count; i++)
            {
                int startLineNr = ((CustomLine)this.lines[i]).StartLineNr;
                int endLineNr   = ((CustomLine)this.lines[i]).EndLineNr;
                if (e.LineStart >= startLineNr && e.LineStart < endLineNr)
                {
                    flag = true;
                    ((CustomLine)this.lines[i]).EndLineNr += e.LinesMoved;
                }
                else
                {
                    if (e.LineStart < startLineNr)
                    {
                        ((CustomLine)this.lines[i]).StartLineNr += e.LinesMoved;
                        ((CustomLine)this.lines[i]).EndLineNr   += e.LinesMoved;
                    }
                }
            }
            if (flag)
            {
                this.OnChanged();
            }
        }
예제 #3
0
 protected virtual void OnLineCountChanged(LineManagerEventArgs e)
 {
     if (this.LineCountChanged != null)
     {
         this.LineCountChanged(this, e);
     }
 }