private string BuildFullRow(string title, string definition) { title = ConsoleBasicDraw.RepresentObjectAsString(title, titleWidth); string paddingFillString = this.BuildPaddingFillString(title, definition); return(String.Concat(title, paddingFillString, definition)); }
public static void DrawFlatText(string message, int topMargin, ConsoleColor background, ConsoleColor foreground) { ConsoleBasicDraw.FillRow(topMargin, background); message = ConsoleBasicDraw.RepresentObjectAsString(message, Console.WindowWidth); ConsoleBasicDraw.DrawText(message, 1, topMargin, background, foreground); }
private void DrawElement(int index) { int lineNumber = index + this.TopMargin; string text = this.Values[index]; ConsoleBasicDraw.DrawFlatText(text, lineNumber, this.Background, this.Foreground); }
private void DrawSelectedElement(int prevIndex) { this.DrawElement(prevIndex); string text = this.Values[this.SelectedIndex]; int lineNumber = this.SelectedIndex + this.TopMargin; ConsoleBasicDraw.DrawFlatText(text, lineNumber, this.Foreground, this.Background); }
public static void DrawFlatBox(int topMargin, int height, ConsoleColor background) { int lastRow = height + topMargin + 1; for (int row = topMargin + 1; row < lastRow; row++) { ConsoleBasicDraw.FillRow(row, background); } }
public void Draw(string title, params string[] arguments) { string definition = this.BuildDefinitionValue(arguments); string message = this.BuildFullRow(title, definition); ConsoleBasicDraw.DrawFlatText(message, this.currentLine, ConsoleColor.White, ConsoleColor.Black); this.currentLine++; }
private string BuildDefinitionValue(params string[] arguments) { string definition = String.Join(", ", arguments); return(ConsoleBasicDraw.RepresentObjectAsString(definition, definitionWidth)); }