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); }
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(); }
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; } } }
protected override bool GetHitTest(Point point) { StiWizardPage page = wizardControl.GetWizardPageAtPoint(wizardControl.PointToClient(point)); return(page != null); }
public void Remove(StiWizardPage page) { List.Remove(page); }
public void Insert(int index, StiWizardPage page) { List.Insert(index, page); }
public int IndexOf(StiWizardPage page) { return(List.IndexOf(page)); }
public bool Contains(StiWizardPage page) { return(List.Contains(page)); }
public void Add(StiWizardPage page) { List.Add(page); }