コード例 #1
0
        protected override void WndProc(ref Message msg)
        {
            if (msg.Msg == WM_LBUTTONDOWN)
            {
                Point pos = wizardControl.PointToClient(Cursor.Position);

                #region Switch Pages
                StiWizardPage page = wizardControl.GetWizardPageAtPoint(pos);
                if (page != null)
                {
                    wizardControl.SelectedPage = page;

                    var controls = new ArrayList();
                    controls.Add(page);
                    ISelectionService service = ((ISelectionService)this.GetService(typeof(ISelectionService)));
                    service.SetSelectedComponents(controls);
                    return;
                }
                #endregion

                /*
                 * Rectangle rect = wizardControl.GetBackButtonRect();
                 * if (rect.Contains(pos))wizardControl.InvokeBackClick(EventArgs.Empty);
                 *
                 * rect = wizardControl.GetNextButtonRect();
                 * if (rect.Contains(pos))wizardControl.InvokeNextClick(EventArgs.Empty);
                 */
            }
            base.WndProc(ref msg);
        }
コード例 #2
0
        private void OnAddControl(object sender, EventArgs e)
        {
            IDesignerHost       host        = ((IDesignerHost)base.GetService(typeof(IDesignerHost)));
            DesignerTransaction transaction = host.CreateTransaction("Add Page");
            StiWizardPage       control     = ((StiWizardPage)host.CreateComponent(typeof(StiWizardPage)));

            wizardControl.Controls.Add(control);
            control.Dock = DockStyle.Fill;
            wizardControl.Invalidate();
            transaction.Commit();
        }
コード例 #3
0
        protected override void OnMouseDown(MouseEventArgs e)
        {
            base.OnMouseDown(e);

            if (AllowPageSwitch && ShowProgressTree)
            {
                Point         pos  = PointToClient(Cursor.Position);
                StiWizardPage page = GetWizardPageAtPoint(pos);
                if (page != null)
                {
                    SelectedPage = page;
                }
            }
        }
コード例 #4
0
        protected override bool GetHitTest(Point point)
        {
            StiWizardPage page = wizardControl.GetWizardPageAtPoint(wizardControl.PointToClient(point));

            return(page != null);
        }
コード例 #5
0
 public void Remove(StiWizardPage page)
 {
     List.Remove(page);
 }
コード例 #6
0
 public void Insert(int index, StiWizardPage page)
 {
     List.Insert(index, page);
 }
コード例 #7
0
 public int IndexOf(StiWizardPage page)
 {
     return(List.IndexOf(page));
 }
コード例 #8
0
 public bool Contains(StiWizardPage page)
 {
     return(List.Contains(page));
 }
コード例 #9
0
 public void Add(StiWizardPage page)
 {
     List.Add(page);
 }