diff FrmUnit.cs @ 51:53a18feb2370

* Set anchoring for better handling of resizing dialog no-open-ticket
author IBBoard <dev@ibboard.co.uk>
date Tue, 15 Sep 2009 20:08:23 +0000
parents 740350673006
children 4a56900936aa
line wrap: on
line diff
--- 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