Exemplo n.º 1
0
        /// <summary>
        /// 呈现窗体 最大,最小,关闭按钮
        /// </summary>
        /// <param name="e"></param>
        protected override void OnRenderSkinFormControlBox(SkinFormControlBoxRenderEventArgs e)
        {
            SkinForm  form = e.Form;
            Graphics  g    = e.Graphics;
            Rectangle rect = e.ClipRectangle;

            rect.Inflate(-1, -1);
            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,
                    form);
                break;

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

            case ControlBoxStyle.Minimize:
                RenderSkinFormMinimizeBoxInternal(
                    g,
                    rect,
                    state,
                    active,
                    form);
                break;

            case ControlBoxStyle.SysBottom:
                RenderSkinFormSysBottomInternal(g,
                                                rect,
                                                state,
                                                active,
                                                form);
                break;
            }
        }
Exemplo n.º 2
0
        public void DrawSkinFormControlBox(
            SkinFormControlBoxRenderEventArgs e)
        {
            OnRenderSkinFormControlBox(e);
            SkinFormControlBoxRenderEventHandler handle =
                Events[EventRenderSkinFormControlBox]
                as SkinFormControlBoxRenderEventHandler;

            if (handle != null)
            {
                handle(this, e);
            }
        }
Exemplo n.º 3
0
 protected abstract void OnRenderSkinFormControlBox(
     SkinFormControlBoxRenderEventArgs e);
        /// <summary>
        /// 呈现窗体 最大,最小,关闭按钮
        /// </summary>
        /// <param name="e"></param>
        protected override void OnRenderSkinFormControlBox(SkinFormControlBoxRenderEventArgs e)
        {
            SkinForm form = e.Form;
            Graphics g = e.Graphics;
            Rectangle rect = e.ClipRectangle;
            rect.Inflate(-1, -1);
            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,
                        form );
                    break;
                case ControlBoxStyle.Maximize:
                    RenderSkinFormMaximizeBoxInternal(
                        g,
                        rect,
                        state,
                        active,
                        minimizeBox,
                        form.WindowState == FormWindowState.Maximized , 
                        form);
                    break;
                case ControlBoxStyle.Minimize:
                    RenderSkinFormMinimizeBoxInternal(
                       g,
                       rect,
                       state,
                       active,
                       form);
                    break;
                case ControlBoxStyle.SysBottom :
                    RenderSkinFormSysBottomInternal(g,
                        rect,
                        state,
                        active,
                        form);
                    break;
            }
        }
Exemplo n.º 5
0
 protected abstract void OnRenderSkinFormControlBox(
     SkinFormControlBoxRenderEventArgs e);
Exemplo n.º 6
0
 public void DrawSkinFormControlBox(
     SkinFormControlBoxRenderEventArgs e)
 {
     OnRenderSkinFormControlBox(e);
     SkinFormControlBoxRenderEventHandler handle =
         Events[EventRenderSkinFormControlBox]
         as SkinFormControlBoxRenderEventHandler;
     if (handle != null)
     {
         handle(this, e);
     }
 }