private void SplitTerminal(Orientation orientation) { if (FocusedTerminal != null) { var parent = FocusedTerminal.Parent; var container = new ConsoleContainer(orientation); parent.Controls.Add(container); parent.Controls.Remove(FocusedTerminal); container.Panel1.Controls.Add(FocusedTerminal); var terminal = CreateNewTerminal(); container.Panel2.Controls.Add(terminal); terminal.HasFocus = true; } }