# HG changeset patch # User IBBoard # Date 1253045303 0 # Node ID 53a18feb237091068ca4544b5d11e116a68db516 # Parent c972fb28367571ae627a5e2fd990935c12cd7d53 * Set anchoring for better handling of resizing dialog no-open-ticket diff -r c972fb283675 -r 53a18feb2370 FrmUnit.cs --- a/FrmUnit.cs Tue Sep 15 19:41:41 2009 +0000 +++ b/FrmUnit.cs Tue Sep 15 20:08:23 2009 +0000 @@ -188,17 +188,20 @@ this.lblOptionalEquip = new System.Windows.Forms.Label(); this.bttnReplaceWeapon = new System.Windows.Forms.Button(); this.bttnEditReqdWeapon = new System.Windows.Forms.Button(); - ((System.ComponentModel.ISupportInitialize) (this.statsGrid)).BeginInit(); - ((System.ComponentModel.ISupportInitialize) (this.unitSize)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.statsGrid)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.unitSize)).BeginInit(); this.SuspendLayout(); - // + // // statsGrid - // + // this.statsGrid.AllowNavigation = false; this.statsGrid.AllowSorting = false; this.statsGrid.AlternatingBackColor = System.Drawing.SystemColors.Control; + this.statsGrid.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.statsGrid.BackgroundColor = System.Drawing.SystemColors.Control; this.statsGrid.CaptionVisible = false; + this.statsGrid.CausesValidation = false; this.statsGrid.DataMember = ""; this.statsGrid.GridLineColor = System.Drawing.SystemColors.ControlDarkDark; this.statsGrid.HeaderForeColor = System.Drawing.SystemColors.ControlText; @@ -212,51 +215,54 @@ this.statsGrid.Size = new System.Drawing.Size(600, 88); this.statsGrid.TabIndex = 0; this.statsGrid.TabStop = false; - // + // // tbUnitName - // + // this.tbUnitName.Location = new System.Drawing.Point(8, 8); this.tbUnitName.Name = "tbUnitName"; this.tbUnitName.Size = new System.Drawing.Size(344, 20); this.tbUnitName.TabIndex = 1; - this.tbUnitName.Text = ""; + this.tbUnitName.Leave += new System.EventHandler(this.tbUnitName_Leave); this.tbUnitName.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tbUnitName_KeyDown); - this.tbUnitName.Leave += new System.EventHandler(this.tbUnitName_Leave); - // + // // unitSize - // + // + this.unitSize.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.unitSize.Location = new System.Drawing.Point(528, 8); this.unitSize.Name = "unitSize"; this.unitSize.Size = new System.Drawing.Size(80, 20); this.unitSize.TabIndex = 1; this.unitSize.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; - this.unitSize.Value = new System.Decimal(new int[] { - 1, - 0, - 0, - 0}); + this.unitSize.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.unitSize.Leave += new System.EventHandler(this.unitSize_Leave); this.unitSize.KeyDown += new System.Windows.Forms.KeyEventHandler(this.unitSize_KeyDown); - this.unitSize.Leave += new System.EventHandler(this.unitSize_Leave); - // + // // lblUnitSize - // + // + this.lblUnitSize.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.lblUnitSize.Location = new System.Drawing.Point(424, 8); this.lblUnitSize.Name = "lblUnitSize"; + this.lblUnitSize.Size = new System.Drawing.Size(100, 23); this.lblUnitSize.TabIndex = 0; this.lblUnitSize.Text = "unit size"; this.lblUnitSize.TextAlign = System.Drawing.ContentAlignment.TopRight; - // + // // lblRequiredEquip - // + // this.lblRequiredEquip.Location = new System.Drawing.Point(8, 128); this.lblRequiredEquip.Name = "lblRequiredEquip"; this.lblRequiredEquip.Size = new System.Drawing.Size(88, 32); this.lblRequiredEquip.TabIndex = 3; this.lblRequiredEquip.Text = "reqd equipment"; this.lblRequiredEquip.TextAlign = System.Drawing.ContentAlignment.TopRight; - // + // // bttnAddWeapon - // + // + this.bttnAddWeapon.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.bttnAddWeapon.FlatStyle = System.Windows.Forms.FlatStyle.System; this.bttnAddWeapon.Location = new System.Drawing.Point(520, 200); this.bttnAddWeapon.Name = "bttnAddWeapon"; @@ -264,9 +270,10 @@ this.bttnAddWeapon.TabIndex = 4; this.bttnAddWeapon.Text = "add"; this.bttnAddWeapon.Click += new System.EventHandler(this.bttnAddWeapon_Click); - // + // // bttnRemoveWeapon - // + // + this.bttnRemoveWeapon.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.bttnRemoveWeapon.Enabled = false; this.bttnRemoveWeapon.FlatStyle = System.Windows.Forms.FlatStyle.System; this.bttnRemoveWeapon.Location = new System.Drawing.Point(520, 248); @@ -275,18 +282,21 @@ this.bttnRemoveWeapon.TabIndex = 5; this.bttnRemoveWeapon.Text = "remove"; this.bttnRemoveWeapon.Click += new System.EventHandler(this.bttnRemoveWeapon_Click); - // + // // reqdList - // + // + this.reqdList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.reqdList.Location = new System.Drawing.Point(104, 128); this.reqdList.Name = "reqdList"; this.reqdList.Size = new System.Drawing.Size(408, 69); this.reqdList.TabIndex = 6; this.reqdList.DoubleClick += new System.EventHandler(this.reqdList_DoubleClick); this.reqdList.SelectedIndexChanged += new System.EventHandler(this.reqdList_SelectedIndexChanged); - // + // // bttnEditWeapon - // + // + this.bttnEditWeapon.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.bttnEditWeapon.Enabled = false; this.bttnEditWeapon.FlatStyle = System.Windows.Forms.FlatStyle.System; this.bttnEditWeapon.Location = new System.Drawing.Point(520, 224); @@ -295,27 +305,30 @@ this.bttnEditWeapon.TabIndex = 7; this.bttnEditWeapon.Text = "edit"; this.bttnEditWeapon.Click += new System.EventHandler(this.bttnEditWeapon_Click); - // + // // optList - // + // + this.optList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.optList.Location = new System.Drawing.Point(104, 200); this.optList.Name = "optList"; this.optList.Size = new System.Drawing.Size(408, 69); this.optList.TabIndex = 9; this.optList.DoubleClick += new System.EventHandler(this.optList_DoubleClick); this.optList.SelectedIndexChanged += new System.EventHandler(this.optList_SelectedIndexChanged); - // + // // lblOptionalEquip - // + // this.lblOptionalEquip.Location = new System.Drawing.Point(8, 200); this.lblOptionalEquip.Name = "lblOptionalEquip"; this.lblOptionalEquip.Size = new System.Drawing.Size(88, 32); this.lblOptionalEquip.TabIndex = 8; this.lblOptionalEquip.Text = "opt equipment"; this.lblOptionalEquip.TextAlign = System.Drawing.ContentAlignment.TopRight; - // + // // bttnReplaceWeapon - // + // + this.bttnReplaceWeapon.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.bttnReplaceWeapon.Enabled = false; this.bttnReplaceWeapon.FlatStyle = System.Windows.Forms.FlatStyle.System; this.bttnReplaceWeapon.Location = new System.Drawing.Point(520, 128); @@ -324,9 +337,10 @@ this.bttnReplaceWeapon.TabIndex = 10; this.bttnReplaceWeapon.Text = "replace"; this.bttnReplaceWeapon.Click += new System.EventHandler(this.bttnReplaceWeapon_Click); - // + // // bttnEditReqdWeapon - // + // + this.bttnEditReqdWeapon.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.bttnEditReqdWeapon.Enabled = false; this.bttnEditReqdWeapon.FlatStyle = System.Windows.Forms.FlatStyle.System; this.bttnEditReqdWeapon.Location = new System.Drawing.Point(520, 152); @@ -335,9 +349,9 @@ this.bttnEditReqdWeapon.TabIndex = 11; this.bttnEditReqdWeapon.Text = "edit"; this.bttnEditReqdWeapon.Click += new System.EventHandler(this.bttnEditReqdWeapon_Click); - // + // // FrmUnit - // + // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(616, 314); this.Controls.Add(this.bttnEditReqdWeapon); @@ -356,9 +370,10 @@ this.Name = "FrmUnit"; this.ShowInTaskbar = false; this.Text = "FrmUnit"; - ((System.ComponentModel.ISupportInitialize) (this.statsGrid)).EndInit(); - ((System.ComponentModel.ISupportInitialize) (this.unitSize)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.statsGrid)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.unitSize)).EndInit(); this.ResumeLayout(false); + this.PerformLayout(); } #endregion diff -r c972fb283675 -r 53a18feb2370 FrmUnit.resx --- a/FrmUnit.resx Tue Sep 15 19:41:41 2009 +0000 +++ b/FrmUnit.resx Tue Sep 15 20:08:23 2009 +0000 @@ -3,7 +3,7 @@ + + + + + + + + + + + + + + + + + + - + + @@ -89,159 +109,12 @@ text/microsoft-resx - 1.3 + 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - False - - - Private - - - Private - - - Private - - - False - - - Private - - - False - - - Private - - - Private - - - False - - - Private - - - Private - - - False - - - Private - - - Private - - - False - - - Private - - - Private - - - False - - - Private - - - Private - - - Private - - - False - - - Private - - - False - - - Private - - - Private - - - Private - - - False - - - Private - - - False - - - Private - - - Private - - - False - - - Private - - - Private - - - False - - - Private - - - Private - - - False - - - (Default) - - - False - - - False - - - 8, 8 - - - True - - - FrmUnit - - - 80 - - - True - - - Private - \ No newline at end of file