Esempio n. 1
0
        public void DrawGroundFormControlBox(FormControlBoxRenderEventArgs e)
        {
            OnRenderGroundFormControlBox(e);
            var handle = Events[EventRenderGroundFormControlBox] as FormControlBoxRenderEventHandler;

            if (handle != null)
            {
                handle(this, e);
            }
        }
Esempio n. 2
0
        protected override void OnRenderGroundFormControlBox(FormControlBoxRenderEventArgs e)
        {
            SkinForm     form     = e.Form;
            Graphics     g        = e.Graphics;
            Rectangle    rect     = e.ClipRectangle;
            ControlState state    = e.ControlBoxtate;
            bool         isActive = e.IsActive;

            bool ifHasMinimizeBox = form.ControlBox && form.MinimizeBox;
            bool ifHasMaximizeBox = form.ControlBox && form.MaximizeBox;

            switch (e.ControlBoxStyle)
            {
            case ControlBoxStyle.Maximize:
                DrawGroundFormMaximizeBox(
                    g,
                    rect,
                    state,
                    isActive,
                    ifHasMinimizeBox,
                    form.WindowState == FormWindowState.Maximized);
                break;

            case ControlBoxStyle.Minimize:
                DrawGroundFormMinimizeBox(
                    g,
                    rect,
                    state,
                    isActive);
                break;

            case ControlBoxStyle.Close:
                DrawGroundFormCloseBox(
                    g,
                    rect,
                    state,
                    isActive,
                    ifHasMinimizeBox,
                    ifHasMaximizeBox);
                break;
            }
        }
Esempio n. 3
0
 protected abstract void OnRenderGroundFormControlBox(FormControlBoxRenderEventArgs e);