public SkinFormBackgroundRenderEventArgs( SkinFormCtl skinForm, Graphics g, Rectangle clipRect) : base(g, clipRect) { _skinForm = skinForm; }
protected override void OnRenderSkinFormCaption( SkinFormCaptionRenderEventArgs e) { Graphics g = e.Graphics; Rectangle rect = e.ClipRectangle; SkinFormCtl form = e.SkinForm; Rectangle iconRect = form.IconRect; Rectangle textRect = Rectangle.Empty; bool closeBox = form.ControlBox; bool minimizeBox = form.ControlBox && form.MinimizeBox; bool maximizeBox = form.ControlBox && form.MaximizeBox; int textWidthDec = 0; if (closeBox) { textWidthDec += form.CloseBoxSize.Width + form.ControlBoxOffset.X; } if (maximizeBox) { textWidthDec += form.MaximizeBoxSize.Width + form.ControlBoxSpace; } if (minimizeBox) { textWidthDec += form.MinimizeBoxSize.Width + form.ControlBoxSpace; } textRect = new Rectangle( iconRect.Right + 3, form.BorderWidth, rect.Width - iconRect.Right - textWidthDec - 6, rect.Height - form.BorderWidth); using (AntiAliasGraphics antiGraphics = new AntiAliasGraphics(g)) { DrawCaptionBackground( g, rect, e.Active); if (form.ShowIcon && form.Icon != null) { DrawIcon(g, iconRect, form.Icon); } if (!string.IsNullOrEmpty(form.Text)) { DrawCaptionText( g, textRect, form.Text, form.CaptionFont); } } }
public SkinFormCaptionRenderEventArgs( SkinFormCtl skinForm, Graphics g, Rectangle clipRect, bool active) : base(g, clipRect) { _skinForm = skinForm; _active = active; }
public override Region CreateRegion(SkinFormCtl 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( SkinFormCtl form, Graphics graphics, Rectangle clipRect, bool active, ControlBoxStyle controlBoxStyle, ControlBoxState controlBoxState) : base(graphics, clipRect) { _form = form; _active = active; _controlBoxState = controlBoxState; _controlBoxStyle = controlBoxStyle; }
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; } }
protected override void OnRenderSkinFormBackground( SkinFormBackgroundRenderEventArgs e) { Graphics g = e.Graphics; Rectangle rect = e.ClipRectangle; SkinFormCtl 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); } } } }
public override void InitSkinForm(SkinFormCtl form) { form.BackColor = ColorTable.Back; }
public abstract void InitSkinForm(SkinFormCtl form);
public abstract Region CreateRegion(SkinFormCtl form);
public void Dispose() { _owner = null; }
public ControlBoxManager(SkinFormCtl owner) { _owner = owner; }