Пример #1
0
        public static void FillBackground(Graphics graphics, BaseStyleDecorator decorator)
        {
            if (decorator.BackColor != GlobalValues.DefaultBackColor)
            {
                RectangleShape backgroundShape = new RectangleShape();

                backgroundShape.FillShape(graphics,
                                          new SolidFillPattern(decorator.BackColor),
                                          decorator.DisplayRectangle);
            }
        }
Пример #2
0
		public static void FillBackground (Graphics  graphics,BaseStyleDecorator decorator)
		{
			if (decorator.BackColor != GlobalValues.DefaultBackColor) {
				
				RectangleShape backgroundShape = new RectangleShape();
				
				backgroundShape.FillShape(graphics,
				                          new SolidFillPattern(decorator.BackColor),
				                          decorator.DisplayRectangle);
			}
		}
Пример #3
0
        public override void Draw(Graphics graphics)
        {
            if (graphics == null)
            {
                throw new ArgumentNullException("graphics");
            }

            Rectangle rect = new Rectangle(this.ClientRectangle.Left, this.ClientRectangle.Top,
                                           this.ClientRectangle.Right - 1,
                                           this.ClientRectangle.Bottom - 1);

            backgroundShape.FillShape(graphics,
                                      new SolidFillPattern(this.BackColor),
                                      rect);
            Border b = new Border(new BaseLine(this.ForeColor, System.Drawing.Drawing2D.DashStyle.Solid, 1));

            DrawFrame(graphics, b);

            shape.DrawShape(graphics,
                            this.Baseline(),
                            rect);
        }