public void Redraw() { Calculate(); Vector2 buttonPosition = new Vector2(FormSize.X - 15f, 2f) + FormPos; int x = 0; if (BtnClose != null) { BtnClose.MoveTo(buttonPosition); } if (BtnMini != null) { x = 0; if (BtnClose != null) { x += 10; } if (BtnMaxi != null) { x += 10; } BtnMini.MoveTo(buttonPosition - new Vector2(x, 0f)); } if (BtnMaxi != null) { x = 0; if (BtnClose != null) { x += 10; } BtnMaxi.MoveTo(buttonPosition - new Vector2(x, 0f)); } if (BtnRestore != null) { x = 0; if (BtnClose != null) { x += 10; } BtnRestore.MoveTo(buttonPosition - new Vector2(x, 0f)); } }