⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 samplewizard.cs

📁 Magic Library 1.7,有说明文档
💻 CS
📖 第 1 页 / 共 2 页
字号:
// *****************************************************************************
// 
//  (c) Crownwood Consulting Limited 2002 
//  All rights reserved. The software and associated documentation 
//  supplied hereunder are the proprietary information of Crownwood Consulting 
//	Limited, Haxey, North Lincolnshire, England and are supplied subject to 
//	licence terms.
// 
//  Magic Version 1.7	www.dotnetmagic.com
// *****************************************************************************
using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using Crownwood.Magic.Controls;namespace SampleWizard{	public class SampleWizard : Crownwood.Magic.Forms.WizardDialog	{
	    private Timer installTimer;
	    private int installCount;
        private Crownwood.Magic.Controls.WizardPage wizardStartPage;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.Label label2;
        private System.Windows.Forms.Label label3;
        private Crownwood.Magic.Controls.WizardPage wizardInfo1;
        private System.Windows.Forms.GroupBox groupBox1;
        private System.Windows.Forms.RadioButton radioButton1;
        private System.Windows.Forms.RadioButton radioButton2;
        private System.Windows.Forms.RadioButton radioButton3;
        private Crownwood.Magic.Controls.WizardPage wizardLegal;
        private System.Windows.Forms.TextBox textBox1;
        private System.Windows.Forms.Label label4;
        private System.Windows.Forms.RadioButton radioButton4;
        private System.Windows.Forms.RadioButton radioButton5;
        private Crownwood.Magic.Controls.WizardPage wizardInstall;
        private System.Windows.Forms.Label label5;
        private System.Windows.Forms.Label label6;
        private System.Windows.Forms.ProgressBar progressBar1;
        private System.Windows.Forms.Label label7;
        private Crownwood.Magic.Controls.WizardPage wizardFinish;
        private Crownwood.Magic.Controls.WizardPage wizardWarn;
        private Crownwood.Magic.Controls.WizardPage wizardInfo2;
        private System.Windows.Forms.TextBox textBox2;
        private System.Windows.Forms.Label label8;
        private System.Windows.Forms.TextBox textBox3;
        private System.Windows.Forms.Label label9;
        private System.Windows.Forms.Label label10;		private System.ComponentModel.IContainer components = null;		public SampleWizard()		{			// This call is required by the Windows Form Designer.			InitializeComponent();			// TODO: Add any initialization after the InitializeComponent call		}		/// <summary>		/// Clean up any resources being used.		/// </summary>		protected override void Dispose( bool disposing )		{			if( disposing )			{				if (components != null) 				{					components.Dispose();				}			}			base.Dispose( disposing );		}		#region Designer generated code		/// <summary>		/// Required method for Designer support - do not modify		/// the contents of this method with the code editor.		/// </summary>		private void InitializeComponent()		{            this.wizardStartPage = new Crownwood.Magic.Controls.WizardPage();
            this.label3 = new System.Windows.Forms.Label();
            this.label2 = new System.Windows.Forms.Label();
            this.label1 = new System.Windows.Forms.Label();
            this.wizardInfo1 = new Crownwood.Magic.Controls.WizardPage();
            this.groupBox1 = new System.Windows.Forms.GroupBox();
            this.radioButton3 = new System.Windows.Forms.RadioButton();
            this.radioButton2 = new System.Windows.Forms.RadioButton();
            this.radioButton1 = new System.Windows.Forms.RadioButton();
            this.wizardLegal = new Crownwood.Magic.Controls.WizardPage();
            this.radioButton5 = new System.Windows.Forms.RadioButton();
            this.radioButton4 = new System.Windows.Forms.RadioButton();
            this.label4 = new System.Windows.Forms.Label();
            this.textBox1 = new System.Windows.Forms.TextBox();
            this.wizardWarn = new Crownwood.Magic.Controls.WizardPage();
            this.label6 = new System.Windows.Forms.Label();
            this.label5 = new System.Windows.Forms.Label();
            this.wizardInstall = new Crownwood.Magic.Controls.WizardPage();
            this.label7 = new System.Windows.Forms.Label();
            this.progressBar1 = new System.Windows.Forms.ProgressBar();
            this.wizardFinish = new Crownwood.Magic.Controls.WizardPage();
            this.label10 = new System.Windows.Forms.Label();
            this.wizardInfo2 = new Crownwood.Magic.Controls.WizardPage();
            this.label9 = new System.Windows.Forms.Label();
            this.textBox3 = new System.Windows.Forms.TextBox();
            this.label8 = new System.Windows.Forms.Label();
            this.textBox2 = new System.Windows.Forms.TextBox();
            this.wizardStartPage.SuspendLayout();
            this.wizardInfo1.SuspendLayout();
            this.groupBox1.SuspendLayout();
            this.wizardLegal.SuspendLayout();
            this.wizardWarn.SuspendLayout();
            this.wizardInstall.SuspendLayout();
            this.wizardFinish.SuspendLayout();
            this.wizardInfo2.SuspendLayout();
            this.SuspendLayout();
            // 
            // wizardControl
            // 
            this.wizardControl.AssignDefaultButton = true;
            this.wizardControl.Profile = Crownwood.Magic.Controls.WizardControl.Profiles.Install;
            this.wizardControl.SelectedIndex = 0;
            this.wizardControl.Size = new System.Drawing.Size(410, 343);
            this.wizardControl.Title = "Sample Wizard using Install Profile";
            this.wizardControl.Visible = true;
            this.wizardControl.WizardPages.AddRange(new Crownwood.Magic.Controls.WizardPage[] {
                                                                                                  this.wizardStartPage,
                                                                                                  this.wizardLegal,
                                                                                                  this.wizardInfo1,
                                                                                                  this.wizardInfo2,
                                                                                                  this.wizardWarn,
                                                                                                  this.wizardInstall,
                                                                                                  this.wizardFinish});
            // 
            // wizardStartPage
            // 
            this.wizardStartPage.CaptionTitle = "Sample Description";
            this.wizardStartPage.Controls.AddRange(new System.Windows.Forms.Control[] {
                                                                                          this.label3,
                                                                                          this.label2,
                                                                                          this.label1});
            this.wizardStartPage.Dock = System.Windows.Forms.DockStyle.Fill;
            this.wizardStartPage.FullPage = false;
            this.wizardStartPage.Name = "wizardStartPage";
            this.wizardStartPage.Size = new System.Drawing.Size(410, 189);
            this.wizardStartPage.SubTitle = "Start page explaining what this sample demonstrates";
            this.wizardStartPage.TabIndex = 3;
            this.wizardStartPage.Title = "Start";
            // 
            // label3
            // 
            this.label3.Location = new System.Drawing.Point(8, 136);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(400, 64);
            this.label3.TabIndex = 3;
            this.label3.Text = @"Therefore on the second to last page only the 'Cancel' button is available and used to abort the installation. On the last page only the 'Close' button is available as the only possible action left is to exit the dialog.  On preceding pages the 'Next' and 'Back' buttons are displayed when appropriate as well as the 'Cancel' button.";
            // 
            // label2
            // 
            this.label2.Location = new System.Drawing.Point(8, 72);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(400, 64);
            this.label2.TabIndex = 2;
            this.label2.Text = @"In this profile the last two pages have special significance. The second to last is used for conducting the actual installation. The last page is used to report the success or failure of the install. All other preceding pages are for information gathering prior to the install attempt.";
            // 
            // label1
            // 
            this.label1.Location = new System.Drawing.Point(8, 8);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(400, 56);
            this.label1.TabIndex = 1;
            this.label1.Text = @"The WizardControl and associated WizardDialog can be used in three different profiles depending on the type of Wizard required. Available options are 'Install', 'Configure' and 'Controller'. This sample is intended to demonstrate use of the 'Install' profile.";
            // 
            // wizardInfo1
            // 
            this.wizardInfo1.CaptionTitle = "Gather Info 1";
            this.wizardInfo1.Controls.AddRange(new System.Windows.Forms.Control[] {
                                                                                      this.groupBox1});
            this.wizardInfo1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.wizardInfo1.FullPage = false;
            this.wizardInfo1.Name = "wizardInfo1";
            this.wizardInfo1.Selected = false;
            this.wizardInfo1.Size = new System.Drawing.Size(410, 269);
            this.wizardInfo1.SubTitle = "This is the first of two pages for gathering input";
            this.wizardInfo1.TabIndex = 4;
            this.wizardInfo1.Title = "Info1";
            // 
            // groupBox1
            // 
            this.groupBox1.Controls.AddRange(new System.Windows.Forms.Control[] {
                                                                                    this.radioButton3,
                                                                                    this.radioButton2,
                                                                                    this.radioButton1});
            this.groupBox1.Location = new System.Drawing.Point(24, 16);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new System.Drawing.Size(160, 152);
            this.groupBox1.TabIndex = 0;
            this.groupBox1.TabStop = false;
            this.groupBox1.Text = "Example of Selection";
            // 
            // radioButton3
            // 
            this.radioButton3.Location = new System.Drawing.Point(32, 112);
            this.radioButton3.Name = "radioButton3";
            this.radioButton3.TabIndex = 2;
            this.radioButton3.Text = "Debug Install";
            // 
            // radioButton2
            // 
            this.radioButton2.Location = new System.Drawing.Point(32, 72);
            this.radioButton2.Name = "radioButton2";
            this.radioButton2.TabIndex = 1;
            this.radioButton2.Text = "Server Install";
            // 
            // radioButton1
            // 
            this.radioButton1.Location = new System.Drawing.Point(32, 32);
            this.radioButton1.Name = "radioButton1";
            this.radioButton1.TabIndex = 0;
            this.radioButton1.Text = "Client Install";
            // 
            // wizardLegal
            // 
            this.wizardLegal.CaptionTitle = "Standard Legal Notice";
            this.wizardLegal.Controls.AddRange(new System.Windows.Forms.Control[] {
                                                                                      this.radioButton5,
                                                                                      this.radioButton4,
                                                                                      this.label4,
                                                                                      this.textBox1});
            this.wizardLegal.Dock = System.Windows.Forms.DockStyle.Fill;
            this.wizardLegal.FullPage = false;
            this.wizardLegal.Name = "wizardLegal";
            this.wizardLegal.Selected = false;
            this.wizardLegal.Size = new System.Drawing.Size(410, 269);
            this.wizardLegal.SubTitle = "Force the user to agree a license agreement for product";
            this.wizardLegal.TabIndex = 5;
            this.wizardLegal.Title = "Legal";
            // 
            // radioButton5
            // 
            this.radioButton5.Checked = true;
            this.radioButton5.Location = new System.Drawing.Point(216, 160);
            this.radioButton5.Name = "radioButton5";
            this.radioButton5.Size = new System.Drawing.Size(88, 24);
            this.radioButton5.TabIndex = 3;
            this.radioButton5.TabStop = true;
            this.radioButton5.Text = "I Disagree";
            this.radioButton5.CheckedChanged += new System.EventHandler(this.radioButton5_CheckedChanged);
            // 
            // radioButton4
            // 
            this.radioButton4.Location = new System.Drawing.Point(120, 160);
            this.radioButton4.Name = "radioButton4";
            this.radioButton4.Size = new System.Drawing.Size(72, 24);
            this.radioButton4.TabIndex = 2;
            this.radioButton4.Text = "I Agree";
            this.radioButton4.CheckedChanged += new System.EventHandler(this.radioButton4_CheckedChanged);
            // 
            // label4
            // 
            this.label4.Location = new System.Drawing.Point(32, 8);
            this.label4.Name = "label4";
            this.label4.TabIndex = 1;
            this.label4.Text = "Must Agree Terms";
            // 
            // textBox1
            // 
            this.textBox1.Location = new System.Drawing.Point(32, 32);
            this.textBox1.Multiline = true;
            this.textBox1.Name = "textBox1";
            this.textBox1.Size = new System.Drawing.Size(352, 120);
            this.textBox1.TabIndex = 0;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -