Disable save and run buttons when items are empty

This commit is contained in:
aj
2018-06-02 20:22:14 -04:00
parent 4277b866af
commit 2d0494731d
3 changed files with 236 additions and 209 deletions

View File

@@ -29,10 +29,15 @@
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
this.dataGridView1 = new System.Windows.Forms.DataGridView(); 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.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label();
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown(); this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
@@ -40,26 +45,21 @@
this.numericUpDown2 = new System.Windows.Forms.NumericUpDown(); this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();
this.toolStrip1 = new System.Windows.Forms.ToolStrip(); this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton(); this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
this.toolStripButton2 = new System.Windows.Forms.ToolStripButton(); this.saveButton = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripButton3 = new System.Windows.Forms.ToolStripButton(); this.runButton = new System.Windows.Forms.ToolStripButton();
this.TotalLength = new System.Windows.Forms.DataGridViewTextBoxColumn();
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);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.itemBindingSource)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();
this.toolStrip1.SuspendLayout(); this.toolStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.itemBindingSource)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
// //
// dataGridView1 // dataGridView1
// //
this.dataGridView1.AllowUserToResizeRows = false; this.dataGridView1.AllowUserToResizeRows = false;
this.dataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.dataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.dataGridView1.AutoGenerateColumns = false; this.dataGridView1.AutoGenerateColumns = false;
this.dataGridView1.BackgroundColor = System.Drawing.Color.White; this.dataGridView1.BackgroundColor = System.Drawing.Color.White;
@@ -82,6 +82,46 @@
this.dataGridView1.Size = new System.Drawing.Size(763, 361); this.dataGridView1.Size = new System.Drawing.Size(763, 361);
this.dataGridView1.TabIndex = 5; this.dataGridView1.TabIndex = 5;
// //
// nameDataGridViewTextBoxColumn
//
this.nameDataGridViewTextBoxColumn.DataPropertyName = "Name";
this.nameDataGridViewTextBoxColumn.HeaderText = "Name";
this.nameDataGridViewTextBoxColumn.Name = "nameDataGridViewTextBoxColumn";
this.nameDataGridViewTextBoxColumn.Width = 200;
//
// lengthDataGridViewTextBoxColumn
//
this.lengthDataGridViewTextBoxColumn.DataPropertyName = "Length";
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
this.lengthDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle4;
this.lengthDataGridViewTextBoxColumn.HeaderText = "Length";
this.lengthDataGridViewTextBoxColumn.Name = "lengthDataGridViewTextBoxColumn";
this.lengthDataGridViewTextBoxColumn.Width = 120;
//
// quantityDataGridViewTextBoxColumn
//
this.quantityDataGridViewTextBoxColumn.DataPropertyName = "Quantity";
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
this.quantityDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle5;
this.quantityDataGridViewTextBoxColumn.HeaderText = "Qty";
this.quantityDataGridViewTextBoxColumn.Name = "quantityDataGridViewTextBoxColumn";
this.quantityDataGridViewTextBoxColumn.Width = 50;
//
// TotalLength
//
this.TotalLength.DataPropertyName = "TotalLength";
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Info;
dataGridViewCellStyle6.Format = "N3";
this.TotalLength.DefaultCellStyle = dataGridViewCellStyle6;
this.TotalLength.HeaderText = "Total Length";
this.TotalLength.Name = "TotalLength";
this.TotalLength.ReadOnly = true;
//
// itemBindingSource
//
this.itemBindingSource.DataSource = typeof(CutToLength.UIItem);
//
// label1 // label1
// //
this.label1.AutoSize = true; this.label1.AutoSize = true;
@@ -154,9 +194,9 @@
// //
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripButton1, this.toolStripButton1,
this.toolStripButton2, this.saveButton,
this.toolStripSeparator1, this.toolStripSeparator1,
this.toolStripButton3}); this.runButton});
this.toolStrip1.Location = new System.Drawing.Point(0, 0); this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1"; this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(787, 39); this.toolStrip1.Size = new System.Drawing.Size(787, 39);
@@ -175,76 +215,36 @@
this.toolStripButton1.Text = "Open"; this.toolStripButton1.Text = "Open";
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click); this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
// //
// toolStripButton2 // saveButton
// //
this.toolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.saveButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButton2.Image = global::CutToLength.Properties.Resources.Save_32; this.saveButton.Image = global::CutToLength.Properties.Resources.Save_32;
this.toolStripButton2.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.saveButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta; this.saveButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton2.Name = "toolStripButton2"; this.saveButton.Name = "saveButton";
this.toolStripButton2.Padding = new System.Windows.Forms.Padding(5, 0, 5, 0); this.saveButton.Padding = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.toolStripButton2.Size = new System.Drawing.Size(46, 36); this.saveButton.Size = new System.Drawing.Size(46, 36);
this.toolStripButton2.Text = "Save"; this.saveButton.Text = "Save";
this.toolStripButton2.Click += new System.EventHandler(this.toolStripButton2_Click); this.saveButton.Click += new System.EventHandler(this.saveButton_Click);
// //
// toolStripSeparator1 // toolStripSeparator1
// //
this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(6, 39); this.toolStripSeparator1.Size = new System.Drawing.Size(6, 39);
// //
// toolStripButton3 // runButton
// //
this.toolStripButton3.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.runButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButton3.Image = global::CutToLength.Properties.Resources.Circled_Play_32; this.runButton.Image = global::CutToLength.Properties.Resources.Circled_Play_32;
this.toolStripButton3.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.runButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
this.toolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta; this.runButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton3.Name = "toolStripButton3"; this.runButton.Name = "runButton";
this.toolStripButton3.Padding = new System.Windows.Forms.Padding(5, 0, 5, 0); this.runButton.Padding = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.toolStripButton3.Size = new System.Drawing.Size(46, 36); this.runButton.Size = new System.Drawing.Size(46, 36);
this.toolStripButton3.Text = "Run"; this.runButton.Text = "Run";
this.toolStripButton3.Click += new System.EventHandler(this.toolStripButton3_Click); this.runButton.Click += new System.EventHandler(this.runButton_Click);
// //
// TotalLength // MainForm
//
this.TotalLength.DataPropertyName = "TotalLength";
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";
this.TotalLength.Name = "TotalLength";
this.TotalLength.ReadOnly = true;
//
// nameDataGridViewTextBoxColumn
//
this.nameDataGridViewTextBoxColumn.DataPropertyName = "Name";
this.nameDataGridViewTextBoxColumn.HeaderText = "Name";
this.nameDataGridViewTextBoxColumn.Name = "nameDataGridViewTextBoxColumn";
this.nameDataGridViewTextBoxColumn.Width = 200;
//
// lengthDataGridViewTextBoxColumn
//
this.lengthDataGridViewTextBoxColumn.DataPropertyName = "Length";
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;
//
// itemBindingSource
//
this.itemBindingSource.DataSource = typeof(CutToLength.UIItem);
//
// Form1
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(787, 496); this.ClientSize = new System.Drawing.Size(787, 496);
@@ -258,15 +258,15 @@
this.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.MinimumSize = new System.Drawing.Size(570, 457); this.MinimumSize = new System.Drawing.Size(570, 457);
this.Name = "Form1"; this.Name = "MainForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Cut To Length"; this.Text = "Cut To Length";
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.itemBindingSource)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();
this.toolStrip1.ResumeLayout(false); this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout(); this.toolStrip1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.itemBindingSource)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
@@ -282,8 +282,8 @@
private System.Windows.Forms.NumericUpDown numericUpDown2; private System.Windows.Forms.NumericUpDown numericUpDown2;
private System.Windows.Forms.ToolStrip toolStrip1; private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ToolStripButton toolStripButton1; private System.Windows.Forms.ToolStripButton toolStripButton1;
private System.Windows.Forms.ToolStripButton toolStripButton2; private System.Windows.Forms.ToolStripButton saveButton;
private System.Windows.Forms.ToolStripButton toolStripButton3; private System.Windows.Forms.ToolStripButton runButton;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.DataGridViewTextBoxColumn nameDataGridViewTextBoxColumn; private System.Windows.Forms.DataGridViewTextBoxColumn nameDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn lengthDataGridViewTextBoxColumn; private System.Windows.Forms.DataGridViewTextBoxColumn lengthDataGridViewTextBoxColumn;

View File

@@ -19,7 +19,26 @@ namespace CutToLength
items = new List<UIItem>(); items = new List<UIItem>();
itemBindingSource.DataSource = items; itemBindingSource.DataSource = items;
itemBindingSource.CurrentChanged += ItemBindingSource_CurrentChanged;
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
UpdateRunButtonState();
}
private void ItemBindingSource_CurrentChanged(object sender, EventArgs e)
{
UpdateRunButtonState();
}
private void UpdateRunButtonState()
{
runButton.Enabled = items.Any(i => i.Length > 0 && i.Quantity > 0);
saveButton.Enabled = runButton.Enabled;
} }
private void Open() private void Open()
@@ -174,12 +193,12 @@ namespace CutToLength
Open(); Open();
} }
private void toolStripButton2_Click(object sender, EventArgs e) private void saveButton_Click(object sender, EventArgs e)
{ {
Save(); Save();
} }
private void toolStripButton3_Click(object sender, EventArgs e) private void runButton_Click(object sender, EventArgs e)
{ {
Run(); Run();
} }

View File

@@ -28,132 +28,140 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
this.dataGridView1 = new System.Windows.Forms.DataGridView(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
this.spacingDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.lengthDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.binBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.usedLengthDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.class11 = new CutToLength.BinLayoutView();
this.remainingLengthDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.utilizationDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.uIItemBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.binBindingSource = new System.Windows.Forms.BindingSource(this.components); this.spacingDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.class11 = new CutToLength.BinLayoutView(); this.lengthDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.usedLengthDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.uIItemBindingSource = new System.Windows.Forms.BindingSource(this.components); this.remainingLengthDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); this.utilizationDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.binBindingSource)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.binBindingSource)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.uIItemBindingSource)).BeginInit(); this.splitContainer1.SuspendLayout();
this.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.uIItemBindingSource)).BeginInit();
// this.SuspendLayout();
// dataGridView1 //
// // dataGridView1
this.dataGridView1.AutoGenerateColumns = false; //
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView1.AutoGenerateColumns = false;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridView1.BackgroundColor = System.Drawing.Color.White;
this.dataGridView1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.dataGridView1.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.spacingDataGridViewTextBoxColumn, this.spacingDataGridViewTextBoxColumn,
this.lengthDataGridViewTextBoxColumn, this.lengthDataGridViewTextBoxColumn,
this.usedLengthDataGridViewTextBoxColumn, this.usedLengthDataGridViewTextBoxColumn,
this.remainingLengthDataGridViewTextBoxColumn, this.remainingLengthDataGridViewTextBoxColumn,
this.utilizationDataGridViewTextBoxColumn}); this.utilizationDataGridViewTextBoxColumn});
this.dataGridView1.DataSource = this.binBindingSource; this.dataGridView1.DataSource = this.binBindingSource;
this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill; this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView1.Location = new System.Drawing.Point(0, 0); this.dataGridView1.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.dataGridView1.Name = "dataGridView1"; this.dataGridView1.Location = new System.Drawing.Point(0, 0);
this.dataGridView1.Size = new System.Drawing.Size(892, 256); this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.TabIndex = 0; this.dataGridView1.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
this.dataGridView1.RowEnter += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_RowEnter); this.dataGridView1.Size = new System.Drawing.Size(892, 256);
this.dataGridView1.SelectionChanged += new System.EventHandler(this.dataGridView1_SelectionChanged); this.dataGridView1.TabIndex = 0;
// this.dataGridView1.RowEnter += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_RowEnter);
// spacingDataGridViewTextBoxColumn this.dataGridView1.SelectionChanged += new System.EventHandler(this.dataGridView1_SelectionChanged);
// //
this.spacingDataGridViewTextBoxColumn.DataPropertyName = "Spacing"; // binBindingSource
this.spacingDataGridViewTextBoxColumn.HeaderText = "Spacing"; //
this.spacingDataGridViewTextBoxColumn.Name = "spacingDataGridViewTextBoxColumn"; this.binBindingSource.DataSource = typeof(CutToLength.Bin);
// //
// lengthDataGridViewTextBoxColumn // class11
// //
this.lengthDataGridViewTextBoxColumn.DataPropertyName = "Length"; this.class11.BackColor = System.Drawing.Color.White;
this.lengthDataGridViewTextBoxColumn.HeaderText = "Length"; this.class11.Bin = null;
this.lengthDataGridViewTextBoxColumn.Name = "lengthDataGridViewTextBoxColumn"; this.class11.Dock = System.Windows.Forms.DockStyle.Fill;
// this.class11.Location = new System.Drawing.Point(0, 0);
// usedLengthDataGridViewTextBoxColumn this.class11.Name = "class11";
// this.class11.Size = new System.Drawing.Size(892, 181);
this.usedLengthDataGridViewTextBoxColumn.DataPropertyName = "UsedLength"; this.class11.TabIndex = 1;
this.usedLengthDataGridViewTextBoxColumn.HeaderText = "UsedLength"; this.class11.Text = "class11";
this.usedLengthDataGridViewTextBoxColumn.Name = "usedLengthDataGridViewTextBoxColumn"; //
this.usedLengthDataGridViewTextBoxColumn.ReadOnly = true; // splitContainer1
// //
// remainingLengthDataGridViewTextBoxColumn this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
// this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.remainingLengthDataGridViewTextBoxColumn.DataPropertyName = "RemainingLength"; this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.remainingLengthDataGridViewTextBoxColumn.HeaderText = "RemainingLength"; this.splitContainer1.Name = "splitContainer1";
this.remainingLengthDataGridViewTextBoxColumn.Name = "remainingLengthDataGridViewTextBoxColumn"; this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
this.remainingLengthDataGridViewTextBoxColumn.ReadOnly = true; //
// // splitContainer1.Panel1
// utilizationDataGridViewTextBoxColumn //
// this.splitContainer1.Panel1.Controls.Add(this.dataGridView1);
this.utilizationDataGridViewTextBoxColumn.DataPropertyName = "Utilization"; //
this.utilizationDataGridViewTextBoxColumn.HeaderText = "Utilization"; // splitContainer1.Panel2
this.utilizationDataGridViewTextBoxColumn.Name = "utilizationDataGridViewTextBoxColumn"; //
this.utilizationDataGridViewTextBoxColumn.ReadOnly = true; this.splitContainer1.Panel2.Controls.Add(this.class11);
// this.splitContainer1.Size = new System.Drawing.Size(892, 441);
// binBindingSource this.splitContainer1.SplitterDistance = 256;
// this.splitContainer1.TabIndex = 2;
this.binBindingSource.DataSource = typeof(CutToLength.Bin); //
// // uIItemBindingSource
// class11 //
// this.uIItemBindingSource.DataSource = typeof(CutToLength.UIItem);
this.class11.BackColor = System.Drawing.Color.White; //
this.class11.Bin = null; // spacingDataGridViewTextBoxColumn
this.class11.Dock = System.Windows.Forms.DockStyle.Fill; //
this.class11.Location = new System.Drawing.Point(0, 0); this.spacingDataGridViewTextBoxColumn.DataPropertyName = "Spacing";
this.class11.Name = "class11"; this.spacingDataGridViewTextBoxColumn.HeaderText = "Spacing";
this.class11.Size = new System.Drawing.Size(892, 181); this.spacingDataGridViewTextBoxColumn.Name = "spacingDataGridViewTextBoxColumn";
this.class11.TabIndex = 1; //
this.class11.Text = "class11"; // lengthDataGridViewTextBoxColumn
// //
// splitContainer1 this.lengthDataGridViewTextBoxColumn.DataPropertyName = "Length";
// this.lengthDataGridViewTextBoxColumn.HeaderText = "Length";
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; this.lengthDataGridViewTextBoxColumn.Name = "lengthDataGridViewTextBoxColumn";
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; //
this.splitContainer1.Location = new System.Drawing.Point(0, 0); // usedLengthDataGridViewTextBoxColumn
this.splitContainer1.Name = "splitContainer1"; //
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; this.usedLengthDataGridViewTextBoxColumn.DataPropertyName = "UsedLength";
// this.usedLengthDataGridViewTextBoxColumn.HeaderText = "UsedLength";
// splitContainer1.Panel1 this.usedLengthDataGridViewTextBoxColumn.Name = "usedLengthDataGridViewTextBoxColumn";
// this.usedLengthDataGridViewTextBoxColumn.ReadOnly = true;
this.splitContainer1.Panel1.Controls.Add(this.dataGridView1); //
// // remainingLengthDataGridViewTextBoxColumn
// splitContainer1.Panel2 //
// this.remainingLengthDataGridViewTextBoxColumn.DataPropertyName = "RemainingLength";
this.splitContainer1.Panel2.Controls.Add(this.class11); this.remainingLengthDataGridViewTextBoxColumn.HeaderText = "RemainingLength";
this.splitContainer1.Size = new System.Drawing.Size(892, 441); this.remainingLengthDataGridViewTextBoxColumn.Name = "remainingLengthDataGridViewTextBoxColumn";
this.splitContainer1.SplitterDistance = 256; this.remainingLengthDataGridViewTextBoxColumn.ReadOnly = true;
this.splitContainer1.TabIndex = 2; //
// // utilizationDataGridViewTextBoxColumn
// uIItemBindingSource //
// this.utilizationDataGridViewTextBoxColumn.DataPropertyName = "Utilization";
this.uIItemBindingSource.DataSource = typeof(CutToLength.UIItem); dataGridViewCellStyle1.Format = "P2";
// this.utilizationDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle1;
// Form2 this.utilizationDataGridViewTextBoxColumn.HeaderText = "Utilization";
// this.utilizationDataGridViewTextBoxColumn.Name = "utilizationDataGridViewTextBoxColumn";
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.utilizationDataGridViewTextBoxColumn.ReadOnly = true;
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; //
this.ClientSize = new System.Drawing.Size(892, 441); // ResultsForm
this.Controls.Add(this.splitContainer1); //
this.Name = "Form2"; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.Text = "Form2"; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); this.ClientSize = new System.Drawing.Size(892, 441);
((System.ComponentModel.ISupportInitialize)(this.binBindingSource)).EndInit(); this.Controls.Add(this.splitContainer1);
this.splitContainer1.Panel1.ResumeLayout(false); this.Name = "ResultsForm";
this.splitContainer1.Panel2.ResumeLayout(false); this.Text = "Form2";
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.splitContainer1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.binBindingSource)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.uIItemBindingSource)).EndInit(); this.splitContainer1.Panel1.ResumeLayout(false);
this.ResumeLayout(false); this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.uIItemBindingSource)).EndInit();
this.ResumeLayout(false);
} }
@@ -161,13 +169,13 @@
private System.Windows.Forms.DataGridView dataGridView1; private System.Windows.Forms.DataGridView dataGridView1;
private BinLayoutView class11; private BinLayoutView class11;
private System.Windows.Forms.DataGridViewTextBoxColumn spacingDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn lengthDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn usedLengthDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn remainingLengthDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn utilizationDataGridViewTextBoxColumn;
private System.Windows.Forms.BindingSource binBindingSource; private System.Windows.Forms.BindingSource binBindingSource;
private System.Windows.Forms.SplitContainer splitContainer1; private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.BindingSource uIItemBindingSource; private System.Windows.Forms.BindingSource uIItemBindingSource;
} private System.Windows.Forms.DataGridViewTextBoxColumn spacingDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn lengthDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn usedLengthDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn remainingLengthDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn utilizationDataGridViewTextBoxColumn;
}
} }