diff --git a/TBF/BenchControl/DataEntry/Standard6/CycleBeginningForm.Designer.cs b/TBF/BenchControl/DataEntry/Standard6/CycleBeginningForm.Designer.cs index 55e987414..da12b8b45 100644 --- a/TBF/BenchControl/DataEntry/Standard6/CycleBeginningForm.Designer.cs +++ b/TBF/BenchControl/DataEntry/Standard6/CycleBeginningForm.Designer.cs @@ -52,16 +52,16 @@ namespace TBF.BenchControl.DataEntry.Standard6 this.comboBox6 = new System.Windows.Forms.ComboBox(); this.checkBox6 = new System.Windows.Forms.CheckBox(); this.label6 = new System.Windows.Forms.Label(); - this.remarkTextBox6 = new System.Windows.Forms.TextBox(); - this.remarkTextBox5 = new System.Windows.Forms.TextBox(); - this.remarkTextBox4 = new System.Windows.Forms.TextBox(); - this.remarkTextBox3 = new System.Windows.Forms.TextBox(); - this.remarkTextBox2 = new System.Windows.Forms.TextBox(); - this.remarkTextBox1 = new System.Windows.Forms.TextBox(); this.orderComboBox = new System.Windows.Forms.ComboBox(); this.orderLabel = new System.Windows.Forms.Label(); this.snLabel = new System.Windows.Forms.Label(); this.remarkLabel = new System.Windows.Forms.Label(); + this.remarkComboBox6 = new System.Windows.Forms.ComboBox(); + this.remarkComboBox1 = new System.Windows.Forms.ComboBox(); + this.remarkComboBox2 = new System.Windows.Forms.ComboBox(); + this.remarkComboBox3 = new System.Windows.Forms.ComboBox(); + this.remarkComboBox4 = new System.Windows.Forms.ComboBox(); + this.remarkComboBox5 = new System.Windows.Forms.ComboBox(); this.SuspendLayout(); // // okButton @@ -195,36 +195,6 @@ namespace TBF.BenchControl.DataEntry.Standard6 resources.ApplyResources(this.label6, "label6"); this.label6.Name = "label6"; // - // remarkTextBox6 - // - resources.ApplyResources(this.remarkTextBox6, "remarkTextBox6"); - this.remarkTextBox6.Name = "remarkTextBox6"; - // - // remarkTextBox5 - // - resources.ApplyResources(this.remarkTextBox5, "remarkTextBox5"); - this.remarkTextBox5.Name = "remarkTextBox5"; - // - // remarkTextBox4 - // - resources.ApplyResources(this.remarkTextBox4, "remarkTextBox4"); - this.remarkTextBox4.Name = "remarkTextBox4"; - // - // remarkTextBox3 - // - resources.ApplyResources(this.remarkTextBox3, "remarkTextBox3"); - this.remarkTextBox3.Name = "remarkTextBox3"; - // - // remarkTextBox2 - // - resources.ApplyResources(this.remarkTextBox2, "remarkTextBox2"); - this.remarkTextBox2.Name = "remarkTextBox2"; - // - // remarkTextBox1 - // - resources.ApplyResources(this.remarkTextBox1, "remarkTextBox1"); - this.remarkTextBox1.Name = "remarkTextBox1"; - // // orderComboBox // resources.ApplyResources(this.orderComboBox, "orderComboBox"); @@ -246,21 +216,57 @@ namespace TBF.BenchControl.DataEntry.Standard6 resources.ApplyResources(this.remarkLabel, "remarkLabel"); this.remarkLabel.Name = "remarkLabel"; // + // remarkComboBox6 + // + resources.ApplyResources(this.remarkComboBox6, "remarkComboBox6"); + this.remarkComboBox6.FormattingEnabled = true; + this.remarkComboBox6.Name = "remarkComboBox6"; + // + // remarkComboBox1 + // + resources.ApplyResources(this.remarkComboBox1, "remarkComboBox1"); + this.remarkComboBox1.FormattingEnabled = true; + this.remarkComboBox1.Name = "remarkComboBox1"; + // + // remarkComboBox2 + // + resources.ApplyResources(this.remarkComboBox2, "remarkComboBox2"); + this.remarkComboBox2.FormattingEnabled = true; + this.remarkComboBox2.Name = "remarkComboBox2"; + // + // remarkComboBox3 + // + resources.ApplyResources(this.remarkComboBox3, "remarkComboBox3"); + this.remarkComboBox3.FormattingEnabled = true; + this.remarkComboBox3.Name = "remarkComboBox3"; + // + // remarkComboBox4 + // + resources.ApplyResources(this.remarkComboBox4, "remarkComboBox4"); + this.remarkComboBox4.FormattingEnabled = true; + this.remarkComboBox4.Name = "remarkComboBox4"; + // + // remarkComboBox5 + // + resources.ApplyResources(this.remarkComboBox5, "remarkComboBox5"); + this.remarkComboBox5.FormattingEnabled = true; + this.remarkComboBox5.Name = "remarkComboBox5"; + // // CycleBeginningForm // resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.DarkGoldenrod; + this.Controls.Add(this.remarkComboBox5); + this.Controls.Add(this.remarkComboBox4); + this.Controls.Add(this.remarkComboBox3); + this.Controls.Add(this.remarkComboBox2); + this.Controls.Add(this.remarkComboBox1); + this.Controls.Add(this.remarkComboBox6); this.Controls.Add(this.remarkLabel); this.Controls.Add(this.snLabel); this.Controls.Add(this.orderLabel); this.Controls.Add(this.orderComboBox); - this.Controls.Add(this.remarkTextBox6); - this.Controls.Add(this.remarkTextBox5); - this.Controls.Add(this.remarkTextBox4); - this.Controls.Add(this.remarkTextBox3); - this.Controls.Add(this.remarkTextBox2); - this.Controls.Add(this.remarkTextBox1); this.Controls.Add(this.comboBox6); this.Controls.Add(this.checkBox6); this.Controls.Add(this.label6); @@ -313,15 +319,15 @@ namespace TBF.BenchControl.DataEntry.Standard6 private System.Windows.Forms.ComboBox comboBox6; private System.Windows.Forms.CheckBox checkBox6; private System.Windows.Forms.Label label6; - private System.Windows.Forms.TextBox remarkTextBox6; - private System.Windows.Forms.TextBox remarkTextBox5; - private System.Windows.Forms.TextBox remarkTextBox4; - private System.Windows.Forms.TextBox remarkTextBox3; - private System.Windows.Forms.TextBox remarkTextBox2; - private System.Windows.Forms.TextBox remarkTextBox1; private System.Windows.Forms.ComboBox orderComboBox; private System.Windows.Forms.Label orderLabel; private System.Windows.Forms.Label snLabel; private System.Windows.Forms.Label remarkLabel; + private System.Windows.Forms.ComboBox remarkComboBox6; + private System.Windows.Forms.ComboBox remarkComboBox1; + private System.Windows.Forms.ComboBox remarkComboBox2; + private System.Windows.Forms.ComboBox remarkComboBox3; + private System.Windows.Forms.ComboBox remarkComboBox4; + private System.Windows.Forms.ComboBox remarkComboBox5; } } \ No newline at end of file diff --git a/TBF/BenchControl/DataEntry/Standard6/CycleBeginningForm.cs b/TBF/BenchControl/DataEntry/Standard6/CycleBeginningForm.cs index 389640adc..651053ff3 100644 --- a/TBF/BenchControl/DataEntry/Standard6/CycleBeginningForm.cs +++ b/TBF/BenchControl/DataEntry/Standard6/CycleBeginningForm.cs @@ -31,7 +31,7 @@ namespace TBF.BenchControl.DataEntry.Standard6 ComboBox[] comboBoxes; CheckBox[] checkBoxes; - TextBox[] remarkBoxes; + ComboBox[] remarkBoxes; /// /// Constructor @@ -44,8 +44,7 @@ namespace TBF.BenchControl.DataEntry.Standard6 comboBoxes = new ComboBox[] { comboBox1, comboBox2, comboBox3, comboBox4, comboBox5, comboBox6 }; checkBoxes = new CheckBox[] { checkBox1, checkBox2, checkBox3, checkBox4, checkBox5, checkBox6 }; - remarkBoxes = new TextBox[] { remarkTextBox1, remarkTextBox2, remarkTextBox3, - remarkTextBox4, remarkTextBox5, remarkTextBox6 }; + remarkBoxes = new ComboBox[] { remarkComboBox1, remarkComboBox2, remarkComboBox3, remarkComboBox4, remarkComboBox5, remarkComboBox6 }; this.WaterMetersCount = waterMetersCount; this.RemarksEnabled = remarksEnabled; @@ -67,8 +66,13 @@ namespace TBF.BenchControl.DataEntry.Standard6 private void CycleBeginningForm_Load(object sender, EventArgs e) { Localize(); - - PrepareOrderCombo(orderComboBox); + + PrepareCombo(orderComboBox, Program.LocalSettings.PurchaseOrderHistory); + + for (int i = 0; i < WaterMetersCount; i++) + { + PrepareCombo(remarkBoxes[i], Program.LocalSettings.RemarkHistory, true); + } if (Program.LocalSettings.LastSNTextsCount == WaterMetersCount) { @@ -89,16 +93,16 @@ namespace TBF.BenchControl.DataEntry.Standard6 if (RemarksEnabled) { - if (WaterMetersCount >= 1) { remarkTextBox1.Visible = true; remarkLabel.Visible = true; } - if (WaterMetersCount >= 2) { remarkTextBox2.Visible = true; } - if (WaterMetersCount >= 3) { remarkTextBox3.Visible = true; } - if (WaterMetersCount >= 4) { remarkTextBox4.Visible = true; } - if (WaterMetersCount >= 5) { remarkTextBox5.Visible = true; } - if (WaterMetersCount >= 6) { remarkTextBox6.Visible = true; } + if (WaterMetersCount >= 1) { remarkComboBox1.Visible = true; remarkLabel.Visible = true; } + if (WaterMetersCount >= 2) { remarkComboBox2.Visible = true; } + if (WaterMetersCount >= 3) { remarkComboBox3.Visible = true; } + if (WaterMetersCount >= 4) { remarkComboBox4.Visible = true; } + if (WaterMetersCount >= 5) { remarkComboBox5.Visible = true; } + if (WaterMetersCount >= 6) { remarkComboBox6.Visible = true; } } Height = 177 + WaterMetersCount * 46; - if (!RemarksEnabled) Width -= remarkTextBox1.Width; + if (!RemarksEnabled) Width -= remarkComboBox1.Width; //Size = new System.Drawing.Size(RemarksEnabled ? 1045 : 624, 177 + WaterMetersCount * 46); } @@ -122,17 +126,23 @@ namespace TBF.BenchControl.DataEntry.Standard6 /// /// Load Purchase order combo box items from the LocalSettings PurchaseOrderHistory array /// - /// Puchase order ComboBox - void PrepareOrderCombo(ComboBox orderComboBox) + /// Puchase order ComboBox + void PrepareCombo(ComboBox comboBox, string[] history, bool emptyOnStart = false) { - for (int i = 0; i < Program.LocalSettings.PurchaseOrderHistoryCount; i++) + int historyLen = (history != null) ? history.Length : 0; + + if (!emptyOnStart && (historyLen > 0)) { - orderComboBox.Items.Add(Program.LocalSettings.PurchaseOrderHistory[i]); + comboBox.Text = history[0]; + } + else + { + comboBox.Text = string.Empty; } - if (orderComboBox.Items.Count > 0) + for (int i = 0; i < historyLen; i++) { - orderComboBox.Text = orderComboBox.Items[0].ToString(); + comboBox.Items.Add(history[i]); } } @@ -150,6 +160,7 @@ namespace TBF.BenchControl.DataEntry.Standard6 for (int i = 0; i < WaterMetersCount; i++) { + Program.LocalSettings.UpdateHistory(remarkBoxes[i].Text, ref Program.LocalSettings.RemarkHistory, 20); SNText[i] = comboBoxes[i].Text; Disabled[i] = !checkBoxes[i].Checked; Remark[i] = remarkBoxes[i].Text; diff --git a/TBF/BenchControl/DataEntry/Standard6/CycleBeginningForm.resx b/TBF/BenchControl/DataEntry/Standard6/CycleBeginningForm.resx index 4c5c3aeb5..9687e5344 100644 --- a/TBF/BenchControl/DataEntry/Standard6/CycleBeginningForm.resx +++ b/TBF/BenchControl/DataEntry/Standard6/CycleBeginningForm.resx @@ -699,186 +699,6 @@ 12 - - Verdana, 14.25pt - - - 453, 373 - - - 6, 5, 6, 5 - - - 421, 31 - - - 29 - - - False - - - remarkTextBox6 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 4 - - - Verdana, 14.25pt - - - 453, 327 - - - 6, 5, 6, 5 - - - 421, 31 - - - 28 - - - False - - - remarkTextBox5 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 5 - - - Verdana, 14.25pt - - - 453, 281 - - - 6, 5, 6, 5 - - - 421, 31 - - - 27 - - - False - - - remarkTextBox4 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 6 - - - Verdana, 14.25pt - - - 453, 235 - - - 6, 5, 6, 5 - - - 421, 31 - - - 26 - - - False - - - remarkTextBox3 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 7 - - - Verdana, 14.25pt - - - 453, 189 - - - 6, 5, 6, 5 - - - 421, 31 - - - 25 - - - False - - - remarkTextBox2 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 8 - - - Verdana, 14.25pt - - - 453, 143 - - - 6, 5, 6, 5 - - - 421, 31 - - - 24 - - - False - - - remarkTextBox1 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 9 - Verdana, 14.25pt @@ -901,7 +721,7 @@ $this - 3 + 9 True @@ -934,7 +754,7 @@ $this - 2 + 8 True @@ -967,7 +787,7 @@ $this - 1 + 7 True @@ -1003,6 +823,168 @@ $this + 6 + + + Verdana, 14.25pt + + + 453, 373 + + + 421, 31 + + + 33 + + + False + + + remarkComboBox6 + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 5 + + + Verdana, 14.25pt + + + 453, 143 + + + 421, 31 + + + 34 + + + False + + + remarkComboBox1 + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 4 + + + Verdana, 14.25pt + + + 453, 189 + + + 421, 31 + + + 35 + + + False + + + remarkComboBox2 + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + + + Verdana, 14.25pt + + + 453, 235 + + + 421, 31 + + + 36 + + + False + + + remarkComboBox3 + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + Verdana, 14.25pt + + + 453, 281 + + + 421, 31 + + + 37 + + + False + + + remarkComboBox4 + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + Verdana, 14.25pt + + + 453, 327 + + + 421, 31 + + + 38 + + + False + + + remarkComboBox5 + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + 0 diff --git a/TBF/LocalSettings.cs b/TBF/LocalSettings.cs index 90e0b92fd..098d215ad 100644 --- a/TBF/LocalSettings.cs +++ b/TBF/LocalSettings.cs @@ -195,7 +195,12 @@ namespace TBF [XmlIgnore] public int PurchaseOrderHistoryCount { get { return (PurchaseOrderHistory != null) ? PurchaseOrderHistory.Length : 0; } } - /// Tester history + /// Remarks history + public string[] RemarkHistory; + [XmlIgnore] + public int RemarksHistoryCount { get { return (RemarkHistory != null) ? RemarkHistory.Length : 0; } } + + /// Tester history public string[] TesterHistory; [XmlIgnore] public int TesterHistoryCount { get { return (TesterHistory != null) ? TesterHistory.Length : 0; } } diff --git a/TBF/Properties/AssemblyInfo.cs b/TBF/Properties/AssemblyInfo.cs index 5b1ee0055..fbf46e208 100644 --- a/TBF/Properties/AssemblyInfo.cs +++ b/TBF/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.18.1076.0")] -[assembly: AssemblyFileVersion("2.18.1076.0")] +[assembly: AssemblyVersion("2.18.1077.0")] +[assembly: AssemblyFileVersion("2.18.1077.0")]