protected override void Dispose(bool disposing) { base.Dispose(disposing); if (disposing) { if (_controlBoxManager != null) { _controlBoxManager.Dispose(); _controlBoxManager = null; } _renderer = null; _toolTip.Dispose(); } }
protected override void OnPaint(PaintEventArgs e) { Graphics g = e.Graphics; Rectangle rect = ClientRectangle; SkinFormRenderer renderer = Renderer; renderer.DrawSkinFormBackground( new SkinFormBackgroundRenderEventArgs( this, g, rect)); renderer.DrawSkinFormCaption( new SkinFormCaptionRenderEventArgs( this, g, CaptionRect, _captionBackColor, _captionBackImage, _active)); renderer.DrawSkinFormBorder( new SkinFormBorderRenderEventArgs( this, g, rect, _active)); if (ControlBoxManager.CloseBoxVisibale) { renderer.DrawSkinFormControlBox( new SkinFormControlBoxRenderEventArgs( this, g, ControlBoxManager.CloseBoxRect, _active, ControlBoxStyle.Close, ControlBoxManager.CloseBoxState)); } if (ControlBoxManager.MaximizeBoxVisibale) { renderer.DrawSkinFormControlBox( new SkinFormControlBoxRenderEventArgs( this, g, ControlBoxManager.MaximizeBoxRect, _active, ControlBoxStyle.Maximize, ControlBoxManager.MaximizeBoxState)); } if (ControlBoxManager.MinimizeBoxVisibale) { renderer.DrawSkinFormControlBox( new SkinFormControlBoxRenderEventArgs( this, g, ControlBoxManager.MinimizeBoxRect, _active, ControlBoxStyle.Minimize, ControlBoxManager.MinimizeBoxState)); } if (ControlBoxManager.SysBottomVisibale) { renderer.DrawSkinFormControlBox(new SkinFormControlBoxRenderEventArgs( this, g, ControlBoxManager.SysBottomRect, _active, ControlBoxStyle.SysBottom, ControlBoxManager.SysBottomState)); } }