private void ActivateDockElement(DockableWindow dockElement, InterfaceActivationEventArgs e) { if (dockElement.DockSituation != DockSituation.None) { if (!dockElement.IsOpen) { dockElement.Open(); } dockElement.Activate(); e.Handled = true; } }
private void ActivateDockElement(Type panelType, InterfaceActivationEventArgs e) { WidgetPanel dockElement = panels[panelType]; if (dockElement == null) { throw new InvalidOperationException("Failed to find panel for: " + panelType.ToString()); } if (dockElement.DockState != DockState.Hidden) { dockElement.Activate(); e.Handled = true; } }
private void ChangeElementActivated(object sender, InterfaceActivationEventArgs e) { ActivateDockElement(typeof(ElementChangePanel), e); }
private void InsertElementActivated(object sender, InterfaceActivationEventArgs e) { ActivateDockElement(typeof(ElementInsertPanel), e); }
private void ChangeAttributesActivated(object sender, InterfaceActivationEventArgs e) { ActivateDockElement(dockAttributes, e); }
private void ChangeElementActivated(object sender, InterfaceActivationEventArgs e) { ActivateDockElement(dockElementChange, e); }
private void InsertElementActivated(object sender, InterfaceActivationEventArgs e) { ActivateDockElement(dockElementInsert, e); }