Exemplo n.º 1
0
		public virtual void Paint(Pad Pad, double MinX, double MaxX, double MinY, double MaxY)
		{
			float height = this.qUZomVYuoh(Pad);
			float width = this.MhmouvgBhg(Pad);
			float x = 0.0f;
			float y = 0.0f;
			switch (this.Position)
			{
				case ETextBoxPosition.TopRight:
					x = (float)(Pad.ClientX() + Pad.ClientWidth() - this.X) - width;
					y = (float)(Pad.ClientY() + this.X);
					break;
				case ETextBoxPosition.TopLeft:
					x = (float)(Pad.ClientX() + this.X);
					y = (float)(Pad.ClientY() + this.Y);
					break;
				case ETextBoxPosition.BottomRight:
					x = (float)(Pad.ClientX() + Pad.ClientWidth() - this.X) - width;
					y = (float)(Pad.ClientY() + Pad.ClientHeight() - this.Y) - height;
					break;
				case ETextBoxPosition.BottomLeft:
					x = (float)(Pad.ClientX() + this.X);
					y = (float)(Pad.ClientY() + Pad.ClientHeight() - this.Y) - height;
					break;
			}
			Pad.Graphics.FillRectangle(new SolidBrush(this.BackColor), x, y, width, height);
			if (this.BorderEnabled)
				Pad.Graphics.DrawRectangle(new Pen(this.BorderColor), x, y, width, height);
			foreach (TTextBoxItem ttextBoxItem in this.items)
			{
				int num = (int)Pad.Graphics.MeasureString(ttextBoxItem.Text, ttextBoxItem.Font).Height;
				Pad.Graphics.DrawString(ttextBoxItem.Text, ttextBoxItem.Font, new SolidBrush(ttextBoxItem.Color), x + 5f, y);
				y += (float)(2 + num);
			}
		}