コード例 #1
0
        private void RemovingDependentResultPaneAt(int index)
        {
            AbstractResultPane abstractResultPane = this.DependentResultPanes[index];

            abstractResultPane.DependedResultPane = null;
            abstractResultPane.Enabled            = true;
        }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
        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;
        }
コード例 #4
0
 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);
         }
     }
 }
コード例 #5
0
        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);
        }
コード例 #6
0
 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);
 }
コード例 #7
0
 private WorkPanePage GetWorkPanePage(AbstractResultPane resultPane)
 {
     return(resultPane.Parent as WorkPanePage);
 }
コード例 #8
0
 public static bool IsDependedResultPane(AbstractResultPane firstResultPane, AbstractResultPane secondResultPane)
 {
     return(firstResultPane is ResultPane && (firstResultPane as ResultPane).IsDependedResultPane(secondResultPane));
 }
コード例 #9
0
        private void ResultPane_Enter(object sender, EventArgs e)
        {
            AbstractResultPane selectedResultPane = sender as AbstractResultPane;

            base.SelectedResultPane = selectedResultPane;
        }