Exemple #1
0
            /// <summary>
            /// Adds an item to the control. Ensures it is a <see cref="MultiPagePanel"/>
            /// </summary>
            public override void Add(Control value)
            {
                if (value == null)
                {
                    throw new ArgumentNullException("value", "Tried to add a null value to the MultiPanelPage.ControlCollection.");
                }

                MultiPanelPage p = value as MultiPanelPage;

                if (p != null)
                {
                    throw new ArgumentException("Tried to add a MultiPanelPage control to the MultiPanelPage.ControlCollection.", "value");
                }

                base.Add(value);
            }
Exemple #2
0
            /// <summary>
            /// Constructor.
            /// </summary>
            public PageControlCollection(Control owner)
                : base(owner)
            {
                // Should not happen
                if (owner == null)
                {
                    throw new ArgumentNullException("owner", "Tried to create a MultiPanelPage.ControlCollection with a null owner.");
                }

                // Should not happen
                MultiPanelPage c = owner as MultiPanelPage;

                if (c == null)
                {
                    throw new ArgumentException("Tried to create a MultiPanelPage.ControlCollection with a non-MultiPanelPage owner.", "owner");
                }
            }
Exemple #3
0
            /// <summary>
            /// Adds a page.
            /// </summary>
            /// <param name="value"></param>
            public override void Add(Control value)
            {
                if (value == null)
                {
                    throw new ArgumentNullException("value", "Tried to add a null value to the MultiPanelPagesCollection.");
                }

                MultiPanelPage p = value as MultiPanelPage;

                if (p == null)
                {
                    throw new ArgumentException("Tried to add a non-MultiPanelPage control to the MultiPanelPagesCollection", "value");
                }

                p.SendToBack();
                base.Add(p);
            }
Exemple #4
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="oldPage"></param>
        /// <param name="newPage"></param>
        public MultiPanelSelectionChangeEventArgs(MultiPanelPage oldPage, MultiPanelPage newPage)
        {
            m_oldPage = oldPage;
            m_newPage = newPage;

        }
Exemple #5
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="oldPage"></param>
 /// <param name="newPage"></param>
 public MultiPanelSelectionChangeEventArgs(MultiPanelPage oldPage, MultiPanelPage newPage)
 {
     m_oldPage = oldPage;
     m_newPage = newPage;
 }