private void Init(string c, GBitmap t) { this.Capture = c; this.Thumbnail = t; this.Width = Thumbnail.Width; this.Height = Thumbnail.Height + GFont.GetLetterDimension(1) + 10; }
public override void Render(GBitmap screen) { if (IsFocused) { if (_isLastAddition > 0) { GFont.Write(screen, "<", 2, X, Y); GFont.Write(screen, " >", 1, X, Y + GFont.GetLetterDimension(2) / 4); } else if (_isLastSubtraction > 0) { GFont.Write(screen, "<", 1, X, Y + GFont.GetLetterDimension(2) / 4); GFont.Write(screen, " >", 2, X, Y); } else { GFont.Write(screen, "< >", 2, X, Y); } } int xOffset = 0; if (Value.ToString().Length < 3) { xOffset = GFont.GetStringWidth(" ", 2) / 2; } if (Value.ToString().Length < 2) { xOffset += GFont.GetStringWidth(" ", 2) / 2; } GFont.Write(screen, " " + Value, 2, X + xOffset, Y); }