protected override void SetClientSizeCore(int x, int y) {
if ((minimum_size.Width != 0) && (x < minimum_size.Width)) {
x = minimum_size.Width;
} else if ((maximum_size.Width != 0) && (x > maximum_size.Width)) {
x = maximum_size.Width;
}
if ((minimum_size.Height != 0) && (y < minimum_size.Height)) {
y = minimum_size.Height;
} else if ((maximum_size.Height != 0) && (y > maximum_size.Height)) {
y = maximum_size.Height;
}
Rectangle ClientRect = new Rectangle(0, 0, x, y);
Rectangle WindowRect;
CreateParams cp = this.CreateParams;
clientsize_set = new Size(x, y);
if (XplatUI.CalculateWindowRect(ref ClientRect, cp, cp.menu, out WindowRect)) {
SetBounds(bounds.X, bounds.Y, WindowRect.Width, WindowRect.Height, BoundsSpecified.Size);
}
}