コード例 #1
0
        protected void OnSelectedPanelChanged(EventArgs e)
        {
            if (oldSelection != null)
            {
                oldSelection.Visible = false;
            }

            if (m_SelectedPanel != null)
            {
                (m_SelectedPanel).Visible = true;
            }

            bool tabChanged = false;

            if (m_SelectedPanel == null)
            {
                tabChanged = (oldSelection != null);
            }
            else
            {
                tabChanged = (!m_SelectedPanel.Equals(oldSelection));
            }

            if (tabChanged && Created)
            {
                if (SelectedIndexChanged != null)
                {
                    SelectedIndexChanged(this, EventArgs.Empty);
                }
            }

            oldSelection = m_SelectedPanel;
        }
コード例 #2
0
        private void OnAddPanel(Object sender, EventArgs e)
        {
            Control.ControlCollection oldManagedPanels = HostControl.Controls;

            RaiseComponentChanging(TypeDescriptor.GetProperties(HostControl)["ManagedPanels"]);

            ManagedPanel P = (ManagedPanel)DesignerHost.CreateComponent(typeof(ManagedPanel));

            P.Text = P.Name;
            HostControl.ManagedPanels.Add(P);

            RaiseComponentChanged(TypeDescriptor.GetProperties(HostControl)["ManagedPanels"], oldManagedPanels,
                                  HostControl.ManagedPanels);
            HostControl.SelectedPanel = P;

            SetVerbs();
        }
コード例 #3
0
ファイル: PanelManager.cs プロジェクト: applejian/cyberduck
        protected void OnSelectedPanelChanged(EventArgs e)
        {
            if (oldSelection != null)
                oldSelection.Visible = false;

            if (m_SelectedPanel != null)
                (m_SelectedPanel).Visible = true;

            bool tabChanged = false;
            if (m_SelectedPanel == null)
                tabChanged = (oldSelection != null);
            else
                tabChanged = (!m_SelectedPanel.Equals(oldSelection));

            if (tabChanged && Created)
                if (SelectedIndexChanged != null)
                    SelectedIndexChanged(this, EventArgs.Empty);

            oldSelection = m_SelectedPanel;
        }