From 6a072b7814e7e1217a352e8642df960f7c4aa9f2 Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Wed, 22 Feb 2017 14:07:20 +0100 Subject: [PATCH] ResultsConfigDlg modifications : TabControl with three TreeViews, ver. 2.12.475 --- Config/Entities/Enums.cs | 12 +- Config/Properties/AssemblyInfo.cs | 4 +- Config/Units.cs | 98 ++++- Results/Forms/ResultsConfigDlg.cs | 203 ++++++++-- Results/Forms/ResultsConfigDlg.designer.cs | 390 ++++++++++++------- Results/Forms/ResultsConfigDlg.resx | 3 + Results/ItemID.cs | 3 +- Results/Properties/AssemblyInfo.cs | 4 +- Results/WMeterRsltItemSpec.cs | 230 ++++++----- ResultsBrowser/Properties/AssemblyInfo.cs | 4 +- TestBenchFramework/Resources/Strings.cs.resx | 5 +- Users/Properties/AssemblyInfo.cs | 4 +- 12 files changed, 630 insertions(+), 330 deletions(-) diff --git a/Config/Entities/Enums.cs b/Config/Entities/Enums.cs index 987eb9ced..39cfe95bd 100644 --- a/Config/Entities/Enums.cs +++ b/Config/Entities/Enums.cs @@ -245,10 +245,16 @@ namespace Config.Entities Count, } - public enum UnitsVolume + public enum ItemCategory { - Liter, - CubicMtr, + [Description("Other")] Other, + [Description("Bench data")] BenchData, + [Description("Bench result")] BenchResult, + [Description("Test data")] TestData, + [Description("Test result")] TestResult, + [Description("Meter data")] MeterData, + [Description("Meter result")] MeterResult, + Count, } /// Possible modes of operation of components and devices. diff --git a/Config/Properties/AssemblyInfo.cs b/Config/Properties/AssemblyInfo.cs index 486b86f47..1330d4676 100644 --- a/Config/Properties/AssemblyInfo.cs +++ b/Config/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.12.464.0")] -[assembly: AssemblyFileVersion("2.12.464.0")] +[assembly: AssemblyVersion("2.12.475.0")] +[assembly: AssemblyFileVersion("2.12.475.0")] diff --git a/Config/Units.cs b/Config/Units.cs index 95225e07f..84a34c6dc 100644 --- a/Config/Units.cs +++ b/Config/Units.cs @@ -71,26 +71,88 @@ namespace Config public enum Quantity { /// Quantities with units and conversions (double -> double) - [Description("Volume")] Volume, - [Description("Flow")] Flow, - [Description("Mass")] Mass, - [Description("Time")] Time, - [Description("Temperature")] Temperature, - [Description("Pressure")] Pressure, - [Description("Humidity")] Humidity, - [Description("Error")] Error, - [Description("Length")] Length, - [Description("Density")] Density, - [Description("Energy")] Energy, - [Description("Pulse/l")] PulsePerLtr, - [Description("Pulse/kWh")] PulsePerKWh, +#if LANG_DE + [Description("Volumen")] Volume, + [Description("Durchfluss")] Flow, + [Description("Masse")] Mass, + [Description("Zeit")] Time, + [Description("Temperatur")] Temperature, + [Description("Druck")] Pressure, + [Description("Feuchtigkeit")] Humidity, + [Description("Fehler")] Error, + [Description("Länge")] Length, + [Description("Dichte")] Density, + [Description("Energie")] Energy, + [Description("Impulse/l")] PulsePerLtr, + [Description("Impulse/kWh")] PulsePerKWh, /// Quantities without units and conversions - [Description("Number")] Number, - [Description("String")] String, - [Description("Boolean")] Boolean, - [Description("Date and time")] DateTime, - Count, + [Description("Nummer")] Number, + [Description("Text")] String, + [Description("Boolean")] Boolean, + [Description("Datum und Uhrzeit")] DateTime, +#elif LANG_PL + [Description("Objętość")] Volume, + [Description("Przepływ")] Flow, + [Description("Masa")] Mass, + [Description("Czas")] Time, + [Description("Temperatura")] Temperature, + [Description("Ciśnienie")] Pressure, + [Description("Wilgotność")] Humidity, + [Description("Błąd")] Error, + [Description("Długość")] Length, + [Description("Gęstość")] Density, + [Description("Energia")] Energy, + [Description("Impulsy/litr")] PulsePerLtr, + [Description("Impulsy/kWh")] PulsePerKWh, + + /// Quantities without units and conversions + [Description("Numer")] Number, + [Description("Tekst")] String, + [Description("Boolean")] Boolean, + [Description("Data i czas")] DateTime, +#elif LANG_CS + [Description("Objem")] Volume, + [Description("Průtok")] Flow, + [Description("Hmotnost")] Mass, + [Description("Čas")] Time, + [Description("Teplota")] Temperature, + [Description("Tlak")] Pressure, + [Description("Vlhkost")] Humidity, + [Description("Chyba")] Error, + [Description("Délka")] Length, + [Description("Hustota")] Density, + [Description("Energie")] Energy, + [Description("Pulzy/litr")] PulsePerLtr, + [Description("Pulzy/kWh")] PulsePerKWh, + + /// Quantities without units and conversions + [Description("Počet")] Number, + [Description("Text")] String, + [Description("Boolean")] Boolean, + [Description("Datum a čas")] DateTime, +#else + [Description("Volume")] Volume, + [Description("Flow")] Flow, + [Description("Mass")] Mass, + [Description("Time")] Time, + [Description("Temperature")] Temperature, + [Description("Pressure")] Pressure, + [Description("Humidity")] Humidity, + [Description("Error")] Error, + [Description("Length")] Length, + [Description("Density")] Density, + [Description("Energy")] Energy, + [Description("Pulses/liter")] PulsePerLtr, + [Description("Pulses/kWh")] PulsePerKWh, + + /// Quantities without units and conversions + [Description("Number")] Number, + [Description("String")] String, + [Description("Boolean")] Boolean, + [Description("Date and time")] DateTime, +#endif + Count, } public static class Units diff --git a/Results/Forms/ResultsConfigDlg.cs b/Results/Forms/ResultsConfigDlg.cs index d57fb0a95..dda65526c 100644 --- a/Results/Forms/ResultsConfigDlg.cs +++ b/Results/Forms/ResultsConfigDlg.cs @@ -3,6 +3,7 @@ /// using System; using System.Collections.Generic; +using System.Linq; using System.Windows.Forms; using log4net; using Config.Entities; @@ -117,6 +118,10 @@ namespace Results.Forms selectedResultsListViewEx.SubItemClicked += new SubItemEventHandler(selectedResultsListViewEx_SubItemClicked); selectedResultsListViewEx.SubItemEndEditing += new SubItemEndEditingEventHandler(selectedResultsListViewEx_SubItemEndEditing); + availableAlphabeticTreeView.ShowNodeToolTips = true; + availableByQuantityTreeView.ShowNodeToolTips = true; + availableByCategoryTreeView.ShowNodeToolTips = true; + RedrawAvailable(); RedrawSelected(); } @@ -194,20 +199,110 @@ namespace Results.Forms return; } + /// - /// Redraw selected items (right hand side) + /// Redraw available items (right hand side) /// void RedrawAvailable() { - availableResultsListBox.Items.Clear(); - AvailableItems = new List(); - foreach (var item in WMeterRsltItemSpec.AllItems) + RedrawInAlphabeticOrder(availableAlphabeticTreeView); + RedrawByQuantity(availableByQuantityTreeView); + RedrawByCategory(availableByCategoryTreeView); + } + + + void RedrawInAlphabeticOrder(TreeView treeView) + { + treeView.Nodes.Clear(); + + IList alphabeticlList = WMeterRsltItemSpec.AllItems.OrderBy(x => x.Name).ToList(); + /// + foreach (var item in alphabeticlList) { - AvailableItems.Add(item); - availableResultsListBox.Items.Add(item.Name); + TreeNode node = new TreeNode(item.Name); + node.Tag = item; + node.ToolTipText = item.ToolTipText; + availableAlphabeticTreeView.Nodes.Add(node); } } + + void RedrawByQuantity(TreeView treeView) + { + treeView.Nodes.Clear(); + + IList quantities = new List(); + for (Config.Quantity q = 0; q < Config.Quantity.Count; q++) quantities.Add(q); + + IList sortedQuantities = quantities.OrderBy(x => x.ToDescription()).ToList(); + + foreach (var q in sortedQuantities) + { + int n = 0; + foreach (var ri in WMeterRsltItemSpec.AllItems) + { + if (ri.Quantity == q) n++; + } + + if (n > 0) + { + TreeNode[] array = new TreeNode[n]; + int i = 0; + foreach (var ri in WMeterRsltItemSpec.AllItems) + { + if (ri.Quantity == q) + { + TreeNode node = new TreeNode(ri.Name); + node.Tag = ri; + node.ToolTipText = ri.ToolTipText; + array[i++] = node; + } + } + + treeView.Nodes.Add(new TreeNode(q.ToDescription(), array)); + } + } + } + + + void RedrawByCategory(TreeView treeView) + { + treeView.Nodes.Clear(); + + IList categories = new List(); + for (ItemCategory c = 0; c < ItemCategory.Count; c++) categories.Add(c); + + IList sortedCategories = categories.OrderBy(x => x.ToDescription()).ToList(); + + foreach (var c in sortedCategories) + { + int n = 0; + foreach (var ri in WMeterRsltItemSpec.AllItems) + { + if (ri.Category == c) n++; + } + + if (n > 0) + { + TreeNode[] array = new TreeNode[n]; + int i = 0; + foreach (var ri in WMeterRsltItemSpec.AllItems) + { + if (ri.Category == c) + { + TreeNode node = new TreeNode(ri.Name); + node.Tag = ri; + node.ToolTipText = ri.ToolTipText; + array[i++] = node; + } + } + + treeView.Nodes.Add(new TreeNode(c.ToDescription(), array)); + } + } + } + + /// /// Redraw selected items (right hand side) /// @@ -237,45 +332,65 @@ namespace Results.Forms { } - void availableResultsListBox_DoubleClick(object sender, EventArgs e) - { - /// Double click works when just one item is selected - if (availableResultsListBox.SelectedIndices.Count == 1) - { - var oriItem = AvailableItems[availableResultsListBox.SelectedIndices[0]]; - WMeterRsltItemSpec newItem = oriItem.Clone(); - newItem.Caption = newItem.Name; - SelectedItems.Add(newItem); - RedrawAvailable(); - RedrawSelected(); - - /// Select the last item - selectedResultsListViewEx.Focus(); - selectedResultsListViewEx.Items[SelectedItems.Count - 1].Selected = true; - selectedResultsListViewEx.Items[SelectedItems.Count - 1].EnsureVisible(); - } - } void addButton_Click(object sender, EventArgs e) { - /// Append at the end, this code supports multiple selected items, - /// although ListBox control settings may limit the max.number of selected items to one. - - for (int i = availableResultsListBox.SelectedIndices.Count - 1; i >= 0; i--) + switch (availableTabControl.SelectedIndex) { - var oriItem = AvailableItems[availableResultsListBox.SelectedIndices[i]]; - WMeterRsltItemSpec newItem = oriItem.Clone(); - newItem.Caption = newItem.Name; - SelectedItems.Add(newItem); + case 0: + availableAlphabeticTreeView_DoubleClick(this, null); + break; + case 1: + availableByQuantityTreeView_DoubleClick(this, null); + break; + case 2: + availableByCategoryTreeView_DoubleClick(this, null); + break; + default: + break; } - RedrawAvailable(); + } + + private void availableAlphabeticTreeView_DoubleClick(object sender, EventArgs e) + { + if (availableAlphabeticTreeView.SelectedNode != null && + availableAlphabeticTreeView.SelectedNode.Tag is WMeterRsltItemSpec) + { + AddItem(availableAlphabeticTreeView.SelectedNode.Tag as WMeterRsltItemSpec); + } + } + + private void availableByQuantityTreeView_DoubleClick(object sender, EventArgs e) + { + if (availableByQuantityTreeView.SelectedNode != null && + availableByQuantityTreeView.SelectedNode.Tag is WMeterRsltItemSpec) + { + AddItem(availableByQuantityTreeView.SelectedNode.Tag as WMeterRsltItemSpec); + } + } + + private void availableByCategoryTreeView_DoubleClick(object sender, EventArgs e) + { + if (availableByCategoryTreeView.SelectedNode != null && + availableByCategoryTreeView.SelectedNode.Tag is WMeterRsltItemSpec) + { + AddItem(availableByCategoryTreeView.SelectedNode.Tag as WMeterRsltItemSpec); + } + } + + void AddItem(WMeterRsltItemSpec item) + { + WMeterRsltItemSpec newItem = item.Clone(); + newItem.Caption = newItem.Name; + SelectedItems.Add(newItem); RedrawSelected(); - /// Select the last item - selectedResultsListViewEx.Focus(); - selectedResultsListViewEx.Items[SelectedItems.Count - 1].Selected = true; - selectedResultsListViewEx.Items[SelectedItems.Count - 1].EnsureVisible(); - } + /// Select the last item + selectedResultsListViewEx.Focus(); + selectedResultsListViewEx.Items[SelectedItems.Count - 1].Selected = true; + selectedResultsListViewEx.Items[SelectedItems.Count - 1].EnsureVisible(); + } + private void selectedResultsListBox_DoubleClick(object sender, EventArgs e) { @@ -374,5 +489,17 @@ namespace Results.Forms DialogResult = DialogResult.Cancel; Close(); } + + private void tabPage1_Click(object sender, EventArgs e) + { + + } + + private void availableByCategoryTreeView_NodeMouseHover(object sender, TreeNodeMouseHoverEventArgs e) + { + ToolTip toolTip = new ToolTip(); + toolTip.SetToolTip(this, e.Node.ToolTipText); + } } + } diff --git a/Results/Forms/ResultsConfigDlg.designer.cs b/Results/Forms/ResultsConfigDlg.designer.cs index 811b5620f..1f06848f1 100644 --- a/Results/Forms/ResultsConfigDlg.designer.cs +++ b/Results/Forms/ResultsConfigDlg.designer.cs @@ -31,156 +31,238 @@ namespace Results.Forms /// private void InitializeComponent() { - this.okButton = new System.Windows.Forms.Button(); - this.cancelButton = new System.Windows.Forms.Button(); - this.availableResultsListBox = new System.Windows.Forms.ListBox(); - this.availableResultsLabel = new System.Windows.Forms.Label(); - this.selectedResultsLabel = new System.Windows.Forms.Label(); - this.removeAllButton = new System.Windows.Forms.Button(); - this.removeButton = new System.Windows.Forms.Button(); - this.addButton = new System.Windows.Forms.Button(); - this.selectedResultsListViewEx = new Results.Forms.ListViewEx(); - this.upButton = new System.Windows.Forms.Button(); - this.downButton = new System.Windows.Forms.Button(); - this.SuspendLayout(); - // - // okButton - // - this.okButton.Location = new System.Drawing.Point(344, 401); - this.okButton.Name = "okButton"; - this.okButton.Size = new System.Drawing.Size(104, 30); - this.okButton.TabIndex = 4; - this.okButton.Text = "OK"; - this.okButton.UseVisualStyleBackColor = true; - this.okButton.Click += new System.EventHandler(this.okButton_Click); - // - // cancelButton - // - this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.cancelButton.Location = new System.Drawing.Point(465, 401); - this.cancelButton.Name = "cancelButton"; - this.cancelButton.Size = new System.Drawing.Size(104, 30); - this.cancelButton.TabIndex = 5; - this.cancelButton.Text = "Cancel"; - this.cancelButton.UseVisualStyleBackColor = true; - this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); - // - // availableResultsListBox - // - this.availableResultsListBox.FormattingEnabled = true; - this.availableResultsListBox.Location = new System.Drawing.Point(12, 31); - this.availableResultsListBox.Name = "availableResultsListBox"; - this.availableResultsListBox.Size = new System.Drawing.Size(162, 355); - this.availableResultsListBox.TabIndex = 6; - this.availableResultsListBox.DoubleClick += new System.EventHandler(this.availableResultsListBox_DoubleClick); - // - // availableResultsLabel - // - this.availableResultsLabel.AutoSize = true; - this.availableResultsLabel.Location = new System.Drawing.Point(12, 9); - this.availableResultsLabel.Name = "availableResultsLabel"; - this.availableResultsLabel.Size = new System.Drawing.Size(86, 13); - this.availableResultsLabel.TabIndex = 8; - this.availableResultsLabel.Text = "Available results:"; - // - // selectedResultsLabel - // - this.selectedResultsLabel.AutoSize = true; - this.selectedResultsLabel.Location = new System.Drawing.Point(284, 9); - this.selectedResultsLabel.Name = "selectedResultsLabel"; - this.selectedResultsLabel.Size = new System.Drawing.Size(85, 13); - this.selectedResultsLabel.TabIndex = 9; - this.selectedResultsLabel.Text = "Selected results:"; - // - // removeAllButton - // - this.removeAllButton.Location = new System.Drawing.Point(184, 144); - this.removeAllButton.Name = "removeAllButton"; - this.removeAllButton.Size = new System.Drawing.Size(94, 30); - this.removeAllButton.TabIndex = 46; - this.removeAllButton.Text = "<< R&emove all"; - this.removeAllButton.UseVisualStyleBackColor = true; - this.removeAllButton.Click += new System.EventHandler(this.removeAllButton_Click); - // - // removeButton - // - this.removeButton.Location = new System.Drawing.Point(184, 109); - this.removeButton.Name = "removeButton"; - this.removeButton.Size = new System.Drawing.Size(93, 30); - this.removeButton.TabIndex = 45; - this.removeButton.Text = "< &Remove"; - this.removeButton.UseVisualStyleBackColor = true; - this.removeButton.Click += new System.EventHandler(this.removeButton_Click); - // - // addButton - // - this.addButton.Location = new System.Drawing.Point(184, 74); - this.addButton.Name = "addButton"; - this.addButton.Size = new System.Drawing.Size(93, 30); - this.addButton.TabIndex = 44; - this.addButton.Text = "&Add >"; - this.addButton.UseVisualStyleBackColor = true; - this.addButton.Click += new System.EventHandler(this.addButton_Click); - // - // selectedResultsListViewEx - // - this.selectedResultsListViewEx.AllowColumnReorder = true; - this.selectedResultsListViewEx.DoubleClickActivation = false; - this.selectedResultsListViewEx.FullRowSelect = true; - this.selectedResultsListViewEx.Location = new System.Drawing.Point(287, 31); - this.selectedResultsListViewEx.Name = "selectedResultsListViewEx"; - this.selectedResultsListViewEx.Size = new System.Drawing.Size(594, 355); - this.selectedResultsListViewEx.TabIndex = 47; - this.selectedResultsListViewEx.UseCompatibleStateImageBehavior = false; - this.selectedResultsListViewEx.View = System.Windows.Forms.View.Details; - this.selectedResultsListViewEx.SubItemClicked += new Results.Forms.SubItemEventHandler(this.selectedResultsListViewEx_SubItemClicked); - this.selectedResultsListViewEx.SubItemEndEditing += new Results.Forms.SubItemEndEditingEventHandler(this.selectedResultsListViewEx_SubItemEndEditing); - // - // upButton - // - this.upButton.Location = new System.Drawing.Point(184, 236); - this.upButton.Name = "upButton"; - this.upButton.Size = new System.Drawing.Size(93, 30); - this.upButton.TabIndex = 48; - this.upButton.Text = "Up"; - this.upButton.UseVisualStyleBackColor = true; - this.upButton.Click += new System.EventHandler(this.upButton_Click); - // - // downButton - // - this.downButton.Location = new System.Drawing.Point(184, 272); - this.downButton.Name = "downButton"; - this.downButton.Size = new System.Drawing.Size(93, 30); - this.downButton.TabIndex = 49; - this.downButton.Text = "Down"; - this.downButton.UseVisualStyleBackColor = true; - this.downButton.Click += new System.EventHandler(this.downButton_Click); - // - // ResultsConfigDlg - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(893, 445); - this.Controls.Add(this.downButton); - this.Controls.Add(this.upButton); - this.Controls.Add(this.selectedResultsListViewEx); - this.Controls.Add(this.removeAllButton); - this.Controls.Add(this.removeButton); - this.Controls.Add(this.addButton); - this.Controls.Add(this.selectedResultsLabel); - this.Controls.Add(this.availableResultsLabel); - this.Controls.Add(this.availableResultsListBox); - this.Controls.Add(this.cancelButton); - this.Controls.Add(this.okButton); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Name = "ResultsConfigDlg"; - this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "ResultsConfig"; - this.Load += new System.EventHandler(this.ResultsConfig_Load); - this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.ResultsConfigDlg_KeyPress); - this.ResumeLayout(false); - this.PerformLayout(); + this.components = new System.ComponentModel.Container(); + this.okButton = new System.Windows.Forms.Button(); + this.cancelButton = new System.Windows.Forms.Button(); + this.availableResultsLabel = new System.Windows.Forms.Label(); + this.selectedResultsLabel = new System.Windows.Forms.Label(); + this.removeAllButton = new System.Windows.Forms.Button(); + this.removeButton = new System.Windows.Forms.Button(); + this.addButton = new System.Windows.Forms.Button(); + this.upButton = new System.Windows.Forms.Button(); + this.downButton = new System.Windows.Forms.Button(); + this.availableTabControl = new System.Windows.Forms.TabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.availableAlphabeticTreeView = new System.Windows.Forms.TreeView(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.availableByQuantityTreeView = new System.Windows.Forms.TreeView(); + this.tabPage3 = new System.Windows.Forms.TabPage(); + this.availableByCategoryTreeView = new System.Windows.Forms.TreeView(); + this.selectedResultsListViewEx = new Results.Forms.ListViewEx(); + this.availableTabControl.SuspendLayout(); + this.tabPage1.SuspendLayout(); + this.tabPage2.SuspendLayout(); + this.tabPage3.SuspendLayout(); + this.SuspendLayout(); + // + // okButton + // + this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.okButton.Location = new System.Drawing.Point(373, 499); + this.okButton.Name = "okButton"; + this.okButton.Size = new System.Drawing.Size(105, 30); + this.okButton.TabIndex = 4; + this.okButton.Text = "OK"; + this.okButton.UseVisualStyleBackColor = true; + this.okButton.Click += new System.EventHandler(this.okButton_Click); + // + // cancelButton + // + this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.cancelButton.Location = new System.Drawing.Point(494, 499); + this.cancelButton.Name = "cancelButton"; + this.cancelButton.Size = new System.Drawing.Size(105, 30); + this.cancelButton.TabIndex = 5; + this.cancelButton.Text = "Cancel"; + this.cancelButton.UseVisualStyleBackColor = true; + this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); + // + // availableResultsLabel + // + this.availableResultsLabel.AutoSize = true; + this.availableResultsLabel.Location = new System.Drawing.Point(12, 9); + this.availableResultsLabel.Name = "availableResultsLabel"; + this.availableResultsLabel.Size = new System.Drawing.Size(86, 13); + this.availableResultsLabel.TabIndex = 8; + this.availableResultsLabel.Text = "Available results:"; + // + // selectedResultsLabel + // + this.selectedResultsLabel.AutoSize = true; + this.selectedResultsLabel.Location = new System.Drawing.Point(284, 9); + this.selectedResultsLabel.Name = "selectedResultsLabel"; + this.selectedResultsLabel.Size = new System.Drawing.Size(85, 13); + this.selectedResultsLabel.TabIndex = 9; + this.selectedResultsLabel.Text = "Selected results:"; + // + // removeAllButton + // + this.removeAllButton.Location = new System.Drawing.Point(218, 221); + this.removeAllButton.Name = "removeAllButton"; + this.removeAllButton.Size = new System.Drawing.Size(94, 30); + this.removeAllButton.TabIndex = 46; + this.removeAllButton.Text = "<< R&emove all"; + this.removeAllButton.UseVisualStyleBackColor = true; + this.removeAllButton.Click += new System.EventHandler(this.removeAllButton_Click); + // + // removeButton + // + this.removeButton.Location = new System.Drawing.Point(218, 186); + this.removeButton.Name = "removeButton"; + this.removeButton.Size = new System.Drawing.Size(93, 30); + this.removeButton.TabIndex = 45; + this.removeButton.Text = "< &Remove"; + this.removeButton.UseVisualStyleBackColor = true; + this.removeButton.Click += new System.EventHandler(this.removeButton_Click); + // + // addButton + // + this.addButton.Location = new System.Drawing.Point(218, 151); + this.addButton.Name = "addButton"; + this.addButton.Size = new System.Drawing.Size(93, 30); + this.addButton.TabIndex = 44; + this.addButton.Text = "&Add >"; + this.addButton.UseVisualStyleBackColor = true; + this.addButton.Click += new System.EventHandler(this.addButton_Click); + // + // upButton + // + this.upButton.Location = new System.Drawing.Point(218, 313); + this.upButton.Name = "upButton"; + this.upButton.Size = new System.Drawing.Size(93, 30); + this.upButton.TabIndex = 48; + this.upButton.Text = "Up"; + this.upButton.UseVisualStyleBackColor = true; + this.upButton.Click += new System.EventHandler(this.upButton_Click); + // + // downButton + // + this.downButton.Location = new System.Drawing.Point(218, 349); + this.downButton.Name = "downButton"; + this.downButton.Size = new System.Drawing.Size(93, 30); + this.downButton.TabIndex = 49; + this.downButton.Text = "Down"; + this.downButton.UseVisualStyleBackColor = true; + this.downButton.Click += new System.EventHandler(this.downButton_Click); + // + // availableTabControl + // + this.availableTabControl.Controls.Add(this.tabPage1); + this.availableTabControl.Controls.Add(this.tabPage2); + this.availableTabControl.Controls.Add(this.tabPage3); + this.availableTabControl.Location = new System.Drawing.Point(6, 31); + this.availableTabControl.Name = "availableTabControl"; + this.availableTabControl.SelectedIndex = 0; + this.availableTabControl.Size = new System.Drawing.Size(206, 453); + this.availableTabControl.TabIndex = 50; + // + // tabPage1 + // + this.tabPage1.Controls.Add(this.availableAlphabeticTreeView); + this.tabPage1.Location = new System.Drawing.Point(4, 22); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(198, 427); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "A...Z"; + this.tabPage1.UseVisualStyleBackColor = true; + this.tabPage1.Click += new System.EventHandler(this.tabPage1_Click); + // + // availableAlphabeticTreeView + // + this.availableAlphabeticTreeView.Dock = System.Windows.Forms.DockStyle.Fill; + this.availableAlphabeticTreeView.Location = new System.Drawing.Point(3, 3); + this.availableAlphabeticTreeView.Name = "availableAlphabeticTreeView"; + this.availableAlphabeticTreeView.Size = new System.Drawing.Size(192, 421); + this.availableAlphabeticTreeView.TabIndex = 0; + this.availableAlphabeticTreeView.DoubleClick += new System.EventHandler(this.availableAlphabeticTreeView_DoubleClick); + // + // tabPage2 + // + this.tabPage2.Controls.Add(this.availableByQuantityTreeView); + this.tabPage2.Location = new System.Drawing.Point(4, 22); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(198, 427); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "by quantity"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // availableByQuantityTreeView + // + this.availableByQuantityTreeView.Dock = System.Windows.Forms.DockStyle.Fill; + this.availableByQuantityTreeView.Location = new System.Drawing.Point(3, 3); + this.availableByQuantityTreeView.Name = "availableByQuantityTreeView"; + this.availableByQuantityTreeView.Size = new System.Drawing.Size(192, 421); + this.availableByQuantityTreeView.TabIndex = 0; + this.availableByQuantityTreeView.DoubleClick += new System.EventHandler(this.availableByQuantityTreeView_DoubleClick); + // + // tabPage3 + // + this.tabPage3.Controls.Add(this.availableByCategoryTreeView); + this.tabPage3.Location = new System.Drawing.Point(4, 22); + this.tabPage3.Name = "tabPage3"; + this.tabPage3.Size = new System.Drawing.Size(198, 427); + this.tabPage3.TabIndex = 2; + this.tabPage3.Text = "by category"; + this.tabPage3.UseVisualStyleBackColor = true; + // + // availableByCategoryTreeView + // + this.availableByCategoryTreeView.Dock = System.Windows.Forms.DockStyle.Fill; + this.availableByCategoryTreeView.Location = new System.Drawing.Point(0, 0); + this.availableByCategoryTreeView.Name = "availableByCategoryTreeView"; + this.availableByCategoryTreeView.Size = new System.Drawing.Size(198, 427); + this.availableByCategoryTreeView.TabIndex = 0; + this.availableByCategoryTreeView.NodeMouseHover += new System.Windows.Forms.TreeNodeMouseHoverEventHandler(this.availableByCategoryTreeView_NodeMouseHover); + this.availableByCategoryTreeView.DoubleClick += new System.EventHandler(this.availableByCategoryTreeView_DoubleClick); + // + // selectedResultsListViewEx + // + this.selectedResultsListViewEx.AllowColumnReorder = true; + this.selectedResultsListViewEx.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Right))); + this.selectedResultsListViewEx.DoubleClickActivation = false; + this.selectedResultsListViewEx.FullRowSelect = true; + this.selectedResultsListViewEx.Location = new System.Drawing.Point(317, 31); + this.selectedResultsListViewEx.Name = "selectedResultsListViewEx"; + this.selectedResultsListViewEx.Size = new System.Drawing.Size(594, 453); + this.selectedResultsListViewEx.TabIndex = 47; + this.selectedResultsListViewEx.UseCompatibleStateImageBehavior = false; + this.selectedResultsListViewEx.View = System.Windows.Forms.View.Details; + this.selectedResultsListViewEx.SubItemClicked += new Results.Forms.SubItemEventHandler(this.selectedResultsListViewEx_SubItemClicked); + this.selectedResultsListViewEx.SubItemEndEditing += new Results.Forms.SubItemEndEditingEventHandler(this.selectedResultsListViewEx_SubItemEndEditing); + // + // ResultsConfigDlg + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(923, 543); + this.Controls.Add(this.availableTabControl); + this.Controls.Add(this.downButton); + this.Controls.Add(this.upButton); + this.Controls.Add(this.selectedResultsListViewEx); + this.Controls.Add(this.removeAllButton); + this.Controls.Add(this.removeButton); + this.Controls.Add(this.addButton); + this.Controls.Add(this.selectedResultsLabel); + this.Controls.Add(this.availableResultsLabel); + this.Controls.Add(this.cancelButton); + this.Controls.Add(this.okButton); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.Name = "ResultsConfigDlg"; + this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "ResultsConfig"; + this.Load += new System.EventHandler(this.ResultsConfig_Load); + this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.ResultsConfigDlg_KeyPress); + this.availableTabControl.ResumeLayout(false); + this.tabPage1.ResumeLayout(false); + this.tabPage2.ResumeLayout(false); + this.tabPage3.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); } @@ -188,7 +270,6 @@ namespace Results.Forms private System.Windows.Forms.Button okButton; private System.Windows.Forms.Button cancelButton; - private System.Windows.Forms.ListBox availableResultsListBox; private System.Windows.Forms.Label availableResultsLabel; private System.Windows.Forms.Label selectedResultsLabel; private System.Windows.Forms.Button removeAllButton; @@ -197,5 +278,12 @@ namespace Results.Forms private ListViewEx selectedResultsListViewEx; private System.Windows.Forms.Button upButton; private System.Windows.Forms.Button downButton; + private System.Windows.Forms.TabControl availableTabControl; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.TreeView availableAlphabeticTreeView; + private System.Windows.Forms.TreeView availableByQuantityTreeView; + private System.Windows.Forms.TabPage tabPage3; + private System.Windows.Forms.TreeView availableByCategoryTreeView; } } \ No newline at end of file diff --git a/Results/Forms/ResultsConfigDlg.resx b/Results/Forms/ResultsConfigDlg.resx index 1af7de150..df8339b68 100644 --- a/Results/Forms/ResultsConfigDlg.resx +++ b/Results/Forms/ResultsConfigDlg.resx @@ -117,4 +117,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 17, 17 + \ No newline at end of file diff --git a/Results/ItemID.cs b/Results/ItemID.cs index 5ca61fff4..1fb7957be 100644 --- a/Results/ItemID.cs +++ b/Results/ItemID.cs @@ -99,8 +99,7 @@ namespace Results Start_volume_aux, /// 92 End_volume, /// 93 End_volume_main, /// 94 - End_volume_aux, /// 95 - + End_volume_aux, /// 95 Count, } } diff --git a/Results/Properties/AssemblyInfo.cs b/Results/Properties/AssemblyInfo.cs index bd95b017e..6dbc29c08 100644 --- a/Results/Properties/AssemblyInfo.cs +++ b/Results/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.12.464.0")] -[assembly: AssemblyFileVersion("2.12.464.0")] +[assembly: AssemblyVersion("2.12.475.0")] +[assembly: AssemblyFileVersion("2.12.475.0")] diff --git a/Results/WMeterRsltItemSpec.cs b/Results/WMeterRsltItemSpec.cs index 098954343..0f7752970 100644 --- a/Results/WMeterRsltItemSpec.cs +++ b/Results/WMeterRsltItemSpec.cs @@ -18,7 +18,9 @@ namespace Results public readonly int Uid; public readonly string OldUid; public readonly string Name; /// Name-s of all items must be unique + public readonly string ToolTipText; /// Tool-Tip Text public readonly Quantity Quantity; /// Quantity + public readonly ItemCategory Category; /// public string Caption; /// Specifies item description to be printed as a caption (in the header, etc.) public string TestID; /// Specifies the test public Config.Unit Units; /// Specifies units for the output @@ -29,7 +31,7 @@ namespace Results public WMeterRsltItemSpec Clone() { - WMeterRsltItemSpec item2 = new WMeterRsltItemSpec((ItemID)Uid, Name, Quantity, printDlgt); + WMeterRsltItemSpec item2 = new WMeterRsltItemSpec((ItemID)Uid, Name, ToolTipText, Quantity, Category, printDlgt); item2.Caption = Caption; item2.TestID = TestID; item2.Units = Units; @@ -43,7 +45,7 @@ namespace Results /// /// Function to pick a MeterTestResult field and convert it into a string /// - public delegate string PrintDlgt(WaterMeter waterMeterResult, string testID, Config.Unit units, string format, string precision); + public delegate string PrintDlgt(WaterMeter waterMeterResult, string testID, Config.Unit units, string format, string precision); private readonly PrintDlgt printDlgt; @@ -85,12 +87,28 @@ namespace Results /// /// Public constructor /// - public WMeterRsltItemSpec(ItemID itemId, string name, Quantity quantity, PrintDlgt printDlgt) + public WMeterRsltItemSpec(ItemID itemId, string name, string toolTipText, Quantity quantity, ItemCategory category, PrintDlgt printDlgt) { Uid = (int)itemId; OldUid = itemId.ToString().Replace("__", "/").Replace('_', ' '); Name = name; + ToolTipText = toolTipText; Quantity = quantity; + Category = category; + this.printDlgt = printDlgt; + } + + /// + /// Constructorwithot ToolTip text + /// + public WMeterRsltItemSpec(ItemID itemId, string name, Quantity quantity, ItemCategory category, PrintDlgt printDlgt) + { + Uid = (int)itemId; + OldUid = itemId.ToString().Replace("__", "/").Replace('_', ' '); + Name = name; + ToolTipText = string.Format("{0} bla, bla, bla", Name); + Quantity = quantity; + Category = category; this.printDlgt = printDlgt; } @@ -103,104 +121,104 @@ namespace Results { AllItems = new List(); - AllItems.Add(new WMeterRsltItemSpec(ItemID.String, "String", Quantity.String, (w, t, u, f, p) => f)); + AllItems.Add(new WMeterRsltItemSpec(ItemID.String, "String", "", Quantity.String, ItemCategory.Other, (w, t, u, f, p) => f)); /// Common - AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_name, Strings.Test + " *", Quantity.String, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Name())); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Procedure_name, Strings.Procedure, Quantity.String, (w, t, u, f, p) => w.ProcedureName())); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Batch_number, Strings.Batch_nr, Quantity.Number, (w, t, u, f, p) => w.BatchNr().ToString())); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_method, Strings.Test_method + " *", Quantity.String, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Method())); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Density, Strings.Density + " *", Quantity.Density, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).DensityOut.ToString(string.IsNullOrEmpty(p) ? "F1" : p))); /// [kg/m3] + AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_name, Strings.Test, Quantity.String, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Name())); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Procedure_name, Strings.Procedure, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.ProcedureName())); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Batch_number, Strings.Batch_nr, Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => w.BatchNr().ToString())); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_method, Strings.Test_method + " *", Quantity.String, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Method())); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Density, Strings.Density + " *", Quantity.Density, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).DensityOut.ToString(string.IsNullOrEmpty(p) ? "F1" : p))); /// [kg/m3] /// Target values - AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_from, Strings.Q_from + "()", Quantity.Flow, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Qfrom().ToString(string.IsNullOrEmpty(p) ? "F3" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_to, Strings.Q_to + "()", Quantity.Flow, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Qto().ToString(string.IsNullOrEmpty(p) ? "F3" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_volume, Strings.Test_vol + "()", Quantity.Volume, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TargetVolume()).ToString(string.IsNullOrEmpty(p) ? "F1" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Error_limit_Lo, Strings.ErrLimLo + "()", Quantity.Error, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).ErrLimLo()).ToString(string.IsNullOrEmpty(p) ? "F1" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Error_limit_Hi, Strings.ErrLimHi + "()", Quantity.Error, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).ErrLimHi()).ToString(string.IsNullOrEmpty(p) ? "F1" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Uncertainty, Strings.Uncertainty + "()", Quantity.Error, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Uncertainty().ToString(string.IsNullOrEmpty(p) ? "F2" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_from, Strings.Q_from + "()", Quantity.Flow, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Qfrom().ToString(string.IsNullOrEmpty(p) ? "F3" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_to, Strings.Q_to + "()", Quantity.Flow, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Qto().ToString(string.IsNullOrEmpty(p) ? "F3" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_volume, Strings.Test_vol + "()", Quantity.Volume, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TargetVolume()).ToString(string.IsNullOrEmpty(p) ? "F1" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Error_limit_Lo, Strings.ErrLimLo + "()", Quantity.Error, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).ErrLimLo()).ToString(string.IsNullOrEmpty(p) ? "F1" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Error_limit_Hi, Strings.ErrLimHi + "()", Quantity.Error, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).ErrLimHi()).ToString(string.IsNullOrEmpty(p) ? "F1" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Uncertainty, Strings.Uncertainty + "()", Quantity.Error, ItemCategory.TestData, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Uncertainty().ToString(string.IsNullOrEmpty(p) ? "F2" : p))); /// Test results - AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_start_time, Strings.T_start + "()", Quantity.DateTime, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : (string.IsNullOrEmpty(f) ? w.GetTestRslt(t).StartTime.ToString() : string.Format(f, w.GetTestRslt(t).StartTime)))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_end_time, Strings.T_end + "()", Quantity.DateTime, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : (string.IsNullOrEmpty(f) ? w.GetTestRslt(t).EndTime.ToString() : string.Format(f, w.GetTestRslt(t).EndTime)))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_time, Strings.T_s + "()", Quantity.Time, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).TestTime.ToString(string.IsNullOrEmpty(p) ? "F2" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow, Strings.Flow + "()", Quantity.Flow, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Utils.DoubleToStr(Config.Units.ConvertTo(u, w.GetTestRslt(t).FlowVolume), 4))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.T_up_mean, Strings.T_in + "()", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempUpMean).ToString(string.IsNullOrEmpty(p) ? "F2" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.T_down_mean, Strings.T_out + "()", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempDownMean).ToString(string.IsNullOrEmpty(p) ? "F2" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.T_div, Strings.T_div + "()", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempDivMean).ToString(string.IsNullOrEmpty(p) ? "F2" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.P_up, Strings.P_up + "()", Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressUpMean).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.P_up_start, Strings.P_up_start + "()", Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressUpStart).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.P_up_end, Strings.P_up_end + "()", Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressUpEnd).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.P_down, Strings.P_dn + "()", Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDownMean).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.P_down_start, Strings.P_dn_start + "()", Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDownStart).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.P_down_end, Strings.P_dn_end + "()", Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDownEnd).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.P_delta_mean, Strings.P_delta + "()", Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDeltaMean).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.P_delta_start, Strings.P_delta_start + "()",Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDeltaStart).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.P_delta_end, Strings.P_delta_end + "()", Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDeltaEnd).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_error, Strings.ErrRef + "()", Quantity.Error, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).ErrorMaster).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_temperature, Strings.T_amb + "()", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? Config.Units.ConvertTo(u, w.Batch.AmbientTempAve()).ToString(string.IsNullOrEmpty(p) ? "F1" : p) : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbTempMean).ToString(string.IsNullOrEmpty(p) ? "F1" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_pressure, Strings.P_amb + "()", Quantity.Pressure, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? Config.Units.ConvertTo(u, w.Batch.AmbientPressAve()).ToString(string.IsNullOrEmpty(p) ? "F0" : p) : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbPressMean).ToString(string.IsNullOrEmpty(p) ? "F0" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_humidity, Strings.H_amb + "()", Quantity.Humidity, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? Config.Units.ConvertTo(u, w.Batch.AmbientHumiAve()).ToString(string.IsNullOrEmpty(p) ? "F1" : p) : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbHumiMean).ToString(string.IsNullOrEmpty(p) ? "F1" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_start_time, Strings.T_start + "()", Quantity.DateTime, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : (string.IsNullOrEmpty(f) ? w.GetTestRslt(t).StartTime.ToString() : string.Format(f, w.GetTestRslt(t).StartTime)))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_end_time, Strings.T_end + "()", Quantity.DateTime, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : (string.IsNullOrEmpty(f) ? w.GetTestRslt(t).EndTime.ToString() : string.Format(f, w.GetTestRslt(t).EndTime)))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_time, Strings.T_s + "()", Quantity.Time, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).TestTime.ToString(string.IsNullOrEmpty(p) ? "F2" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow, Strings.Flow + "()", Quantity.Flow, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Utils.DoubleToStr(Config.Units.ConvertTo(u, w.GetTestRslt(t).FlowVolume), 4))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.T_up_mean, Strings.T_in + "()", Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempUpMean).ToString(string.IsNullOrEmpty(p) ? "F2" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.T_down_mean, Strings.T_out + "()", Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempDownMean).ToString(string.IsNullOrEmpty(p) ? "F2" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.T_div, Strings.T_div + "()", Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempDivMean).ToString(string.IsNullOrEmpty(p) ? "F2" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.P_up, Strings.P_up + "()", Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressUpMean).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.P_up_start, Strings.P_up_start + "()", Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressUpStart).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.P_up_end, Strings.P_up_end + "()", Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressUpEnd).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.P_down, Strings.P_dn + "()", Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDownMean).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.P_down_start, Strings.P_dn_start + "()", Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDownStart).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.P_down_end, Strings.P_dn_end + "()", Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDownEnd).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.P_delta_mean, Strings.P_delta + "()", Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDeltaMean).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.P_delta_start, Strings.P_delta_start + "()", Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDeltaStart).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.P_delta_end, Strings.P_delta_end + "()", Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDeltaEnd).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_error, Strings.ErrRef + "()", Quantity.Error, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).ErrorMaster).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_temperature, Strings.T_amb + "()", Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? Config.Units.ConvertTo(u, w.Batch.AmbientTempAve()).ToString(string.IsNullOrEmpty(p) ? "F1" : p) : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbTempMean).ToString(string.IsNullOrEmpty(p) ? "F1" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_pressure, Strings.P_amb + "()", Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? Config.Units.ConvertTo(u, w.Batch.AmbientPressAve()).ToString(string.IsNullOrEmpty(p) ? "F0" : p) : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbPressMean).ToString(string.IsNullOrEmpty(p) ? "F0" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_humidity, Strings.H_amb + "()", Quantity.Humidity, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? Config.Units.ConvertTo(u, w.Batch.AmbientHumiAve()).ToString(string.IsNullOrEmpty(p) ? "F1" : p) : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbHumiMean).ToString(string.IsNullOrEmpty(p) ? "F1" : p))); /// Single and combined meter results - AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume, Strings.Volume + "()", Quantity.Volume, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeMeter).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_volume, Strings.VolRef + "()", Quantity.Volume, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeRef).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume, Strings.Volume + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeMeter).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_volume, Strings.VolRef + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeRef).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); #if TURA_IPERL || TURA_SPECIAL - AllItems.Add(new WMeterRsltItemSpec(ItemID.Error, Strings.Error + "()", Quantity.Error, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "0" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).Error).ToString(string.IsNullOrEmpty(p) ? "F2" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Error, Strings.Error + "()", Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "0" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).Error).ToString(string.IsNullOrEmpty(p) ? "F2" : p))); #else - AllItems.Add(new WMeterRsltItemSpec(ItemID.Error, Strings.Error + "()", Quantity.Error, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).Error).ToString(string.IsNullOrEmpty(p) ? "F2" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Error, Strings.Error + "()", Quantity.Error, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).Error).ToString(string.IsNullOrEmpty(p) ? "F2" : p))); #endif - AllItems.Add(new WMeterRsltItemSpec(ItemID.Passed, Strings.Result + "()", Quantity.Boolean, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : w.GetMeterTestRslt(t).PassedColorStr())); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Passed, Strings.Result + "()", Quantity.Boolean, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : w.GetMeterTestRslt(t).PassedColorStr())); /// Water meter info - AllItems.Add(new WMeterRsltItemSpec(ItemID.Watermeter_type, Strings.WM_Type, Quantity.String, (w, t, u, f, p) => w.WaterMeterData.ProductName)); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Producer, Strings.Producer, Quantity.String, (w, t, u, f, p) => w.WaterMeterData.Producer)); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Watermeter_type, Strings.WM_Type, Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => w.WaterMeterData.ProductName)); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Producer, Strings.Producer, Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => w.WaterMeterData.Producer)); - AllItems.Add(new WMeterRsltItemSpec(ItemID.DN, "DN", Quantity.Length, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.DN).ToString() - : Config.Units.ConvertTo(u, w.WaterMeterData.DN).ToString(p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.L, "L", Quantity.Length, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.L).ToString() + AllItems.Add(new WMeterRsltItemSpec(ItemID.DN, "DN", Quantity.Length, ItemCategory.MeterData, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.DN).ToString() + : Config.Units.ConvertTo(u, w.WaterMeterData.DN).ToString(p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.L, "L", Quantity.Length, ItemCategory.MeterData, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.L).ToString() : Config.Units.ConvertTo(u, w.WaterMeterData.L).ToString(p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Mounting, Strings.Mounting, Quantity.String, (w, t, u, f, p) => w.WaterMeterData.Mounting.ToDescription())); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Mounting, Strings.Mounting, Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => w.WaterMeterData.Mounting.ToDescription())); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Q4, "Q4_Qmax", Quantity.Flow, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.Q4_Qmax).ToString() - : Config.Units.ConvertTo(u, w.WaterMeterData.Q4_Qmax).ToString(p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Q3, "Q3_Qn", Quantity.Flow, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.Q3_Qn).ToString() - : Config.Units.ConvertTo(u, w.WaterMeterData.Q3_Qn).ToString(p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2, "Q2_Qt", Quantity.Flow, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.Q2_Qt).ToString() - : Config.Units.ConvertTo(u, w.WaterMeterData.Q2_Qt).ToString(p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Q1, "Q1_Qmin", Quantity.Flow, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.Q1_Qmin).ToString() - : Config.Units.ConvertTo(u, w.WaterMeterData.Q1_Qmin).ToString(p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Q4, "Q4_Qmax", Quantity.Flow, ItemCategory.MeterData, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.Q4_Qmax).ToString() + : Config.Units.ConvertTo(u, w.WaterMeterData.Q4_Qmax).ToString(p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Q3, "Q3_Qn", Quantity.Flow, ItemCategory.MeterData, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.Q3_Qn).ToString() + : Config.Units.ConvertTo(u, w.WaterMeterData.Q3_Qn).ToString(p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Q2, "Q2_Qt", Quantity.Flow, ItemCategory.MeterData, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.Q2_Qt).ToString() + : Config.Units.ConvertTo(u, w.WaterMeterData.Q2_Qt).ToString(p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Q1, "Q1_Qmin", Quantity.Flow, ItemCategory.MeterData, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.Q1_Qmin).ToString() + : Config.Units.ConvertTo(u, w.WaterMeterData.Q1_Qmin).ToString(p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Metrological_class, Strings.MClass, Quantity.String, (w, t, u, f, p) => w.WaterMeterData.MetrologicalClass)); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Temperature_class, "Temperature class", Quantity.String, (w, t, u, f, p) => w.WaterMeterData.TemperatureClass.ToDescription())); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Pressure_loss_class, "Pressure loss class", Quantity.String, (w, t, u, f, p) => w.WaterMeterData.PressureLossClass.ToDescription())); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Max_admissible_pressure, "Max. admissible pressure", Quantity.String, (w, t, u, f, p) => w.WaterMeterData.MaxAdmissiblePressure.ToDescription())); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow_profile_sensitivity_class, "Flow profile sensitivity class", Quantity.String, (w, t, u, f, p) => w.WaterMeterData.FlowProfileSensitivityClass.ToDescription())); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Metrological_class, Strings.MClass, Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => w.WaterMeterData.MetrologicalClass)); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Temperature_class, "Temperature class", Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => w.WaterMeterData.TemperatureClass.ToDescription())); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Pressure_loss_class, "Pressure loss class", Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => w.WaterMeterData.PressureLossClass.ToDescription())); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Max_admissible_pressure, "Max. admissible pressure", Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => w.WaterMeterData.MaxAdmissiblePressure.ToDescription())); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Flow_profile_sensitivity_class, "Flow profile sensitivity class", Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => w.WaterMeterData.FlowProfileSensitivityClass.ToDescription())); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Approval_info, Strings.Approval, Quantity.String, (w, t, u, f, p) => w.WaterMeterData.ApprovalInfo)); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Certificate, "Certificate", Quantity.String, (w, t, u, f, p) => w.WaterMeterData.Certificate)); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Approval_info, Strings.Approval, Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => w.WaterMeterData.ApprovalInfo)); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Certificate, "Certificate", Quantity.String, ItemCategory.MeterData, (w, t, u, f, p) => w.WaterMeterData.Certificate)); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Pulses_per_liter, Strings.PulsesLiter, Quantity.PulsePerLtr, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? w.WaterMeterData.PulsesPerLtr.ToString() + AllItems.Add(new WMeterRsltItemSpec(ItemID.Pulses_per_liter, Strings.PulsesLiter, Quantity.PulsePerLtr, ItemCategory.MeterData, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? w.WaterMeterData.PulsesPerLtr.ToString() : w.WaterMeterData.PulsesPerLtr.ToString(p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Text1, "Text1", Quantity.String, (w, t, u, f, p) => w.WaterMeterData.Text1)); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Text2, "Text2", Quantity.String, (w, t, u, f, p) => w.WaterMeterData.Text2)); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Text3, "Text3", Quantity.String, (w, t, u, f, p) => w.WaterMeterData.Text3)); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Text4, "Text4", Quantity.String, (w, t, u, f, p) => w.WaterMeterData.Text4)); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Text5, "Text5", Quantity.String, (w, t, u, f, p) => w.WaterMeterData.Text5)); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Text1, "Text1", Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.WaterMeterData.Text1)); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Text2, "Text2", Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.WaterMeterData.Text2)); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Text3, "Text3", Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.WaterMeterData.Text3)); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Text4, "Text4", Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.WaterMeterData.Text4)); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Text5, "Text5", Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.WaterMeterData.Text5)); /// Water meters results - AllItems.Add(new WMeterRsltItemSpec(ItemID.Serial_Nr, Strings.sn, Quantity.String, (w, t, u, f, p) => w.SerialNr)); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Purchase_order, Strings.PO, Quantity.String, (w, t, u, f, p) => w.PurchaseOrder)); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Year_of_production, Strings.Year, Quantity.Number, (w, t, u, f, p) => w.YearOfProduction.ToString())); - AllItems.Add(new WMeterRsltItemSpec(ItemID.WM_Position, Strings.Pos, Quantity.Number, (w, t, u, f, p) => w.WMPosition.ToString())); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Serial_Nr, Strings.sn, Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => w.SerialNr)); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Purchase_order, Strings.PO, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.PurchaseOrder)); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Year_of_production, Strings.Year, Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => w.YearOfProduction.ToString())); + AllItems.Add(new WMeterRsltItemSpec(ItemID.WM_Position, Strings.Pos, Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => w.WMPosition.ToString())); /// Water meters results (single) - AllItems.Add(new WMeterRsltItemSpec(ItemID.End_state, Strings.End_state, Quantity.String, (w, t, u, f, p) => w.EndState)); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Pulses, Strings.Pulses + "()", Quantity.Number, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : w.GetMeterTestRslt(t).PulsesMeter.ToString())); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Pulses__liter, Strings.PulsesLiter + "()", Quantity.PulsePerLtr, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : (string.IsNullOrEmpty(p) ? w.GetMeterTestRslt(t).PulsesPerLiter.ToString() + AllItems.Add(new WMeterRsltItemSpec(ItemID.End_state, Strings.End_state, Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => w.EndState)); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Pulses, Strings.Pulses + "()", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : w.GetMeterTestRslt(t).PulsesMeter.ToString())); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Pulses__liter, Strings.PulsesLiter + "()", Quantity.PulsePerLtr, ItemCategory.Other, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : (string.IsNullOrEmpty(p) ? w.GetMeterTestRslt(t).PulsesPerLiter.ToString() : w.GetMeterTestRslt(t).PulsesPerLiter.ToString(p)))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_pulses, Strings.RefPulses + "()", Quantity.Number, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : w.GetMeterTestRslt(t).PulsesMaster.ToString())); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_pulses, Strings.RefPulses + "()", Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : w.GetMeterTestRslt(t).PulsesMaster.ToString())); /// Water meters results (combined) //AllItems.Add(new ItemSpec("Q rise", "Q rise [m3/h]", null, (x, y, z) => (z.QRise() == 0) ? "-" : Utils.DoubleToStr(z.QRise(), 4))); @@ -213,43 +231,43 @@ namespace Results //AllItems.Add(new ItemSpec("End state small WM", "End state", null, (x, y, z) => y.EndState())); /// Batch info - AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_bench_ID, Strings.Bench, Quantity.String, (w, t, u, f, p) => w.Batch.TestBenchId.ToString())); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Program_version, Strings.Ver, Quantity.String, (w, t, u, f, p) => w.Batch.ProgramVersion)); - AllItems.Add(new WMeterRsltItemSpec(ItemID.User_name, Strings.User, Quantity.String, (w, t, u, f, p) => w.Batch.UserName)); - AllItems.Add(new WMeterRsltItemSpec(ItemID.User_nr, Strings.User_nr, Quantity.Number, (w, t, u, f, p) => w.Batch.UserNumber.ToString())); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Watermeters, Strings.WMs, Quantity.String, (w, t, u, f, p) => w.Batch.WatermetersStr)); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Protocol_title, Strings.Protocol, Quantity.String, (w, t, u, f, p) => w.Batch.ProtocolTitle)); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Batch_start_time, Strings.Start, Quantity.DateTime, (w, t, u, f, p) => string.IsNullOrEmpty(f) ? w.Batch.StartTime.ToString() : string.Format(f, w.Batch.StartTime))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Batch_end_time, Strings.End, Quantity.DateTime, (w, t, u, f, p) => string.IsNullOrEmpty(f) ? w.Batch.EndTime.ToString() : string.Format(f, w.Batch.EndTime))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Lite_per_pulse_Read, "1 / PlsPerLtr_Read", Quantity.PulsePerLtr, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? ((w.WaterMeterData.PulsesPerLtr != 0) ? 1 / w.WaterMeterData.PulsesPerLtr : 0).ToString() + AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_bench_ID, Strings.Bench, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.Batch.TestBenchId.ToString())); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Program_version, Strings.Ver, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.Batch.ProgramVersion)); + AllItems.Add(new WMeterRsltItemSpec(ItemID.User_name, Strings.User, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.Batch.UserName)); + AllItems.Add(new WMeterRsltItemSpec(ItemID.User_nr, Strings.User_nr, Quantity.Number, ItemCategory.Other, (w, t, u, f, p) => w.Batch.UserNumber.ToString())); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Watermeters, Strings.WMs, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.Batch.WatermetersStr)); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Protocol_title, Strings.Protocol, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.Batch.ProtocolTitle)); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Batch_start_time, Strings.Start, Quantity.DateTime, ItemCategory.Other, (w, t, u, f, p) => string.IsNullOrEmpty(f) ? w.Batch.StartTime.ToString() : string.Format(f, w.Batch.StartTime))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Batch_end_time, Strings.End, Quantity.DateTime, ItemCategory.Other, (w, t, u, f, p) => string.IsNullOrEmpty(f) ? w.Batch.EndTime.ToString() : string.Format(f, w.Batch.EndTime))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Lite_per_pulse_Read, "1 / PlsPerLtr_Read", Quantity.PulsePerLtr, ItemCategory.Other, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? ((w.WaterMeterData.PulsesPerLtr != 0) ? 1 / w.WaterMeterData.PulsesPerLtr : 0).ToString() : ((w.WaterMeterData.PulsesPerLtr != 0) ? 1 / w.WaterMeterData.PulsesPerLtr : 0).ToString(p))); /// Extra water meter data - AllItems.Add(new WMeterRsltItemSpec(ItemID.Result_code, Strings.Result_code, Quantity.Number, (w, t, u, f, p) => string.IsNullOrEmpty(f) ? w.ResultCode.ToString() : string.Format(f, w.ResultCode))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Remark, Strings.Remark, Quantity.String, (w, t, u, f, p) => w.Batch.Remark)); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Meter_type, Strings.Meter_type, Quantity.String, (w, t, u, f, p) => w.WaterMeterData.Compound ? Strings.Compound : (w.WaterMeterData.HeatMeter ? Strings.Heat_meter : Strings.Single))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Result_code, Strings.Result_code, Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => string.IsNullOrEmpty(f) ? w.ResultCode.ToString() : string.Format(f, w.ResultCode))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Remark, Strings.Remark, Quantity.String, ItemCategory.TestResult, (w, t, u, f, p) => w.Batch.Remark)); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Meter_type, Strings.Meter_type, Quantity.String, ItemCategory.Other, (w, t, u, f, p) => w.WaterMeterData.Compound ? Strings.Compound : (w.WaterMeterData.HeatMeter ? Strings.Heat_meter : Strings.Single))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume_main, Strings.Volume_main + "()", Quantity.Volume, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeMeter).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume_aux, Strings.Volume_aux + "()", Quantity.Volume, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeMeter).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume, Strings.Start_volume + "()", Quantity.Volume, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeStart).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume_main, Strings.Start_volume_main + "()", Quantity.Volume, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeStart).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume_aux, Strings.Start_volume_aux + "()", Quantity.Volume, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeStart).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume, Strings.End_volume + "()", Quantity.Volume, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeEnd).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume_main, Strings.End_volume_main + "()", Quantity.Volume, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeEnd).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume_aux, Strings.End_volume_aux + "()", Quantity.Volume, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeEnd).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume_main, Strings.Volume_main + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeMeter).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume_aux, Strings.Volume_aux + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeMeter).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume, Strings.Start_volume + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeStart).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume_main, Strings.Start_volume_main + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeStart).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume_aux, Strings.Start_volume_aux + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeStart).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume, Strings.End_volume + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeEnd).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume_main, Strings.End_volume_main + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeEnd).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume_aux, Strings.End_volume_aux + "()", Quantity.Volume, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeEnd).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); #if HEAT_METERS - AllItems.Add(new WMeterRsltItemSpec(ItemID.Energy, Strings.Energy + "()", Quantity.Energy, (w, t, u, f, p) => (w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy).VolumeMeter).ToString(string.IsNullOrEmpty(p) ? "F1" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_energy, Strings.Energy_ref + "()", Quantity.Energy, (w, t, u, f, p) => (w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy).VolumeRef).ToString(string.IsNullOrEmpty(p) ? "F1" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.TempHiMean, "T hi me", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).Custom1).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.TempHiStart, "T hi st", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).Custom2).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.TempHiEnd, "T hi en", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).Custom3).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.TempHiAve, "T hi av", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, (w.GetTestRslt(t).Custom2 + w.GetTestRslt(t).Custom3) / 2).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.TempLoMean, "T lo me", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).Custom6).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.TempLoStart, "T lo st", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).Custom7).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.TempLoEnd, "T lo en", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).Custom8).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.TempLoAve, "T lo av", Quantity.Temperature, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, (w.GetTestRslt(t).Custom7 + w.GetTestRslt(t).Custom8) / 2).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Energy, Strings.Energy + "()", Quantity.Energy, ItemCategory.Other, (w, t, u, f, p) => (w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy).VolumeMeter).ToString(string.IsNullOrEmpty(p) ? "F1" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_energy, Strings.Energy_ref + "()", Quantity.Energy, ItemCategory.Other, (w, t, u, f, p) => (w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t, Config.Entities.CompoundMeterId.HeatMeterEnergy).VolumeRef).ToString(string.IsNullOrEmpty(p) ? "F1" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.TempHiMean, "T hi me", Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).Custom1).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.TempHiStart, "T hi st", Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).Custom2).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.TempHiEnd, "T hi en", Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).Custom3).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.TempHiAve, "T hi av", Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, (w.GetTestRslt(t).Custom2 + w.GetTestRslt(t).Custom3) / 2).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.TempLoMean, "T lo me", Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).Custom6).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.TempLoStart, "T lo st", Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).Custom7).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.TempLoEnd, "T lo en", Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).Custom8).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.TempLoAve, "T lo av", Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, (w.GetTestRslt(t).Custom7 + w.GetTestRslt(t).Custom8) / 2).ToString(string.IsNullOrEmpty(p) ? "F3" : p))); #endif - } + } /// /// Converts a list of 'Output item specifications' to a string array diff --git a/ResultsBrowser/Properties/AssemblyInfo.cs b/ResultsBrowser/Properties/AssemblyInfo.cs index 676d5089f..fbadfc87b 100644 --- a/ResultsBrowser/Properties/AssemblyInfo.cs +++ b/ResultsBrowser/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.12.463.0")] -[assembly: AssemblyFileVersion("2.12.463.0")] +[assembly: AssemblyVersion("2.12.475.0")] +[assembly: AssemblyFileVersion("2.12.475.0")] diff --git a/TestBenchFramework/Resources/Strings.cs.resx b/TestBenchFramework/Resources/Strings.cs.resx index f542ff598..d2723eda7 100644 --- a/TestBenchFramework/Resources/Strings.cs.resx +++ b/TestBenchFramework/Resources/Strings.cs.resx @@ -448,7 +448,7 @@ Průtok [m3 / h] - Flow Výběr + Výběr průtoku Průtokoměr @@ -933,9 +933,6 @@ Zastavení průtoku před zkouškou s pevným startem - - String1 - Potlačit WM vibrace diff --git a/Users/Properties/AssemblyInfo.cs b/Users/Properties/AssemblyInfo.cs index 4e51be251..5df9862c8 100644 --- a/Users/Properties/AssemblyInfo.cs +++ b/Users/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.12.424.0")] -[assembly: AssemblyFileVersion("2.12.424.0")] +[assembly: AssemblyVersion("2.12.475.0")] +[assembly: AssemblyFileVersion("2.12.475.0")]