예제 #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
        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;
        }