diff --git a/TBF/Forms/PreviousResultCtrl.Designer.cs b/TBF/Forms/PreviousResultCtrl.Designer.cs index 3cdac85ee..fbf37af2e 100644 --- a/TBF/Forms/PreviousResultCtrl.Designer.cs +++ b/TBF/Forms/PreviousResultCtrl.Designer.cs @@ -28,129 +28,140 @@ /// private void InitializeComponent() { - this.sendReloadButton = new System.Windows.Forms.Button(); - this.sentCheckBox = new System.Windows.Forms.CheckBox(); - this.failedCountLabel = new System.Windows.Forms.Label(); - this.passedCountLabel = new System.Windows.Forms.Label(); - this.purchaseOrderLabel = new System.Windows.Forms.Label(); - this.procedureLabel = new System.Windows.Forms.Label(); - this.endTimeLabel = new System.Windows.Forms.Label(); - this.startTimeLabel = new System.Windows.Forms.Label(); - this.batchNrLabel = new System.Windows.Forms.Label(); - this.showButton = new System.Windows.Forms.Button(); - this.SuspendLayout(); - // - // sendReloadButton - // - this.sendReloadButton.Location = new System.Drawing.Point(832, 2); - this.sendReloadButton.Name = "sendReloadButton"; - this.sendReloadButton.Size = new System.Drawing.Size(104, 23); - this.sendReloadButton.TabIndex = 15; - this.sendReloadButton.Text = "Again"; - this.sendReloadButton.UseVisualStyleBackColor = true; - this.sendReloadButton.Click += new System.EventHandler(this.sendReloadButton_Click); - // - // sentCheckBox - // - this.sentCheckBox.AutoSize = true; - this.sentCheckBox.Location = new System.Drawing.Point(748, 6); - this.sentCheckBox.Name = "sentCheckBox"; - this.sentCheckBox.Size = new System.Drawing.Size(48, 17); - this.sentCheckBox.TabIndex = 14; - this.sentCheckBox.Text = "Sent"; - this.sentCheckBox.UseVisualStyleBackColor = true; - // - // failedCountLabel - // - this.failedCountLabel.AutoSize = true; - this.failedCountLabel.Location = new System.Drawing.Point(681, 7); - this.failedCountLabel.Name = "failedCountLabel"; - this.failedCountLabel.Size = new System.Drawing.Size(48, 13); - this.failedCountLabel.TabIndex = 13; - this.failedCountLabel.Text = "failedCnt"; - // - // passedCountLabel - // - this.passedCountLabel.AutoSize = true; - this.passedCountLabel.Location = new System.Drawing.Point(590, 7); - this.passedCountLabel.Name = "passedCountLabel"; - this.passedCountLabel.Size = new System.Drawing.Size(57, 13); - this.passedCountLabel.TabIndex = 12; - this.passedCountLabel.Text = "passedCnt"; - // - // purchaseOrderLabel - // - this.purchaseOrderLabel.AutoSize = true; - this.purchaseOrderLabel.Location = new System.Drawing.Point(481, 7); - this.purchaseOrderLabel.Name = "purchaseOrderLabel"; - this.purchaseOrderLabel.Size = new System.Drawing.Size(77, 13); - this.purchaseOrderLabel.TabIndex = 11; - this.purchaseOrderLabel.Text = "purchaseOrder"; - // - // procedureLabel - // - this.procedureLabel.AutoSize = true; - this.procedureLabel.Location = new System.Drawing.Point(328, 7); - this.procedureLabel.Name = "procedureLabel"; - this.procedureLabel.Size = new System.Drawing.Size(55, 13); - this.procedureLabel.TabIndex = 10; - this.procedureLabel.Text = "procedure"; - // - // endTimeLabel - // - this.endTimeLabel.AutoSize = true; - this.endTimeLabel.Location = new System.Drawing.Point(185, 7); - this.endTimeLabel.Name = "endTimeLabel"; - this.endTimeLabel.Size = new System.Drawing.Size(48, 13); - this.endTimeLabel.TabIndex = 9; - this.endTimeLabel.Text = "endTime"; - // - // startTimeLabel - // - this.startTimeLabel.AutoSize = true; - this.startTimeLabel.Location = new System.Drawing.Point(54, 7); - this.startTimeLabel.Name = "startTimeLabel"; - this.startTimeLabel.Size = new System.Drawing.Size(50, 13); - this.startTimeLabel.TabIndex = 8; - this.startTimeLabel.Text = "startTime"; - // - // batchNrLabel - // - this.batchNrLabel.AutoSize = true; - this.batchNrLabel.Location = new System.Drawing.Point(3, 7); - this.batchNrLabel.Name = "batchNrLabel"; - this.batchNrLabel.Size = new System.Drawing.Size(24, 13); - this.batchNrLabel.TabIndex = 16; - this.batchNrLabel.Text = "bNr"; - // - // showButton - // - this.showButton.Location = new System.Drawing.Point(939, 2); - this.showButton.Name = "showButton"; - this.showButton.Size = new System.Drawing.Size(104, 23); - this.showButton.TabIndex = 17; - this.showButton.Text = "Show"; - this.showButton.UseVisualStyleBackColor = true; - this.showButton.Click += new System.EventHandler(this.showButton_Click); - // - // PreviousResultCtrl - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.showButton); - this.Controls.Add(this.batchNrLabel); - this.Controls.Add(this.sendReloadButton); - this.Controls.Add(this.sentCheckBox); - this.Controls.Add(this.failedCountLabel); - this.Controls.Add(this.passedCountLabel); - this.Controls.Add(this.purchaseOrderLabel); - this.Controls.Add(this.procedureLabel); - this.Controls.Add(this.endTimeLabel); - this.Controls.Add(this.startTimeLabel); - this.Name = "PreviousResultCtrl"; - this.Size = new System.Drawing.Size(1048, 26); - this.ResumeLayout(false); - this.PerformLayout(); + this.sendReloadButton = new System.Windows.Forms.Button(); + this.sentCheckBox = new System.Windows.Forms.CheckBox(); + this.failedCountLabel = new System.Windows.Forms.Label(); + this.passedCountLabel = new System.Windows.Forms.Label(); + this.purchaseOrderLabel = new System.Windows.Forms.Label(); + this.procedureLabel = new System.Windows.Forms.Label(); + this.endTimeLabel = new System.Windows.Forms.Label(); + this.startTimeLabel = new System.Windows.Forms.Label(); + this.batchNrLabel = new System.Windows.Forms.Label(); + this.showButton = new System.Windows.Forms.Button(); + this.swVerLabel = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // sendReloadButton + // + this.sendReloadButton.Location = new System.Drawing.Point(832, 2); + this.sendReloadButton.Name = "sendReloadButton"; + this.sendReloadButton.Size = new System.Drawing.Size(104, 23); + this.sendReloadButton.TabIndex = 15; + this.sendReloadButton.Text = "Again"; + this.sendReloadButton.UseVisualStyleBackColor = true; + this.sendReloadButton.Click += new System.EventHandler(this.sendReloadButton_Click); + // + // sentCheckBox + // + this.sentCheckBox.AutoSize = true; + this.sentCheckBox.Location = new System.Drawing.Point(748, 6); + this.sentCheckBox.Name = "sentCheckBox"; + this.sentCheckBox.Size = new System.Drawing.Size(48, 17); + this.sentCheckBox.TabIndex = 14; + this.sentCheckBox.Text = "Sent"; + this.sentCheckBox.UseVisualStyleBackColor = true; + // + // failedCountLabel + // + this.failedCountLabel.AutoSize = true; + this.failedCountLabel.Location = new System.Drawing.Point(690, 7); + this.failedCountLabel.Name = "failedCountLabel"; + this.failedCountLabel.Size = new System.Drawing.Size(36, 13); + this.failedCountLabel.TabIndex = 13; + this.failedCountLabel.Text = "failCnt"; + // + // passedCountLabel + // + this.passedCountLabel.AutoSize = true; + this.passedCountLabel.Location = new System.Drawing.Point(641, 7); + this.passedCountLabel.Name = "passedCountLabel"; + this.passedCountLabel.Size = new System.Drawing.Size(45, 13); + this.passedCountLabel.TabIndex = 12; + this.passedCountLabel.Text = "passCnt"; + // + // purchaseOrderLabel + // + this.purchaseOrderLabel.AutoSize = true; + this.purchaseOrderLabel.Location = new System.Drawing.Point(559, 7); + this.purchaseOrderLabel.Name = "purchaseOrderLabel"; + this.purchaseOrderLabel.Size = new System.Drawing.Size(77, 13); + this.purchaseOrderLabel.TabIndex = 11; + this.purchaseOrderLabel.Text = "purchaseOrder"; + // + // procedureLabel + // + this.procedureLabel.AutoSize = true; + this.procedureLabel.Location = new System.Drawing.Point(345, 7); + this.procedureLabel.Name = "procedureLabel"; + this.procedureLabel.Size = new System.Drawing.Size(55, 13); + this.procedureLabel.TabIndex = 10; + this.procedureLabel.Text = "procedure"; + // + // endTimeLabel + // + this.endTimeLabel.AutoSize = true; + this.endTimeLabel.Location = new System.Drawing.Point(160, 7); + this.endTimeLabel.Name = "endTimeLabel"; + this.endTimeLabel.Size = new System.Drawing.Size(48, 13); + this.endTimeLabel.TabIndex = 9; + this.endTimeLabel.Text = "endTime"; + // + // startTimeLabel + // + this.startTimeLabel.AutoSize = true; + this.startTimeLabel.Location = new System.Drawing.Point(50, 7); + this.startTimeLabel.Name = "startTimeLabel"; + this.startTimeLabel.Size = new System.Drawing.Size(50, 13); + this.startTimeLabel.TabIndex = 8; + this.startTimeLabel.Text = "startTime"; + // + // batchNrLabel + // + this.batchNrLabel.AutoSize = true; + this.batchNrLabel.Location = new System.Drawing.Point(3, 7); + this.batchNrLabel.Name = "batchNrLabel"; + this.batchNrLabel.Size = new System.Drawing.Size(24, 13); + this.batchNrLabel.TabIndex = 16; + this.batchNrLabel.Text = "bNr"; + // + // showButton + // + this.showButton.Location = new System.Drawing.Point(939, 2); + this.showButton.Name = "showButton"; + this.showButton.Size = new System.Drawing.Size(104, 23); + this.showButton.TabIndex = 17; + this.showButton.Text = "Show"; + this.showButton.UseVisualStyleBackColor = true; + this.showButton.Click += new System.EventHandler(this.showButton_Click); + // + // swVerLabel + // + this.swVerLabel.AutoSize = true; + this.swVerLabel.Location = new System.Drawing.Point(270, 7); + this.swVerLabel.Name = "swVerLabel"; + this.swVerLabel.Size = new System.Drawing.Size(47, 13); + this.swVerLabel.TabIndex = 18; + this.swVerLabel.Text = "SW Ver."; + // + // PreviousResultCtrl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.swVerLabel); + this.Controls.Add(this.showButton); + this.Controls.Add(this.batchNrLabel); + this.Controls.Add(this.sendReloadButton); + this.Controls.Add(this.sentCheckBox); + this.Controls.Add(this.failedCountLabel); + this.Controls.Add(this.passedCountLabel); + this.Controls.Add(this.purchaseOrderLabel); + this.Controls.Add(this.procedureLabel); + this.Controls.Add(this.endTimeLabel); + this.Controls.Add(this.startTimeLabel); + this.Name = "PreviousResultCtrl"; + this.Size = new System.Drawing.Size(1048, 26); + this.ResumeLayout(false); + this.PerformLayout(); } @@ -166,6 +177,7 @@ private System.Windows.Forms.Label startTimeLabel; private System.Windows.Forms.Label batchNrLabel; private System.Windows.Forms.Button showButton; + private System.Windows.Forms.Label swVerLabel; } } diff --git a/TBF/Forms/PreviousResultCtrl.cs b/TBF/Forms/PreviousResultCtrl.cs index 338ff01c8..ec7642900 100644 --- a/TBF/Forms/PreviousResultCtrl.cs +++ b/TBF/Forms/PreviousResultCtrl.cs @@ -15,6 +15,7 @@ namespace TBF.Forms public int BatchNr; public DateTime StarTime; public DateTime EndTime; + public string Ver; public string ProcedureName; public string PurchaseOrder; public int PassedCount; @@ -26,7 +27,7 @@ namespace TBF.Forms InitializeComponent(); } - public PreviousResultCtrl(PreviousResultsDlg parent, int bnr, DateTime s, DateTime e, string proc, string pOrd, int passCnt, int failCnt, bool sent, bool reloadEn) + public PreviousResultCtrl(PreviousResultsDlg parent, int bnr, DateTime s, DateTime e, string ver, string proc, string pOrd, int passCnt, int failCnt, bool sent, bool reloadEn) : this() { this.parent = parent; @@ -35,6 +36,7 @@ namespace TBF.Forms BatchNr = bnr; StarTime = s; EndTime = e; + Ver = ver; ProcedureName = proc; PurchaseOrder = pOrd; PassedCount = passCnt; @@ -44,8 +46,9 @@ namespace TBF.Forms batchNrLabel.Text = BatchNr.ToString(); startTimeLabel.Text = string.Format("{0} {1}", StarTime.ToShortDateString(), StarTime.ToShortTimeString()); endTimeLabel.Text = string.Format("{0} {1}", EndTime.ToShortDateString(), EndTime.ToShortTimeString()); + swVerLabel.Text = Ver; procedureLabel.Text = ProcedureName; - purchaseOrderLabel.Text = string.Format("{0}: {1}", Strings.PO, PurchaseOrder); + purchaseOrderLabel.Text = PurchaseOrder; passedCountLabel.Text = string.Format("{0}: {1}", Strings.Passed, PassedCount); failedCountLabel.Text = string.Format("{0}: {1}", Strings.Failed, FailedCount); diff --git a/TBF/Forms/PreviousResultsDlg.cs b/TBF/Forms/PreviousResultsDlg.cs index a2b241513..b73abcffd 100644 --- a/TBF/Forms/PreviousResultsDlg.cs +++ b/TBF/Forms/PreviousResultsDlg.cs @@ -261,26 +261,26 @@ namespace TBF.Forms foreach (var b in batches) { - int passedCount = 0; + int passedCount = 0; int failedCount = 0; - foreach (var wm in b.WaterMeters) - { - if (wm.Passed) { passedCount++; } else { failedCount++; } - } + foreach (var wm in b.WaterMeters) + { + if ((wm != null) && wm.Passed) { passedCount++; } else { failedCount++; } + } - if (passedCount + failedCount == 0) continue; + if (passedCount + failedCount == 0) continue; - - flowLayoutPanel1.Controls.Add(new PreviousResultCtrl(this, - b.BatchNr, - b.StartTime, - b.EndTime, - b.ProcedureName, - b.WaterMeters[0].PurchaseOrder, - passedCount, - failedCount, - b.RsltsSent, - reloadEn)); + flowLayoutPanel1.Controls.Add(new PreviousResultCtrl(this, + b.BatchNr, + b.StartTime, + b.EndTime, + b.ProgramVersion, + b.ProcedureName, + b.WaterMeters[0].PurchaseOrder, + passedCount, + failedCount, + b.RsltsSent, + reloadEn)); } ResumeLayout(); diff --git a/TBF/Properties/AssemblyInfo.cs b/TBF/Properties/AssemblyInfo.cs index 7ae1f41ba..9d34e692b 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.1053.0")] -[assembly: AssemblyFileVersion("2.18.1053.0")] +[assembly: AssemblyVersion("2.18.1054.0")] +[assembly: AssemblyFileVersion("2.18.1054.0")]