Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="e"></param>
        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, _Active));

            renderer.DrawSkinFormBorder(
                new SkinFormBorderRenderEventArgs(
                    this, g, rect, _Active));

            if (this.ControlBoxManager.CloseBoxVisibale)
            {
                renderer.DrawSkinFormControlBox(
                    new SkinFormControlBoxRenderEventArgs(
                        this,
                        g,
                        this.ControlBoxManager.CloseBoxRect,
                        _Active,
                        FormControlBoxStyle.Close,
                        this.ControlBoxManager.CloseBoxState));
            }

            if (this.ControlBoxManager.MaximizeBoxVisibale)
            {
                renderer.DrawSkinFormControlBox(
                    new SkinFormControlBoxRenderEventArgs(
                        this,
                        g,
                        this.ControlBoxManager.MaximizeBoxRect,
                        _Active,
                        FormControlBoxStyle.Maximize,
                        this.ControlBoxManager.MaximizeBoxState));
            }

            if (this.ControlBoxManager.MinimizeBoxVisibale)
            {
                renderer.DrawSkinFormControlBox(
                    new SkinFormControlBoxRenderEventArgs(
                        this,
                        g,
                        this.ControlBoxManager.MinimizeBoxRect,
                        _Active,
                        FormControlBoxStyle.Minimize,
                        this.ControlBoxManager.MinimizeBoxState));
            }
        }
Esempio n. 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="Disposing"></param>
        protected override void Dispose(bool Disposing)
        {
            base.Dispose(Disposing);

            if (Disposing)
            {
                if (_ControlBoxManager != null)
                {
                    this._ControlBoxManager.Dispose();
                    this._ControlBoxManager = null;
                }
                if (this._Renderer != null)
                {
                    this._Renderer = null;
                }

                if (this._ToolTip != null)
                {
                    this._ToolTip.Dispose();
                }
            }
        }