Accept input in architectural units

This commit is contained in:
AJ
2019-11-20 08:22:54 -05:00
parent 9abb4d93b7
commit f290c9ec7f
7 changed files with 318 additions and 149 deletions

View File

@@ -29,11 +29,15 @@
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.nameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.lengthDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.quantityDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.TotalLength = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.itemBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
@@ -45,17 +49,10 @@
this.textBox1 = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.feetBox = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.inchesBox = new System.Windows.Forms.TextBox();
this.nameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.lengthDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.quantityDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.itemBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.stockLengthBox = new System.Windows.Forms.TextBox();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.toolStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.itemBindingSource)).BeginInit();
this.toolStrip1.SuspendLayout();
this.SuspendLayout();
//
// dataGridView1
@@ -84,18 +81,50 @@
this.dataGridView1.RowTemplate.Height = 26;
this.dataGridView1.Size = new System.Drawing.Size(822, 349);
this.dataGridView1.TabIndex = 11;
this.dataGridView1.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellEndEdit);
this.dataGridView1.CellValidated += new System.Windows.Forms.DataGridViewCellEventHandler(this.DataGridView1_CellValidated);
this.dataGridView1.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.dataGridView1_DataError);
//
// nameDataGridViewTextBoxColumn
//
this.nameDataGridViewTextBoxColumn.DataPropertyName = "Name";
this.nameDataGridViewTextBoxColumn.HeaderText = "Name";
this.nameDataGridViewTextBoxColumn.Name = "nameDataGridViewTextBoxColumn";
this.nameDataGridViewTextBoxColumn.Width = 200;
//
// lengthDataGridViewTextBoxColumn
//
this.lengthDataGridViewTextBoxColumn.DataPropertyName = "LengthInputValue";
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
this.lengthDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle1;
this.lengthDataGridViewTextBoxColumn.HeaderText = "Length";
this.lengthDataGridViewTextBoxColumn.Name = "lengthDataGridViewTextBoxColumn";
this.lengthDataGridViewTextBoxColumn.Width = 120;
//
// quantityDataGridViewTextBoxColumn
//
this.quantityDataGridViewTextBoxColumn.DataPropertyName = "Quantity";
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
this.quantityDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle2;
this.quantityDataGridViewTextBoxColumn.HeaderText = "Qty";
this.quantityDataGridViewTextBoxColumn.Name = "quantityDataGridViewTextBoxColumn";
this.quantityDataGridViewTextBoxColumn.Width = 50;
//
// TotalLength
//
this.TotalLength.DataPropertyName = "TotalLength";
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Info;
dataGridViewCellStyle4.Format = "N3";
this.TotalLength.DefaultCellStyle = dataGridViewCellStyle4;
this.TotalLength.HeaderText = "Total Length";
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Info;
dataGridViewCellStyle3.Format = "N3";
this.TotalLength.DefaultCellStyle = dataGridViewCellStyle3;
this.TotalLength.HeaderText = "Total Length (in)";
this.TotalLength.Name = "TotalLength";
this.TotalLength.ReadOnly = true;
this.TotalLength.Width = 150;
//
// itemBindingSource
//
this.itemBindingSource.DataSource = typeof(CutToLength.UIItem);
//
// label1
//
@@ -213,94 +242,25 @@
this.label4.TabIndex = 8;
this.label4.Text = "Cut width";
//
// feetBox
// stockLengthBox
//
this.feetBox.Location = new System.Drawing.Point(110, 42);
this.feetBox.Name = "feetBox";
this.feetBox.Size = new System.Drawing.Size(53, 25);
this.feetBox.TabIndex = 2;
this.feetBox.Text = "12";
this.feetBox.TextChanged += new System.EventHandler(this.FeetBox_TextChanged);
this.feetBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.TextBox2_KeyPress);
this.feetBox.Validating += new System.ComponentModel.CancelEventHandler(this.TextBox2_Validating);
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Segoe UI Semibold", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label5.ForeColor = System.Drawing.Color.Gray;
this.label5.Location = new System.Drawing.Point(166, 45);
this.label5.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(17, 17);
this.label5.TabIndex = 3;
this.label5.Text = "ft";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("Segoe UI Semibold", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label6.ForeColor = System.Drawing.Color.Gray;
this.label6.Location = new System.Drawing.Point(245, 45);
this.label6.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(19, 17);
this.label6.TabIndex = 5;
this.label6.Text = "in";
//
// inchesBox
//
this.inchesBox.Location = new System.Drawing.Point(189, 42);
this.inchesBox.Name = "inchesBox";
this.inchesBox.Size = new System.Drawing.Size(53, 25);
this.inchesBox.TabIndex = 4;
this.inchesBox.Text = "0";
this.inchesBox.TextChanged += new System.EventHandler(this.InchesBox_TextChanged);
this.inchesBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.TextBox2_KeyPress);
this.inchesBox.Validating += new System.ComponentModel.CancelEventHandler(this.TextBox2_Validating);
//
// nameDataGridViewTextBoxColumn
//
this.nameDataGridViewTextBoxColumn.DataPropertyName = "Name";
this.nameDataGridViewTextBoxColumn.HeaderText = "Name";
this.nameDataGridViewTextBoxColumn.Name = "nameDataGridViewTextBoxColumn";
this.nameDataGridViewTextBoxColumn.Width = 200;
//
// lengthDataGridViewTextBoxColumn
//
this.lengthDataGridViewTextBoxColumn.DataPropertyName = "Length";
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
this.lengthDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle5;
this.lengthDataGridViewTextBoxColumn.HeaderText = "Length";
this.lengthDataGridViewTextBoxColumn.Name = "lengthDataGridViewTextBoxColumn";
this.lengthDataGridViewTextBoxColumn.Width = 120;
//
// quantityDataGridViewTextBoxColumn
//
this.quantityDataGridViewTextBoxColumn.DataPropertyName = "Quantity";
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
this.quantityDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle6;
this.quantityDataGridViewTextBoxColumn.HeaderText = "Qty";
this.quantityDataGridViewTextBoxColumn.Name = "quantityDataGridViewTextBoxColumn";
this.quantityDataGridViewTextBoxColumn.Width = 50;
//
// itemBindingSource
//
this.itemBindingSource.DataSource = typeof(CutToLength.UIItem);
this.stockLengthBox.Location = new System.Drawing.Point(110, 42);
this.stockLengthBox.Name = "stockLengthBox";
this.stockLengthBox.Size = new System.Drawing.Size(142, 25);
this.stockLengthBox.TabIndex = 2;
this.stockLengthBox.Text = "12ft 0in";
this.stockLengthBox.TextChanged += new System.EventHandler(this.StockLengthBox_TextChanged);
//
// MainForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(846, 484);
this.Controls.Add(this.inchesBox);
this.Controls.Add(this.feetBox);
this.Controls.Add(this.stockLengthBox);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.comboBox1);
this.Controls.Add(this.toolStrip1);
this.Controls.Add(this.label4);
this.Controls.Add(this.label6);
this.Controls.Add(this.label3);
this.Controls.Add(this.label5);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.dataGridView1);
@@ -311,9 +271,9 @@
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Cut To Length";
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.itemBindingSource)).EndInit();
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.itemBindingSource)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -329,18 +289,15 @@
private System.Windows.Forms.ToolStripButton saveButton;
private System.Windows.Forms.ToolStripButton runButton;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.DataGridViewTextBoxColumn nameDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn lengthDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn quantityDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn TotalLength;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox feetBox;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox inchesBox;
private System.Windows.Forms.TextBox stockLengthBox;
private System.Windows.Forms.DataGridViewTextBoxColumn nameDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn lengthDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn quantityDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn TotalLength;
}
}