Exemplo n.º 1
0
 public AccountWizard( iFolderWebService ifWebService, SimiasWebService simiasWebService, Manager simiasManager, bool firstAccount, Preferences prefs )
 {
     this.simiasManager = simiasManager;
        this.simiasWebService = simiasWebService;
        this.ifWebService = ifWebService;
        this.prefs = prefs;
        InitializeComponent();
        this.welcomePage = new WelcomePage();
        this.serverPage = new ServerPage( firstAccount );
        this.identityPage = new IdentityPage();
        this.verifyPage = new VerifyPage( firstAccount );
        this.completionPage = new CompletionPage();
        this.defaultiFolderPage = new DefaultiFolderPage(this.ifWebService, this.simiasWebService, this.domainInfo);
        this.welcomePage.DescriptionText = Resource.GetString("WelcomePageDescription");
        this.welcomePage.ActionText = Resource.GetString("WelcomePageAction");
        this.welcomePage.Location = new System.Drawing.Point(0, 0);
        this.welcomePage.Name = Resource.GetString("WelcomePageName");
        this.welcomePage.Size = new System.Drawing.Size(496, 304);
        this.welcomePage.TabIndex = 1;
        this.welcomePage.WelcomeTitle = Resource.GetString("WelcomePageTitle");
        this.serverPage.HeaderTitle = Resource.GetString("ServerPageHeaderTitle");
        this.serverPage.Location = new System.Drawing.Point(0, 0);
        this.serverPage.Name = Resource.GetString("ServerPageName");
        this.serverPage.Size = new System.Drawing.Size(496, 304);
        this.serverPage.TabIndex = 1;
        this.identityPage.HeaderTitle = Resource.GetString("IdentityPageHeaderTitle");
        this.identityPage.Location = new System.Drawing.Point(0, 0);
        this.identityPage.Name = Resource.GetString("IdentityPageName");
        this.identityPage.Size = new System.Drawing.Size(496, 304);
        this.identityPage.TabIndex = 1;
        this.verifyPage.HeaderTitle = Resource.GetString("VerifyPageHeaderTitle");
        this.verifyPage.Location = new System.Drawing.Point(0, 0);
        this.verifyPage.Name = Resource.GetString("VerifyPageName");
        this.verifyPage.Size = new System.Drawing.Size(496, 304);
        this.verifyPage.TabIndex = 1;
        this.defaultiFolderPage.Name = "defaultiFolderPage";
        this.defaultiFolderPage.Location = new System.Drawing.Point(0, 0);
        this.defaultiFolderPage.Size = new System.Drawing.Size(496, 304);
        this.defaultiFolderPage.HeaderTitle = Resource.GetString("DefaultiFolder");
        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("CompletionPageWT");
        this.Controls.Add(this.welcomePage);
        this.Controls.Add(this.serverPage);
        this.Controls.Add(this.identityPage);
        this.Controls.Add(this.verifyPage);
        this.Controls.Add(this.defaultiFolderPage);
        this.Controls.Add(this.completionPage);
        try
        {
     this.Icon = new Icon(Path.Combine(Application.StartupPath, @"res\ifolder_16.ico"));
        }
        catch {}
        pages = new BaseWizardPage[maxPages];
        pages[0] = this.welcomePage;
        pages[1] = this.serverPage;
        pages[2] = this.identityPage;
        pages[3] = this.verifyPage;
        pages[4] = this.defaultiFolderPage;
        pages[5] = this.completionPage;
        try
        {
     Image image = Image.FromFile(Path.Combine(Application.StartupPath, @"res\ifolder_account_wiz.png"));
     this.welcomePage.Watermark = image;
     this.completionPage.Watermark = image;
     image = Image.FromFile(Path.Combine(Application.StartupPath, @"res\ifolder-add-account48.png"));
     this.serverPage.Thumbnail = image;
     this.verifyPage.Thumbnail = image;
     this.identityPage.Thumbnail = image;
     this.defaultiFolderPage.Thumbnail = image;
        }
        catch {}
        foreach (BaseWizardPage page in pages)
        {
     page.Hide();
        }
        pages[0].ActivatePage(0);
 }
Exemplo n.º 2
0
        /// <summary>
        /// Constructs an AccountWizard object.
        /// </summary>
        public AccountWizard(iFolderWebService ifWebService, SimiasWebService simiasWebService, Manager simiasManager, bool firstAccount, Preferences prefs)
        {
            this.simiasManager    = simiasManager;
            this.simiasWebService = simiasWebService;
            this.ifWebService     = ifWebService;
            this.prefs            = prefs;

            //
            // Required for Windows Form Designer support
            //
            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 WelcomePage();
            this.serverPage         = new ServerPage(firstAccount);
            this.identityPage       = new IdentityPage();
            this.verifyPage         = new VerifyPage(firstAccount);
            this.completionPage     = new CompletionPage();
            this.defaultiFolderPage = new DefaultiFolderPage(this.ifWebService, this.simiasWebService, this.domainInfo);
            //
            // welcomePage
            //
            // TODO: Localize
            this.welcomePage.DescriptionText = Resource.GetString("WelcomePageDescription"); //"This wizard will guide you through setting up your iFolder account.";
            this.welcomePage.ActionText      = Resource.GetString("WelcomePageAction");      //"To continue, click Next.";
            this.welcomePage.Location        = new System.Drawing.Point(0, 0);
            this.welcomePage.Name            = Resource.GetString("WelcomePageName");        //"welcomePage";
            this.welcomePage.Size            = new System.Drawing.Size(496, 304);
            this.welcomePage.TabIndex        = 1;
            this.welcomePage.WelcomeTitle    = Resource.GetString("WelcomePageTitle");         //"Welcome to the iFolder Account Wizard";
            //
            // serverPage
            //
            // TODO: Localize
            this.serverPage.HeaderTitle = Resource.GetString("ServerPageHeaderTitle"); //"Choose an iFolder Server";
            this.serverPage.Location    = new System.Drawing.Point(0, 0);
            this.serverPage.Name        = Resource.GetString("ServerPageName");        //"serverPage";
            this.serverPage.Size        = new System.Drawing.Size(496, 304);
            this.serverPage.TabIndex    = 1;
            //
            // identityPage
            //
            // TODO: Localize
            this.identityPage.HeaderTitle = Resource.GetString("IdentityPageHeaderTitle"); //"iFolder Account Information";
            this.identityPage.Location    = new System.Drawing.Point(0, 0);
            this.identityPage.Name        = Resource.GetString("IdentityPageName");        //"identityPage";
            this.identityPage.Size        = new System.Drawing.Size(496, 304);
            this.identityPage.TabIndex    = 1;
            //
            // verifyPage
            //
            // TODO: Localize
            this.verifyPage.HeaderTitle = Resource.GetString("VerifyPageHeaderTitle"); //"Verify and Connect";
            this.verifyPage.Location    = new System.Drawing.Point(0, 0);
            this.verifyPage.Name        = Resource.GetString("VerifyPageName");        //"verifyPage";
            this.verifyPage.Size        = new System.Drawing.Size(496, 304);
            this.verifyPage.TabIndex    = 1;
            //
            // DefaultiFolderPage
            //
            this.defaultiFolderPage.Name        = "defaultiFolderPage";
            this.defaultiFolderPage.Location    = new System.Drawing.Point(0, 0);
            this.defaultiFolderPage.Size        = new System.Drawing.Size(496, 304);
            this.defaultiFolderPage.HeaderTitle = Resource.GetString("DefaultiFolder");            //"Default iFolder";
            //
            // 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("CompletionPageWT");         //"Completing the iFolder Invitation 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.defaultiFolderPage);
            this.Controls.Add(this.completionPage);

            // Load the application icon.
            try
            {
                this.Icon = new Icon(Path.Combine(Application.StartupPath, @"res\ifolder_16.ico"));
            }
            catch {}             // Ignore

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

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

                // TODO:
                image = Image.FromFile(Path.Combine(Application.StartupPath, @"res\ifolder-add-account48.png"));
                this.serverPage.Thumbnail         = image;
                this.verifyPage.Thumbnail         = image;
                this.identityPage.Thumbnail       = image;
                this.defaultiFolderPage.Thumbnail = image;
            }
            catch {}             // Ignore. Unable to load watermark. No functionality issues

            foreach (BaseWizardPage page in pages)
            {
                page.Hide();
            }

            // Activate the first wizard page.
            pages[0].ActivatePage(0);
        }