SidebarLibrary.WinControls.OutlookBar.DrawHeader C# (CSharp) 메소드

DrawHeader() 개인적인 메소드

private DrawHeader ( Graphics g, int index, Rectangle rc, Border3DStyle style ) : void
g System.Drawing.Graphics
index int
rc System.Drawing.Rectangle
style Border3DStyle
리턴 void
		void DrawHeader(Graphics g, int index, Rectangle rc, Border3DStyle style)
		{
			string bandName = bands[index].Text;
			using (Brush b = new SolidBrush(ColorUtil.VSNetControlColor))
			{
				g.FillRectangle(b, rc);
			}

			if (ColorUtil.UsingCustomColor)
			{
				if (style == Border3DStyle.RaisedInner)
				{
					using (var p = new Pen(ColorUtil.VSNetBorderColor))
						g.DrawRectangle(p, rc.Left, rc.Top, rc.Width - 1, rc.Height - 1);
				}
				else
				{
					using (Brush fillColor = new SolidBrush(ColorUtil.VSNetSelectionColor))
						g.FillRectangle(fillColor, rc);
					using (var p = new Pen(ColorUtil.VSNetBorderColor))
						g.DrawRectangle(p, rc.Left, rc.Top, rc.Width - 1, rc.Height - 1);
				}
			}
			else
			{
				ControlPaint.DrawBorder3D(g, rc, style);
			}
			using (StringFormat stringFormat = new StringFormat())
			{
				stringFormat.LineAlignment = StringAlignment.Center;
				stringFormat.Alignment = StringAlignment.Center;
				g.DrawString(bandName, Font, SystemBrushes.WindowText, rc, stringFormat);
			}
		}