コード例 #1
0
		/// <summary>
		///     Changes the language of the form.
		/// </summary>
		/// <param name="form">
		///     <c>Form</c> object to apply changes to.
		/// </param>
		private void ChangeFormLanguage(System.Windows.Forms.Form form) {
			form.SuspendLayout();
			Cursor.Current = Cursors.WaitCursor;
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(form.GetType());
			// change main form resources
			form.Text = (string)(GetSafeValue(resources, "$this.Text", form.Text));
			ReloadControlCommonProperties(form, resources);
			ToolTip toolTip = GetToolTip(form);
			// change text of all containing controls
			RecurControls(form, resources, toolTip);
			// change the text of menus
			ScanNonControls(form, resources);
			form.ResumeLayout();
		}
コード例 #2
0
ファイル: Game1.cs プロジェクト: KhkhkhTeMakhkhKh/Glib
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent(ref System.Windows.Forms.Form winform)
 {
     this.tintColorDialog = new System.Windows.Forms.ColorDialog();
     this.tintChangeButton = new System.Windows.Forms.Button();
     winform.SuspendLayout();
     //
     // tintChangeButton
     //
     this.tintChangeButton.Location = new System.Drawing.Point(13, 63);
     this.tintChangeButton.Name = "tintChangeButton";
     this.tintChangeButton.Size = new System.Drawing.Size(75, 23);
     this.tintChangeButton.TabIndex = 0;
     this.tintChangeButton.Text = "Change Tint";
     this.tintChangeButton.Click += new EventHandler(tintChangeButton_Click);
     this.tintChangeButton.UseVisualStyleBackColor = true;
     //
     // Form1
     //
     winform.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     winform.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     winform.ClientSize = new System.Drawing.Size(736, 496);
     winform.Controls.Add(this.tintChangeButton);
     winform.Name = "Sprite Previewer";
     winform.Text = "Sprite Previewer";
     winform.ResumeLayout(false);
 }
コード例 #3
0
ファイル: ContactViewContainer.cs プロジェクト: kommee/KomMee
        public void createViewForReading(System.Windows.Forms.Panel parentPanel)
        {
            ContactViewContainer.firstNameTextbox = null;
            ContactViewContainer.lastNameTextbox = null;
            ContactViewContainer.mobileNumberTextbox = null;
            ContactViewContainer.firstNameLabel = null;
            ContactViewContainer.lastNameLabel = null;
            ContactViewContainer.mobileNumberLabel = null;

            parentPanel.SuspendLayout();

            ContactViewContainer.firstNameLabel = new Label();
            ContactViewContainer.firstNameLabel.SuspendLayout();
            ContactViewContainer.firstNameLabel.Width = 490;
            ContactViewContainer.firstNameLabel.Height = 25;
            ContactViewContainer.firstNameLabel.Left = 0;
            ContactViewContainer.firstNameLabel.Top = 0;
            ContactViewContainer.firstNameLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75f, System.Drawing.FontStyle.Bold);
            ContactViewContainer.firstNameLabel.Text = "Vorname:";

            ContactViewContainer.firstNameTextbox = new TextBox();
            ContactViewContainer.firstNameTextbox.SuspendLayout();
            ContactViewContainer.firstNameTextbox.Width = 490;
            ContactViewContainer.firstNameTextbox.Height = 50;
            ContactViewContainer.firstNameTextbox.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75f, System.Drawing.FontStyle.Bold);
            ContactViewContainer.firstNameTextbox.Left = 0;
            ContactViewContainer.firstNameTextbox.Top = 35;
            ContactViewContainer.firstNameTextbox.ReadOnly = true;
            ContactViewContainer.firstNameTextbox.BackColor = Color.MistyRose;

            ContactViewContainer.lastNameLabel = new Label();
            ContactViewContainer.lastNameLabel.SuspendLayout();
            ContactViewContainer.lastNameLabel.Width = 490;
            ContactViewContainer.lastNameLabel.Height = 25;
            ContactViewContainer.lastNameLabel.Left = 0;
            ContactViewContainer.lastNameLabel.Top = 70;
            ContactViewContainer.lastNameLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75f, System.Drawing.FontStyle.Bold);
            ContactViewContainer.lastNameLabel.Text = "Nachname:";

            ContactViewContainer.lastNameTextbox = new TextBox();
            ContactViewContainer.lastNameTextbox.SuspendLayout();
            ContactViewContainer.lastNameTextbox.Width = 490;
            ContactViewContainer.lastNameTextbox.Height = 50;
            ContactViewContainer.lastNameTextbox.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75f, System.Drawing.FontStyle.Bold);
            ContactViewContainer.lastNameTextbox.Left = 0;
            ContactViewContainer.lastNameTextbox.Top = 105;
            ContactViewContainer.lastNameTextbox.ReadOnly = true;
            ContactViewContainer.lastNameTextbox.BackColor = System.Drawing.Color.White;

            ContactViewContainer.mobileNumberLabel = new Label();
            ContactViewContainer.mobileNumberLabel.SuspendLayout();
            ContactViewContainer.mobileNumberLabel.Width = 490;
            ContactViewContainer.mobileNumberLabel.Height = 25;
            ContactViewContainer.mobileNumberLabel.Left = 0;
            ContactViewContainer.mobileNumberLabel.Top = 140;
            ContactViewContainer.mobileNumberLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75f, System.Drawing.FontStyle.Bold);
            ContactViewContainer.mobileNumberLabel.Text = "Telefonnummer:";

            ContactViewContainer.mobileNumberTextbox = new TextBox();
            ContactViewContainer.mobileNumberTextbox.SuspendLayout();
            ContactViewContainer.mobileNumberTextbox.Width = 490;
            ContactViewContainer.mobileNumberTextbox.Height = 50;
            ContactViewContainer.mobileNumberTextbox.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75f, System.Drawing.FontStyle.Bold);
            ContactViewContainer.mobileNumberTextbox.Left = 0;
            ContactViewContainer.mobileNumberTextbox.Top = 175;
            ContactViewContainer.mobileNumberTextbox.ReadOnly = true;
            ContactViewContainer.mobileNumberTextbox.BackColor = System.Drawing.Color.White;

            parentPanel.Controls.Add(ContactViewContainer.firstNameLabel);
            parentPanel.Controls.Add(ContactViewContainer.firstNameTextbox);
            parentPanel.Controls.Add(ContactViewContainer.lastNameLabel);
            parentPanel.Controls.Add(ContactViewContainer.lastNameTextbox);
            parentPanel.Controls.Add(ContactViewContainer.mobileNumberLabel);
            parentPanel.Controls.Add(ContactViewContainer.mobileNumberTextbox);

            ContactViewContainer.firstNameLabel.ResumeLayout(false);
            ContactViewContainer.firstNameTextbox.ResumeLayout(false);
            ContactViewContainer.lastNameLabel.ResumeLayout(false);
            ContactViewContainer.lastNameTextbox.ResumeLayout(false);
            ContactViewContainer.mobileNumberLabel.ResumeLayout(false);
            ContactViewContainer.mobileNumberTextbox.ResumeLayout(false);

            parentPanel.ResumeLayout(false);
        }
コード例 #4
0
ファイル: frm_advresbrs.cs プロジェクト: Trowalts/SpUD
 public void Dtg_Ctl_Sus_Lot(System.Windows.Forms.Control myctl, bool suspend)
 {
     if (suspend) myctl.SuspendLayout();
     else myctl.ResumeLayout();
 }