public override void Draw() { if (ContainingApp == null) { return; } RemoveCursor(); string clippedPath; if (Selected) { clippedPath = ' ' + Text.PadRight(Width + _offset, ' ').Substring(_offset, Width - 2); } else { clippedPath = ' ' + Text.PadRight(Width, ' ').Substring(0, Width - 2); } ContainingApp.WirteText(clippedPath + " ", Origin.X, Origin.Y, TEXT_COLOR, BACKGROUND_COLOR); if (Selected) { ShowCursor(); } }
public void Draw() { if (ContainingApp == null) { return; } ContainingApp.WirteText(_letterUnderCursor.ToString(), Origin.X, Origin.Y, _foregroundColor, _backgroundColor); }
public override void Draw() { if (ContainingApp == null) { return; } ContainingApp.WirteText(Text, Origin.X, Origin.Y, TextColour, BackgroundColour); }
public override void Draw() { if (ContainingApp == null) { return; } base.Draw(); ContainingApp.DrawColorBlock(TitleBarColour, X, Y, X + 1, Y + Width); //Title Bar ContainingApp.WirteText(' ' + Title + ' ', X, Y + 2, TitleColour, BackgroundColor); }
public override void Draw() { if (ContainingApp == null) { return; } if (Selected) { ContainingApp.WirteText("<" + Text + ">", Origin.X, Origin.Y, SELECTED_TEXT_COLOR, SELECTED_BACKGROUND_COLOR); } else { ContainingApp.WirteText("<" + Text + ">", Origin.X, Origin.Y, TEXT_COLOR, BACKGROUND_COLOR); } }
public override void Draw() { if (ContainingApp == null) { return; } if (Selected) { ContainingApp.WirteText('[' + Text + ']', Origin.X, Origin.Y, SelectedTextColour, SelectedBackgroundColour); } else { ContainingApp.WirteText('[' + Text + ']', Origin.X, Origin.Y, TextColour, BackgroudColour); } }
public override void Draw() { if (ContainingApp == null) { return; } var paddedText = ('[' + Text + ']').PadRight(Width, ' '); if (Selected) { ContainingApp.WirteText(paddedText, Origin.X, Origin.Y, SelectedTextColour, SelectedBackgroundColour); } else { ContainingApp.WirteText(paddedText, Origin.X, Origin.Y, TextColour, BackgroudColour); } }
public override void Draw() { if (ContainingApp == null) { return; } var Char = Checked ? "X" : " "; if (Selected) { ContainingApp.WirteText('[' + Char + ']', X, Y, SelectedTextColour, SelectedBackgroundColour); } else { ContainingApp.WirteText('[' + Char + ']', X, Y, TextColour, BackgroundColour); } }
public override void Draw() { if (ContainingApp == null) { return; } var paddedText = Text.PadRight(Length - 2, ' ').Substring(0, Length - 2); if (Selected) { ContainingApp.WirteText('[' + paddedText + '▼' + ']', X, Y, SelectedTextColour, SelectedBackgroundColour); } else { ContainingApp.WirteText('[' + paddedText + '▼' + ']', X, Y, TextColour, BackgroudColour); } }
public override void Draw() { if (ContainingApp == null) { return; } RemoveCursor(); UpdateCursorDisplayPostion(); var lines = _splitText; //Draw test area for (var i = _offset; i < Height + _offset; i++) { var line = ' ' + "".PadRight(Width - 1, ' '); if (lines.Count > i) { line = ' ' + RemoveNewLine(lines[i]).PadRight(Width - 1, ' '); } ContainingApp.WirteText(line, i + Origin.X - _offset, Origin.Y, TEXT_COLOR, BackgroundColour); } if (_selected) { ShowCursor(); } //Draw Scroll Bar ContainingApp.DrawColorBlock(ConsoleColor.White, Origin.X + Width, Origin.Y, Origin.X + Width + 1, Origin.Y + Height); double linesPerPixel = (double)lines.Count() / (Height); var postion = 0; if (linesPerPixel > 0) { postion = (int)Math.Floor(_cursorDisplayX / linesPerPixel); } ContainingApp.WirteText("■", Origin.X + postion, Origin.Y + Width, ConsoleColor.DarkGray, ConsoleColor.White); }
override public void Draw() { if (ContainingApp == null) { return; } ParentWindow.ContainingApp.DrawColorBlock(BackgroundColour, X, Y, X + Height, Y + Width); if (!ShowingDrive) { var trimedPath = CurrentPath.PadRight(Width - 2, ' '); trimedPath = trimedPath.Substring(trimedPath.Count() - Width + 2, Width - 2); ContainingApp.WirteText(trimedPath, X, Y + 1, ConsoleColor.Gray, BackgroundColour); } else { ContainingApp.WirteText("Drives", X, Y + 1, ConsoleColor.Gray, BackgroundColour); } if (!ShowingDrive) { var i = Offset; while (i < Math.Min(Folders.Count, Height + Offset - 1)) { var folderName = Folders[i].PadRight(Width - 2, ' ').Substring(0, Width - 2); if (i == CursorX) { if (Selected) { ContainingApp.WirteText(folderName, X + i - Offset + 1, Y + 1, SelectedTextColour, SelectedBackgroundColour); } else { ContainingApp.WirteText(folderName, X + i - Offset + 1, Y + 1, SelectedTextColour, BackgroundColour); } } else { ContainingApp.WirteText(folderName, X + i - Offset + 1, Y + 1, TextColour, BackgroundColour); } i++; } while (i < Math.Min(Folders.Count + FileNames.Count, Height + Offset - 1)) { var fileName = FileNames[i - Folders.Count].PadRight(Width - 2, ' ').Substring(0, Width - 2); if (i == CursorX) { if (Selected) { ContainingApp.WirteText(fileName, X + i - Offset + 1, Y + 1, SelectedTextColour, SelectedBackgroundColour); } else { ContainingApp.WirteText(fileName, X + i - Offset + 1, Y + 1, SelectedTextColour, BackgroundColour); } } else { ContainingApp.WirteText(fileName, X + i - Offset + 1, Y + 1, TextColour, BackgroundColour); } i++; } } else { for (var i = 0; i < Drives.Count(); i++) { if (i == CursorX) { if (Selected) { ContainingApp.WirteText(Drives[i], X + i - Offset + 1, Y + 1, SelectedTextColour, SelectedBackgroundColour); } else { ContainingApp.WirteText(Drives[i], X + i - Offset + 1, Y + 1, SelectedTextColour, BackgroundColour); } } else { ContainingApp.WirteText(Drives[i], X + i - Offset + 1, Y + 1, TextColour, BackgroundColour); } } } }