/// <summary> /// Sets the background color in <see cref="Console"/>. /// </summary> /// <param name="color">A specified <see cref="TWidgetColor"/>.</param> public void SetBackgroundColor(TWidgetColor color) { if (TWidgetColor.System == color) { Console.BackgroundColor = (ConsoleColor)this.WindowBackgroundColor; } else { Console.BackgroundColor = (ConsoleColor)(int)color; } }
/// <summary> /// Initializes an instance of <see cref="TWidgetBase"/>. /// </summary> /// <param name="id">The identifier of the widget.</param> public TWidgetBase(string id) { this.Id = id; this.Position = Position.Relative; this.TextAlign = Align.Left; this.Margin = new Margin(); this.ForegroundColor = TWidgetColor.System; this.BackgroundColor = TWidgetColor.System; }