protected virtual void DrawLink(Graphics gr, Rectangle rect) { if (this.m_Clicking) { gr.DrawRectangle(this.m_BlackPen, rect); } rect.X++; rect.Y++; rect.Width--; rect.Height--; if ((base.TextBackColor != Color.Transparent) || !base.Parent.UseGradient) { gr.FillRectangle(base.m_TextBackBrush, rect); } else if (base.Parent.UseGradient) { Rectangle srcrc = base.Parent.CalculateClientRect(); GradientFill.Fill(gr, rect, srcrc, base.Parent.GradientBackColor); } int num = LinkWidth / 4; int x = (rect.X + num) - 1; int y = (rect.Y + rect.Height) - 5; gr.FillRectangle(this.m_BlackBrush, x, y, 2, 2); x += num; gr.FillRectangle(this.m_BlackBrush, x, y, 2, 2); x += num; gr.FillRectangle(this.m_BlackBrush, x, y, 2, 2); }
protected override void Draw(Graphics gr, int yOffset, int parentWidth) { Resco.Controls.DetailView.DetailView parent = base.Parent; if (parent != null) { Rectangle rectangle = parent.CalculateClientRect(); int height = this.Height; if (height > 0) { yOffset = rectangle.Y + ((parent.PagesLocation == RescoPagesLocation.Top) ? 0 : (rectangle.Height - height)); if ((base.LabelBackColor != Color.Transparent) || !parent.UseGradient) { gr.FillRectangle(base.m_LabelBackBrush, rectangle.X, yOffset, rectangle.Width, height); } else if (parent.UseGradient) { Rectangle dstrc = new Rectangle(rectangle.X, yOffset, rectangle.Width, height); Rectangle srcrc = rectangle; GradientFill.Fill(gr, dstrc, srcrc, base.Parent.GradientBackColor); } switch (this.PageStyle) { case RescoPageStyle.TabStrip: this.DrawTabStrip(gr, rectangle.X, yOffset, rectangle.Width, height); return; case RescoPageStyle.Dots: this.DrawDots(gr, rectangle.X, yOffset, rectangle.Width, height); return; } this.DrawArrows(gr, rectangle.X, yOffset, rectangle.Width, height); } } }
public void DrawGradient(Graphics gr, Rectangle rc) { GradientFill.Fill(gr, rc, rc, this); }