private void RemovingDependentResultPaneAt(int index) { AbstractResultPane abstractResultPane = this.DependentResultPanes[index]; abstractResultPane.DependedResultPane = null; abstractResultPane.Enabled = true; }
private void ResultPane_IconChanged(object sender, EventArgs e) { AbstractResultPane abstractResultPane = sender as AbstractResultPane; if (abstractResultPane != null) { if (abstractResultPane.Icon == null) { this.GetWorkPanePage(abstractResultPane).ImageIndex = -1; return; } this.GetWorkPanePage(abstractResultPane).ImageIndex = this.AddNewImageIcon(abstractResultPane.Icon); } }
private void InsertedDependentResultPaneAt(int index) { AbstractResultPane abstractResultPane = this.DependentResultPanes[index]; if (abstractResultPane == null) { throw new InvalidOperationException("Cannot add null to ResultPane.DependentResultPanes"); } if (abstractResultPane.DependedResultPane != null) { throw new InvalidOperationException("the result pane has been added to DependentResultPanes of another result pane."); } abstractResultPane.DependedResultPane = this; }
private void TabControl_SelectedIndexChanged(object sender, EventArgs e) { if (this.tabControl.SelectedResultPane != base.SelectedResultPane) { AbstractResultPane selectedResultPane = base.SelectedResultPane; base.SelectedResultPane = this.tabControl.SelectedResultPane; if (selectedResultPane != null) { if (base.IsActive) { selectedResultPane.OnKillActive(); return; } base.ResultPanesActiveToContainer.Remove(selectedResultPane); } } }
public bool IsDependedResultPane(AbstractResultPane resultPane) { bool result = false; if (resultPane != null) { for (ResultPane dependedResultPane = resultPane.DependedResultPane; dependedResultPane != null; dependedResultPane = dependedResultPane.DependedResultPane) { if (dependedResultPane == this) { result = true; break; } } } return(result); }
protected override void OnSelectedResultPaneChanged(EventArgs e) { base.SuspendLayout(); if (this.tabControl.SelectedResultPane != base.SelectedResultPane) { AbstractResultPane selectedResultPane = this.tabControl.SelectedResultPane; int selectedIndex = base.ResultPanes.IndexOf(base.SelectedResultPane); this.tabControl.SelectedIndex = selectedIndex; if (selectedResultPane != null) { if (base.IsActive) { selectedResultPane.OnKillActive(); } else { base.ResultPanesActiveToContainer.Remove(selectedResultPane); } } } base.ResumeLayout(true); base.OnSelectedResultPaneChanged(e); }
private WorkPanePage GetWorkPanePage(AbstractResultPane resultPane) { return(resultPane.Parent as WorkPanePage); }
public static bool IsDependedResultPane(AbstractResultPane firstResultPane, AbstractResultPane secondResultPane) { return(firstResultPane is ResultPane && (firstResultPane as ResultPane).IsDependedResultPane(secondResultPane)); }
private void ResultPane_Enter(object sender, EventArgs e) { AbstractResultPane selectedResultPane = sender as AbstractResultPane; base.SelectedResultPane = selectedResultPane; }