示例#1
0
 /// <summary>
 /// Sets the text
 /// </summary>
 public static ElementData Text(this ElementData elementData, string text)
 {
     elementData.Text = text;
     return(elementData);
 }
示例#2
0
 /// <summary>
 /// Sets the colors
 /// </summary>
 public static ElementData Colors(this ElementData elementData, Color foregroundColor, Color backgroundColor)
 {
     elementData.ForegroundColor = foregroundColor;
     elementData.BackgroundColor = backgroundColor;
     return(elementData);
 }
示例#3
0
 public static ElementData ColumnSpan(this ElementData elementData, int columnSpan)
 {
     elementData.ColumnSpan = columnSpan;
     return(elementData);
 }
示例#4
0
 public static ElementData RowSpan(this ElementData elementData, int rowSpan)
 {
     elementData.RowSpan = rowSpan;
     return(elementData);
 }
示例#5
0
 /// <summary>
 /// Sets the margin size of the Grid class, not supported on other classes
 /// </summary>
 public static ElementData Margin(this ElementData elementData, int width, int height)
 {
     elementData.MarginWidth  = width;
     elementData.MarginHeight = height;
     return(elementData);
 }
示例#6
0
 /// <summary>
 /// Sets the width and height of the Grid class, other elements automatically figure out their size
 /// </summary>
 public static ElementData Size(this ElementData elementData, int width, int height)
 {
     elementData.Width  = width;
     elementData.Height = height;
     return(elementData);
 }
示例#7
0
 /// <summary>
 /// Sets the console target for Grid classes
 /// </summary>
 public static ElementData Target(this ElementData elementData, IConsole target)
 {
     elementData.Target = target;
     return(elementData);
 }
示例#8
0
 /// <summary>
 /// Sets the OnEnterPressed event and parameter for classes that support it
 /// </summary>
 public static ElementData Pressed(this ElementData elementData, EnterPressedDelegate enterPressed, object parameter)
 {
     elementData.Parameter      = parameter;
     elementData.OnEnterPressed = enterPressed;
     return(elementData);
 }
示例#9
0
 /// <summary>
 /// Sets the highlight colors
 /// </summary>
 public static ElementData Highlight(this ElementData elementData, Color foregroundColor, Color backgroundColor)
 {
     elementData.HighlightForegroundColor = foregroundColor;
     elementData.HighlightBackgroundColor = backgroundColor;
     return(elementData);
 }