public void CreateRepl(string replPath, string projectPath) { var interactiveText = ReplUserInterfaceFactory.CreateInteractiveText(); var closeButton = ReplUserInterfaceFactory.CreateCloseButton(); var name = ReplUserInterfaceFactory.CreateTabLabel(); var grid = ReplUserInterfaceFactory.CreateTextBoxGrid(interactiveText); var headerPanel = ReplUserInterfaceFactory.CreateHeaderPanel(name, closeButton); var tabItem = ReplUserInterfaceFactory.CreateTabItem(headerPanel, grid); var replProcess = CreateReplProcess(replPath, projectPath); var replEntity = new Entity <ReplState> { CurrentState = new ReplState() }; WireUpTheTextBoxInputToTheReplProcess(interactiveText, replProcess, replEntity); WireUpTheOutputOfTheReplProcessToTheTextBox(interactiveText, replProcess, replEntity); WireUpTheReplEditorCommandsToTheEditor(interactiveText, replProcess, replEntity, tabItem); closeButton.Click += (o, e) => { replProcess.Kill(); _replManager.Items.Remove(tabItem); }; _replManager.Items.Add(tabItem); _replManager.SelectedItem = tabItem; }
public ReplToolWindow() : this(ReplUserInterfaceFactory.CreateTabControl()) { }