public static void Main(string[] args) { Curses Curses = new Curses(); Curses.Print(10, 10, "Hello, curses!"); Curses.Refresh(); char c = Curses.GetChar(); Curses = null; }
private static void Curses_ReadKeyEvent(object sender, ReadKeyEventArgs e) { //Curses.Write(Guid.NewGuid().ToString(), e.KeyInfo.Key.ToString(), 1, 1); var currKey = e.KeyInfo.Key.ToString() + "/" + e.KeyInfo.Modifiers.ToString(); Curses.Write("currKey", currKey, 1, 1); history[i] = e.KeyInfo.KeyChar.ToString(); Curses.Write("history", string.Join(",", history), 1, 2, fg: ConsoleColor.Black, bg: ConsoleColor.Green); Curses.Refresh(); i = (i >= history.Length - 1) ? 0 : i + 1; }
static void myrefresh() { Curses.Sleep(200); Curses.Move(Curses.Lines - 1, Curses.Cols - 1); Curses.Refresh(); }