示例#1
0
		public Button(string text, Position position, Position size, Rectangle container, string id, bool disable = false, ExitType exitType = ExitType.Center)
		{
			Text = text;
			this.Id = id;
			this.Position = position;
			this.Size = size;
			this.Disabled = disable;
			this.Selected = false;
			this.ExitType = exitType;
			ApplyContainer (container);
		}
示例#2
0
 public Space(Position position, Rectangle container, ExitType exitType, int length = 5)
     : base("space", position, new Position(length,1), container, "Space", false, exitType)
 {
 }
示例#3
0
 public Shift(Position position, Rectangle container, ExitType exitType, bool small = true)
     : base("Shift", position, small ? new Position(3,1) : new Position(2,2), container, "Shift", false, exitType)
 {
     this.small = small;
     arrowRect = new Rectangle (new Point (outherBox.P1.X + 3 * characterEdge, outherBox.P1.Y + 2 * characterEdge), new Point (outherBox.P1.X + 14 * characterEdge, outherBox.P2.Y - 7 * characterEdge));
     if (!small)
     {
         arrowRect = new Rectangle (new Point (arrowRect.P1.X, arrowRect.P1.Y), new Point (arrowRect.P2.X, arrowRect.P1.Y + (arrowRect.P2.Y - arrowRect.P1.Y)/2 - 2 * characterEdge));
         arrowRect = arrowRect + new Point (7, 0);
     }
     lineStart = new Point(arrowRect.P1.X + ((arrowRect.P2.X - arrowRect.P1.X) / 2), arrowRect.P2.Y);
     lineLength = (innerBox.P2.Y - lineStart.Y)  - 2 * characterEdge;
     if (small)
     {
         lineLength = (innerBox.P2.Y - lineStart.Y)  - 2 * characterEdge;
         textDisplacement = new Point (10, 6);
     }
     else
     {
         lineLength = (innerBox.P2.Y - lineStart.Y)/3;
         textDisplacement = new Point (5, 14);
     }
 }
示例#4
0
 public Select(Position position, Rectangle container, bool next)
     : base("", position, new Position(1,1), container, next ? "SelectNext" : "SelectPrev")
 {
     arrowOrientation = next ? Lcd.ArrowOrientation.Right : Lcd.ArrowOrientation.Left;
     arrowRect = new Rectangle (new Point (outherBox.P1.X + 3 * characterEdge, outherBox.P1.Y + 3 * characterEdge), new Point (outherBox.P2.X - 3 * characterEdge, outherBox.P2.Y - 3 * characterEdge));
 }
示例#5
0
 public Ok(Position position, Rectangle container, ExitType exitType, Position size)
     : base("Ok", position, size, container, "Ok", false, exitType)
 {
 }
示例#6
0
 public Ok(Position position, Rectangle container, ExitType exitType)
     : this(position, container, exitType, new Position(2,1))
 {
 }
示例#7
0
 public Letter(string text, Position position, Rectangle container)
     : base(text, position, new Position(1, 1), container, "Letter")
 {
 }
示例#8
0
 public Enter(Position position, Rectangle container, ExitType exitType)
     : base("", position, new Position(2,1), container, "Enter", false, exitType)
 {
     arrowRect = new Rectangle (new Point (outherBox.P1.X + characterEdge, outherBox.P1.Y + 4 * characterEdge), new Point (outherBox.P2.X - ((outherBox.P2.X - outherBox.P1.X)/2) - 3* characterEdge, outherBox.P2.Y - 3 * characterEdge));
 }
示例#9
0
		public TextButton(string startText, Position position, Position size, Rectangle container): base (startText, position, size, container, "Text",true, ExitType.Center)
		{
			textCenterPoint = new Point (innerBox.P1.X + characterEdge *2, textCenterPoint.Y);


		}