private static void WireUpTheTextBoxInputToTheReplProcess(TextBox replTextBox, Process replProcess, Entity <ReplState> replEntity) { var inputKeyHandler = new InputKeyHandler(new KeyboardExaminer(), replEntity, replTextBox, new ReplWriter(replProcess, new TextBoxWriter(replTextBox, replEntity))); var history = new History(new KeyboardExaminer(), replEntity, replTextBox); replTextBox.PreviewKeyDown += history.PreviewKeyDown; replTextBox.PreviewTextInput += inputKeyHandler.PreviewTextInput; replTextBox.PreviewKeyDown += inputKeyHandler.PreviewKeyDown; }
private static void WireUpTheTextBoxInputToTheReplProcess(TextBox replTextBox, Process replProcess, Entity<ReplState> replEntity) { var inputKeyHandler = new InputKeyHandler(new KeyboardExaminer(), replEntity, replTextBox, new ReplWriter(replProcess, new TextBoxWriter(replTextBox, replEntity))); var history = new History(new KeyboardExaminer(), replEntity, replTextBox); replTextBox.PreviewKeyDown += history.PreviewKeyDown; replTextBox.PreviewTextInput += inputKeyHandler.PreviewTextInput; replTextBox.PreviewKeyDown += inputKeyHandler.PreviewKeyDown; }