/* * DrawTabBody */ /// <summary> /// </summary> /// <param name="paintParams"></param> /// <exception cref="ArgumentNullException"> /// <para> /// <paramref name="paintParams"/> is <see langword="null"/>. /// </para> /// </exception> public void DrawTabBody(NuGenTabBodyPaintParams paintParams) { if (paintParams == null) { throw new ArgumentNullException("paintParams"); } Graphics g = paintParams.Graphics; Rectangle bounds = paintParams.Bounds; this.DrawBackground(g, bounds, NuGenControlState.Normal); this.DrawBorder(g, NuGenControlPaint.BorderRectangle(bounds), NuGenControlState.Normal); }
/* * DrawTabBody */ /// <summary> /// </summary> /// <exception cref="ArgumentNullException"> /// <para> /// <paramref name="paintParams"/> is <see langword="null"/>. /// </para> /// </exception> public void DrawTabBody(NuGenTabBodyPaintParams paintParams) { if (paintParams == null) { throw new ArgumentNullException("paintParams"); } Debug.Assert(paintParams.Graphics != null, "tabPageParams.Graphics != null"); switch (paintParams.FlatStyle) { case FlatStyle.Flat: case FlatStyle.Popup: { if (Application.RenderWithVisualStyles) { this.DrawTabBodyFlatUsingVisualStyles(paintParams.Graphics, paintParams.Bounds); } else { this.DrawTabBodyFlat(paintParams.Graphics, paintParams.Bounds); } break; } case FlatStyle.Standard: case FlatStyle.System: { if (Application.RenderWithVisualStyles) { this.DrawTabBodyUsingVisualStyles(paintParams.Graphics, paintParams.Bounds); } else { this.DrawTabBodyNotched(paintParams.Graphics, paintParams.Bounds); } break; } } }
/* * DrawTabBody */ /// <summary> /// </summary> /// <exception cref="ArgumentNullException"> /// <para> /// <paramref name="paintParams"/> is <see langword="null"/>. /// </para> /// </exception> public void DrawTabBody(NuGenTabBodyPaintParams paintParams) { if (paintParams == null) { throw new ArgumentNullException("paintParams"); } Debug.Assert(paintParams.Graphics != null, "tabPageParams.Graphics != null"); switch (paintParams.FlatStyle) { case FlatStyle.Flat: case FlatStyle.Popup: { if (Application.RenderWithVisualStyles) { this.DrawTabBodyFlatUsingVisualStyles(paintParams.Graphics, paintParams.Bounds); } else { this.DrawTabBodyFlat(paintParams.Graphics, paintParams.Bounds); } break; } case FlatStyle.Standard: case FlatStyle.System: { if (Application.RenderWithVisualStyles) { this.DrawTabBodyUsingVisualStyles(paintParams.Graphics, paintParams.Bounds); } else { this.DrawTabBodyNotched(paintParams.Graphics, paintParams.Bounds); } break; } } }
/* * OnPaint */ /// <summary> /// Raises the <see cref="E:System.Windows.Forms.Control.Paint"></see> event. /// </summary> /// <param name="e">A <see cref="T:System.Windows.Forms.PaintEventArgs"></see> that contains the event data.</param> protected override void OnPaint(PaintEventArgs e) { Debug.Assert(this.TabRenderer != null, "this.TabRenderer != null"); NuGenTabBodyPaintParams tabPageParams = new NuGenTabBodyPaintParams(e.Graphics, this.TabPageBounds); tabPageParams.FlatStyle = this.FlatStyle; this.TabRenderer.DrawTabBody(tabPageParams); }