Example #1
0
        public void DrawSkinFormControlBox(
            SkinFormControlBoxRenderEventArgs e)
        {
            OnRenderSkinFormControlBox(e);
            SkinFormControlBoxRenderEventHandler handle =
                Events[EventRenderSkinFormControlBox]
                as SkinFormControlBoxRenderEventHandler;

            if (handle != null)
            {
                handle(this, e);
            }
        }
        protected override void OnRenderSkinFormControlBox(
            SkinFormControlBoxRenderEventArgs e)
        {
            SkinFormCtl     form   = e.Form;
            Graphics        g      = e.Graphics;
            Rectangle       rect   = e.ClipRectangle;
            ControlBoxState state  = e.ControlBoxtate;
            bool            active = e.Active;

            bool minimizeBox = form.ControlBox && form.MinimizeBox;
            bool maximizeBox = form.ControlBox && form.MaximizeBox;

            switch (e.ControlBoxStyle)
            {
            case ControlBoxStyle.Close:
                RenderSkinFormCloseBoxInternal(
                    g,
                    rect,
                    state,
                    active,
                    minimizeBox,
                    maximizeBox);
                break;

            case ControlBoxStyle.Maximize:
                RenderSkinFormMaximizeBoxInternal(
                    g,
                    rect,
                    state,
                    active,
                    minimizeBox,
                    form.WindowState == FormWindowState.Maximized);
                break;

            case ControlBoxStyle.Minimize:
                RenderSkinFormMinimizeBoxInternal(
                    g,
                    rect,
                    state,
                    active);
                break;
            }
        }
Example #3
0
 protected abstract void OnRenderSkinFormControlBox(
     SkinFormControlBoxRenderEventArgs e);