public void SetBounds(int x, int y, int width, int height, BoundsSpecified specified) { // Fill in the values that were not specified if ((specified & BoundsSpecified.X) == 0) x = Left; if ((specified & BoundsSpecified.Y) == 0) y = Top; if ((specified & BoundsSpecified.Width) == 0) width = Width; if ((specified & BoundsSpecified.Height) == 0) height = Height; SetBoundsInternal (x, y, width, height, specified); }
public static void CallControlSetBounds(Control c, object[] obj) { if (obj.Length == 4) { c.SetBounds((int)obj[0], (int)obj[1], (int)obj[2], (int)obj[3]); } if (obj.Length == 5) { c.SetBounds((int)obj[0], (int)obj[1], (int)obj[2], (int)obj[3], (BoundsSpecified)obj[4]); } }