コード例 #1
0
        private void handlePrevPage(object sender, EventArgs e)
        {
            MultiPanelPage page = this.Control as MultiPanelPage;

            if (page.Parent is MultiPanel)
            {
                MultiPanel wiz = page.Parent as MultiPanel;

                wiz.PageIndex--;
            }
        }
コード例 #2
0
        private void selectParentContainer(object sender, EventArgs e)
        {
            MultiPanelPage page = this.Control as MultiPanelPage;

            page.Parent.Select();

            /*if (page.Parent is MultiPanel)
             * {
             *  MultiPanel wiz = page.Parent as MultiPanel;
             *
             *  wiz.PageIndex--;
             * }*/
        }
コード例 #3
0
        protected internal void ActivatePage(int index)
        {
            //If the new page is invalid
            if (index < 0 || index >= vPages.Count)
            {
                return;
            }

            //Change to the new Page
            MultiPanelPage tWizPage = ((MultiPanelPage)vPages[index]);

            //Really activate the page
            ActivatePage(tWizPage);
        }
コード例 #4
0
        protected internal void ActivatePage(MultiPanelPage page)
        {
            //Deactivate the current
            if (vActivePage != null)
            {
                vActivePage.Visible = false;
            }

            //Activate the new page
            vActivePage = page;

            if (vActivePage != null)
            {
                //Ensure that this panel displays inside the MultiPanel
                vActivePage.Parent = this;
                if (this.Contains(vActivePage) == false)
                {
                    this.Container.Add(vActivePage);
                }

                //if (DesignMode && vActivePage.BackColor == SystemColors.Control)
                //    vActivePage.BackColor = Color.FromArgb(this.Parent.BackColor.ToArgb());

                //Make it fill the space
                vActivePage.Dock    = DockStyle.Fill;
                vActivePage.Visible = true;
                vActivePage.BringToFront();
                //vActivePage.FocusFirstTabIndex();
            }

            //Cause a refresh
            if (vActivePage != null)
            {
                vActivePage.Invalidate();
            }
            else
            {
                this.Invalidate();
            }

            if (PageChanged != null)
            {
                PageChanged(this, EventArgs.Empty);
            }
        }
コード例 #5
0
        private void handleAddPage(object sender, EventArgs e)
        {
            MultiPanel wiz = this.Control as MultiPanel;

            IDesignerHost           h = (IDesignerHost)GetService(typeof(IDesignerHost));
            IComponentChangeService c = (IComponentChangeService)GetService(typeof(IComponentChangeService));

            DesignerTransaction dt   = h.CreateTransaction("Add Page");
            MultiPanelPage      page = (MultiPanelPage)h.CreateComponent(typeof(MultiPanelPage));

            c.OnComponentChanging(wiz, null);

            //Add a new page to the collection
            wiz.Pages.Add(page);
            wiz.Controls.Add(page);
            wiz.ActivatePage(page);

            c.OnComponentChanged(wiz, null, null, null);
            dt.Commit();
        }
コード例 #6
0
 /// <summary>
 /// Removes the given page from the collection
 /// </summary>
 /// <param name="value">Page to remove</param>
 public void Remove(MultiPanelPage value)
 {
     //Remove the item
     List.Remove(value);
 }
コード例 #7
0
 /// <summary>
 /// Adds a new page at a particular position in the Collection
 /// </summary>
 /// <param name="index">Position</param>
 /// <param name="value">Page to be added</param>
 public void Insert(int index, MultiPanelPage value)
 {
     List.Insert(index, value);
 }
コード例 #8
0
 /// <summary>
 /// Finds the position of the page in the colleciton
 /// </summary>
 /// <param name="value">Page to find position of</param>
 /// <returns>Index of Page in collection</returns>
 public int IndexOf(MultiPanelPage value)
 {
     return(List.IndexOf(value));
 }
コード例 #9
0
ファイル: PageCollection.cs プロジェクト: hostitherepc/Fork-1
 /// <summary>
 /// Removes the given page from the collection
 /// </summary>
 /// <param name="value">Page to remove</param>
 public void Remove( MultiPanelPage value )
 {
     //Remove the item
     List.Remove( value );
 }
コード例 #10
0
ファイル: PageCollection.cs プロジェクト: hostitherepc/Fork-1
 /// <summary>
 /// Adds a new page at a particular position in the Collection
 /// </summary>
 /// <param name="index">Position</param>
 /// <param name="value">Page to be added</param>
 public void Insert( int index, MultiPanelPage value )
 {
     List.Insert(index, value );
 }
コード例 #11
0
ファイル: PageCollection.cs プロジェクト: hostitherepc/Fork-1
 /// <summary>
 /// Finds the position of the page in the colleciton
 /// </summary>
 /// <param name="value">Page to find position of</param>
 /// <returns>Index of Page in collection</returns>
 public int IndexOf( MultiPanelPage value )
 {
     return( List.IndexOf( value ) );
 }
コード例 #12
0
ファイル: PageCollection.cs プロジェクト: hostitherepc/Fork-1
 /// <summary>
 /// Adds an array of pages into the collection. Used by the Studio Designer generated coed
 /// </summary>
 /// <param name="pages">Array of pages to add</param>
 public void AddRange(MultiPanelPage[] pages)
 {
     // Use external to validate and add each entry
     foreach(MultiPanelPage page in pages)
     {
         this.Add(page);
     }
 }
コード例 #13
0
ファイル: PageCollection.cs プロジェクト: hostitherepc/Fork-1
 /// <summary>
 /// Adds a MultiPanelPage into the Collection
 /// </summary>
 /// <param name="value">The page to add</param>
 /// <returns></returns>
 public int Add(MultiPanelPage value )
 {
     int result = List.Add( value );
     return result;
 }
コード例 #14
0
ファイル: MultiPanel.cs プロジェクト: hostitherepc/Fork-1
        protected internal void ActivatePage(MultiPanelPage page)
        {
            //Deactivate the current
            if (vActivePage != null)
            {
                vActivePage.Visible = false;
            }

            //Activate the new page
            vActivePage = page;

            if (vActivePage != null)
            {
                //Ensure that this panel displays inside the MultiPanel
                vActivePage.Parent = this;
                if (this.Contains(vActivePage) == false)
                {
                    this.Container.Add(vActivePage);
                }

                //if (DesignMode && vActivePage.BackColor == SystemColors.Control)
                //    vActivePage.BackColor = Color.FromArgb(this.Parent.BackColor.ToArgb());

                //Make it fill the space
                vActivePage.Dock = DockStyle.Fill;
                vActivePage.Visible = true;
                vActivePage.BringToFront();
                //vActivePage.FocusFirstTabIndex();
            }

            //Cause a refresh
            if (vActivePage != null)
                vActivePage.Invalidate();
            else
                this.Invalidate();

            if (PageChanged != null)
                PageChanged(this, EventArgs.Empty);
        }
コード例 #15
0
 /// <summary>
 /// Detects if a given Page is in the Collection
 /// </summary>
 /// <param name="value">Page to find</param>
 /// <returns></returns>
 public bool Contains(MultiPanelPage value)
 {
     // If value is not of type Int16, this will return false.
     return(List.Contains(value));
 }
コード例 #16
0
        /// <summary>
        /// Adds a MultiPanelPage into the Collection
        /// </summary>
        /// <param name="value">The page to add</param>
        /// <returns></returns>
        public int Add(MultiPanelPage value)
        {
            int result = List.Add(value);

            return(result);
        }
コード例 #17
0
ファイル: PageCollection.cs プロジェクト: hostitherepc/Fork-1
 /// <summary>
 /// Detects if a given Page is in the Collection
 /// </summary>
 /// <param name="value">Page to find</param>
 /// <returns></returns>
 public bool Contains( MultiPanelPage value )
 {
     // If value is not of type Int16, this will return false.
     return( List.Contains( value ) );
 }