예제 #1
0
        /// <summary>
        /// Constructs an MigrationWizard object.
        /// </summary>
        public MigrationWizard(string Uname, string path, bool encryptedOriginal, iFolderWebService ifws, SimiasWebService simiasWebService)
        {
            //
            // Required for Windows Form Designer support
            //
            this.encryptedOriginal = encryptedOriginal;
            this.UserName          = Uname;
            this.location          = path;
            this.ifws             = ifws;
            this.simiasWebService = simiasWebService;
            InitializeComponent();

            // Initialize the wizard pages ... I had to move this here so that
            // dev studio wouldn't wipe it out (when it was in InitializeComponent()).
            this.welcomePage = new MigrationWelcomePage();


            this.serverPage           = new MigrationServerPage(path);
            this.identityPage         = new MigrationIdentityPage(ifws);
            this.passphrasePage       = new MigrationPassphrasePage();
            this.passphraseVerifyPage = new MigrationPassphraseVerifyPage();
            this.verifyPage           = new MigrationVerifyPage();
            this.completionPage       = new MigrationCompletionPage();
            //
            // welcomePage
            //
            // TODO: Localize

            this.welcomePage.ActionText      = Resource.GetString("MigrationWelcomepgAT");       //"This wizard will guide you through migrating your iFolder account to 3.x.";
            this.welcomePage.DescriptionText = Resource.GetString("WelcomePageAction");          //"To continue, click Next.";
            this.welcomePage.Location        = new System.Drawing.Point(0, 0);
            this.welcomePage.Name            = "welcomePage";
            this.welcomePage.Size            = new System.Drawing.Size(496, 304);
            this.welcomePage.TabIndex        = 1;
            this.welcomePage.WelcomeTitle    = Resource.GetString("MigrationWelcomeTitle");         //"Welcome to the iFolder Migration Assistant";


            //
            // serverPage
            //
            // TODO: Localize

            //this.serverPage.HeaderSubTitle = "Enter the name of your iFolder server.";
            this.serverPage.HeaderTitle = Resource.GetString("MigrationOptions");            //"Migration Options";
            this.serverPage.Location    = new System.Drawing.Point(0, 0);
            this.serverPage.Name        = "serverPage";
            this.serverPage.Size        = new System.Drawing.Size(496, 304);
            this.serverPage.TabIndex    = 1;

            //
            // identityPage
            //
            // TODO: Localize
            //this.identityPage.HeaderSubTitle = "Enter your iFolder username and password.";
            this.identityPage.HeaderTitle = Resource.GetString("ServerInfo");            //"Server Information";
            this.identityPage.Location    = new System.Drawing.Point(0, 0);
            this.identityPage.Name        = "identityPage";
            this.identityPage.Size        = new System.Drawing.Size(496, 304);
            this.identityPage.TabIndex    = 1;
            //
            // passphrasePage
            //
            this.passphrasePage.HeaderTitle = "Passphrase Entry";
            this.passphrasePage.Location    = new Point(0, 0);
            this.passphrasePage.Name        = "passphrasePage";
            this.passphrasePage.Size        = new Size(496, 304);
            this.passphrasePage.TabIndex    = 1;
            //
            // passphraseVerifyPage
            //
            this.passphraseVerifyPage.HeaderTitle = "Passphrase";
            this.passphraseVerifyPage.Location    = new Point(0, 0);
            this.passphraseVerifyPage.Size        = new Size(496, 304);

            //
            // verifyPage
            //
            // TODO: Localize
            //this.verifyPage.HeaderSubTitle = "Verify the iFolder account information.";
            this.verifyPage.HeaderTitle = Resource.GetString("MigrateVerify");            //"Verify and Migrate";
            this.verifyPage.Location    = new System.Drawing.Point(0, 0);
            this.verifyPage.Name        = "verifyPage";
            this.verifyPage.Size        = new System.Drawing.Size(496, 304);
            this.verifyPage.TabIndex    = 1;

            //
            // completionPage
            //
            // TODO: Localize
            this.completionPage.DescriptionText = Resource.GetString("CompletionPageDT");            //"Description...";
            this.completionPage.Location        = new System.Drawing.Point(0, 0);
            this.completionPage.Name            = "completionPage";
            this.completionPage.Size            = new System.Drawing.Size(496, 304);
            this.completionPage.TabIndex        = 1;
            this.completionPage.WelcomeTitle    = Resource.GetString("MigrationCompleteWT");         //"Completing the iFolder Migration Wizard";

            /*
             * this.Controls.Add(this.welcomePage);
             * this.Controls.Add(this.serverPage);
             * this.Controls.Add(this.identityPage);
             * this.Controls.Add(this.verifyPage);
             * this.Controls.Add(this.completionPage);
             */
            this.Controls.Add(this.welcomePage);
            this.Controls.Add(this.serverPage);
            this.Controls.Add(this.identityPage);
            this.Controls.Add(this.passphrasePage);
            this.Controls.Add(this.passphraseVerifyPage);
            this.Controls.Add(this.verifyPage);
            this.Controls.Add(this.completionPage);
            // Load the application icon.
            try
            {
                this.Icon = new Icon(Path.Combine(Application.StartupPath, @"ifolder_app.ico"));
            }
            catch {}             // Ignore


            // Put the wizard pages in order.
            pages    = new MigrationBaseWizardPage[maxPages];
            pages[0] = this.welcomePage;
            pages[1] = this.serverPage;
            pages[2] = this.identityPage;
            pages[3] = this.passphrasePage;
            pages[4] = this.passphraseVerifyPage;
            pages[5] = this.verifyPage;
            pages[6] = this.completionPage;

            /*
             * pages[1] = this.serverPage;
             * pages[2] = this.identityPage;
             * pages[3] = this.verifyPage;
             * pages[4] = this.completionPage;
             */

            try
            {
                // Load the watermark.
                // TODO:
                Image image = Image.FromFile(Path.Combine(Application.StartupPath, "invitewiz.png"));
                this.welcomePage.Watermark    = image;
                this.completionPage.Watermark = image;

                // TODO:
                image = Image.FromFile(Path.Combine(Application.StartupPath, @"res\ifolder_invite_32.png"));
                this.serverPage.Thumbnail   = image;
                this.verifyPage.Thumbnail   = image;
                this.identityPage.Thumbnail = image;
            }
            catch {}             // Ignore.

            for (int i = 0; i < maxPages; i++)
            {
                pages[i].Hide();
            }

            // Activate the first wizard page.
            pages[0].ActivatePage(0);
        }
예제 #2
0
 public MigrationWizard( string Uname, string path, bool encryptedOriginal, iFolderWebService ifws, SimiasWebService simiasWebService )
 {
     this.encryptedOriginal = encryptedOriginal;
        this.UserName = Uname;
        this.location = path;
        this.ifws = ifws;
        this.simiasWebService = simiasWebService;
        InitializeComponent();
        this.welcomePage = new MigrationWelcomePage();
        this.serverPage = new MigrationServerPage(path);
        this.identityPage = new MigrationIdentityPage(ifws);
        this.passphrasePage = new MigrationPassphrasePage();
        this.passphraseVerifyPage = new MigrationPassphraseVerifyPage();
        this.verifyPage = new MigrationVerifyPage();
        this.completionPage = new MigrationCompletionPage();
        this.welcomePage.ActionText = Resource.GetString("MigrationWelcomepgAT");
        this.welcomePage.DescriptionText = Resource.GetString("WelcomePageAction");
        this.welcomePage.Location = new System.Drawing.Point(0, 0);
        this.welcomePage.Name = "welcomePage";
        this.welcomePage.Size = new System.Drawing.Size(496, 304);
        this.welcomePage.TabIndex = 1;
        this.welcomePage.WelcomeTitle = Resource.GetString("MigrationWelcomeTitle");
        this.serverPage.HeaderTitle = Resource.GetString("MigrationOptions");
        this.serverPage.Location = new System.Drawing.Point(0, 0);
        this.serverPage.Name = "serverPage";
        this.serverPage.Size = new System.Drawing.Size(496, 304);
        this.serverPage.TabIndex = 1;
        this.identityPage.HeaderTitle = Resource.GetString("ServerInfo");
        this.identityPage.Location = new System.Drawing.Point(0, 0);
        this.identityPage.Name = "identityPage";
        this.identityPage.Size = new System.Drawing.Size(496, 304);
        this.identityPage.TabIndex = 1;
        this.passphrasePage.HeaderTitle = "Passphrase Entry";
        this.passphrasePage.Location = new Point(0, 0);
        this.passphrasePage.Name = "passphrasePage";
        this.passphrasePage.Size = new Size(496,304);
        this.passphrasePage.TabIndex = 1;
        this.passphraseVerifyPage.HeaderTitle = "Passphrase";
        this.passphraseVerifyPage.Location = new Point(0, 0);
        this.passphraseVerifyPage.Size = new Size(496, 304);
        this.verifyPage.HeaderTitle = Resource.GetString("MigrateVerify");
        this.verifyPage.Location = new System.Drawing.Point(0, 0);
        this.verifyPage.Name = "verifyPage";
        this.verifyPage.Size = new System.Drawing.Size(496, 304);
        this.verifyPage.TabIndex = 1;
        this.completionPage.DescriptionText = Resource.GetString("CompletionPageDT");
        this.completionPage.Location = new System.Drawing.Point(0, 0);
        this.completionPage.Name = "completionPage";
        this.completionPage.Size = new System.Drawing.Size(496, 304);
        this.completionPage.TabIndex = 1;
        this.completionPage.WelcomeTitle = Resource.GetString("MigrationCompleteWT");
        this.Controls.Add(this.welcomePage);
        this.Controls.Add(this.serverPage);
        this.Controls.Add(this.identityPage);
        this.Controls.Add(this.passphrasePage);
        this.Controls.Add(this.passphraseVerifyPage);
        this.Controls.Add(this.verifyPage);
        this.Controls.Add(this.completionPage);
        try
        {
     this.Icon = new Icon(Path.Combine(Application.StartupPath, @"ifolder_app.ico"));
        }
        catch {}
        pages = new MigrationBaseWizardPage[maxPages];
        pages[0] = this.welcomePage;
        pages[1] = this.serverPage;
        pages[2] = this.identityPage;
        pages[3] = this.passphrasePage;
        pages[4] = this.passphraseVerifyPage;
        pages[5] = this.verifyPage;
        pages[6] = this.completionPage;
        try
        {
     Image image = Image.FromFile(Path.Combine(Application.StartupPath, "invitewiz.png"));
     this.welcomePage.Watermark = image;
     this.completionPage.Watermark = image;
     image = Image.FromFile(Path.Combine(Application.StartupPath, @"res\ifolder_invite_32.png"));
     this.serverPage.Thumbnail = image;
     this.verifyPage.Thumbnail = image;
     this.identityPage.Thumbnail = image;
        }
        catch {}
        for(int i=0;i<maxPages;i++)
     pages[i].Hide();
        pages[0].ActivatePage(0);
 }