goblinfactory / konsole

Home of the simple console library consisting of ProgressBar, Window, Form, Draw & MockConsole (C# console progress bar with support for single or multithreaded progress updates) Window is a 100%-ish console compatible window, supporting all normal console writing to a windowed section of the screen, supporting scrolling and clipping of console output.
718 stars 62 forks source link

List View and Form View #54

Open goblinfactory opened 4 years ago

goblinfactory commented 4 years ago

List view to allow you to render a list of entities in window X. Form view to allow you to specify that a selected item on a list, is rendered inside window Y.

example

var window = new Window();
var listWin = window.SplitLeft("accounts");
var formWin = window.SplitRight("Form View");
var list = new ListView(listWin, accountService.Accounts); // convention based automatic select fields
list.OnSelect(item  => { formWin.Clear(); new Form(formWin).Write(item));
view.Run();