public int GetRightSide() { if (Child == null) { return(Right); } return(Child.GetRightSide()); }
public void ResizeSelf() { QueryOperatorSelect.Location = new Point(0, 0); PropertySelect.Location = new Point(QueryOperatorSelect.Right + 3, 0); ComparerSelect.Location = new Point(PropertySelect.GetRightSide() + 3, 0); ValueSelect.Location = new Point(ComparerSelect.Right + 3, 0); if (OrderByCriteria && Controls.Contains(ValueSelect)) { OrderBySelect.Location = new Point(ValueSelect.Right + 3, 0); } else if (OrderByCriteria && Controls.Contains(ComparerSelect)) { OrderBySelect.Location = new Point(ComparerSelect.Right + 3, 0); } else if (OrderByCriteria) { OrderBySelect.Location = new Point(PropertySelect.GetRightSide() + 3, 0); } if (OrderByCriteria) { Insert.Location = new Point(OrderBySelect.Right + 15, 0); } else { Insert.Location = new Point(ValueSelect.Right + 15, 0); } Remove.Location = new Point(Insert.Right + 3, 0); Width = Remove.Right; if (Parent != null) { (Parent as CriteriaPanel).AutoResize(); } }