Esempio n. 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);
        }
 public SkinFormCaptionRenderEventArgs(
     SkinForm skinForm,
     Graphics g,
     Rectangle clipRect,
     bool active)
     : base(g, clipRect)
 {
     _skinForm = skinForm;
     _active = active;
 }
Esempio n. 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);
            }
        }
 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;
 }
Esempio n. 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);
            }
        }
        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;
            }
        }
        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);
                    }
                }
            }
        }
Esempio n. 8
0
 public abstract Region CreateRegion(SkinForm form);
Esempio n. 9
0
 public void Dispose()
 {
     _owner = null;
 }
Esempio n. 10
0
 public ControlBoxManager(SkinForm owner)
 {
     _owner = owner;
 }
 public override void InitSkinForm(SkinForm form)
 {
     form.BackColor = ColorTable.Back;
 }
Esempio n. 12
0
 public override void InitSkinForm(SkinForm form)
 {
     form.BackColor = ColorTable.Back;
 }
Esempio n. 13
0
 public abstract void InitSkinForm(SkinForm  form);
Esempio n. 14
0
 public abstract void InitSkinForm(SkinForm form);
Esempio n. 15
0
 public abstract Region CreateRegion(SkinForm form);
Esempio n. 16
0
 public void Dispose()
 {
     _owner = null;
 }
Esempio n. 17
0
 public ControlBoxManager(SkinForm owner)
 {
     _owner = owner;
 }