Esempio n. 1
0
        void InitializeComponents()
        {
            this.SuspendLayout();

            ShowInTaskbar   = false;
            StartPosition   = FormStartPosition.CenterScreen;
            FormBorderStyle = FormBorderStyle.FixedDialog;
            MinimizeBox     = MaximizeBox = false;
            Icon            = null;
            ClientSize      = new Size(640, 440);

            int buttonSize   = 92;
            int buttonYLoc   = 464 - 2 * 24 - 4;
            int buttonXStart = Width - ((buttonSize + 4) * 4) - 4;

            label1.Size        = new Size(Width - 4, 1);
            label1.BorderStyle = BorderStyle.Fixed3D;
            label1.Location    = new Point(2, 404 - 2);
            label1.Anchor      = AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left;
            Controls.Add(label1);

            backButton.Text       = ResourceService.GetString("Global.BackButtonText");
            backButton.Location   = new Point(buttonXStart, buttonYLoc);
            backButton.ClientSize = new Size(buttonSize, 26);
            backButton.Click     += new EventHandler(ShowPrevPanelEvent);
            backButton.FlatStyle  = FlatStyle.System;
            backButton.Anchor     = AnchorStyles.Bottom | AnchorStyles.Right;
            Controls.Add(backButton);

            nextButton.Text       = ResourceService.GetString("Global.NextButtonText");
            nextButton.Location   = new Point(buttonXStart + buttonSize + 4, buttonYLoc);
            nextButton.ClientSize = new Size(buttonSize, 26);
            nextButton.Click     += new EventHandler(ShowNextPanelEvent);
            nextButton.FlatStyle  = FlatStyle.System;
            nextButton.Anchor     = AnchorStyles.Bottom | AnchorStyles.Right;
            Controls.Add(nextButton);

            finishButton.Text       = ResourceService.GetString("Dialog.WizardDialog.FinishButton");
            finishButton.Location   = new Point(buttonXStart + 2 * (buttonSize + 4), buttonYLoc);
            finishButton.ClientSize = new Size(buttonSize, 26);
            finishButton.Click     += new EventHandler(FinishEvent);
            finishButton.FlatStyle  = FlatStyle.System;
            finishButton.Anchor     = AnchorStyles.Bottom | AnchorStyles.Right;
            Controls.Add(finishButton);

            cancelButton.Text       = ResourceService.GetString("Global.CancelButtonText");
            cancelButton.Location   = new Point(buttonXStart + 3 * (buttonSize + 4), buttonYLoc);
            cancelButton.ClientSize = new Size(buttonSize, 26);
            cancelButton.Click     += new EventHandler(CancelEvent);
            cancelButton.FlatStyle  = FlatStyle.System;
            cancelButton.Anchor     = AnchorStyles.Bottom | AnchorStyles.Right;
            Controls.Add(cancelButton);

//			helpButton.Text = ResourceService.GetString("Global.HelpButtonText");
//			helpButton.Location = new Point(buttonXStart + 4 * (buttonSize + 4), buttonYLoc);
//			helpButton.ClientSize     = new Size(buttonSize, 26);
//			helpButton.Click   += new EventHandler(HelpEvent);
//			helpButton.FlatStyle = FlatStyle.System;
//			helpButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
//			Controls.Add(helpButton);

            statusPanel          = new StatusPanel(this);
            statusPanel.Location = new Point(2, 2);
            statusPanel.Anchor   = AnchorStyles.Bottom | AnchorStyles.Top | AnchorStyles.Left;
            Controls.Add(statusPanel);

            curPanel          = new CurrentPanelPanel(this);
            curPanel.Location = new Point(200, 2);
            curPanel.Anchor   = AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Left;
            Controls.Add(curPanel);

            dialogPanel.Location = new Point(200, 27);
            //          dialogPanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            dialogPanel.Size = new Size(Width - 8 - statusPanel.Bounds.Right,
                                        label1.Location.Y - dialogPanel.Location.Y);
            dialogPanel.Anchor = AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom;
            Controls.Add(dialogPanel);
            this.ResumeLayout(true);
        }
Esempio n. 2
0
		void InitializeComponents()
		{
			
			
			this.SuspendLayout();
			
			ShowInTaskbar = false;
			StartPosition   = FormStartPosition.CenterScreen;
			FormBorderStyle = FormBorderStyle.FixedDialog;
			MinimizeBox = MaximizeBox = false;
			Icon   = null;
			ClientSize = new Size(640, 440);
			
			int buttonSize = 92;
			int buttonYLoc = 464 -  2 * 24  - 4;
			int buttonXStart = Width - ((buttonSize + 4) * 4) - 4;
			
			label1.Size        = new Size(Width - 4, 1);
			label1.BorderStyle = BorderStyle.Fixed3D;
			label1.Location    = new Point(2, 404 - 2);
			label1.Anchor = AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left;
			Controls.Add(label1);
			
			backButton.Text = ResourceService.GetString("Global.BackButtonText");
			backButton.Location = new Point(buttonXStart, buttonYLoc);
			backButton.ClientSize     = new Size(buttonSize, 26);
			backButton.Click   += new EventHandler(ShowPrevPanelEvent);
			backButton.FlatStyle = FlatStyle.System;
			backButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
			Controls.Add(backButton);
			
			nextButton.Text = ResourceService.GetString("Global.NextButtonText");
			nextButton.Location = new Point(buttonXStart + buttonSize + 4, buttonYLoc);
			nextButton.ClientSize     = new Size(buttonSize, 26);
			nextButton.Click   += new EventHandler(ShowNextPanelEvent);
			nextButton.FlatStyle = FlatStyle.System;
			nextButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
			Controls.Add(nextButton);
			
			finishButton.Text = ResourceService.GetString("Dialog.WizardDialog.FinishButton");
			finishButton.Location = new Point(buttonXStart + 2 * (buttonSize + 4), buttonYLoc);
			finishButton.ClientSize     = new Size(buttonSize, 26);
			finishButton.Click   += new EventHandler(FinishEvent);
			finishButton.FlatStyle = FlatStyle.System;
			finishButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
			Controls.Add(finishButton);
			
			cancelButton.Text = ResourceService.GetString("Global.CancelButtonText");
			cancelButton.Location = new Point(buttonXStart + 3 * (buttonSize + 4), buttonYLoc);
			cancelButton.ClientSize     = new Size(buttonSize, 26);
			cancelButton.Click   += new EventHandler(CancelEvent);
			cancelButton.FlatStyle = FlatStyle.System;
			cancelButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
			Controls.Add(cancelButton);
			
//			helpButton.Text = ResourceService.GetString("Global.HelpButtonText");
//			helpButton.Location = new Point(buttonXStart + 4 * (buttonSize + 4), buttonYLoc);
//			helpButton.ClientSize     = new Size(buttonSize, 26);
//			helpButton.Click   += new EventHandler(HelpEvent);
//			helpButton.FlatStyle = FlatStyle.System;
//			helpButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
//			Controls.Add(helpButton);
			
			statusPanel = new StatusPanel(this);
			statusPanel.Location = new Point(2, 2);
			statusPanel.Anchor = AnchorStyles.Bottom | AnchorStyles.Top | AnchorStyles.Left;
			Controls.Add(statusPanel);
			
			curPanel = new CurrentPanelPanel(this);
			curPanel.Location = new Point(200, 2);
			curPanel.Anchor = AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Left;
			Controls.Add(curPanel);
			
			dialogPanel.Location    = new Point(200, 27);
			//        	dialogPanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			dialogPanel.Size        = new Size(Width - 8 - statusPanel.Bounds.Right,
			                                   label1.Location.Y - dialogPanel.Location.Y);
			dialogPanel.Anchor = AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom;
			Controls.Add(dialogPanel);
			this.ResumeLayout(true);
		}