private void EnsureToolWindowContainer() { if (toolWindowContainer == null) { toolWindowContainer = new ToolWindowContainer(this); toolWindowContainer.Visible = true; } }
public void SetNullControl() { var pane = new ShellToolWindowPane(MockRepository.GenerateStub<IServiceProvider>()); var container = new ToolWindowContainer(pane); container.ToolWindow = null; Assert.IsNull(container.ToolWindow); Assert.Count(0, container.Controls); }
public void ObtainsPaneFromContainer() { var pane = new ShellToolWindowPane(MockRepository.GenerateStub<IServiceProvider>()); var container = new ToolWindowContainer(pane); var window = new MyConcreteShellToolWindowControl(); container.ToolWindow = window; Assert.AreSame(pane, window.ToolWindowPane); }
public void SetControlOk() { var pane = new ShellToolWindowPane(MockRepository.GenerateStub<IServiceProvider>()); var container = new ToolWindowContainer(pane); var control = new MyConcreteToolWindow(); container.ToolWindow = control; Assert.AreSame(control, container.ToolWindow); Assert.IsTrue(container.Controls.Contains(control)); Assert.AreEqual(DockStyle.Fill, control.Dock); }
/// <inheritdoc /> protected override void OnParentChanged(EventArgs e) { base.OnParentChanged(e); ToolWindowContainer toolWindowContainer = Parent as ToolWindowContainer; if (toolWindowContainer != null) { toolWindowPane = toolWindowContainer.ToolWindowPane; } else { toolWindowPane = null; } }