Beispiel #1
0
        protected override void OnWizardPageEnter(Crownwood.Magic.Controls.WizardPage wp,
                                                  Crownwood.Magic.Controls.WizardControl wc)
        {
            // Asking for licence terms by entering page?
            if (wp.Name == "wizardLegal")
            {
                if (this.radioButton4.Checked)
                {
                    wc.EnableNextButton = WizardControl.Status.Default;
                }
                else
                {
                    wc.EnableNextButton = WizardControl.Status.No;
                }
            }

            // Started the installation process by entering page 5?
            if (wp.Name == "wizardInstall")
            {
                // Kick off a timer to represent progress
                installCount          = 0;
                installTimer          = new Timer();
                installTimer.Interval = 250;
                installTimer.Tick    += new EventHandler(OnProgressTick);
                installTimer.Start();
            }
        }
Beispiel #2
0
 protected override void OnWizardPageLeave(Crownwood.Magic.Controls.WizardPage wp,
                                           Crownwood.Magic.Controls.WizardControl wc)
 {
     // Leaving page means we have to restore default status of next button
     if (wp.Name == "wizardLegal")
     {
         // Default the next button to disable
         wc.EnableNextButton = WizardControl.Status.Default;
     }
 }
Beispiel #3
0
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
            System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(WizardDialog));
            this.wizardControl = new Crownwood.Magic.Controls.WizardControl();
            this.SuspendLayout();
            // 
            // wizardControl
            // 
            this.wizardControl.Dock = System.Windows.Forms.DockStyle.Fill;
            this.wizardControl.Name = "wizardControl";
            this.wizardControl.Picture = ((System.Drawing.Bitmap)(resources.GetObject("wizardControl.Picture")));
            this.wizardControl.SelectedIndex = -1;
            this.wizardControl.Size = new System.Drawing.Size(416, 285);
            this.wizardControl.TabIndex = 0;
            this.wizardControl.CancelClick += new System.EventHandler(this.OnCancelClick);
            this.wizardControl.CloseClick += new System.EventHandler(this.OnCloseClick);
            this.wizardControl.NextClick += new System.ComponentModel.CancelEventHandler(this.OnNextClick);
            this.wizardControl.FinishClick += new System.EventHandler(this.OnFinishClick);
            this.wizardControl.WizardPageEnter += new Crownwood.Magic.Controls.WizardControl.WizardPageHandler(this.OnWizardPageEnter);
            this.wizardControl.BackClick += new System.ComponentModel.CancelEventHandler(this.OnBackClick);
            this.wizardControl.HelpClick += new System.EventHandler(this.OnHelpClick);
            this.wizardControl.WizardPageLeave += new Crownwood.Magic.Controls.WizardControl.WizardPageHandler(this.OnWizardPageLeave);
            this.wizardControl.WizardCaptionTitleChanged += new System.EventHandler(this.OnWizardCaptionTitleChanged);
            this.wizardControl.SelectionChanged += new System.EventHandler(this.OnSelectionChanged);
            this.wizardControl.UpdateClick += new System.EventHandler(this.OnUpdateClick);
            // 
            // WizardDialog
            // 
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
            this.ClientSize = new System.Drawing.Size(416, 285);
            this.Controls.AddRange(new System.Windows.Forms.Control[] {
                                                                          this.wizardControl});
            this.Name = "WizardDialog";
            this.Text = "Wizard Dialog";
            this.ResumeLayout(false);

        }
        protected override void WndProc(ref Message msg)
        {
            // Test for the left mouse down windows message
            if (msg.Msg == (int)Win32.Msgs.WM_LBUTTONDOWN)
            {
                Crownwood.Magic.Controls.WizardControl wizardControl = this.SelectionService.PrimarySelection as Crownwood.Magic.Controls.WizardControl;

                // Check we have a valid object reference
                if (wizardControl != null)
                {
                    Crownwood.Magic.Controls.TabControl tabControl = wizardControl.TabControl;

                    // Check we have a valid object reference
                    if (tabControl != null)
                    {
                        // Extract the mouse position
                        int xPos = (short)((uint)msg.LParam & 0x0000FFFFU);
                        int yPos = (short)(((uint)msg.LParam & 0xFFFF0000U) >> 16);

                        Point screenCoord = wizardControl.PointToScreen(new Point(xPos, yPos));
                        Point clientCoord = tabControl.PointToClient(screenCoord);

                        // Ask the TabControl to change tabs according to mouse message
                        tabControl.ExternalMouseTest(msg.HWnd, clientCoord);
                    }
                }
            }
            else
            {
                if (msg.Msg == (int)Win32.Msgs.WM_LBUTTONDBLCLK)
                {
                    Crownwood.Magic.Controls.WizardControl wizardControl = this.SelectionService.PrimarySelection as Crownwood.Magic.Controls.WizardControl;

                    // Check we have a valid object reference
                    if (wizardControl != null)
                    {
                        Crownwood.Magic.Controls.TabControl tabControl = wizardControl.TabControl;

                        // Check we have a valid object reference
                        if (tabControl != null)
                        {
                            // Extract the mouse position
                            int xPos = (short)((uint)msg.LParam & 0x0000FFFFU);
                            int yPos = (short)(((uint)msg.LParam & 0xFFFF0000U) >> 16);

                            Point screenCoord = wizardControl.PointToScreen(new Point(xPos, yPos));
                            Point clientCoord = tabControl.PointToClient(screenCoord);

                            // Ask the TabControl to process a double click over an arrow as a simple
                            // click of the arrow button. In which case we return immediately to prevent
                            // the base class from using the double to generate the default event
                            if (tabControl.WantDoubleClick(msg.HWnd, clientCoord))
                            {
                                return;
                            }
                        }
                    }
                }
            }

            base.WndProc(ref msg);
        }