예제 #1
0
            /// <summary>
            /// </summary>
            public ControlCollection(Control owner) : base(owner)
            {
                if (owner == null)
                {
                    throw new ArgumentNullException("owner", "Tried to create a MultiPanelPage.ControlCollection with a null owner.");
                }
                MultiPanelPage c = owner as MultiPanelPage;

                if (c == null)
                {
                    throw new ArgumentException("Tried to create a MultiPanelPage.ControlCollection with a non-MultiPanelPage owner.", "owner");
                }
            }
예제 #2
0
        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);
        }