/// <summary> /// /// </summary> /// <param name="e"></param> protected override void OnRenderSkinFormBackground(SkinFormBackgroundRenderEventArgs e) { Graphics g = e.Graphics; Rectangle rect = e.ClipRectangle; SkinForm form = e.SkinForm; using (FormAntiAliasGraphics antiGraphics = new FormAntiAliasGraphics(g)) { int bc = int.Parse(this.ColorTable.BaseColor.B.ToString()); int gc = int.Parse(this.ColorTable.BaseColor.G.ToString()); int rc = int.Parse(this.ColorTable.BaseColor.R.ToString()); using (LinearGradientBrush brush = new LinearGradientBrush(rect, this.ColorTable.BaseColor, this.GetUndertoneColor(rc, gc, bc), 90f, true)) { using (GraphicsPath path = FormGraphicsPathHelper.CreatePath(rect, form.Radius, form.RoundStyle, false)) { g.FillPath(brush, path); } } } }
/// <summary> /// /// </summary> /// <param name="e"></param> public void DrawSkinFormBackground(SkinFormBackgroundRenderEventArgs e) { this.OnRenderSkinFormBackground(e); SkinFormBackgroundRenderEventHandler handle = Events[EventRenderSkinFormBackground] as SkinFormBackgroundRenderEventHandler; if (handle != null) { handle(this, e); } }
protected abstract void OnRenderSkinFormBackground(SkinFormBackgroundRenderEventArgs e);