public void Render(RenderWindowLineEngine renderLineEngine, int lineNo, int width) { if (lineNo == 0) { renderLineEngine.Write(" " + Header); } if (lineNo == 2) { renderLineEngine.Write(" "); renderLineEngine.ChangeForegroundColor(ConsoleColor.White); renderLineEngine.ChangeBackgroundColor(ConsoleColor.Black); renderLineEngine.Write(_value.ValueToRender); renderLineEngine.ResetColor(); } if (lineNo == 4) { renderLineEngine.WriteCentred(this, EnterEscapePhrase); } CursorY = 2; CursorX = 5 + _value.CursorPosition; }
public void Render(RenderWindowLineEngine renderLineEngine, int lineNo, int width) { if (_activeNoteBook == null) { return; } var page = PagesRepository.Get(_activeNoteBook.Id, lineNo); if (page != null) { if (SelectedIndex == lineNo) { if (IsActive) { renderLineEngine.ChangeBackgroundColor(ConsoleColor.DarkMagenta); } renderLineEngine.Write("[" + page.Name + "]"); CursorY = lineNo; } else { renderLineEngine.Write(" " + page.Name + " "); } } }
public void Render(RenderWindowLineEngine renderLineEngine, int lineNo, int width) { var textDataSource = _textAreaDataSource; if (textDataSource == null) { return; } if (lineNo == Height - 1) { renderLineEngine.ChangeBackgroundColor(ConsoleColor.White); renderLineEngine.ChangeForegroundColor(ConsoleColor.Black); renderLineEngine.Write($"Position:{GetTextXPosition()}; Line: {GetTextYPosition()}; Lines Count: {textDataSource.GetLinesCount()}"); return; } var textLine = GetTextLineByScreenLine(lineNo); var line = textDataSource.GetLine(textLine); line = ApplyOffsetToLine(line); if (line != null) { renderLineEngine.Write(line); } }
public void Render(RenderWindowLineEngine renderLineEngine, int lineNo, int width) { var notebook = NotebooksRepository.Get(lineNo); if (notebook != null) { if (SelectedIndex == lineNo) { if (IsActive) { renderLineEngine.ChangeBackgroundColor(ConsoleColor.DarkYellow); } renderLineEngine.Write("[" + notebook.Name + "]"); CursorY = lineNo; } else { renderLineEngine.Write(" " + notebook.Name + " "); } } }