コード例 #1
0
        public void AddButton(int x, int y, int width, int height, SkinForm form,EventHandler ClickHandler)
        {
            ImageButton img = new ImageButton(new Rectangle(x, y, width, height), form);
            img.Click += ClickHandler;

            this.Buttons.Add(img);
        }
コード例 #2
0
 public SkinFormCaptionRenderEventArgs(
     SkinForm skinForm,
     Graphics g,
     Rectangle clipRect,
     bool active)
     : base(g, clipRect)
 {
     _skinForm = skinForm;
     _active = active;
 }
コード例 #3
0
        public override Region CreateRegion(SkinForm form)
        {
            Rectangle rect = new Rectangle(Point.Empty, form.Size);

            using (GraphicsPath path = GraphicsPathHelper.CreatePath(
                rect,
                form.Radius,
                form.RoundStyle,
                false))
            {
                return new Region(path);
            }
        }
コード例 #4
0
 public SkinFormControlBoxRenderEventArgs(
     SkinForm form,
     Graphics graphics,
     Rectangle clipRect,
     bool active,
     ControlBoxStyle controlBoxStyle,
     ControlBoxState controlBoxState)
     : base(graphics, clipRect)
 {
     _form = form;
     _active = active;
     _controlBoxState = controlBoxState;
     _controlBoxStyle = controlBoxStyle;
 }
コード例 #5
0
        public ImageButton(Rectangle size, SkinForm Parent)
        {
            this._Size = size;
            _ParentControl = Parent;

            if (_ParentControl.Renderer is IPSSkinRender)
            {
                TitleImage = ((IPSSkinRender)_ParentControl.Renderer).TitleImage;
            }

            if (TitleImage != null)
            {
                _Image = TitleImage.Clone(size, TitleImage.PixelFormat);
                _OverImage = Brightness(_Image,25);
            }
        }
コード例 #6
0
        protected override void OnRenderSkinFormControlBox(
            SkinFormControlBoxRenderEventArgs e)
        {
            SkinForm        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;
            }
        }
コード例 #7
0
        protected override void OnRenderSkinFormBackground(
            SkinFormBackgroundRenderEventArgs e)
        {
            Graphics  g    = e.Graphics;
            Rectangle rect = e.ClipRectangle;
            SkinForm  form = e.SkinForm;

            using (AntiAliasGraphics antiGraphics = new AntiAliasGraphics(g))
            {
                using (Brush brush = new SolidBrush(ColorTable.Back))
                {
                    using (GraphicsPath path = GraphicsPathHelper.CreatePath(
                               rect, form.Radius, form.RoundStyle, false))
                    {
                        g.FillPath(brush, path);
                    }
                }
            }
        }
コード例 #8
0
 public abstract Region CreateRegion(SkinForm form);
コード例 #9
0
 public void Dispose()
 {
     _owner = null;
 }
コード例 #10
0
 public ControlBoxManager(SkinForm owner)
 {
     _owner = owner;
 }
コード例 #11
0
 public override void InitSkinForm(SkinForm form)
 {
     form.BackColor = ColorTable.Back;
 }
コード例 #12
0
 public override void InitSkinForm(SkinForm form)
 {
     form.BackColor = ColorTable.Back;
 }
コード例 #13
0
 public abstract void InitSkinForm(SkinForm  form);
コード例 #14
0
 public abstract void InitSkinForm(SkinForm form);
コード例 #15
0
 public abstract Region CreateRegion(SkinForm form);
コード例 #16
0
 public void Dispose()
 {
     _owner = null;
 }
コード例 #17
0
 public ControlBoxManager(SkinForm owner)
 {
     _owner = owner;
 }