Esempio n. 1
0
 private void SubscribeEntryToKeyprocessor()
 {
     keyProcessor.KeyPressed += (sender, ch) => EntryPoint.AddEntry(ch);
     keyProcessor.BackSpace  += (sender, args) => EntryPoint.DeleteEntry();
     keyProcessor.Delete     += (sender, args) => EntryPoint.DeleteEntryAfterCursor();
     keyProcessor.Left       += (sender, args) => EntryPoint.Cursor.Left();
     keyProcessor.Right      += (sender, args) => EntryPoint.Cursor.Right();
     keyProcessor.Up         += (sender, args) => EntryPoint.PeekNext();
     keyProcessor.Down       += (sender, args) => EntryPoint.PeekPrevious();
     keyProcessor.Insert     += (sender, args) =>
     {
         var entry = EntryPoint.Flush();
     };
     EntryPoint.OnFlushedEntry += async(sender, command) =>
     {
         window.AddCellRange(appender.Cells());
         await terminal.ExecuteCommand(command);
     };
 }