public virtual bool BlockDeleting(Rectangle Rect) { bool flag1 = false; this.BeginUpdate(); try { int num1; if (base.FindLast(new Point(Rect.Right, Rect.Bottom), out num1, this.ptComparer)) { num1++; } for (int num2 = Math.Min(num1, (int)(this.Count - 1)); num2 >= 0; num2--) { IRange range1 = (IRange)this[num2]; if (range1.EndPoint.Y < Rect.Top) { return(flag1); } if (SortList.InsideBlock(range1.StartPoint, Rect) && SortList.InsideBlock(new Point(Math.Max((int)(range1.EndPoint.X - 1), 0), range1.EndPoint.Y), Rect)) { this.RemoveAt(num2); flag1 = true; } } } finally { this.EndUpdate(); } return(flag1); }
public static bool UpdatePos(int X, int Y, int DeltaX, int DeltaY, ref Point Pt, bool EndPos) { int num1 = Pt.X; int num2 = Pt.Y; bool flag1 = SortList.UpdatePos(X, Y, DeltaX, DeltaY, ref num1, ref num2, EndPos); Pt.X = num1; Pt.Y = num2; return(flag1); }
protected virtual bool UpdatePosition(IRange Range, int X, int Y, int DeltaX, int DeltaY) { Point point1 = Range.StartPoint; bool flag1 = false; if (SortList.UpdatePos(X, Y, DeltaX, DeltaY, ref point1, false)) { Range.StartPoint = point1; flag1 = true; } point1 = Range.EndPoint; if (SortList.UpdatePos(X, Y, DeltaX, DeltaY, ref point1, true)) { Range.EndPoint = point1; flag1 = true; } return(flag1); }