Compare commits
42
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
87eb37132f | ||
|
|
28a62da0ea | ||
|
|
03f7e990b3 | ||
|
|
78c53f8924 | ||
|
|
f93147133b | ||
|
|
0ebebffffc | ||
|
|
96bb0a8a9c | ||
|
|
30d525e0b1 | ||
|
|
0186ac443f | ||
|
|
bfa506911c | ||
|
|
a2432927ee | ||
|
|
126a0e2663 | ||
|
|
f3f6ad4291 | ||
|
|
ffc70efaf4 | ||
|
|
951a62ad06 | ||
|
|
d8d8f24843 | ||
|
|
c75e88c871 | ||
|
|
47af8c11d3 | ||
|
|
6c85732748 | ||
|
|
8cd3b6a7b0 | ||
|
|
d1ef582349 | ||
|
|
6d47789708 | ||
|
|
66a31fc1e9 | ||
|
|
d84c3ca4d8 | ||
|
|
98c8b0e7a8 | ||
|
|
68c4bf5956 | ||
|
|
b131ba01a8 | ||
|
|
f5642a2676 | ||
|
|
1585066b57 | ||
|
|
1ee5724082 | ||
|
|
511d86a186 | ||
|
|
d91ca4b56b | ||
|
|
e14dc37060 | ||
|
|
1e058726d4 | ||
|
|
26982a5729 | ||
|
|
494c6edf76 | ||
|
|
61bfa51fa7 | ||
|
|
81fe244c23 | ||
|
|
98f74fa971 | ||
|
|
bb260426c9 | ||
|
|
02b31634f8 | ||
|
|
35c449bd0c |
+5
-11
@@ -18,7 +18,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;IPERLST</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
@@ -28,7 +28,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;IPERLST</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
@@ -39,6 +39,9 @@
|
||||
<Reference Include="Iesi.Collections">
|
||||
<HintPath>..\packages\Iesi.Collections.3.2.0.4000\lib\Net35\Iesi.Collections.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net">
|
||||
<HintPath>..\packages\log4net.2.0.2\lib\net40-full\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MySql.Data, Version=6.6.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MySql.Data.6.6.5\lib\net20\MySql.Data.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -63,12 +66,6 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="Data.cs" />
|
||||
<Compile Include="DatabaseSettings.cs" />
|
||||
<Compile Include="DatabaseSettingsDlg.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="DatabaseSettingsDlg.designer.cs">
|
||||
<DependentUpon>DatabaseSettingsDlg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DBSettings.cs" />
|
||||
<Compile Include="Entities\BenchPath.cs" />
|
||||
<Compile Include="Entities\Component.cs" />
|
||||
@@ -121,9 +118,6 @@
|
||||
<Compile Include="ResultItemSpec.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="DatabaseSettingsDlg.resx">
|
||||
<DependentUpon>DatabaseSettingsDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\Strings.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
|
||||
@@ -10,14 +10,14 @@ namespace Config
|
||||
/// </summary>
|
||||
public class DBSettings : ICloneable
|
||||
{
|
||||
public DBType DbType;
|
||||
public Entities.DBType DbType;
|
||||
public string ConnectionString;
|
||||
|
||||
public DBSettings()
|
||||
{
|
||||
}
|
||||
|
||||
public DBSettings(DBType dbType, string connectionString)
|
||||
public DBSettings(Entities.DBType dbType, string connectionString)
|
||||
{
|
||||
this.DbType = dbType;
|
||||
this.ConnectionString = connectionString;
|
||||
|
||||
@@ -15,22 +15,16 @@ namespace Config
|
||||
// Public fields
|
||||
public string BenchName;
|
||||
public bool IsRealBench;
|
||||
public DBSettings UsersDBSettings;
|
||||
public DBSettings BenchDBSettings;
|
||||
public DBSettings ProceduresDBSettings;
|
||||
public DBSettings WMTypesDBSettings;
|
||||
public DBSettings WaterMetersDBSettings;
|
||||
public DBSettings ProceduresDBSettings; /// Config database settings
|
||||
public DBSettings WaterMetersDBSettings; /// Results database settings
|
||||
|
||||
// Constructor
|
||||
public DatabaseSettings()
|
||||
{
|
||||
BenchName = String.Empty; /// Empty string to avoid null
|
||||
IsRealBench = false;
|
||||
UsersDBSettings = new DBSettings(DBType.MySql, "SERVER=localhost; DATABASE=tbf_users; UID=root; PASSWORD=;");
|
||||
BenchDBSettings = new DBSettings(DBType.MySql, "SERVER=localhost; DATABASE=tbf_bench; UID=root; PASSWORD=;");
|
||||
ProceduresDBSettings = new DBSettings(DBType.MySql, "SERVER=localhost; DATABASE=tbf_procedures; UID=root; PASSWORD=;");
|
||||
WMTypesDBSettings = new DBSettings(DBType.MySql, "SERVER=localhost; DATABASE=tbf_wmtypes; UID=root; PASSWORD=;");
|
||||
WaterMetersDBSettings = new DBSettings(DBType.MySql, "SERVER=localhost; DATABASE=tbf_watermeters; UID=root; PASSWORD=;");
|
||||
ProceduresDBSettings = new DBSettings(Entities.DBType.MySql, "SERVER=localhost; DATABASE=tbf_procedures; UID=root; PASSWORD=;");
|
||||
WaterMetersDBSettings = new DBSettings(Entities.DBType.MySql, "SERVER=localhost; DATABASE=tbf_watermeters; UID=root; PASSWORD=;");
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
@@ -39,13 +33,15 @@ namespace Config
|
||||
|
||||
result.BenchName = BenchName;
|
||||
result.IsRealBench = IsRealBench;
|
||||
result.UsersDBSettings = (DBSettings)UsersDBSettings.Clone();
|
||||
result.BenchDBSettings = (DBSettings)BenchDBSettings.Clone();
|
||||
result.ProceduresDBSettings = (DBSettings)ProceduresDBSettings.Clone();
|
||||
result.WMTypesDBSettings = (DBSettings)WMTypesDBSettings.Clone();
|
||||
result.WaterMetersDBSettings = (DBSettings)WaterMetersDBSettings.Clone();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0} conn.str.={1}", BenchName, ProceduresDBSettings.ConnectionString);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Generated
-352
@@ -1,352 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
namespace Config
|
||||
{
|
||||
partial class DatabaseSettingsDlg
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DatabaseSettingsDlg));
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.benchNameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.usersConnectionStringTextBox = new System.Windows.Forms.TextBox();
|
||||
this.connectionStringLabel = new System.Windows.Forms.Label();
|
||||
this.benchConnectionStringTextBox = new System.Windows.Forms.TextBox();
|
||||
this.proceduresConnectionStringTextBox = new System.Windows.Forms.TextBox();
|
||||
this.wmTypesConnectionStringTextBox = new System.Windows.Forms.TextBox();
|
||||
this.watermetersConnectionStringTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.testConnUsersBtn = new System.Windows.Forms.Button();
|
||||
this.createUsersDbBtn = new System.Windows.Forms.Button();
|
||||
this.realBenchCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.dbTypeLabel = new System.Windows.Forms.Label();
|
||||
this.usersDbTypeComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.benchDbTypeComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.proceduresDbTypeComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.wmTypesDbTypeComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.watermetersDbTypeComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.testConnBenchBtn = new System.Windows.Forms.Button();
|
||||
this.testConnProceduresBtn = new System.Windows.Forms.Button();
|
||||
this.testConnWMTypesBtn = new System.Windows.Forms.Button();
|
||||
this.testConnWaterMetersBtn = new System.Windows.Forms.Button();
|
||||
this.createBenchDbBtn = new System.Windows.Forms.Button();
|
||||
this.createProceduresDbBtn = new System.Windows.Forms.Button();
|
||||
this.createWMTypesDbBtn = new System.Windows.Forms.Button();
|
||||
this.createWaterMetersDbBtn = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
resources.ApplyResources(this.okButton, "okButton");
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.cancelButton, "cancelButton");
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
resources.ApplyResources(this.label1, "label1");
|
||||
this.label1.Name = "label1";
|
||||
//
|
||||
// benchNameTextBox
|
||||
//
|
||||
resources.ApplyResources(this.benchNameTextBox, "benchNameTextBox");
|
||||
this.benchNameTextBox.Name = "benchNameTextBox";
|
||||
//
|
||||
// usersConnectionStringTextBox
|
||||
//
|
||||
resources.ApplyResources(this.usersConnectionStringTextBox, "usersConnectionStringTextBox");
|
||||
this.usersConnectionStringTextBox.Name = "usersConnectionStringTextBox";
|
||||
//
|
||||
// connectionStringLabel
|
||||
//
|
||||
resources.ApplyResources(this.connectionStringLabel, "connectionStringLabel");
|
||||
this.connectionStringLabel.Name = "connectionStringLabel";
|
||||
//
|
||||
// benchConnectionStringTextBox
|
||||
//
|
||||
resources.ApplyResources(this.benchConnectionStringTextBox, "benchConnectionStringTextBox");
|
||||
this.benchConnectionStringTextBox.Name = "benchConnectionStringTextBox";
|
||||
//
|
||||
// proceduresConnectionStringTextBox
|
||||
//
|
||||
resources.ApplyResources(this.proceduresConnectionStringTextBox, "proceduresConnectionStringTextBox");
|
||||
this.proceduresConnectionStringTextBox.Name = "proceduresConnectionStringTextBox";
|
||||
//
|
||||
// wmTypesConnectionStringTextBox
|
||||
//
|
||||
resources.ApplyResources(this.wmTypesConnectionStringTextBox, "wmTypesConnectionStringTextBox");
|
||||
this.wmTypesConnectionStringTextBox.Name = "wmTypesConnectionStringTextBox";
|
||||
//
|
||||
// watermetersConnectionStringTextBox
|
||||
//
|
||||
resources.ApplyResources(this.watermetersConnectionStringTextBox, "watermetersConnectionStringTextBox");
|
||||
this.watermetersConnectionStringTextBox.Name = "watermetersConnectionStringTextBox";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
resources.ApplyResources(this.label2, "label2");
|
||||
this.label2.Name = "label2";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
resources.ApplyResources(this.label3, "label3");
|
||||
this.label3.Name = "label3";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
resources.ApplyResources(this.label4, "label4");
|
||||
this.label4.Name = "label4";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
resources.ApplyResources(this.label5, "label5");
|
||||
this.label5.Name = "label5";
|
||||
//
|
||||
// label6
|
||||
//
|
||||
resources.ApplyResources(this.label6, "label6");
|
||||
this.label6.Name = "label6";
|
||||
//
|
||||
// testConnUsersBtn
|
||||
//
|
||||
this.testConnUsersBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.testConnUsersBtn, "testConnUsersBtn");
|
||||
this.testConnUsersBtn.Name = "testConnUsersBtn";
|
||||
this.testConnUsersBtn.UseVisualStyleBackColor = true;
|
||||
this.testConnUsersBtn.Click += new System.EventHandler(this.testConnUsersBtn_Click);
|
||||
//
|
||||
// createUsersDbBtn
|
||||
//
|
||||
this.createUsersDbBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.createUsersDbBtn, "createUsersDbBtn");
|
||||
this.createUsersDbBtn.Name = "createUsersDbBtn";
|
||||
this.createUsersDbBtn.UseVisualStyleBackColor = true;
|
||||
this.createUsersDbBtn.Click += new System.EventHandler(this.createDatabasesButton_Click);
|
||||
//
|
||||
// realBenchCheckBox
|
||||
//
|
||||
resources.ApplyResources(this.realBenchCheckBox, "realBenchCheckBox");
|
||||
this.realBenchCheckBox.Name = "realBenchCheckBox";
|
||||
this.realBenchCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// dbTypeLabel
|
||||
//
|
||||
resources.ApplyResources(this.dbTypeLabel, "dbTypeLabel");
|
||||
this.dbTypeLabel.Name = "dbTypeLabel";
|
||||
//
|
||||
// usersDbTypeComboBox
|
||||
//
|
||||
this.usersDbTypeComboBox.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.usersDbTypeComboBox, "usersDbTypeComboBox");
|
||||
this.usersDbTypeComboBox.Name = "usersDbTypeComboBox";
|
||||
//
|
||||
// benchDbTypeComboBox
|
||||
//
|
||||
this.benchDbTypeComboBox.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.benchDbTypeComboBox, "benchDbTypeComboBox");
|
||||
this.benchDbTypeComboBox.Name = "benchDbTypeComboBox";
|
||||
//
|
||||
// proceduresDbTypeComboBox
|
||||
//
|
||||
this.proceduresDbTypeComboBox.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.proceduresDbTypeComboBox, "proceduresDbTypeComboBox");
|
||||
this.proceduresDbTypeComboBox.Name = "proceduresDbTypeComboBox";
|
||||
//
|
||||
// wmTypesDbTypeComboBox
|
||||
//
|
||||
this.wmTypesDbTypeComboBox.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.wmTypesDbTypeComboBox, "wmTypesDbTypeComboBox");
|
||||
this.wmTypesDbTypeComboBox.Name = "wmTypesDbTypeComboBox";
|
||||
//
|
||||
// watermetersDbTypeComboBox
|
||||
//
|
||||
this.watermetersDbTypeComboBox.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.watermetersDbTypeComboBox, "watermetersDbTypeComboBox");
|
||||
this.watermetersDbTypeComboBox.Name = "watermetersDbTypeComboBox";
|
||||
//
|
||||
// testConnBenchBtn
|
||||
//
|
||||
this.testConnBenchBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.testConnBenchBtn, "testConnBenchBtn");
|
||||
this.testConnBenchBtn.Name = "testConnBenchBtn";
|
||||
this.testConnBenchBtn.UseVisualStyleBackColor = true;
|
||||
this.testConnBenchBtn.Click += new System.EventHandler(this.testConnBenchBtn_Click);
|
||||
//
|
||||
// testConnProceduresBtn
|
||||
//
|
||||
this.testConnProceduresBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.testConnProceduresBtn, "testConnProceduresBtn");
|
||||
this.testConnProceduresBtn.Name = "testConnProceduresBtn";
|
||||
this.testConnProceduresBtn.UseVisualStyleBackColor = true;
|
||||
this.testConnProceduresBtn.Click += new System.EventHandler(this.testConnProceduresBtn_Click);
|
||||
//
|
||||
// testConnWMTypesBtn
|
||||
//
|
||||
this.testConnWMTypesBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.testConnWMTypesBtn, "testConnWMTypesBtn");
|
||||
this.testConnWMTypesBtn.Name = "testConnWMTypesBtn";
|
||||
this.testConnWMTypesBtn.UseVisualStyleBackColor = true;
|
||||
this.testConnWMTypesBtn.Click += new System.EventHandler(this.testConnWMTypesBtn_Click);
|
||||
//
|
||||
// testConnWaterMetersBtn
|
||||
//
|
||||
this.testConnWaterMetersBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.testConnWaterMetersBtn, "testConnWaterMetersBtn");
|
||||
this.testConnWaterMetersBtn.Name = "testConnWaterMetersBtn";
|
||||
this.testConnWaterMetersBtn.UseVisualStyleBackColor = true;
|
||||
this.testConnWaterMetersBtn.Click += new System.EventHandler(this.testConnWaterMetersBtn_Click);
|
||||
//
|
||||
// createBenchDbBtn
|
||||
//
|
||||
this.createBenchDbBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.createBenchDbBtn, "createBenchDbBtn");
|
||||
this.createBenchDbBtn.Name = "createBenchDbBtn";
|
||||
this.createBenchDbBtn.UseVisualStyleBackColor = true;
|
||||
this.createBenchDbBtn.Click += new System.EventHandler(this.createbenchDbBtn_Click);
|
||||
//
|
||||
// createProceduresDbBtn
|
||||
//
|
||||
this.createProceduresDbBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.createProceduresDbBtn, "createProceduresDbBtn");
|
||||
this.createProceduresDbBtn.Name = "createProceduresDbBtn";
|
||||
this.createProceduresDbBtn.UseVisualStyleBackColor = true;
|
||||
this.createProceduresDbBtn.Click += new System.EventHandler(this.createProecduresDbBtn_Click);
|
||||
//
|
||||
// createWMTypesDbBtn
|
||||
//
|
||||
this.createWMTypesDbBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.createWMTypesDbBtn, "createWMTypesDbBtn");
|
||||
this.createWMTypesDbBtn.Name = "createWMTypesDbBtn";
|
||||
this.createWMTypesDbBtn.UseVisualStyleBackColor = true;
|
||||
this.createWMTypesDbBtn.Click += new System.EventHandler(this.createWMTypesDbBtn_Click);
|
||||
//
|
||||
// createWaterMetersDbBtn
|
||||
//
|
||||
this.createWaterMetersDbBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.createWaterMetersDbBtn, "createWaterMetersDbBtn");
|
||||
this.createWaterMetersDbBtn.Name = "createWaterMetersDbBtn";
|
||||
this.createWaterMetersDbBtn.UseVisualStyleBackColor = true;
|
||||
this.createWaterMetersDbBtn.Click += new System.EventHandler(this.createWaterMetersDbBtn_Click);
|
||||
//
|
||||
// DatabaseSettingsDlg
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.createWaterMetersDbBtn);
|
||||
this.Controls.Add(this.createWMTypesDbBtn);
|
||||
this.Controls.Add(this.createProceduresDbBtn);
|
||||
this.Controls.Add(this.createBenchDbBtn);
|
||||
this.Controls.Add(this.testConnWaterMetersBtn);
|
||||
this.Controls.Add(this.testConnWMTypesBtn);
|
||||
this.Controls.Add(this.testConnProceduresBtn);
|
||||
this.Controls.Add(this.testConnBenchBtn);
|
||||
this.Controls.Add(this.watermetersDbTypeComboBox);
|
||||
this.Controls.Add(this.wmTypesDbTypeComboBox);
|
||||
this.Controls.Add(this.proceduresDbTypeComboBox);
|
||||
this.Controls.Add(this.benchDbTypeComboBox);
|
||||
this.Controls.Add(this.usersDbTypeComboBox);
|
||||
this.Controls.Add(this.dbTypeLabel);
|
||||
this.Controls.Add(this.realBenchCheckBox);
|
||||
this.Controls.Add(this.createUsersDbBtn);
|
||||
this.Controls.Add(this.testConnUsersBtn);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.watermetersConnectionStringTextBox);
|
||||
this.Controls.Add(this.wmTypesConnectionStringTextBox);
|
||||
this.Controls.Add(this.proceduresConnectionStringTextBox);
|
||||
this.Controls.Add(this.benchConnectionStringTextBox);
|
||||
this.Controls.Add(this.connectionStringLabel);
|
||||
this.Controls.Add(this.usersConnectionStringTextBox);
|
||||
this.Controls.Add(this.benchNameTextBox);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "DatabaseSettingsDlg";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.Load += new System.EventHandler(this.BenchSettingsDlg_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox benchNameTextBox;
|
||||
private System.Windows.Forms.TextBox usersConnectionStringTextBox;
|
||||
private System.Windows.Forms.Label connectionStringLabel;
|
||||
private System.Windows.Forms.TextBox benchConnectionStringTextBox;
|
||||
private System.Windows.Forms.TextBox proceduresConnectionStringTextBox;
|
||||
private System.Windows.Forms.TextBox wmTypesConnectionStringTextBox;
|
||||
private System.Windows.Forms.TextBox watermetersConnectionStringTextBox;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.Button testConnUsersBtn;
|
||||
private System.Windows.Forms.Button createUsersDbBtn;
|
||||
private System.Windows.Forms.CheckBox realBenchCheckBox;
|
||||
private System.Windows.Forms.Label dbTypeLabel;
|
||||
private System.Windows.Forms.ComboBox usersDbTypeComboBox;
|
||||
private System.Windows.Forms.ComboBox benchDbTypeComboBox;
|
||||
private System.Windows.Forms.ComboBox proceduresDbTypeComboBox;
|
||||
private System.Windows.Forms.ComboBox wmTypesDbTypeComboBox;
|
||||
private System.Windows.Forms.ComboBox watermetersDbTypeComboBox;
|
||||
private System.Windows.Forms.Button testConnBenchBtn;
|
||||
private System.Windows.Forms.Button testConnProceduresBtn;
|
||||
private System.Windows.Forms.Button testConnWMTypesBtn;
|
||||
private System.Windows.Forms.Button testConnWaterMetersBtn;
|
||||
private System.Windows.Forms.Button createBenchDbBtn;
|
||||
private System.Windows.Forms.Button createProceduresDbBtn;
|
||||
private System.Windows.Forms.Button createWMTypesDbBtn;
|
||||
private System.Windows.Forms.Button createWaterMetersDbBtn;
|
||||
}
|
||||
}
|
||||
@@ -1,260 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using Config.Resources;
|
||||
|
||||
namespace Config
|
||||
{
|
||||
/// <summary>
|
||||
/// Dialog to process test bench name and database settings (BenchSettings)
|
||||
/// </summary>
|
||||
public partial class DatabaseSettingsDlg : Form
|
||||
{
|
||||
// Reference to bench DB settins (not a local copy)
|
||||
DatabaseSettings bench;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="bench">Test bench database settings</param>
|
||||
public DatabaseSettingsDlg(DatabaseSettings bench)
|
||||
{
|
||||
this.bench = bench;
|
||||
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Test_Bench_Databases_Specification;
|
||||
label1.Text = Strings.Test_bench_name;
|
||||
realBenchCheckBox.Text = Strings.Test_bench_is_controlled_by_this_computer;
|
||||
dbTypeLabel.Text = Strings.Database_type;
|
||||
connectionStringLabel.Text = Strings.Connection_string;
|
||||
label2.Text = Strings.Users_and_groups;
|
||||
label3.Text = Strings.Bench_parameters;
|
||||
label4.Text = Strings.Procedures;
|
||||
label5.Text = Strings.Water_meter_types;
|
||||
label6.Text = Strings.Water_meter_data;
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
cancelButton.Text = Strings.CancelBtnText;
|
||||
|
||||
testConnBenchBtn.Text = Strings.Test_connection;
|
||||
testConnProceduresBtn.Text = Strings.Test_connection;
|
||||
testConnUsersBtn.Text = Strings.Test_connection;
|
||||
testConnWaterMetersBtn.Text = Strings.Test_connection;
|
||||
testConnWMTypesBtn.Text = Strings.Test_connection;
|
||||
|
||||
createBenchDbBtn.Text = Strings.Create_DB;
|
||||
createProceduresDbBtn.Text = Strings.Create_DB;
|
||||
createUsersDbBtn.Text = Strings.Create_DB;
|
||||
createWaterMetersDbBtn.Text = Strings.Create_DB;
|
||||
createWMTypesDbBtn.Text = Strings.Create_DB;
|
||||
}
|
||||
|
||||
private void BenchSettingsDlg_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
|
||||
benchNameTextBox.Text = bench.BenchName;
|
||||
realBenchCheckBox.Checked = bench.IsRealBench;
|
||||
|
||||
/// Initialize 'Database type' combo-boxes
|
||||
for (int i = 0; i < (int)DBType.DbTypesCount; i++)
|
||||
{
|
||||
DBType dbType = (DBType)i;
|
||||
usersDbTypeComboBox.Items.Add(dbType);
|
||||
benchDbTypeComboBox.Items.Add(dbType);
|
||||
proceduresDbTypeComboBox.Items.Add(dbType);
|
||||
wmTypesDbTypeComboBox.Items.Add(dbType);
|
||||
watermetersDbTypeComboBox.Items.Add(dbType);
|
||||
}
|
||||
usersDbTypeComboBox.SelectedIndex = (int)bench.UsersDBSettings.DbType;
|
||||
benchDbTypeComboBox.SelectedIndex = (int)bench.BenchDBSettings.DbType;
|
||||
proceduresDbTypeComboBox.SelectedIndex = (int)bench.ProceduresDBSettings.DbType;
|
||||
wmTypesDbTypeComboBox.SelectedIndex = (int)bench.WMTypesDBSettings.DbType;
|
||||
watermetersDbTypeComboBox.SelectedIndex = (int)bench.WaterMetersDBSettings.DbType;
|
||||
|
||||
/// Initialize connection strings
|
||||
usersConnectionStringTextBox.Text = bench.UsersDBSettings.ConnectionString;
|
||||
benchConnectionStringTextBox.Text = bench.BenchDBSettings.ConnectionString;
|
||||
proceduresConnectionStringTextBox.Text = bench.ProceduresDBSettings.ConnectionString;
|
||||
wmTypesConnectionStringTextBox.Text = bench.WMTypesDBSettings.ConnectionString;
|
||||
watermetersConnectionStringTextBox.Text = bench.WaterMetersDBSettings.ConnectionString;
|
||||
}
|
||||
|
||||
bool UpdateBenchFromUIControls()
|
||||
{
|
||||
/// TODO: The following code doesnot work as expected - error message shown!
|
||||
//for (int i = 0; i < Program.LocalSettings.BenchesCount; i++)
|
||||
//{
|
||||
// if (bench != Program.LocalSettings.TestBenches[i] &&
|
||||
// benchNameTextBox.Text == Program.LocalSettings.TestBenches[i].BenchName)
|
||||
// {
|
||||
// MessageBox.Show(Strings.Bench_name_conflict_Use_another_name_pls, Strings.Error, MessageBoxButtons.OK);
|
||||
// return false;
|
||||
// }
|
||||
//}
|
||||
|
||||
bench.BenchName = benchNameTextBox.Text;
|
||||
bench.IsRealBench = realBenchCheckBox.Checked;
|
||||
|
||||
bench.UsersDBSettings.ConnectionString = usersConnectionStringTextBox.Text;
|
||||
bench.BenchDBSettings.ConnectionString = benchConnectionStringTextBox.Text;
|
||||
bench.ProceduresDBSettings.ConnectionString = proceduresConnectionStringTextBox.Text;
|
||||
bench.WMTypesDBSettings.ConnectionString = wmTypesConnectionStringTextBox.Text;
|
||||
bench.WaterMetersDBSettings.ConnectionString = watermetersConnectionStringTextBox.Text;
|
||||
|
||||
bench.UsersDBSettings.DbType = (DBType)usersDbTypeComboBox.SelectedIndex;
|
||||
bench.BenchDBSettings.DbType = (DBType)benchDbTypeComboBox.SelectedIndex;
|
||||
bench.ProceduresDBSettings.DbType = (DBType)proceduresDbTypeComboBox.SelectedIndex;
|
||||
bench.WMTypesDBSettings.DbType = (DBType)wmTypesDbTypeComboBox.SelectedIndex;
|
||||
bench.WaterMetersDBSettings.DbType = (DBType)watermetersDbTypeComboBox.SelectedIndex;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update bench DB setting, return 'OK'
|
||||
/// </summary>
|
||||
/// <param name="sender">Not used</param>
|
||||
/// <param name="e">Not used</param>
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (UpdateBenchFromUIControls())
|
||||
{
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
|
||||
DialogResult = DialogResult.None;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Throw away changes, return 'Cancel'
|
||||
/// </summary>
|
||||
/// <param name="sender">Not used</param>
|
||||
/// <param name="e">Not used</param>
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void createDatabasesButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!UpdateBenchFromUIControls()) return;
|
||||
|
||||
if (DialogResult.OK == MessageBox.Show(Strings.DB_will_be_overwritten + Environment.NewLine +
|
||||
Strings.Do_you_want_to_proceed, Strings.Warning,
|
||||
MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation))
|
||||
try
|
||||
{
|
||||
Cursor.Current = Cursors.WaitCursor;
|
||||
FluentCommon.CreateEmptyUsersDB(bench.UsersDBSettings);
|
||||
MessageBox.Show(Strings.DB_was_successfully_created, Strings.Notification);
|
||||
Cursor.Current = Cursors.Default;
|
||||
DialogResult = DialogResult.None;
|
||||
}
|
||||
catch (NHibernate.HibernateException exception)
|
||||
{
|
||||
Cursor.Current = Cursors.Default;
|
||||
MessageBox.Show(Strings.Error_while_creating_DB_Reason + exception.Message, Strings.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void createbenchDbBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!UpdateBenchFromUIControls()) return;
|
||||
|
||||
if (DialogResult.OK == MessageBox.Show(Strings.DB_will_be_overwritten + Environment.NewLine +
|
||||
Strings.Do_you_want_to_proceed, Strings.Warning,
|
||||
MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation))
|
||||
try
|
||||
{
|
||||
Cursor.Current = Cursors.WaitCursor;
|
||||
FluentCommon.CreateEmptyBenchDB(bench.BenchDBSettings);
|
||||
MessageBox.Show(Strings.DB_was_successfully_created, Strings.Notification);
|
||||
Cursor.Current = Cursors.Default;
|
||||
DialogResult = DialogResult.None;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Cursor.Current = Cursors.Default;
|
||||
MessageBox.Show(Strings.Error_while_creating_DB_Reason + exception.Message, Strings.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void createProecduresDbBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!UpdateBenchFromUIControls()) return;
|
||||
|
||||
if (DialogResult.OK == MessageBox.Show(Strings.DB_will_be_overwritten + Environment.NewLine +
|
||||
Strings.Do_you_want_to_proceed, Strings.Warning,
|
||||
MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation))
|
||||
try
|
||||
{
|
||||
Cursor.Current = Cursors.WaitCursor;
|
||||
FluentCommon.CreateEmptyProceduresDB(bench.ProceduresDBSettings);
|
||||
MessageBox.Show(Strings.DB_was_successfully_created, Strings.Notification);
|
||||
Cursor.Current = Cursors.Default;
|
||||
DialogResult = DialogResult.None;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Cursor.Current = Cursors.Default;
|
||||
MessageBox.Show(Strings.Error_while_creating_DB_Reason + exception.Message, Strings.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void createWMTypesDbBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void createWaterMetersDbBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!UpdateBenchFromUIControls()) return;
|
||||
|
||||
if (DialogResult.OK == MessageBox.Show(Strings.DB_will_be_overwritten + Environment.NewLine +
|
||||
Strings.Do_you_want_to_proceed, Strings.Warning,
|
||||
MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation))
|
||||
try
|
||||
{
|
||||
Cursor.Current = Cursors.WaitCursor;
|
||||
FluentCommon.CreateEmptyWaterMetersDB(bench.WaterMetersDBSettings);
|
||||
MessageBox.Show(Strings.DB_was_successfully_created, Strings.Notification);
|
||||
Cursor.Current = Cursors.Default;
|
||||
DialogResult = DialogResult.None;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Cursor.Current = Cursors.Default;
|
||||
MessageBox.Show(Strings.Error_while_creating_DB_Reason + exception.Message, Strings.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void testConnUsersBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
private void testConnBenchBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
private void testConnProceduresBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
private void testConnWMTypesBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
private void testConnWaterMetersBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,930 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="okButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>614, 15</value>
|
||||
</data>
|
||||
<data name="okButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>217, 28</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="okButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>14</value>
|
||||
</data>
|
||||
<data name="okButton.Text" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name=">>okButton.Name" xml:space="preserve">
|
||||
<value>okButton</value>
|
||||
</data>
|
||||
<data name=">>okButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>okButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>okButton.ZOrder" xml:space="preserve">
|
||||
<value>30</value>
|
||||
</data>
|
||||
<data name="cancelButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>614, 49</value>
|
||||
</data>
|
||||
<data name="cancelButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>217, 28</value>
|
||||
</data>
|
||||
<data name="cancelButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>13</value>
|
||||
</data>
|
||||
<data name="cancelButton.Text" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Name" xml:space="preserve">
|
||||
<value>cancelButton</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.ZOrder" xml:space="preserve">
|
||||
<value>31</value>
|
||||
</data>
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 18</value>
|
||||
</data>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>93, 13</value>
|
||||
</data>
|
||||
<data name="label1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>Test Bench Name</value>
|
||||
</data>
|
||||
<data name=">>label1.Name" xml:space="preserve">
|
||||
<value>label1</value>
|
||||
</data>
|
||||
<data name=">>label1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>29</value>
|
||||
</data>
|
||||
<data name="benchNameTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>116, 15</value>
|
||||
</data>
|
||||
<data name="benchNameTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>315, 20</value>
|
||||
</data>
|
||||
<data name="benchNameTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>16</value>
|
||||
</data>
|
||||
<data name=">>benchNameTextBox.Name" xml:space="preserve">
|
||||
<value>benchNameTextBox</value>
|
||||
</data>
|
||||
<data name=">>benchNameTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>benchNameTextBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>benchNameTextBox.ZOrder" xml:space="preserve">
|
||||
<value>28</value>
|
||||
</data>
|
||||
<data name="usersConnectionStringTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>202, 101</value>
|
||||
</data>
|
||||
<data name="usersConnectionStringTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>406, 20</value>
|
||||
</data>
|
||||
<data name="usersConnectionStringTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>17</value>
|
||||
</data>
|
||||
<data name=">>usersConnectionStringTextBox.Name" xml:space="preserve">
|
||||
<value>usersConnectionStringTextBox</value>
|
||||
</data>
|
||||
<data name=">>usersConnectionStringTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>usersConnectionStringTextBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>usersConnectionStringTextBox.ZOrder" xml:space="preserve">
|
||||
<value>27</value>
|
||||
</data>
|
||||
<data name="connectionStringLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="connectionStringLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>199, 82</value>
|
||||
</data>
|
||||
<data name="connectionStringLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>89, 13</value>
|
||||
</data>
|
||||
<data name="connectionStringLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>18</value>
|
||||
</data>
|
||||
<data name="connectionStringLabel.Text" xml:space="preserve">
|
||||
<value>Connection string</value>
|
||||
</data>
|
||||
<data name=">>connectionStringLabel.Name" xml:space="preserve">
|
||||
<value>connectionStringLabel</value>
|
||||
</data>
|
||||
<data name=">>connectionStringLabel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>connectionStringLabel.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>connectionStringLabel.ZOrder" xml:space="preserve">
|
||||
<value>26</value>
|
||||
</data>
|
||||
<data name="benchConnectionStringTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>202, 127</value>
|
||||
</data>
|
||||
<data name="benchConnectionStringTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>406, 20</value>
|
||||
</data>
|
||||
<data name="benchConnectionStringTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>19</value>
|
||||
</data>
|
||||
<data name=">>benchConnectionStringTextBox.Name" xml:space="preserve">
|
||||
<value>benchConnectionStringTextBox</value>
|
||||
</data>
|
||||
<data name=">>benchConnectionStringTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>benchConnectionStringTextBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>benchConnectionStringTextBox.ZOrder" xml:space="preserve">
|
||||
<value>25</value>
|
||||
</data>
|
||||
<data name="proceduresConnectionStringTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>202, 153</value>
|
||||
</data>
|
||||
<data name="proceduresConnectionStringTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>406, 20</value>
|
||||
</data>
|
||||
<data name="proceduresConnectionStringTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>20</value>
|
||||
</data>
|
||||
<data name=">>proceduresConnectionStringTextBox.Name" xml:space="preserve">
|
||||
<value>proceduresConnectionStringTextBox</value>
|
||||
</data>
|
||||
<data name=">>proceduresConnectionStringTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>proceduresConnectionStringTextBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>proceduresConnectionStringTextBox.ZOrder" xml:space="preserve">
|
||||
<value>24</value>
|
||||
</data>
|
||||
<data name="wmTypesConnectionStringTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>202, 179</value>
|
||||
</data>
|
||||
<data name="wmTypesConnectionStringTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>406, 20</value>
|
||||
</data>
|
||||
<data name="wmTypesConnectionStringTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>21</value>
|
||||
</data>
|
||||
<data name=">>wmTypesConnectionStringTextBox.Name" xml:space="preserve">
|
||||
<value>wmTypesConnectionStringTextBox</value>
|
||||
</data>
|
||||
<data name=">>wmTypesConnectionStringTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>wmTypesConnectionStringTextBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>wmTypesConnectionStringTextBox.ZOrder" xml:space="preserve">
|
||||
<value>23</value>
|
||||
</data>
|
||||
<data name="watermetersConnectionStringTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>202, 205</value>
|
||||
</data>
|
||||
<data name="watermetersConnectionStringTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>406, 20</value>
|
||||
</data>
|
||||
<data name="watermetersConnectionStringTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>22</value>
|
||||
</data>
|
||||
<data name=">>watermetersConnectionStringTextBox.Name" xml:space="preserve">
|
||||
<value>watermetersConnectionStringTextBox</value>
|
||||
</data>
|
||||
<data name=">>watermetersConnectionStringTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>watermetersConnectionStringTextBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>watermetersConnectionStringTextBox.ZOrder" xml:space="preserve">
|
||||
<value>22</value>
|
||||
</data>
|
||||
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 104</value>
|
||||
</data>
|
||||
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>90, 13</value>
|
||||
</data>
|
||||
<data name="label2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>47</value>
|
||||
</data>
|
||||
<data name="label2.Text" xml:space="preserve">
|
||||
<value>Users and groups</value>
|
||||
</data>
|
||||
<data name=">>label2.Name" xml:space="preserve">
|
||||
<value>label2</value>
|
||||
</data>
|
||||
<data name=">>label2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label2.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label2.ZOrder" xml:space="preserve">
|
||||
<value>21</value>
|
||||
</data>
|
||||
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 130</value>
|
||||
</data>
|
||||
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>93, 13</value>
|
||||
</data>
|
||||
<data name="label3.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>48</value>
|
||||
</data>
|
||||
<data name="label3.Text" xml:space="preserve">
|
||||
<value>Bench parameters</value>
|
||||
</data>
|
||||
<data name=">>label3.Name" xml:space="preserve">
|
||||
<value>label3</value>
|
||||
</data>
|
||||
<data name=">>label3.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label3.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label3.ZOrder" xml:space="preserve">
|
||||
<value>20</value>
|
||||
</data>
|
||||
<data name="label4.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label4.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 156</value>
|
||||
</data>
|
||||
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>61, 13</value>
|
||||
</data>
|
||||
<data name="label4.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>49</value>
|
||||
</data>
|
||||
<data name="label4.Text" xml:space="preserve">
|
||||
<value>Procedures</value>
|
||||
</data>
|
||||
<data name=">>label4.Name" xml:space="preserve">
|
||||
<value>label4</value>
|
||||
</data>
|
||||
<data name=">>label4.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label4.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label4.ZOrder" xml:space="preserve">
|
||||
<value>19</value>
|
||||
</data>
|
||||
<data name="label5.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label5.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 182</value>
|
||||
</data>
|
||||
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>90, 13</value>
|
||||
</data>
|
||||
<data name="label5.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>50</value>
|
||||
</data>
|
||||
<data name="label5.Text" xml:space="preserve">
|
||||
<value>Watermeter types</value>
|
||||
</data>
|
||||
<data name=">>label5.Name" xml:space="preserve">
|
||||
<value>label5</value>
|
||||
</data>
|
||||
<data name=">>label5.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label5.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label5.ZOrder" xml:space="preserve">
|
||||
<value>18</value>
|
||||
</data>
|
||||
<data name="label6.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label6.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 208</value>
|
||||
</data>
|
||||
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>67, 13</value>
|
||||
</data>
|
||||
<data name="label6.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>51</value>
|
||||
</data>
|
||||
<data name="label6.Text" xml:space="preserve">
|
||||
<value>Watermeters</value>
|
||||
</data>
|
||||
<data name=">>label6.Name" xml:space="preserve">
|
||||
<value>label6</value>
|
||||
</data>
|
||||
<data name=">>label6.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label6.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label6.ZOrder" xml:space="preserve">
|
||||
<value>17</value>
|
||||
</data>
|
||||
<data name="testConnUsersBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>614, 99</value>
|
||||
</data>
|
||||
<data name="testConnUsersBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>95, 23</value>
|
||||
</data>
|
||||
<data name="testConnUsersBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>52</value>
|
||||
</data>
|
||||
<data name="testConnUsersBtn.Text" xml:space="preserve">
|
||||
<value>Test Connection</value>
|
||||
</data>
|
||||
<data name=">>testConnUsersBtn.Name" xml:space="preserve">
|
||||
<value>testConnUsersBtn</value>
|
||||
</data>
|
||||
<data name=">>testConnUsersBtn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>testConnUsersBtn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>testConnUsersBtn.ZOrder" xml:space="preserve">
|
||||
<value>16</value>
|
||||
</data>
|
||||
<data name="createUsersDbBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>711, 99</value>
|
||||
</data>
|
||||
<data name="createUsersDbBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>120, 23</value>
|
||||
</data>
|
||||
<data name="createUsersDbBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>53</value>
|
||||
</data>
|
||||
<data name="createUsersDbBtn.Text" xml:space="preserve">
|
||||
<value>Create DB</value>
|
||||
</data>
|
||||
<data name=">>createUsersDbBtn.Name" xml:space="preserve">
|
||||
<value>createUsersDbBtn</value>
|
||||
</data>
|
||||
<data name=">>createUsersDbBtn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>createUsersDbBtn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>createUsersDbBtn.ZOrder" xml:space="preserve">
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name="realBenchCheckBox.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="realBenchCheckBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>116, 47</value>
|
||||
</data>
|
||||
<data name="realBenchCheckBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>219, 17</value>
|
||||
</data>
|
||||
<data name="realBenchCheckBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>54</value>
|
||||
</data>
|
||||
<data name="realBenchCheckBox.Text" xml:space="preserve">
|
||||
<value>Test bench is controlled by this computer</value>
|
||||
</data>
|
||||
<data name=">>realBenchCheckBox.Name" xml:space="preserve">
|
||||
<value>realBenchCheckBox</value>
|
||||
</data>
|
||||
<data name=">>realBenchCheckBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>realBenchCheckBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>realBenchCheckBox.ZOrder" xml:space="preserve">
|
||||
<value>14</value>
|
||||
</data>
|
||||
<data name="dbTypeLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="dbTypeLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>113, 82</value>
|
||||
</data>
|
||||
<data name="dbTypeLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>76, 13</value>
|
||||
</data>
|
||||
<data name="dbTypeLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>55</value>
|
||||
</data>
|
||||
<data name="dbTypeLabel.Text" xml:space="preserve">
|
||||
<value>Database type</value>
|
||||
</data>
|
||||
<data name=">>dbTypeLabel.Name" xml:space="preserve">
|
||||
<value>dbTypeLabel</value>
|
||||
</data>
|
||||
<data name=">>dbTypeLabel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>dbTypeLabel.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>dbTypeLabel.ZOrder" xml:space="preserve">
|
||||
<value>13</value>
|
||||
</data>
|
||||
<data name="usersDbTypeComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>116, 101</value>
|
||||
</data>
|
||||
<data name="usersDbTypeComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>80, 21</value>
|
||||
</data>
|
||||
<data name="usersDbTypeComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>56</value>
|
||||
</data>
|
||||
<data name=">>usersDbTypeComboBox.Name" xml:space="preserve">
|
||||
<value>usersDbTypeComboBox</value>
|
||||
</data>
|
||||
<data name=">>usersDbTypeComboBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>usersDbTypeComboBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>usersDbTypeComboBox.ZOrder" xml:space="preserve">
|
||||
<value>12</value>
|
||||
</data>
|
||||
<data name="benchDbTypeComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>116, 127</value>
|
||||
</data>
|
||||
<data name="benchDbTypeComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>80, 21</value>
|
||||
</data>
|
||||
<data name="benchDbTypeComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>57</value>
|
||||
</data>
|
||||
<data name=">>benchDbTypeComboBox.Name" xml:space="preserve">
|
||||
<value>benchDbTypeComboBox</value>
|
||||
</data>
|
||||
<data name=">>benchDbTypeComboBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>benchDbTypeComboBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>benchDbTypeComboBox.ZOrder" xml:space="preserve">
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="proceduresDbTypeComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>116, 153</value>
|
||||
</data>
|
||||
<data name="proceduresDbTypeComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>80, 21</value>
|
||||
</data>
|
||||
<data name="proceduresDbTypeComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>58</value>
|
||||
</data>
|
||||
<data name=">>proceduresDbTypeComboBox.Name" xml:space="preserve">
|
||||
<value>proceduresDbTypeComboBox</value>
|
||||
</data>
|
||||
<data name=">>proceduresDbTypeComboBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>proceduresDbTypeComboBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>proceduresDbTypeComboBox.ZOrder" xml:space="preserve">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="wmTypesDbTypeComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>116, 179</value>
|
||||
</data>
|
||||
<data name="wmTypesDbTypeComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>80, 21</value>
|
||||
</data>
|
||||
<data name="wmTypesDbTypeComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>59</value>
|
||||
</data>
|
||||
<data name=">>wmTypesDbTypeComboBox.Name" xml:space="preserve">
|
||||
<value>wmTypesDbTypeComboBox</value>
|
||||
</data>
|
||||
<data name=">>wmTypesDbTypeComboBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>wmTypesDbTypeComboBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>wmTypesDbTypeComboBox.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="watermetersDbTypeComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>116, 205</value>
|
||||
</data>
|
||||
<data name="watermetersDbTypeComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>80, 21</value>
|
||||
</data>
|
||||
<data name="watermetersDbTypeComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>60</value>
|
||||
</data>
|
||||
<data name=">>watermetersDbTypeComboBox.Name" xml:space="preserve">
|
||||
<value>watermetersDbTypeComboBox</value>
|
||||
</data>
|
||||
<data name=">>watermetersDbTypeComboBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>watermetersDbTypeComboBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>watermetersDbTypeComboBox.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="testConnBenchBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="testConnBenchBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>614, 125</value>
|
||||
</data>
|
||||
<data name="testConnBenchBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>95, 23</value>
|
||||
</data>
|
||||
<data name="testConnBenchBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>61</value>
|
||||
</data>
|
||||
<data name="testConnBenchBtn.Text" xml:space="preserve">
|
||||
<value>Test Connection</value>
|
||||
</data>
|
||||
<data name=">>testConnBenchBtn.Name" xml:space="preserve">
|
||||
<value>testConnBenchBtn</value>
|
||||
</data>
|
||||
<data name=">>testConnBenchBtn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>testConnBenchBtn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>testConnBenchBtn.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="testConnProceduresBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="testConnProceduresBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>614, 151</value>
|
||||
</data>
|
||||
<data name="testConnProceduresBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>95, 23</value>
|
||||
</data>
|
||||
<data name="testConnProceduresBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>62</value>
|
||||
</data>
|
||||
<data name="testConnProceduresBtn.Text" xml:space="preserve">
|
||||
<value>Test Connection</value>
|
||||
</data>
|
||||
<data name=">>testConnProceduresBtn.Name" xml:space="preserve">
|
||||
<value>testConnProceduresBtn</value>
|
||||
</data>
|
||||
<data name=">>testConnProceduresBtn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>testConnProceduresBtn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>testConnProceduresBtn.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="testConnWMTypesBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="testConnWMTypesBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>614, 177</value>
|
||||
</data>
|
||||
<data name="testConnWMTypesBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>95, 23</value>
|
||||
</data>
|
||||
<data name="testConnWMTypesBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>63</value>
|
||||
</data>
|
||||
<data name="testConnWMTypesBtn.Text" xml:space="preserve">
|
||||
<value>Test Connection</value>
|
||||
</data>
|
||||
<data name=">>testConnWMTypesBtn.Name" xml:space="preserve">
|
||||
<value>testConnWMTypesBtn</value>
|
||||
</data>
|
||||
<data name=">>testConnWMTypesBtn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>testConnWMTypesBtn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>testConnWMTypesBtn.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="testConnWaterMetersBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="testConnWaterMetersBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>614, 203</value>
|
||||
</data>
|
||||
<data name="testConnWaterMetersBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>95, 23</value>
|
||||
</data>
|
||||
<data name="testConnWaterMetersBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>64</value>
|
||||
</data>
|
||||
<data name="testConnWaterMetersBtn.Text" xml:space="preserve">
|
||||
<value>Test Connection</value>
|
||||
</data>
|
||||
<data name=">>testConnWaterMetersBtn.Name" xml:space="preserve">
|
||||
<value>testConnWaterMetersBtn</value>
|
||||
</data>
|
||||
<data name=">>testConnWaterMetersBtn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>testConnWaterMetersBtn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>testConnWaterMetersBtn.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="createBenchDbBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="createBenchDbBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>711, 124</value>
|
||||
</data>
|
||||
<data name="createBenchDbBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>120, 23</value>
|
||||
</data>
|
||||
<data name="createBenchDbBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>65</value>
|
||||
</data>
|
||||
<data name="createBenchDbBtn.Text" xml:space="preserve">
|
||||
<value>Create DB</value>
|
||||
</data>
|
||||
<data name=">>createBenchDbBtn.Name" xml:space="preserve">
|
||||
<value>createBenchDbBtn</value>
|
||||
</data>
|
||||
<data name=">>createBenchDbBtn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>createBenchDbBtn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>createBenchDbBtn.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="createProceduresDbBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="createProceduresDbBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>711, 150</value>
|
||||
</data>
|
||||
<data name="createProceduresDbBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>120, 23</value>
|
||||
</data>
|
||||
<data name="createProceduresDbBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>66</value>
|
||||
</data>
|
||||
<data name="createProceduresDbBtn.Text" xml:space="preserve">
|
||||
<value>Create DB</value>
|
||||
</data>
|
||||
<data name=">>createProceduresDbBtn.Name" xml:space="preserve">
|
||||
<value>createProceduresDbBtn</value>
|
||||
</data>
|
||||
<data name=">>createProceduresDbBtn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>createProceduresDbBtn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>createProceduresDbBtn.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="createWMTypesDbBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="createWMTypesDbBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>711, 176</value>
|
||||
</data>
|
||||
<data name="createWMTypesDbBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>120, 23</value>
|
||||
</data>
|
||||
<data name="createWMTypesDbBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>67</value>
|
||||
</data>
|
||||
<data name="createWMTypesDbBtn.Text" xml:space="preserve">
|
||||
<value>Create DB</value>
|
||||
</data>
|
||||
<data name=">>createWMTypesDbBtn.Name" xml:space="preserve">
|
||||
<value>createWMTypesDbBtn</value>
|
||||
</data>
|
||||
<data name=">>createWMTypesDbBtn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>createWMTypesDbBtn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>createWMTypesDbBtn.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="createWaterMetersDbBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="createWaterMetersDbBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>711, 202</value>
|
||||
</data>
|
||||
<data name="createWaterMetersDbBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>120, 23</value>
|
||||
</data>
|
||||
<data name="createWaterMetersDbBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>68</value>
|
||||
</data>
|
||||
<data name="createWaterMetersDbBtn.Text" xml:space="preserve">
|
||||
<value>Create DB</value>
|
||||
</data>
|
||||
<data name=">>createWaterMetersDbBtn.Name" xml:space="preserve">
|
||||
<value>createWaterMetersDbBtn</value>
|
||||
</data>
|
||||
<data name=">>createWaterMetersDbBtn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>createWaterMetersDbBtn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>createWaterMetersDbBtn.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>836, 241</value>
|
||||
</data>
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterParent</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Test Bench Databases Specification</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>DatabaseSettingsDlg</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
</root>
|
||||
+179
-13
@@ -3,9 +3,57 @@
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Config.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Helper class to assign descriptions to enum values
|
||||
/// </summary>
|
||||
public class Description : Attribute
|
||||
{
|
||||
public string Text;
|
||||
public Description(string t)
|
||||
{
|
||||
Text = t;
|
||||
}
|
||||
}
|
||||
|
||||
public static class GetDescription
|
||||
{
|
||||
/// Extension method for enum-s
|
||||
public static string ToDescription(this Enum en)
|
||||
{
|
||||
Type type = en.GetType();
|
||||
MemberInfo[] memInfo = type.GetMember(en.ToString());
|
||||
|
||||
if (memInfo != null && memInfo.Length > 0)
|
||||
{
|
||||
object[] attrs = memInfo[0].GetCustomAttributes(typeof(Description), false);
|
||||
if (attrs != null && attrs.Length > 0)
|
||||
return ((Description)attrs[0]).Text;
|
||||
}
|
||||
|
||||
return en.ToString(); /// Return ToString() value in case there is no description
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Identifies the type of a database </summary>
|
||||
public enum DBType
|
||||
{
|
||||
MySql, /// MySQL database
|
||||
SQLite, /// SQLite
|
||||
DbTypesCount,
|
||||
}
|
||||
|
||||
/// <summary> Identifies the database based on the content </summary>
|
||||
public enum DBKind
|
||||
{
|
||||
Config,
|
||||
Results,
|
||||
Count,
|
||||
}
|
||||
|
||||
public enum ProcedureState
|
||||
{
|
||||
Active,
|
||||
@@ -14,24 +62,94 @@ namespace Config.Entities
|
||||
Count,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Kind of meters for the procedure / test
|
||||
/// </summary>
|
||||
/// <summary> Kind of meters for the procedure / test </summary>
|
||||
public enum MetersKind
|
||||
{
|
||||
Single,
|
||||
Combined,
|
||||
HeatMeter,
|
||||
}
|
||||
|
||||
public enum CompoundMeterId : byte
|
||||
{
|
||||
Single,
|
||||
CompoundMain,
|
||||
CompoundAux,
|
||||
Compound,
|
||||
}
|
||||
|
||||
public enum Medium
|
||||
{
|
||||
[Description("")] NotSpecified,
|
||||
ColdWater,
|
||||
HotWater,
|
||||
}
|
||||
Count
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Transition step is finished when this condition is fulfilled
|
||||
/// </summary>
|
||||
public enum Mounting
|
||||
{
|
||||
[Description("")] NotSpecified,
|
||||
[Description("H")] H, /// horizontal
|
||||
[Description("V")] V, /// vertical
|
||||
[Description("S")] S, /// steig
|
||||
[Description("F")] F, /// fall
|
||||
Count
|
||||
}
|
||||
|
||||
public enum TemperatureClass
|
||||
{
|
||||
[Description("")] NotSpecified,
|
||||
[Description("T30")] T30,
|
||||
[Description("T50")] T50,
|
||||
[Description("T70")] T70,
|
||||
[Description("T90")] T90,
|
||||
[Description("T130")] T130,
|
||||
[Description("T180")] T180,
|
||||
[Description("T30/70")] T30_70,
|
||||
[Description("T30/90")] T30_90,
|
||||
[Description("T30/130")] T30_130,
|
||||
[Description("T30/180")] T30_180,
|
||||
[Description("30")] t30,
|
||||
[Description("50")] t50,
|
||||
[Description("70")] t70,
|
||||
[Description("90")] t90,
|
||||
[Description("130")] t130,
|
||||
[Description("180")] t180,
|
||||
Count
|
||||
}
|
||||
|
||||
public enum FlowProfileSensitivityClass
|
||||
{
|
||||
[Description("")] NotSpecified,
|
||||
[Description("U0")] U0, /// ?
|
||||
[Description("D0")] D0, /// ?
|
||||
Count
|
||||
}
|
||||
|
||||
public enum PressureLossClass
|
||||
{
|
||||
[Description("")] NotSpecified,
|
||||
[Description("dp63")] dp63, /// 0.063 MPa = 0.63 bar, TODO: Change to "Δp63"
|
||||
[Description("dp40")] dp40, /// 0.040 MPa = 0.40 bar
|
||||
[Description("dp25")] dp25, /// 0.025 MPa = 0.25 bar
|
||||
[Description("dp16")] dp16, /// 0.016 MPa = 0.16 bar
|
||||
[Description("dp10")] dp10, /// 0.010 MPa = 0.10 bar
|
||||
Count
|
||||
}
|
||||
|
||||
/// <summary> Maximum Admissible Pressure </summary>
|
||||
public enum MaxAdmissiblePressure
|
||||
{
|
||||
[Description("")] NotSpecified,
|
||||
[Description("MAP6")] MAP6,
|
||||
[Description("MAP10")] MAP10,
|
||||
[Description("MAP16")] MAP16,
|
||||
[Description("MAP25")] MAP25,
|
||||
[Description("MAP40")] MAP40,
|
||||
Count
|
||||
}
|
||||
|
||||
/// <summary> Transition step is finished when this condition is fulfilled </summary>
|
||||
public enum StepCondition
|
||||
{
|
||||
None,
|
||||
@@ -39,7 +157,36 @@ namespace Config.Entities
|
||||
Scale2Empty,
|
||||
Scale3Empty,
|
||||
AllScalesEmpty,
|
||||
Count,
|
||||
Count
|
||||
}
|
||||
|
||||
public enum Publish : sbyte
|
||||
{
|
||||
#if MUNICH
|
||||
/// nemecky
|
||||
[Description("nie")] Never = 0,
|
||||
[Description("immer")] Always = 1,
|
||||
[Description("Bildschirm")] OnScreen = 2,
|
||||
[Description("intern")] Internal = 3,
|
||||
#elif CEVAK || BADGER_MALA_TRAT || BADGER_VELKA_TRAT
|
||||
/// cesky
|
||||
[Description("nikdy")] Never = 0,
|
||||
[Description("vždy")] Always = 1,
|
||||
[Description("na obrazovku")] OnScreen = 2,
|
||||
[Description("interně")] Internal = 3,
|
||||
#elif IPERLST || IPERLST_SPECIAL || SLM_50
|
||||
/// slovensky
|
||||
[Description("nikdy")] Never = 0,
|
||||
[Description("vždy")] Always = 1,
|
||||
[Description("na obrazovku")] OnScreen = 2,
|
||||
[Description("interne")] Internal = 3,
|
||||
#else
|
||||
[Description("Never")] Never = 0,
|
||||
[Description("Always")] Always = 1,
|
||||
[Description("On screen")] OnScreen = 2,
|
||||
[Description("Internal")] Internal = 3,
|
||||
#endif
|
||||
Count
|
||||
}
|
||||
|
||||
public enum TestRedType
|
||||
@@ -56,6 +203,18 @@ namespace Config.Entities
|
||||
Count,
|
||||
}
|
||||
|
||||
public enum Progress
|
||||
{
|
||||
JustStarted,
|
||||
TransitionBefore,
|
||||
SwitchingFlowDetection,
|
||||
FlowSetting,
|
||||
Test,
|
||||
TransitionAfter,
|
||||
Completed,
|
||||
Count,
|
||||
}
|
||||
|
||||
public enum Device
|
||||
{
|
||||
Screen,
|
||||
@@ -76,9 +235,7 @@ namespace Config.Entities
|
||||
CubicMtr,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Possible modes of operation of components and devices.
|
||||
/// </summary>
|
||||
/// <summary> Possible modes of operation of components and devices. </summary>
|
||||
public enum DebugMode
|
||||
{
|
||||
DetectedOff = -2,
|
||||
@@ -107,18 +264,27 @@ namespace Config.Entities
|
||||
}
|
||||
|
||||
|
||||
/// Arrangement of tests
|
||||
/// <summary> Arrangement of tests </summary>
|
||||
public enum TestsArrangement
|
||||
{
|
||||
Rows,
|
||||
Columns,
|
||||
}
|
||||
|
||||
/// Arrangement of meters
|
||||
/// <summary> Arrangement of meters </summary>
|
||||
public enum MetersArrangement
|
||||
{
|
||||
Vertically,
|
||||
Horizontally,
|
||||
}
|
||||
|
||||
public enum Alignment
|
||||
{
|
||||
Left,
|
||||
Center,
|
||||
Right,
|
||||
Justified,
|
||||
Count
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -99,5 +99,10 @@ namespace Config.Entities
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0}, rev.{1}", Name, Revision);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+50
-14
@@ -17,29 +17,37 @@ namespace Config.Entities
|
||||
public virtual string Name { get; set; }
|
||||
public virtual int Part { get; set; } /// Part=0 ... test of all WM-s
|
||||
/// Part>0 ... part of a set of tests with the same Name: subset of WM-s is given by MetersPath
|
||||
public virtual sbyte Publish { get; set; } /// 0=no, 1=in all protocols, 2=on screen, 3=internal
|
||||
public virtual bool Evaluate { get; set; }
|
||||
public virtual float Qfrom { get; set; } /// Water flow low limit in [m3/h]
|
||||
public virtual float Qto { get; set; } /// Water flow high limit in [m3/h]
|
||||
public virtual float Volume { get; set; } /// Test volume (target) in [l]
|
||||
public virtual float TstTime { get; set; } /// Test time (estimate) in [s]
|
||||
public virtual string Method { get; set; }
|
||||
public virtual float ErrLimLo { get; set; } /// in [%] (usually < 0)
|
||||
public virtual float ErrLimHi { get; set; } /// in [%] (usually > 0)
|
||||
public virtual float Uncertainty { get; set; } /// int [%] makes error limits tighter: 0 <= Uncertainty <= abs(ErrLimXx)
|
||||
public virtual int Repeats { get; set; }
|
||||
public virtual bool Emptying { get; set; }
|
||||
public virtual bool Zeroing { get; set; }
|
||||
public virtual float PumpPower { get; set; } /// Power of the pump in [%] in the range 0 .. 100.0f, use values 0% and 100% for non-FM pumps
|
||||
public virtual int MassRepeats { get; set; } /// Number of mass. measurements at the beginning/end of test, 0 = default (=5)
|
||||
public virtual float MassSpread { get; set; } /// Max spread of mass. measurements at the beginning/end of test, 0 = default
|
||||
public virtual bool MassMethod { get; set; } /// method of mass. measurement at the beginning/end of test: false=slow (precise), true=fast (immediate)
|
||||
public virtual int TimeBeforeFlow { get; set; } /// Delay time before the start of flow control in [s]
|
||||
public virtual int TimeFlow2Mass { get; set; } /// Delay time from the flow stable to the 1st mass measurement in [s]
|
||||
public virtual int TimeMass2Start { get; set; } /// Delay time from the 1st mass measurement to the test start in [s]
|
||||
public virtual int TimeFlow2Mass { get; set; } /// Delay time from the flow stable to the 1st mass measurement in [s]
|
||||
public virtual int TimePump2StartV { get; set; }/// Delay time from the start of the pump to opening the start valve in [s]
|
||||
public virtual int TimeStop2Mass { get; set; } /// Delay time from the test end (diverted) to the 2nd mass measuremen in [s]
|
||||
public virtual string Method { get; set; }
|
||||
public virtual float ErrLimLo { get; set; } /// in [%] (usually < 0)
|
||||
public virtual float ErrLimHi { get; set; } /// in [%] (usually > 0)
|
||||
public virtual float Uncertainty { get; set; } /// int [%] makes error limits tighter: 0 <= Uncertainty <= abs(ErrLimXx)
|
||||
public virtual double TolerRed { get; set; } /// = Filter
|
||||
public virtual TestRedType RedType { get; set; }
|
||||
public virtual string FeedingPath { get; set; }
|
||||
public virtual string BenchPath { get; set; }
|
||||
public virtual string OutputPath { get; set; }
|
||||
public virtual string MetersPath { get; set; }
|
||||
public virtual string RelTransBefore { get; set; }
|
||||
#if HEAT_METERS_SUPPORT
|
||||
public virtual string HeatMetersPath { get; set; }
|
||||
#endif
|
||||
public virtual string RelTransBefore { get; set; }
|
||||
public virtual string RelTransBetween { get; set; }
|
||||
public virtual string RelTransAfter { get; set; }
|
||||
public virtual string TransitionAfter { get; set; }
|
||||
@@ -57,18 +65,27 @@ namespace Config.Entities
|
||||
///
|
||||
/// Default values
|
||||
///
|
||||
Publish = (sbyte)Config.Entities.Publish.Always;
|
||||
Evaluate = true;
|
||||
Repeats = 1;
|
||||
Emptying = false;
|
||||
Zeroing = false;
|
||||
PumpPower = 60.0f; /// [%]
|
||||
TimeBeforeFlow = 10; /// [s] time before the start of flow control in [s]
|
||||
TimeFlow2Mass = 5; /// [s] time from the flow stable to the 1st mass measurement in [s]
|
||||
TimeMass2Start = 1; /// [s] time from the 1st mass measurement to the test start in [s]
|
||||
TimeStop2Mass = 5; /// [s] between the test end and the final mass measurement
|
||||
ErrLimLo = -2.0f; /// [%] lower error limit
|
||||
ErrLimHi = 2.0f; /// [%] upper error limit
|
||||
Uncertainty = 0;
|
||||
TolerRed = 0; /// = Filter parameter
|
||||
PumpPower = 60.0f; /// [%]
|
||||
MassRepeats = 0; /// default
|
||||
MassSpread = 0; /// default
|
||||
MassMethod = false; /// default
|
||||
TimeBeforeFlow = 10; /// [s] time before the start of flow control in [s]
|
||||
TimeFlow2Mass = 5; /// [s] time from the flow stable to the 1st mass measurement in [s]
|
||||
TimePump2StartV = 1; /// [s] time from the 1st mass measurement to the test start in [s]
|
||||
TimeStop2Mass = 5; /// [s] between the test end and the final mass measurement
|
||||
TolerRed = 0; /// = Filter parameter
|
||||
RelTransBefore = string.Empty;
|
||||
RelTransBetween = string.Empty;
|
||||
RelTransAfter = string.Empty;
|
||||
TransitionAfter = string.Empty;
|
||||
}
|
||||
|
||||
public Test(string name, int itemNr, Procedure procedure)
|
||||
@@ -85,6 +102,8 @@ namespace Config.Entities
|
||||
Test result = new Test(Name, ItemNr, Procedure);
|
||||
|
||||
result.Part = Part;
|
||||
result.Publish = Publish;
|
||||
result.Evaluate = Evaluate;
|
||||
result.Qfrom = Qfrom;
|
||||
result.Qto = Qto;
|
||||
result.Volume = Volume;
|
||||
@@ -93,9 +112,12 @@ namespace Config.Entities
|
||||
result.Emptying = Emptying;
|
||||
result.Zeroing = Zeroing;
|
||||
result.PumpPower = PumpPower;
|
||||
result.MassRepeats = MassRepeats;
|
||||
result.MassSpread = MassSpread;
|
||||
result.MassMethod = MassMethod;
|
||||
result.TimeBeforeFlow = TimeBeforeFlow;
|
||||
result.TimeFlow2Mass = TimeFlow2Mass;
|
||||
result.TimeMass2Start = TimeMass2Start;
|
||||
result.TimePump2StartV = TimePump2StartV;
|
||||
result.TimeStop2Mass = TimeStop2Mass;
|
||||
result.Method = Method;
|
||||
result.ErrLimLo = ErrLimLo;
|
||||
@@ -107,9 +129,23 @@ namespace Config.Entities
|
||||
result.BenchPath = BenchPath;
|
||||
result.OutputPath = OutputPath;
|
||||
result.MetersPath = MetersPath;
|
||||
#if HEAT_METERS_SUPPORT
|
||||
result.HeatMetersPath = HeatMetersPath;
|
||||
#endif
|
||||
result.RelTransBefore = RelTransBefore;
|
||||
result.RelTransBetween = RelTransBetween;
|
||||
result.RelTransAfter = RelTransAfter;
|
||||
result.TransitionAfter = TransitionAfter;
|
||||
foreach (var prms in MoreParams) { result.MoreParams.Add(prms.Clone()); }
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
string partStr = (Part > 0) ? string.Format(", part {0}", Part) : string.Empty;
|
||||
|
||||
return string.Format("{0}(P.{1},{2}){3}", Name, ((Publish)Publish).ToString(), Evaluate ? "E" : "-", partStr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ namespace Config.Entities
|
||||
/// <returns>reference to a 'User' (if it exists) or null</returns>
|
||||
public static User LoadUserByName(string username, DBSettings dbSettings)
|
||||
{
|
||||
IList<User> listOfUsers = FluentCommon.CreateSessionFactory(Database.Users, dbSettings, false)
|
||||
IList<User> listOfUsers = FluentCommon.CreateSessionFactory(DBKind.Config, dbSettings, false)
|
||||
.OpenSession()
|
||||
.CreateQuery("FROM User WHERE LOWER(Name) = :username")
|
||||
.SetParameter("username", username.ToLower())
|
||||
@@ -200,7 +200,7 @@ namespace Config.Entities
|
||||
/// <returns>reference to a 'User' (if it exists) or null</returns>
|
||||
public static User LoadUserByName(string username)
|
||||
{
|
||||
IList<User> listOfUsers = FluentCommon.CreateSession(Database.Users)
|
||||
IList<User> listOfUsers = FluentCommon.CreateSession(DBKind.Config)
|
||||
.CreateQuery("FROM User WHERE LOWER(Name) = :username")
|
||||
.SetParameter("username", username.ToLower())
|
||||
.List<User>();
|
||||
@@ -213,7 +213,7 @@ namespace Config.Entities
|
||||
/// </summary>
|
||||
public static IList<User> GetAllUsers()
|
||||
{
|
||||
return FluentCommon.CreateSession(Database.Users)
|
||||
return FluentCommon.CreateSession(DBKind.Config)
|
||||
.CreateQuery("FROM User")
|
||||
.List<User>();
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace Config.Entities
|
||||
/// </summary>
|
||||
public static Watermeter LoadBySerialnr(string SerialNr)
|
||||
{
|
||||
IList<Watermeter> ListOfWatermeters = FluentCommon.CreateSession(Database.WaterMeters)
|
||||
IList<Watermeter> ListOfWatermeters = FluentCommon.CreateSession(DBKind.Results)
|
||||
.CreateQuery("FROM Watermeter WHERE Serial = :SerialNrParameter")
|
||||
.SetParameter("SerialNrParameter", SerialNr)
|
||||
.List<Watermeter>();
|
||||
|
||||
+20
-107
@@ -12,61 +12,30 @@ using Config.Resources;
|
||||
|
||||
namespace Config
|
||||
{
|
||||
/// <summary>
|
||||
/// Identifies the content of a database
|
||||
/// </summary>
|
||||
public enum Database
|
||||
{
|
||||
Users,
|
||||
Bench,
|
||||
Procedures,
|
||||
WaterMeters,
|
||||
Count,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Identifies the type of a database
|
||||
/// </summary>
|
||||
public enum DBType
|
||||
{
|
||||
SQLite, /// SQLite
|
||||
MySql, /// MySQL database
|
||||
DbTypesCount,
|
||||
}
|
||||
|
||||
|
||||
public static class FluentCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Session factories for regular sessions.
|
||||
/// </summary>
|
||||
public static ISessionFactory[] SessionFactories = new ISessionFactory[(int)Database.Count];
|
||||
public static ISessionFactory[] SessionFactories = new ISessionFactory[(int)Entities.DBKind.Count];
|
||||
|
||||
/// <summary>
|
||||
/// NHibernate session factory (to create the database session 'SessionFactory')
|
||||
/// </summary>
|
||||
/// <returns>A database session</returns>
|
||||
static ISessionFactory CreateSessionFactory(Database database)
|
||||
static ISessionFactory CreateSessionFactory(Entities.DBKind database)
|
||||
{
|
||||
DBType dbType;
|
||||
Entities.DBType dbType;
|
||||
string connectionString;
|
||||
|
||||
switch (database)
|
||||
{
|
||||
default:
|
||||
case Database.Users:
|
||||
dbType = Data.CurrentBench.UsersDBSettings.DbType;
|
||||
connectionString = Data.CurrentBench.UsersDBSettings.ConnectionString;
|
||||
break;
|
||||
case Database.Bench:
|
||||
dbType = Data.CurrentBench.BenchDBSettings.DbType;
|
||||
connectionString = Data.CurrentBench.BenchDBSettings.ConnectionString;
|
||||
break;
|
||||
case Database.Procedures:
|
||||
case Entities.DBKind.Config:
|
||||
dbType = Data.CurrentBench.ProceduresDBSettings.DbType;
|
||||
connectionString = Data.CurrentBench.ProceduresDBSettings.ConnectionString;
|
||||
break;
|
||||
case Database.WaterMeters:
|
||||
case Entities.DBKind.Results:
|
||||
dbType = Data.CurrentBench.WaterMetersDBSettings.DbType;
|
||||
connectionString = Data.CurrentBench.WaterMetersDBSettings.ConnectionString;
|
||||
break;
|
||||
@@ -79,7 +48,7 @@ namespace Config
|
||||
/// NHibernate session factory (to create the database session 'SessionFactory')
|
||||
/// </summary>
|
||||
/// <returns>A database session</returns>
|
||||
public static ISessionFactory CreateSessionFactory(Database database, DBSettings dbSettings, bool createDB)
|
||||
public static ISessionFactory CreateSessionFactory(Entities.DBKind database, DBSettings dbSettings, bool createDB)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -88,10 +57,10 @@ namespace Config
|
||||
switch (dbSettings.DbType)
|
||||
{
|
||||
default:
|
||||
case DBType.SQLite:
|
||||
case Entities.DBType.SQLite:
|
||||
cfg = cfg.Database(SQLiteConfiguration.Standard.UsingFile(dbSettings.ConnectionString));
|
||||
break;
|
||||
case DBType.MySql:
|
||||
case Entities.DBType.MySql:
|
||||
cfg = cfg.Database(MySQLConfiguration.Standard.ConnectionString(dbSettings.ConnectionString));
|
||||
break;
|
||||
}
|
||||
@@ -99,16 +68,10 @@ namespace Config
|
||||
switch (database)
|
||||
{
|
||||
default:
|
||||
case Database.Users:
|
||||
case Entities.DBKind.Config:
|
||||
cfg = cfg.Mappings(m => m.FluentMappings.AddFromAssemblyOf<Data>());
|
||||
break;
|
||||
case Database.Bench:
|
||||
cfg = cfg.Mappings(m => m.FluentMappings.AddFromAssemblyOf<Data>());
|
||||
break;
|
||||
case Database.Procedures:
|
||||
cfg = cfg.Mappings(m => m.FluentMappings.AddFromAssemblyOf<Data>());
|
||||
break;
|
||||
case Database.WaterMeters:
|
||||
case Entities.DBKind.Results:
|
||||
cfg = cfg.Mappings(m => m.FluentMappings.AddFromAssemblyOf<Data>());
|
||||
break;
|
||||
}
|
||||
@@ -147,17 +110,17 @@ namespace Config
|
||||
}
|
||||
|
||||
/// Create a NHibernate session for the given database
|
||||
public static ISession CreateSession(Database database)
|
||||
public static ISession CreateSession(Entities.DBKind database)
|
||||
{
|
||||
int ix = (int)database;
|
||||
if (ix < 0 || ix >= (int)Database.Count) return null;
|
||||
if (ix < 0 || ix >= (int)Entities.DBKind.Count) return null;
|
||||
|
||||
if (SessionFactories[ix] == null) SessionFactories[ix] = CreateSessionFactory(database);
|
||||
|
||||
return SessionFactories[ix].OpenSession();
|
||||
}
|
||||
|
||||
public static void SaveToDb(Database database, object obj)
|
||||
public static void SaveToDb(Entities.DBKind database, object obj)
|
||||
{
|
||||
SaveToDb(CreateSession(database), obj);
|
||||
}
|
||||
@@ -172,7 +135,7 @@ namespace Config
|
||||
}
|
||||
}
|
||||
|
||||
public static void DeleteFromDb(Database database, object obj)
|
||||
public static void DeleteFromDb(Entities.DBKind database, object obj)
|
||||
{
|
||||
DeleteFromDb(CreateSession(database), obj);
|
||||
}
|
||||
@@ -193,10 +156,10 @@ namespace Config
|
||||
/// <param name="dbType">DBType.SQLite or DBType.MySql</param>
|
||||
/// <param name="connectionString">Connection string</param>
|
||||
/// <returns>true=success, false=error</returns>
|
||||
public static bool CreateEmptyUsersDB(DBSettings dbSettings)
|
||||
{
|
||||
ISessionFactory sessionFactory = CreateSessionFactory(Database.Users, dbSettings, true);
|
||||
if (sessionFactory == null) return false;
|
||||
public static bool CreateEmptyConfigDB(DBSettings dbSettings)
|
||||
{
|
||||
ISessionFactory sessionFactory = CreateSessionFactory(Entities.DBKind.Config, dbSettings, true);
|
||||
if (sessionFactory == null) return false;
|
||||
|
||||
/// Populate the database
|
||||
using (var session = sessionFactory.OpenSession())
|
||||
@@ -243,65 +206,15 @@ namespace Config
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create an empty bench database
|
||||
/// </summary>
|
||||
/// <param name="dbType">DBType.SQLite or DBType.MySql</param>
|
||||
/// <param name="connectionString">Connection string</param>
|
||||
/// <returns>true=success, false=error</returns>
|
||||
public static bool CreateEmptyBenchDB(DBSettings dbSettings)
|
||||
{
|
||||
ISessionFactory sessionFactory = CreateSessionFactory(Database.Users, dbSettings, true);
|
||||
if (sessionFactory == null) return false;
|
||||
|
||||
/// Populate the database
|
||||
//using (var session = sessionFactory.OpenSession())
|
||||
//{
|
||||
// using (var transaction = session.BeginTransaction())
|
||||
// {
|
||||
// /// Create one component
|
||||
// var cmpnt = (new BenchControl.Elde.ControlBoardCfg("CB", 1)).CreateDbEntity();
|
||||
// session.SaveOrUpdate(cmpnt);
|
||||
// transaction.Commit();
|
||||
// }
|
||||
//}
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create an empty procedures database
|
||||
/// </summary>
|
||||
/// <param name="dbType">DBType.SQLite or DBType.MySql</param>
|
||||
/// <param name="connectionString">Connection string</param>
|
||||
/// <returns>true=success, false=error</returns>
|
||||
public static bool CreateEmptyProceduresDB(DBSettings dbSettings)
|
||||
{
|
||||
ISessionFactory sessionFactory = CreateSessionFactory(Database.Users, dbSettings, true);
|
||||
if (sessionFactory == null) return false;
|
||||
|
||||
/// Populate the database
|
||||
//using (var session = sessionFactory.OpenSession())
|
||||
//{
|
||||
// using (var transaction = session.BeginTransaction())
|
||||
// {
|
||||
// /// Create one component
|
||||
// var cmpnt = (new BenchControl.Elde.ControlBoardCfg("CB", 1)).CreateDbEntity();
|
||||
// session.SaveOrUpdate(cmpnt);
|
||||
// transaction.Commit();
|
||||
// }
|
||||
//}
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create an empty water meters database
|
||||
/// </summary>
|
||||
/// <param name="dbType">DBType.SQLite or DBType.MySql</param>
|
||||
/// <param name="connectionString">Connection string</param>
|
||||
/// <returns>true=success, false=error</returns>
|
||||
public static bool CreateEmptyWaterMetersDB(DBSettings dbSettings)
|
||||
public static bool CreateEmptyResultsDB(DBSettings dbSettings)
|
||||
{
|
||||
ISessionFactory sessionFactory = CreateSessionFactory(Database.Users, dbSettings, true);
|
||||
ISessionFactory sessionFactory = CreateSessionFactory(Entities.DBKind.Results, dbSettings, true);
|
||||
if (sessionFactory == null) return false;
|
||||
|
||||
/// Populate the database
|
||||
|
||||
@@ -15,6 +15,8 @@ namespace Config.Mappings
|
||||
Map(x => x.ItemNr);
|
||||
Map(x => x.Name);
|
||||
Map(x => x.Part);
|
||||
Map(x => x.Publish);
|
||||
Map(x => x.Evaluate);
|
||||
Map(x => x.Qfrom);
|
||||
Map(x => x.Qto);
|
||||
Map(x => x.Volume);
|
||||
@@ -23,21 +25,29 @@ namespace Config.Mappings
|
||||
Map(x => x.Emptying);
|
||||
Map(x => x.Zeroing);
|
||||
Map(x => x.PumpPower);
|
||||
Map(x => x.MassRepeats);
|
||||
Map(x => x.MassSpread);
|
||||
Map(x => x.MassMethod);
|
||||
Map(x => x.TimeBeforeFlow);
|
||||
Map(x => x.TimeFlow2Mass);
|
||||
Map(x => x.TimeMass2Start);
|
||||
Map(x => x.TimePump2StartV)
|
||||
.Column("TimeMass2Start");
|
||||
Map(x => x.TimeStop2Mass);
|
||||
Map(x => x.Method);
|
||||
Map(x => x.ErrLimLo);
|
||||
Map(x => x.ErrLimHi);
|
||||
Map(x => x.Uncertainty);
|
||||
Map(x => x.TolerRed); /// ???
|
||||
Map(x => x.RedType); /// ???
|
||||
Map(x => x.TolerRed)
|
||||
.Column("TolerRed"); /// ???
|
||||
Map(x => x.RedType); /// ???
|
||||
Map(x => x.FeedingPath);
|
||||
Map(x => x.BenchPath);
|
||||
Map(x => x.OutputPath);
|
||||
Map(x => x.MetersPath);
|
||||
Map(x => x.RelTransBefore);
|
||||
#if HEAT_METERS_SUPPORT
|
||||
Map(x => x.HeatMetersPath);
|
||||
#endif
|
||||
Map(x => x.RelTransBefore);
|
||||
Map(x => x.RelTransBetween);
|
||||
Map(x => x.RelTransAfter);
|
||||
Map(x => x.TransitionAfter);
|
||||
|
||||
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Sensus")]
|
||||
[assembly: AssemblyProduct("Config")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2013 - 2015 Sensus Slovensko a.s.")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2013 - 2016 Sensus Slovensko a.s.")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
@@ -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.0.2.0")]
|
||||
[assembly: AssemblyFileVersion("2.0.2.0")]
|
||||
[assembly: AssemblyVersion("2.9.329.0")]
|
||||
[assembly: AssemblyFileVersion("2.9.329.0")]
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Test StartTime: when? Start of flow set or start of real test?
|
||||
@@ -0,0 +1,186 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Results.Entities;
|
||||
|
||||
namespace Results
|
||||
{
|
||||
public class BatchResults
|
||||
{
|
||||
public readonly int WMPositionsCount;
|
||||
|
||||
public IList<Entities.TestData> TestDataList;
|
||||
public IList<Entities.Components> ComponentsList;
|
||||
public IList<Entities.WaterMeterData> WaterMeterDataList;
|
||||
|
||||
private BatchResults(int wmPositionsCount)
|
||||
{
|
||||
WMPositionsCount = wmPositionsCount;
|
||||
|
||||
TestDataList = new List<Entities.TestData>();
|
||||
ComponentsList = new List<Entities.Components>();
|
||||
WaterMeterDataList = new List<Entities.WaterMeterData>();
|
||||
}
|
||||
|
||||
|
||||
public Batch Batch;
|
||||
public WaterMeter[] WaterMeters;
|
||||
|
||||
public static BatchResults NewFromProcedure(int batchNr, int benchId, string user, string programVer,
|
||||
Config.Entities.Procedure procedure,
|
||||
WaterMeterData[] waterMeterDatas, int[] waterMeterParts)
|
||||
{
|
||||
BatchResults d = new BatchResults(waterMeterDatas.Length);
|
||||
int year = DateTime.Now.Year;
|
||||
|
||||
/// Create new batch
|
||||
d.Batch = new Batch()
|
||||
{
|
||||
TestBenchId = benchId,
|
||||
BatchNr = batchNr,
|
||||
ProgramVersion = programVer,
|
||||
UserName = user,
|
||||
ProcedureName = procedure.Name,
|
||||
ProcedureDescription = procedure.Description,
|
||||
WatermetersStr = procedure.Watermeters,
|
||||
ProcedureRevision = procedure.Revision,
|
||||
ProtocolTitle = procedure.ProtocolTitle,
|
||||
StartTime = DateTime.Now,
|
||||
Compound = (procedure.MetersKind == Config.Entities.MetersKind.Combined),
|
||||
#if HEAT_METERS_SUPPORT
|
||||
HeatMeter = (procedure.MetersKind == Config.Entities.MetersKind.HeatMeter),
|
||||
#endif
|
||||
};
|
||||
|
||||
///
|
||||
/// Add watermeter to an array, array index is WM position.
|
||||
/// AddWaterMetersToBatch() has to be used before saving results.
|
||||
///
|
||||
d.WaterMeters = new WaterMeter[d.WMPositionsCount];
|
||||
for (int i = 0; i < d.WMPositionsCount; i++)
|
||||
{
|
||||
if (waterMeterDatas[i] == null) continue;
|
||||
WaterMeterData wmd = WaterMeterData.UpdateList(d.WaterMeterDataList, waterMeterDatas[i]);
|
||||
d.WaterMeters[i] = new WaterMeter()
|
||||
{
|
||||
Batch = d.Batch,
|
||||
WaterMeterData = wmd,
|
||||
WMPosition = i + 1,
|
||||
YearOfProduction = year,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
foreach (var t in procedure.Tests)
|
||||
{
|
||||
if (t.Publish != (byte)Config.Entities.Publish.Never)
|
||||
{
|
||||
TestData td = TestData.UpdateList(d.TestDataList, new TestData(t));
|
||||
|
||||
for (int rnr = 1; rnr <= t.Repeats; rnr++)
|
||||
{
|
||||
/// Create an empty test result and add it to the list
|
||||
TestRslt tr = new TestRslt(d.Batch, td, t.Part, rnr);
|
||||
d.Batch.TestRslts.Add(tr);
|
||||
|
||||
for (int i = 0; i < d.WMPositionsCount; i++)
|
||||
{
|
||||
if (d.WaterMeters[i] == null) continue;
|
||||
|
||||
if (t.Part != 0 && waterMeterParts[i] != 0 && t.Part != waterMeterParts[i]) continue;
|
||||
|
||||
/// Create empty watermeter test results and add them to the list and to dictionaries
|
||||
if (!d.Batch.Compound)
|
||||
{
|
||||
MeterTestRslt mtr = new MeterTestRslt(d.WaterMeters[i], tr, Config.Entities.CompoundMeterId.Single);
|
||||
d.WaterMeters[i].MeterTestRslts.Add(mtr);
|
||||
}
|
||||
else
|
||||
{
|
||||
MeterTestRslt mainMTR = new MeterTestRslt(d.WaterMeters[i], tr, Config.Entities.CompoundMeterId.CompoundMain);
|
||||
d.WaterMeters[i].MeterTestRslts.Add(mainMTR);
|
||||
|
||||
MeterTestRslt auxMTR = new MeterTestRslt(d.WaterMeters[i], tr, Config.Entities.CompoundMeterId.CompoundAux);
|
||||
d.WaterMeters[i].MeterTestRslts.Add(auxMTR);
|
||||
|
||||
MeterTestRslt cmpdMTR = new MeterTestRslt(d.WaterMeters[i], tr, Config.Entities.CompoundMeterId.Compound);
|
||||
d.WaterMeters[i].MeterTestRslts.Add(cmpdMTR);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return d;
|
||||
}
|
||||
|
||||
public static BatchResults FromBatch(Batch batch)
|
||||
{
|
||||
int wmCount = batch.WaterMeters.Count;
|
||||
if (wmCount == 0) return null;
|
||||
|
||||
BatchResults batchResults = new BatchResults(wmCount);
|
||||
batchResults.Batch = batch;
|
||||
batchResults.WaterMeters = new WaterMeter[wmCount];
|
||||
for (int i = 0; i < wmCount; i++) batchResults.WaterMeters[i] = batch.WaterMeters[i];
|
||||
|
||||
return batchResults;
|
||||
}
|
||||
|
||||
public TestRslt GetTestRslt(string name, int part)
|
||||
{
|
||||
return Batch.GetTestRslt(name, part);
|
||||
}
|
||||
|
||||
public MeterTestRslt GetMeterTestRslt(string name, int wmnr0, Config.Entities.CompoundMeterId meterId)
|
||||
{
|
||||
if (WaterMeters[wmnr0] != null)
|
||||
{
|
||||
return WaterMeters[wmnr0].GetMeterTestRslt(name, meterId);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns true when all tests were done
|
||||
/// </summary>
|
||||
/// <returns>true = all tests done</returns>
|
||||
public bool AllTestsDone()
|
||||
{
|
||||
for (int i = 0; i < WMPositionsCount; i++)
|
||||
{
|
||||
if (WaterMeters[i] != null)
|
||||
{
|
||||
foreach (var mtr in WaterMeters[i].MeterTestRslts)
|
||||
{
|
||||
if (!mtr.TestDone) return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Adds non-null water meters from an array to a Batch water meters list.
|
||||
/// This method should be used when results are prepared and
|
||||
/// all disabled water meters are deleted.
|
||||
/// </summary>
|
||||
public void AddWaterMetersToBatch()
|
||||
{
|
||||
for (int i = 0; i < WMPositionsCount; i++)
|
||||
{
|
||||
if (WaterMeters[i] != null)
|
||||
{
|
||||
WaterMeters[i].Passed = WaterMeters[i].PassedFromTests();
|
||||
if (!WaterMeters[i].Disabled)
|
||||
{
|
||||
Batch.WaterMeters.Add(WaterMeters[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Results
|
||||
{
|
||||
public class Class1
|
||||
{
|
||||
}
|
||||
}
|
||||
+257
@@ -0,0 +1,257 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using FluentNHibernate.Cfg;
|
||||
using FluentNHibernate.Cfg.Db;
|
||||
using log4net;
|
||||
using NHibernate;
|
||||
using NHibernate.Cfg;
|
||||
using NHibernate.Tool.hbm2ddl;
|
||||
using Results.Entities;
|
||||
|
||||
namespace Results
|
||||
{
|
||||
public static class DB
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(DB));
|
||||
|
||||
/// <summary> Session factory for all regular sessions, not for CreateEmptyResultsDB(). </summary>
|
||||
public static ISessionFactory SessionFactory;
|
||||
|
||||
/// <summary> Connection string for all sessions </summary>
|
||||
private static string connectionString;
|
||||
///
|
||||
public static string ConnectionString
|
||||
{
|
||||
get { return connectionString; }
|
||||
set { connectionString = value; SessionFactory = null; }
|
||||
}
|
||||
|
||||
/// <summary> Database type (MySQL or SQLite) for all sessions </summary>
|
||||
private static Config.Entities.DBType dbType;
|
||||
///
|
||||
public static Config.Entities.DBType DbType
|
||||
{
|
||||
get { return dbType; }
|
||||
set { dbType = value; SessionFactory = null; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// NHibernate session factory (to create the database session 'SessionFactory')
|
||||
/// </summary>
|
||||
/// <returns>A database session</returns>
|
||||
static ISessionFactory CreateSessionFactory()
|
||||
{
|
||||
return CreateSessionFactory(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// NHibernate session factory (to create the database session 'SessionFactory')
|
||||
/// </summary>
|
||||
/// <param name="createDB">true = Create a new DB, false = Regular DB</param>
|
||||
/// <returns>A database session</returns>
|
||||
public static ISessionFactory CreateSessionFactory(bool createDB)
|
||||
{
|
||||
FluentConfiguration cfg = Fluently.Configure();
|
||||
|
||||
switch (dbType)
|
||||
{
|
||||
default:
|
||||
case Config.Entities.DBType.SQLite:
|
||||
cfg = cfg.Database(SQLiteConfiguration.Standard.UsingFile(connectionString));
|
||||
break;
|
||||
case Config.Entities.DBType.MySql:
|
||||
cfg = cfg.Database(MySQLConfiguration.Standard.ConnectionString(connectionString));
|
||||
break;
|
||||
}
|
||||
|
||||
cfg = cfg.Mappings(m => m.FluentMappings.AddFromAssemblyOf<Entities.WaterMeterData>());
|
||||
|
||||
if (createDB)
|
||||
{
|
||||
return cfg.ExposeConfiguration(BuildSchemaCreate).BuildSessionFactory();
|
||||
}
|
||||
else
|
||||
{
|
||||
return cfg.ExposeConfiguration(BuildSchema).BuildSessionFactory();
|
||||
}
|
||||
}
|
||||
|
||||
static void BuildSchema(Configuration config)
|
||||
{
|
||||
/// This NHibernate tool takes a configuration with mapping info and exports a database schema
|
||||
new SchemaExport(config).SetOutputFile("db_schema");
|
||||
}
|
||||
|
||||
static void BuildSchemaCreate(Configuration config)
|
||||
{
|
||||
/// This NHibernate tool takes a configuration with mapping info and exports a database schema
|
||||
new SchemaExport(config).Create(true, true);
|
||||
}
|
||||
|
||||
/// Create a NHibernate session for the given database
|
||||
public static ISession CreateSession()
|
||||
{
|
||||
if (string.IsNullOrEmpty(connectionString))
|
||||
{
|
||||
throw new Exception("Connection string was not specified");
|
||||
}
|
||||
|
||||
if (SessionFactory == null) SessionFactory = CreateSessionFactory();
|
||||
|
||||
return SessionFactory.OpenSession();
|
||||
}
|
||||
|
||||
|
||||
public static void SaveObject(object obj)
|
||||
{
|
||||
SaveObject(CreateSession(), obj);
|
||||
}
|
||||
///
|
||||
public static void SaveObject(ISession session, object obj)
|
||||
{
|
||||
using (var transaction = session.BeginTransaction())
|
||||
{
|
||||
session.SaveOrUpdate(obj);
|
||||
try { transaction.Commit(); }
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void DeleteObject(object obj)
|
||||
{
|
||||
DeleteObject(CreateSession(), obj);
|
||||
}
|
||||
///
|
||||
public static void DeleteObject(ISession session, object obj)
|
||||
{
|
||||
using (var transaction = session.BeginTransaction())
|
||||
{
|
||||
session.Delete(obj);
|
||||
transaction.Commit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Create an empty users database.
|
||||
/// Database contains only the user 'admin' and the control board component 'CB'.
|
||||
/// </summary>
|
||||
/// <param name="dbType">DBType.SQLite or DBType.MySql</param>
|
||||
/// <param name="connectionString">Connection string</param>
|
||||
/// <returns>true=success, false=error</returns>
|
||||
public static bool CreateEmptyDB()
|
||||
{
|
||||
ISessionFactory sessionFactory = CreateSessionFactory(true);
|
||||
if (sessionFactory == null) return false;
|
||||
|
||||
/// Populate the database
|
||||
using (var session = sessionFactory.OpenSession())
|
||||
{
|
||||
using (var transaction = session.BeginTransaction())
|
||||
{
|
||||
transaction.Commit();
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Shared data
|
||||
/// </summary>
|
||||
public static IList<Entities.TestData> TestDataList;
|
||||
public static IList<Entities.Components> ComponentsList;
|
||||
public static IList<Entities.WaterMeterData> WaterMeterDataList;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Loads shared data from the database
|
||||
/// </summary>
|
||||
/// <exception>Throws NHibernate exceptions</exception>
|
||||
public static void LoadSharedData()
|
||||
{
|
||||
ISession session = DB.CreateSession();
|
||||
|
||||
TestDataList = session.CreateQuery("FROM TestData").List<Entities.TestData>();
|
||||
ComponentsList = session.CreateQuery("FROM Components").List<Entities.Components>();
|
||||
WaterMeterDataList = session.CreateQuery("FROM WaterMeterData").List<Entities.WaterMeterData>();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Update TestData, Components and WaterMeterData fo tests and water meters in batch results
|
||||
/// with existing data in static lists TestDataList, ComponentsList and WaterMeterDataList.
|
||||
/// </summary>
|
||||
/// <param name="batch">Batch results</param>
|
||||
/// <returns>true when any data modiifed</returns>
|
||||
public static bool UpdateBatchData(Entities.Batch batch)
|
||||
{
|
||||
ISession session = DB.CreateSession();
|
||||
|
||||
if (session == null) return false;
|
||||
|
||||
foreach (var tr in batch.TestRslts)
|
||||
{
|
||||
/// Search in TestDataList and update test data in the new batch
|
||||
TestData td = TestData.UpdateList(TestDataList, tr.TestData);
|
||||
tr.TestData = td;
|
||||
|
||||
/// Search in ComponentsList and update components in the new batch
|
||||
Components cd = Components.UpdateList(ComponentsList, tr.Components);
|
||||
tr.Components = cd;
|
||||
}
|
||||
|
||||
foreach (var wm in batch.WaterMeters)
|
||||
{
|
||||
/// Search in WaterMeterDataList and update water meter data in the new batch
|
||||
WaterMeterData wmd = WaterMeterData.UpdateList(WaterMeterDataList, wm.WaterMeterData);
|
||||
wm.WaterMeterData = wmd;
|
||||
}
|
||||
|
||||
return true; /// TODO: Really check for modifications
|
||||
}
|
||||
|
||||
|
||||
public static bool SaveNewBatch(Entities.Batch batch)
|
||||
{
|
||||
ISession session = DB.CreateSession();
|
||||
if (session == null) return false;
|
||||
|
||||
TestDataList = session.CreateQuery("FROM TestData").List<Entities.TestData>();
|
||||
ComponentsList = session.CreateQuery("FROM Components").List<Entities.Components>();
|
||||
WaterMeterDataList = session.CreateQuery("FROM WaterMeterData").List<Entities.WaterMeterData>();
|
||||
|
||||
UpdateBatchData(batch);
|
||||
|
||||
ITransaction transaction = session.BeginTransaction();
|
||||
if (transaction == null) return false;
|
||||
|
||||
try
|
||||
{
|
||||
foreach (var td in TestDataList) if (td.Id == 0) session.SaveOrUpdate(td);
|
||||
foreach (var cd in ComponentsList) if (cd.Id == 0) session.SaveOrUpdate(cd);
|
||||
foreach (var wd in WaterMeterDataList) if (wd.Id == 0) session.SaveOrUpdate(wd);
|
||||
|
||||
session.SaveOrUpdate(batch);
|
||||
|
||||
transaction.Commit();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
transaction.Rollback();
|
||||
log.FatalFormat("Saving results of batch #{0} into the results DB failed: {1}", batch.BatchNr, exc.Message);
|
||||
return false;
|
||||
}
|
||||
|
||||
session.Flush();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Results.Entities
|
||||
{
|
||||
public class Batch
|
||||
{
|
||||
public virtual int Id { get; protected set; }
|
||||
public virtual int BatchNr { get; set; }
|
||||
public virtual int TestBenchId { get; set; }
|
||||
public virtual string ProgramVersion { get; set; }
|
||||
public virtual string UserName { get; set; }
|
||||
public virtual int UserNumber { get; set; }
|
||||
public virtual string ProcedureName { get; set; }
|
||||
public virtual string ProcedureDescription { get; set; } /// CEVAK, not mapped to DB
|
||||
public virtual int ProcedureRevision { get; set; }
|
||||
public virtual string WatermetersStr { get; set; } /// CEVAK, not mapped to DB
|
||||
public virtual string ProtocolTitle { get; set; }
|
||||
public virtual string Remark { get; set; }
|
||||
public virtual float Custom1 { get; set; }
|
||||
public virtual float Custom2 { get; set; }
|
||||
public virtual float Custom3 { get; set; }
|
||||
public virtual DateTime StartTime { get; set; }
|
||||
public virtual DateTime EndTime { get; set; }
|
||||
public virtual bool RsltsSent { get; set; }
|
||||
public virtual bool RsltsPrinted { get; set; }
|
||||
public virtual IList<TestData> Tests { get; set; }
|
||||
public virtual IList<WaterMeter> WaterMeters { get; set; }
|
||||
public virtual IList<TestRslt> TestRslts { get; set; }
|
||||
public virtual bool Compound { get; set; } /// Not mapped to DB now
|
||||
#if HEAT_METERS_SUPPORT
|
||||
public virtual bool HeatMeter { get; set; } /// Not mapped to DB now
|
||||
#endif
|
||||
|
||||
public Batch()
|
||||
{
|
||||
Tests = new List<TestData>();
|
||||
WaterMeters = new List<WaterMeter>();
|
||||
TestRslts = new List<TestRslt>();
|
||||
}
|
||||
|
||||
public virtual float AmbientTempAve()
|
||||
{
|
||||
if (TestRslts.Count == 0) return 0;
|
||||
float sum = 0;
|
||||
foreach (var tr in TestRslts) sum += tr.AmbientTempAve;
|
||||
return sum / TestRslts.Count;
|
||||
}
|
||||
|
||||
public virtual float AmbientPressAve()
|
||||
{
|
||||
if (TestRslts.Count == 0) return 0;
|
||||
float sum = 0;
|
||||
foreach (var tr in TestRslts) sum += tr.AmbientPressAve;
|
||||
return sum / TestRslts.Count;
|
||||
}
|
||||
|
||||
public virtual float AmbientHumiAve()
|
||||
{
|
||||
if (TestRslts.Count == 0) return 0;
|
||||
float sum = 0;
|
||||
foreach (var tr in TestRslts) sum += tr.AmbientHumiAve;
|
||||
return sum / TestRslts.Count;
|
||||
}
|
||||
|
||||
public virtual TestRslt GetTestRslt(string name, int part)
|
||||
{
|
||||
foreach (var tr in TestRslts)
|
||||
{
|
||||
if (part == tr.Part && name.Equals(tr.Name())) return tr;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("Batch #{0}, Start:{1}, End:{2}, Procedure:{3}", BatchNr, StartTime, EndTime, ProcedureName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Results.Entities
|
||||
{
|
||||
public class Components
|
||||
{
|
||||
public virtual int Id { get; protected set; }
|
||||
public virtual int TestBenchId { get; set; }
|
||||
public virtual string TestBenchName { get; set; }
|
||||
public virtual string Pump { get; set; }
|
||||
public virtual string RegValve { get; set; }
|
||||
public virtual string Flowmeter { get; set; }
|
||||
public virtual string Diverter { get; set; }
|
||||
public virtual string Scale { get; set; }
|
||||
public virtual string Custom1 { get; set; }
|
||||
public virtual string Custom2 { get; set; }
|
||||
public virtual string Custom3 { get; set; }
|
||||
|
||||
protected Components()
|
||||
{
|
||||
TestBenchId = 0;
|
||||
TestBenchName = string.Empty;
|
||||
Pump = string.Empty;
|
||||
RegValve = string.Empty;
|
||||
Flowmeter = string.Empty;
|
||||
Diverter = string.Empty;
|
||||
Scale = string.Empty;
|
||||
Custom1 = string.Empty;
|
||||
Custom2 = string.Empty;
|
||||
Custom3 = string.Empty;
|
||||
}
|
||||
|
||||
public Components(int benchId, string benchName, string pump, string flowmeter,
|
||||
string scale, string regValve, string diverter)
|
||||
{
|
||||
TestBenchId = benchId;
|
||||
TestBenchName = benchName;
|
||||
Pump = pump;
|
||||
RegValve = regValve;
|
||||
Flowmeter = flowmeter;
|
||||
Diverter = diverter;
|
||||
Scale = scale;
|
||||
Custom1 = string.Empty;
|
||||
Custom2 = string.Empty;
|
||||
Custom3 = string.Empty;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Method to compare the content of two entities
|
||||
/// </summary>
|
||||
/// <param name="wmd">Second entity to compare with</param>
|
||||
/// <returns>first = two entities are equal (except of Id)</returns>
|
||||
public virtual bool Equals(Components bc)
|
||||
{
|
||||
if (TestBenchId != bc.TestBenchId) return false;
|
||||
if (!TestBenchName.Equals(bc.TestBenchName)) return false;
|
||||
if (!Pump.Equals(bc.Pump)) return false;
|
||||
if (!RegValve.Equals(bc.RegValve)) return false;
|
||||
if (!Flowmeter.Equals(bc.Flowmeter)) return false;
|
||||
if (!Diverter.Equals(bc.Diverter)) return false;
|
||||
if (!Scale.Equals(bc.Scale)) return false;
|
||||
if (!Custom1.Equals(bc.Custom1)) return false;
|
||||
if (!Custom2.Equals(bc.Custom2)) return false;
|
||||
if (!Custom3.Equals(bc.Custom3)) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Adds an item to the list if it does not occur there
|
||||
/// </summary>
|
||||
/// <param name="list">List of items</param>
|
||||
/// <param name="item">Item to add to the list or find there</param>
|
||||
/// <returns>Item from the list (existing or added)</returns>
|
||||
public static Components UpdateList(IList<Components> list, Components item)
|
||||
{
|
||||
if (item == null) return null; /// Null item is not stored in the list
|
||||
|
||||
Components found = list.FirstOrDefault<Components>(x => x.Equals(item));
|
||||
|
||||
if (found != null) return found; /// The same item found in the list, The found item returned
|
||||
|
||||
list.Add(item); /// Item not fund in the list, it is added to the list
|
||||
return item;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
|
||||
namespace Results.Entities
|
||||
{
|
||||
public class MeterTestRslt
|
||||
{
|
||||
public virtual int Id { get; protected set; }
|
||||
|
||||
public virtual byte CompoundMeterId { get; set; } /// 0=single, 1=compound/main, 2=compound/aux., 3=compound/overal
|
||||
public virtual double PulsesMeter { get; set; } /// # of water meter pulses
|
||||
public virtual double PulsesMaster { get; set; } /// # of reference flowmeter pulses (gated by this water meter pulses)
|
||||
public virtual double PulsesPerLiter { get; set; } /// # of water meter pulses per one liter
|
||||
public virtual double VolumeStart { get; set; } /// [l]
|
||||
public virtual double VolumeEnd { get; set; } /// [l]
|
||||
public virtual double VolumeMeter { get; set; } /// [l]
|
||||
public virtual double VolumeRef { get; set; } /// [l]
|
||||
public virtual double TimestampStart { get; set; } /// [s]
|
||||
public virtual double TimestampEnd { get; set; } /// [s]
|
||||
public virtual double TestTime { get; set; } /// [s]
|
||||
public virtual double Error { get; set; } /// [%]
|
||||
public virtual bool TestDone { get; set; } /// true = test was completed
|
||||
public virtual bool Passed { get; set; } /// true = test passed, water meter is OK
|
||||
|
||||
public virtual WaterMeter WaterMeter { get; set; } /// reference to the WaterMeter entity
|
||||
public virtual TestRslt TestRslt { get; set; } /// reference to the TestRslt entity
|
||||
|
||||
/// Wrappers
|
||||
public virtual string Name() { return TestRslt.Name(); }
|
||||
public virtual DateTime StartTime() { return TestRslt.StartTime; }
|
||||
public virtual DateTime EndTime() { return TestRslt.EndTime; }
|
||||
public virtual double FlowSetTime() { return TestRslt.FlowSetTime; } /// [s]
|
||||
public virtual double FlowMass() { return TestRslt.FlowMass; } /// [kg/h]
|
||||
public virtual double FlowVolume() { return TestRslt.FlowVolume; } /// [m3/h]
|
||||
public virtual double ErrorMaster() { return TestRslt.ErrorMaster; } /// [%]
|
||||
public virtual double DensityOut() { return TestRslt.DensityOut; }
|
||||
public virtual Components Components(){ return TestRslt.Components; }
|
||||
///
|
||||
protected virtual TestData TestData() { return TestRslt.TestData; }
|
||||
///
|
||||
public virtual int Repeats() { return TestData().Repeats; }
|
||||
public virtual double Qfrom() { return TestData().Qfrom; } /// [m3/h]
|
||||
public virtual double Qto() { return TestData().Qto; } /// [m3/h]
|
||||
public virtual double TargetVolume() { return TestData().TargetVolume; } /// [l]
|
||||
public virtual double TargetTime() { return TestData().TargetTime; } /// [s]
|
||||
public virtual string Method() { return TestData().Method; }
|
||||
public virtual double ErrLimLo() { return TestData().ErrLimLo; } /// [%]
|
||||
public virtual double ErrLimHi() { return TestData().ErrLimHi; } /// [%]
|
||||
public virtual double Uncertainty() { return TestData().Uncertainty; } /// [%]
|
||||
|
||||
public virtual string ProcedureName() { return WaterMeter.Batch.ProcedureName; }
|
||||
public virtual int BatchNr() { return WaterMeter.Batch.BatchNr; }
|
||||
public virtual string SerialNr() { return WaterMeter.SerialNr; }
|
||||
public virtual string EndState() { return WaterMeter.EndState; }
|
||||
public virtual double QRise() { return WaterMeter.QRise; } /// [m3/h]
|
||||
public virtual double QFall() { return WaterMeter.QFall; } /// [m3/h]
|
||||
|
||||
public virtual bool Evaluate() { return TestData().Evaluate; }
|
||||
public virtual Config.Entities.Publish Publish() { return (Config.Entities.Publish)TestData().Publish; }
|
||||
|
||||
public virtual WaterMeterData WaterMeterData() { return WaterMeter.WaterMeterData; }
|
||||
public virtual Batch Batch() { return WaterMeter.Batch; }
|
||||
|
||||
public virtual string PassedColorStr()
|
||||
{
|
||||
#if PUCHONG_PT200
|
||||
if (!Evaluate()) return Passed ? "OK|White" : "NG|White";
|
||||
else return Passed ? "OK|Green" : "NG|Red";
|
||||
#else
|
||||
if (!Evaluate()) return Passed ? "OK|White" : "NOK|White";
|
||||
else return Passed ? "OK|Green" : "NOK|Red";
|
||||
#endif
|
||||
}
|
||||
|
||||
public MeterTestRslt()
|
||||
{
|
||||
TestDone = false;
|
||||
Passed = false;
|
||||
}
|
||||
|
||||
public MeterTestRslt(WaterMeter waterMeterRslt, TestRslt testRslt, Config.Entities.CompoundMeterId compoundMeterId)
|
||||
: this()
|
||||
{
|
||||
WaterMeter = waterMeterRslt;
|
||||
TestRslt = testRslt;
|
||||
CompoundMeterId = (byte)compoundMeterId;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Results.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Test, consisting of one or more repetitions of the test 'SingleTest'.
|
||||
/// </summary>
|
||||
public class TestData
|
||||
{
|
||||
public virtual int Id { get; protected set; }
|
||||
public virtual string Name { get; set; }
|
||||
public virtual int Repeats { get; set; }
|
||||
public virtual double Qfrom { get; set; } /// [m3/h] flow range low limit
|
||||
public virtual double Qto { get; set; } /// [m3/h] flow range high limit
|
||||
public virtual double TargetVolume { get; set; } /// [l] target test volume
|
||||
public virtual double TargetTime { get; set; } /// [s] target test time
|
||||
public virtual string Method { get; set; }
|
||||
public virtual double ErrLimLo { get; set; } /// [%] (usually < 0)
|
||||
public virtual double ErrLimHi { get; set; } /// [%] (usually > 0)
|
||||
public virtual double Uncertainty { get; set; } /// [%] makes error limits tighter: 0 <= Uncertainty <= abs(ErrLimXx)
|
||||
public virtual sbyte Publish { get; set; } /// 0=no, 1=in all protocols, 2=on screen, 3=internal
|
||||
public virtual bool Evaluate { get; set; }
|
||||
|
||||
|
||||
protected TestData()
|
||||
{
|
||||
Name = string.Empty;
|
||||
Method = string.Empty;
|
||||
}
|
||||
|
||||
public TestData(Config.Entities.Test test)
|
||||
: this()
|
||||
{
|
||||
Name = test.Name;
|
||||
Repeats = test.Repeats;
|
||||
Qfrom = (double)test.Qfrom;
|
||||
Qto = (double)test.Qto;
|
||||
TargetVolume = (double)test.Volume;
|
||||
TargetTime = (double)test.TstTime;
|
||||
Method = test.Method;
|
||||
ErrLimLo = (double)test.ErrLimLo;
|
||||
ErrLimHi = (double)test.ErrLimHi;
|
||||
Uncertainty = (double)test.Uncertainty;
|
||||
Publish = test.Publish;
|
||||
Evaluate = test.Evaluate;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Method to compare the content of two entities
|
||||
/// </summary>
|
||||
/// <param name="wmd">Second entity to compare with</param>
|
||||
/// <returns>first = two entities are equal (except of Id)</returns>
|
||||
public virtual bool Equals(TestData td)
|
||||
{
|
||||
if (!Name.Equals(td.Name)) return false;
|
||||
if (Repeats != td.Repeats) return false;
|
||||
if (Qfrom != td.Qfrom) return false;
|
||||
if (Qto != td.Qto) return false;
|
||||
if (TargetVolume != td.TargetVolume) return false;
|
||||
if (TargetTime != td.TargetTime) return false;
|
||||
if (!Method.Equals(td.Method)) return false;
|
||||
if (ErrLimLo != td.ErrLimLo) return false;
|
||||
if (ErrLimHi != td.ErrLimHi) return false;
|
||||
if (Uncertainty != td.Uncertainty) return false;
|
||||
if (Publish != td.Publish) return false;
|
||||
if (Evaluate != td.Evaluate) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Adds an item to the list if it does not occur there
|
||||
/// </summary>
|
||||
/// <param name="list">List of items</param>
|
||||
/// <param name="item">Item to add to the list or find there</param>
|
||||
/// <returns>Item from the list (existing or added)</returns>
|
||||
public static TestData UpdateList(IList<TestData> list, TestData item)
|
||||
{
|
||||
if (item == null) return null; /// Null item is not stored in the list
|
||||
|
||||
TestData found = list.FirstOrDefault<TestData>(x => x.Equals(item));
|
||||
|
||||
if (found != null) return found; /// The same item found in the list, The found item returned
|
||||
|
||||
list.Add(item); /// Item not fund in the list, it is added to the list
|
||||
return item;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Results.Entities
|
||||
{
|
||||
public class TestRslt
|
||||
{
|
||||
/// Identity
|
||||
public virtual int Id { get; protected set; }
|
||||
public virtual Batch Batch { get; set; }
|
||||
public virtual TestData TestData { get; set; }
|
||||
public virtual Components Components { get; set; }
|
||||
public virtual int Part { get; set; }
|
||||
public virtual int RepetitionNr { get; set; } /// Repetition number from the set of repeated tests (1...)
|
||||
|
||||
/// Main results
|
||||
public virtual DateTime StartTime { get; set; } /// Date and time of the test start
|
||||
public virtual DateTime EndTime { get; set; } /// Date and time of the test end
|
||||
public virtual int FlowSetTime { get; set; } /// [s] Measurement time in seconds
|
||||
public virtual double TestTime { get; set; } /// [s] Measurement time in seconds
|
||||
public virtual double PulsesMaster { get; set; }
|
||||
public virtual double ConstMaster { get; set; } /// [pls/l] Pulses per liter master flow meter
|
||||
public virtual double MassStartRaw { get; set; } /// [kg]
|
||||
public virtual double MassStart { get; set; } /// [kg]
|
||||
public virtual double MassEndRaw { get; set; } /// [kg]
|
||||
public virtual double MassEnd { get; set; } /// [kg]
|
||||
public virtual double DensityIn { get; set; } /// [kg/m3]
|
||||
public virtual double DensityOut { get; set; } /// [kg/m3]
|
||||
public virtual double DensityDiv { get; set; } /// [kg/m3]
|
||||
public virtual double Buoyancy { get; set; }
|
||||
public virtual double FlowMass { get; set; } /// [kg/h] calculated from conventional true value
|
||||
public virtual double FlowVolume { get; set; } ///![m3/h]
|
||||
public virtual double VolumeCTV { get; set; } /// [l] Volume conventional true value
|
||||
public virtual double VolumeMaster { get; set; } /// [l] Volume from the master flow meter
|
||||
public virtual double ErrorMaster { get; set; } /// [%]
|
||||
|
||||
/// Auxiliary results
|
||||
public virtual float AmbientTempAve { get; set; } /// [deg.C] Average ambient air temperature
|
||||
public virtual float AmbientPressAve { get; set; } /// Average ambient air pressure
|
||||
public virtual float AmbientHumiAve { get; set; } /// [%] Average ambient air relative humidity
|
||||
public virtual float PressUpAvrg { get; set; } /// [Bar] Input water pressure (average)
|
||||
public virtual float PressUpStart { get; set; } /// [Bar]
|
||||
public virtual float PressUpEnd { get; set; } /// [Bar]
|
||||
public virtual float PressUpMin { get; set; } /// [Bar]
|
||||
public virtual float PressUpMax { get; set; } /// [Bar]
|
||||
public virtual float PressDownAvrg { get; set; } /// [Bar]
|
||||
public virtual float PressDownStart { get; set; } /// [Bar]
|
||||
public virtual float PressDownEnd { get; set; } /// [Bar]
|
||||
public virtual float PressDownMin { get; set; } /// [Bar]
|
||||
public virtual float PressDownMax { get; set; } /// [Bar]
|
||||
public virtual float TempInAvrg { get; set; } /// [deg.C]
|
||||
public virtual float TempInStart { get; set; } /// [deg.C]
|
||||
public virtual float TempInEnd { get; set; } /// [deg.C]
|
||||
public virtual float TempInMin { get; set; } /// [deg.C]
|
||||
public virtual float TempInMax { get; set; } /// [deg.C]
|
||||
public virtual float TempOutAvrg { get; set; } /// [deg.C]
|
||||
public virtual float TempOutStart { get; set; } /// [deg.C]
|
||||
public virtual float TempOutEnd { get; set; } /// [deg.C]
|
||||
public virtual float TempOutMin { get; set; } /// [deg.C]
|
||||
public virtual float TempOutMax { get; set; } /// [deg.C]
|
||||
public virtual float TempDivAvrg { get; set; } /// [deg.C]
|
||||
public virtual float TempDivStart { get; set; } /// [deg.C]
|
||||
public virtual float TempDivEnd { get; set; } /// [deg.C]
|
||||
public virtual float TempDivMin { get; set; } /// [deg.C]
|
||||
public virtual float TempDivMax { get; set; } /// [deg.C]
|
||||
public virtual float FlowMin { get; set; } /// [kg/m3] minimum flow
|
||||
public virtual float FlowMax { get; set; } /// [kg/m3] maximum flow
|
||||
|
||||
public virtual float Custom1 { get; set; }
|
||||
public virtual float Custom2 { get; set; }
|
||||
public virtual float Custom3 { get; set; }
|
||||
public virtual float Custom4 { get; set; }
|
||||
public virtual float Custom5 { get; set; }
|
||||
public virtual float Custom6 { get; set; }
|
||||
public virtual float Custom7 { get; set; }
|
||||
public virtual float Custom8 { get; set; }
|
||||
|
||||
/// Wrappers
|
||||
public virtual string Name() { return Utils.GetTestName(TestData.Name, TestData.Repeats, RepetitionNr); }
|
||||
public virtual int Repeats() { return TestData.Repeats; }
|
||||
public virtual double Qfrom() { return TestData.Qfrom; }
|
||||
public virtual double Qto() { return TestData.Qto; }
|
||||
public virtual double TargetVolume() { return TestData.TargetVolume; }
|
||||
public virtual double TargetTime() { return TestData.TargetTime; }
|
||||
public virtual string Method() { return TestData.Method; }
|
||||
public virtual double ErrLimLo() { return TestData.ErrLimLo; }
|
||||
public virtual double ErrLimHi() { return TestData.ErrLimHi; }
|
||||
public virtual double Uncertainty() { return TestData.Uncertainty; }
|
||||
public virtual bool Evaluate() { return TestData.Evaluate; }
|
||||
public virtual Config.Entities.Publish Publish() { return (Config.Entities.Publish)TestData.Publish; }
|
||||
|
||||
|
||||
protected TestRslt()
|
||||
{
|
||||
}
|
||||
|
||||
public TestRslt(Batch batch, TestData testData, int part, int repetitionNr)
|
||||
: this()
|
||||
{
|
||||
Batch = batch;
|
||||
TestData = testData;
|
||||
Part = part;
|
||||
RepetitionNr = repetitionNr;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("batch={0}, procedure={1}, test={2}, {3} {4}", Batch.BatchNr, Batch.ProcedureName, Name(), StartTime.ToShortDateString(), StartTime.ToShortTimeString());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Config.Entities;
|
||||
|
||||
namespace Results.Entities
|
||||
{
|
||||
public class WaterMeter
|
||||
{
|
||||
public virtual int Id { get; protected set; }
|
||||
public virtual string SerialNr { get; set; } /// Main s/n for compound meters, PCB Number for iPerl water meter
|
||||
public virtual string SerialNrAux { get; set; } /// Aux s/n for compound meters, Serial number for iPerl water meter
|
||||
public virtual string PurchaseOrder { get; set; }
|
||||
public virtual int YearOfProduction { get; set; }
|
||||
public virtual int WMPosition { get; set; }
|
||||
public virtual string EndState { get; set; } /// End state (of the main water meter)
|
||||
public virtual string EndStateAux { get; set; } /// End state of the auxiliary water meter
|
||||
public virtual double QRise { get; set; } ///![m3/h] detected Q_rise of a composed meter
|
||||
public virtual double QFall { get; set; } ///![m3/h] detected Q_fall of a composed meter
|
||||
public virtual bool Passed { get; set; }
|
||||
public virtual int ResultCode { get; set; }
|
||||
|
||||
#if IPERLST || IPERLST_SPECIAL
|
||||
public virtual int SerialNrEx { get; set; } /// Aux s/n for compound meters, Serial number for iPerl water meter
|
||||
public virtual double OrigCalibFactor { get; set; } /// iPerl calibration factor used during the test
|
||||
public virtual double CalibFactor { get; set; } /// iPerl calibration factor used during the test
|
||||
public virtual double Q2ErrWOCorrection { get; set; }
|
||||
public virtual bool Q2CorrectionDone { get; set; } /// true = iPerl Q2 correction was done
|
||||
public virtual double Q2Correction { get; set; } /// iPerl Q2 correction used during the test
|
||||
public virtual int Q2CorrFlowRight { get; set; } /// 1 = right to left
|
||||
public virtual double Diff2Hz8Hz { get; set; }
|
||||
public virtual bool Hz2CorrectionDone { get; set; } /// true = iPerl Q2 correction was done
|
||||
public virtual int Hz2Correction { get; set; } /// iPerl Q2 correction used during the test
|
||||
public virtual int Pruefindex { get; set; } /// Not mapped to DB !!! 0=unknown (saving to Oracle failed), >=1 ... pruefindex
|
||||
public virtual int HydrPruefung { get; set; } /// Not mapped to DB !!!
|
||||
#endif
|
||||
public virtual WaterMeterData WaterMeterData { get; set; }
|
||||
public virtual Batch Batch { get; set; }
|
||||
public virtual IList<MeterTestRslt> MeterTestRslts { get; set; }
|
||||
|
||||
///
|
||||
/// Wrappers
|
||||
///
|
||||
public virtual string ProductName() { return ((WaterMeterData == null) || string.IsNullOrEmpty(WaterMeterData.ProductName)) ? string.Empty : WaterMeterData.ProductName; }
|
||||
public virtual string Producer() { return WaterMeterData.Producer; }
|
||||
public virtual string MetrologicalClass() { return WaterMeterData.MetrologicalClass; }
|
||||
public virtual string ApprovalInfo() { return WaterMeterData.ApprovalInfo; }
|
||||
public virtual double Q4_Qmax() { return WaterMeterData.Q4_Qmax; }
|
||||
public virtual double Q3_Qn() { return WaterMeterData.Q3_Qn; }
|
||||
public virtual double Q2_Qt() { return WaterMeterData.Q2_Qt; }
|
||||
public virtual double Q1_Qmin() { return WaterMeterData.Q1_Qmin; }
|
||||
|
||||
public virtual bool Compound() { return WaterMeterData.Compound; }
|
||||
#if HEAT_METER_SUPPORT
|
||||
public virtual bool HeatMeter() { return WaterMeterData.HeatMeter; }
|
||||
#endif
|
||||
|
||||
public virtual string ProducerAux() { return WaterMeterData.ProducerAux; }
|
||||
public virtual double Q3_Qn_Aux() { return WaterMeterData.Q3_Qn_Aux; }
|
||||
public virtual string MetrologicalClassAux() { return WaterMeterData.MetrologicalClassAux; }
|
||||
public virtual string ApprovalInfoAux() { return WaterMeterData.ApprovalInfoAux; }
|
||||
|
||||
public virtual int BatchNr() { return Batch.BatchNr; }
|
||||
public virtual int BenchId() { return Batch.TestBenchId; }
|
||||
public virtual string ProcedureName() { return Batch.ProcedureName; }
|
||||
public virtual int ProcedureRevision() { return Batch.ProcedureRevision; }
|
||||
public virtual DateTime StartTime() { return Batch.StartTime; }
|
||||
public virtual DateTime EndTime() { return Batch.EndTime; }
|
||||
|
||||
protected MeterTestRslt lastMeterTestRslts;
|
||||
public virtual MeterTestRslt LastMeterTestRslts() { return lastMeterTestRslts; }
|
||||
|
||||
|
||||
public virtual bool PassedFromTests()
|
||||
{
|
||||
bool passed = true;
|
||||
foreach (var mtr in MeterTestRslts)
|
||||
{
|
||||
if (mtr.Evaluate() && (!mtr.Passed || !mtr.TestDone))
|
||||
{
|
||||
passed = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return passed;
|
||||
}
|
||||
|
||||
///
|
||||
/// Not mapped to the database
|
||||
///
|
||||
public virtual bool Disabled { get; set; } /// true = Disabled water meters (not saved into DB)
|
||||
|
||||
|
||||
public virtual MeterTestRslt GetMeterTestRslt(string testName)
|
||||
{
|
||||
return GetMeterTestRslt(testName, CompoundMeterId.Single);
|
||||
}
|
||||
|
||||
public virtual MeterTestRslt GetMeterTestRslt(string testName, Config.Entities.CompoundMeterId meterId)
|
||||
{
|
||||
if (Disabled) return null;
|
||||
string testNameL = testName.ToLower();
|
||||
foreach (var mtr in MeterTestRslts)
|
||||
{
|
||||
if ((mtr.CompoundMeterId == (byte)meterId) && mtr.Name().ToLower().Equals(testNameL))
|
||||
{
|
||||
return mtr;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual TestRslt GetTestRslt(string testName)
|
||||
{
|
||||
MeterTestRslt mtr = GetMeterTestRslt(testName);
|
||||
if (mtr != null) return mtr.TestRslt;
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Constructor, initializes a list, used as a base for other constructors
|
||||
/// </summary>
|
||||
public WaterMeter()
|
||||
{
|
||||
MeterTestRslts = new List<MeterTestRslt>();
|
||||
}
|
||||
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder(80);
|
||||
#if IPERLST || IPERLST_SPECIAL
|
||||
sb.AppendFormat("PCB:{0} S/N:{1} ", SerialNr, SerialNrEx);
|
||||
#else
|
||||
sb.AppendFormat("S/N:{0} ", SerialNr);
|
||||
#endif
|
||||
|
||||
foreach (var tr in MeterTestRslts) sb.AppendFormat(" {0}:{1}%", tr.Name(), tr.Error.ToString("F2"));
|
||||
sb.AppendFormat(" test start: {0} {1} batch={2}", StartTime().ToShortDateString(), StartTime().ToShortTimeString(), BatchNr());
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Results.Entities
|
||||
{
|
||||
public class WaterMeterData
|
||||
{
|
||||
public virtual int Id { get; protected set; }
|
||||
|
||||
public virtual string ProductName { get; set; }
|
||||
public virtual string Producer { get; set; }
|
||||
|
||||
public virtual double DN { get; set; } /// [mm]
|
||||
public virtual double L { get; set; } /// [mm]
|
||||
public virtual Config.Entities.Mounting Mounting { get; set; } /// H / V / S / F
|
||||
|
||||
public virtual double Q4_Qmax { get; set; } /// [m3/h]
|
||||
public virtual double Q3_Qn { get; set; } /// [m3/h]
|
||||
public virtual double Q2_Qt { get; set; } /// [m3/h]
|
||||
public virtual double Q1_Qmin { get; set; } /// [m3/h]
|
||||
|
||||
public virtual string MetrologicalClass { get; set; }
|
||||
public virtual Config.Entities.TemperatureClass TemperatureClass { get; set; }
|
||||
public virtual Config.Entities.PressureLossClass PressureLossClass { get; set; }
|
||||
public virtual Config.Entities.MaxAdmissiblePressure MaxAdmissiblePressure { get; set; }
|
||||
public virtual Config.Entities.FlowProfileSensitivityClass FlowProfileSensitivityClass { get; set; }
|
||||
|
||||
public virtual string ApprovalInfo { get; set; }
|
||||
public virtual string Certificate { get; set; }
|
||||
|
||||
public virtual double PulsesPerLtr { get; set; }
|
||||
|
||||
/// Concerns compound water meters
|
||||
public virtual string ProducerAux { get; set; }
|
||||
public virtual double Q3_Qn_Aux { get; set; } /// [m3/h]
|
||||
public virtual string MetrologicalClassAux { get; set; }
|
||||
public virtual string ApprovalInfoAux { get; set; }
|
||||
|
||||
public virtual string Text1 { get; set; }
|
||||
public virtual string Text2 { get; set; }
|
||||
public virtual string Text3 { get; set; }
|
||||
public virtual string Text4 { get; set; }
|
||||
public virtual string Text5 { get; set; }
|
||||
|
||||
public virtual bool Compound { get; set; }
|
||||
#if HEAT_METER_SUPPORT
|
||||
public virtual bool HeatMeter { get; set; }
|
||||
#endif
|
||||
#if IPERLST || IPERLST_SPECIAL
|
||||
public virtual int WMTypeId { get; set; }
|
||||
#endif
|
||||
|
||||
public WaterMeterData()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Method to compare the content of two entities
|
||||
/// </summary>
|
||||
/// <param name="wmd">Second entity to compare with</param>
|
||||
/// <returns>first = two entities are equal (except of Id)</returns>
|
||||
public virtual bool Equals(WaterMeterData wmd)
|
||||
{
|
||||
if (!ProductName.Equals(wmd.ProductName)) return false;
|
||||
if (!Producer.Equals(wmd.Producer)) return false;
|
||||
|
||||
if (DN != wmd.DN) return false;
|
||||
if (L != wmd.L) return false;
|
||||
if (Mounting != wmd.Mounting) return false;
|
||||
|
||||
if (Q4_Qmax != wmd.Q4_Qmax) return false;
|
||||
if (Q3_Qn != wmd.Q3_Qn) return false;
|
||||
if (Q2_Qt != wmd.Q2_Qt) return false;
|
||||
if (Q1_Qmin != wmd.Q1_Qmin) return false;
|
||||
|
||||
if (!MetrologicalClass.Equals(wmd.MetrologicalClass)) return false;
|
||||
if (!TemperatureClass.Equals(wmd.TemperatureClass)) return false;
|
||||
if (!PressureLossClass.Equals(wmd.PressureLossClass)) return false;
|
||||
if (!MaxAdmissiblePressure.Equals(wmd.MaxAdmissiblePressure)) return false;
|
||||
if (!FlowProfileSensitivityClass.Equals(wmd.FlowProfileSensitivityClass)) return false;
|
||||
|
||||
if (!ApprovalInfo.Equals(wmd.ApprovalInfo)) return false;
|
||||
if (Certificate != wmd.Certificate) return false;
|
||||
|
||||
if (PulsesPerLtr != wmd.PulsesPerLtr) return false;
|
||||
|
||||
if (ProducerAux != wmd.ProducerAux) return false;
|
||||
if (Q3_Qn_Aux != wmd.Q3_Qn_Aux) return false;
|
||||
if (MetrologicalClassAux != wmd.MetrologicalClassAux) return false;
|
||||
if (ApprovalInfoAux != wmd.ApprovalInfoAux) return false;
|
||||
|
||||
if (Text1 != wmd.Text1) return false;
|
||||
if (Text2 != wmd.Text2) return false;
|
||||
if (Text3 != wmd.Text3) return false;
|
||||
if (Text4 != wmd.Text4) return false;
|
||||
if (Text5 != wmd.Text5) return false;
|
||||
|
||||
if (Compound != wmd.Compound) return false;
|
||||
|
||||
#if IPERLST || IPERLST_SPECIAL
|
||||
if (WMTypeId != wmd.WMTypeId) return false;
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Adds an item to the list if it does not occur there
|
||||
/// </summary>
|
||||
/// <param name="list">List of items</param>
|
||||
/// <param name="item">Item to add to the list or find there</param>
|
||||
/// <returns>Item from the list (existing or added)</returns>
|
||||
public static WaterMeterData UpdateList(IList<WaterMeterData> list, WaterMeterData item)
|
||||
{
|
||||
if (item == null) return null; /// Null item is not stored in the list
|
||||
|
||||
WaterMeterData found = list.FirstOrDefault<WaterMeterData>(x => x.Equals(item));
|
||||
|
||||
if (found != null) return found; /// The same item found in the list, The found item returned
|
||||
|
||||
list.Add(item); /// Item not fund in the list, it is added to the list
|
||||
return item;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,113 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Config.Entities;
|
||||
|
||||
namespace Results.Entities
|
||||
{
|
||||
public class WaterMeterResult
|
||||
{
|
||||
/// Set only once, used as a reference in some getters
|
||||
private readonly MeterTestResult firstMeterTestResult;
|
||||
|
||||
///
|
||||
/// Hard water meter data
|
||||
///
|
||||
public string SerialNr; /// iPerl : This is PCB Number
|
||||
public int SerialNrEx; /// iPerl : This is the serial number assigned later
|
||||
public int BenchId;
|
||||
public int BatchNr { get { return firstMeterTestResult.TestResult.BatchNr; } }
|
||||
public string ProcedureName { get { return firstMeterTestResult.TestResult.ProcedureName; } }
|
||||
public DateTime TestStart;
|
||||
public DateTime TestEnd;
|
||||
public IList<MeterTestResult> MeterTestResults;
|
||||
|
||||
///
|
||||
/// Soft water meter data
|
||||
///
|
||||
public string Type;
|
||||
public string TypeApproval;
|
||||
public string MetrologicalClass;
|
||||
public string ProtocolTitle { get { return firstMeterTestResult.TestResult.ProtocolTitle; } }
|
||||
public string PurchaseOrder;
|
||||
|
||||
|
||||
public TestResult TestResult(string testName)
|
||||
{
|
||||
foreach (var tr in MeterTestResults)
|
||||
{
|
||||
if (tr.TestResult.TestName.ToLower().Equals(testName.ToLower())) return tr.TestResult;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public MeterTestResult MeterTestResult(string testName)
|
||||
{
|
||||
foreach (var tr in MeterTestResults)
|
||||
{
|
||||
if (tr.TestResult.TestName.ToLower().Equals(testName.ToLower())) return tr;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Private constructor, initializes a list, used as a base
|
||||
/// </summary>
|
||||
private WaterMeterResult()
|
||||
{
|
||||
MeterTestResults = new List<MeterTestResult>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor used to construct WaterMeterResults from the first meter test result
|
||||
/// </summary>
|
||||
public WaterMeterResult(MeterTestResult meterTestResult, int benchId)
|
||||
: this()
|
||||
{
|
||||
if (meterTestResult == null) throw new Exception("meterTestResult cannot be null");
|
||||
MeterTestResults.Add(firstMeterTestResult = meterTestResult);
|
||||
|
||||
SerialNr = meterTestResult.SerialNr;
|
||||
BenchId = (benchId == 5) ? 20033 : ((benchId == 6) ? 20034 : 0);
|
||||
TestStart = meterTestResult.TestResult.TimeStart;
|
||||
TestEnd = meterTestResult.TestResult.TimeEnd;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Function to append result to a list of results and update start/end dates
|
||||
/// </summary>
|
||||
public void Append(MeterTestResult meterTestResult)
|
||||
{
|
||||
MeterTestResults.Add(meterTestResult);
|
||||
if (meterTestResult.TestResult.TimeStart < TestStart) TestStart = meterTestResult.TestResult.TimeStart;
|
||||
if (meterTestResult.TestResult.TimeEnd > TestEnd) TestEnd = meterTestResult.TestResult.TimeEnd;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns 'tests passed' information based on so far appended results
|
||||
/// </summary>
|
||||
public bool Passed()
|
||||
{
|
||||
bool passed = true;
|
||||
foreach (var tr in MeterTestResults)
|
||||
{
|
||||
if (tr.TestResult.DoNotEvaluate) continue;
|
||||
if (tr.VolumeErrorPct < tr.TestResult.ErrLimLo || tr.VolumeErrorPct > tr.TestResult.ErrLimHi) passed = false;
|
||||
}
|
||||
return passed;
|
||||
}
|
||||
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder(80);
|
||||
sb.AppendFormat("PCB:{0} s/n:{1} ", SerialNr, SerialNrEx);
|
||||
|
||||
foreach (var tr in MeterTestResults) sb.AppendFormat(" {0}:{1}%", tr.TestResult.TestName, tr.VolumeErrorPct.ToString("F1"));
|
||||
sb.AppendFormat(" test start: {0} {1} batch={2}", TestStart.ToShortDateString(), TestStart.ToShortTimeString(), BatchNr);
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Results.Entities;
|
||||
|
||||
namespace Results
|
||||
{
|
||||
public class ItemSpec
|
||||
{
|
||||
///
|
||||
/// Public fields
|
||||
///
|
||||
public readonly string Name; /// Name-s of all items must be unique
|
||||
public readonly string ClmnHeaderText; /// Text printed in the column header
|
||||
|
||||
|
||||
///
|
||||
/// Function to pick a MeterTestResult field and convert it into a string
|
||||
///
|
||||
public delegate string PrintDlgt(MeterTestRslt meterTestRslt);
|
||||
|
||||
private readonly PrintDlgt printDlgt;
|
||||
|
||||
public bool CanPrintSingle { get { return (printDlgt != null); } }
|
||||
|
||||
/// <summary> Safe wrapper which replaces null-s by empty strings </summary>
|
||||
public string Print(MeterTestRslt meterTestRslt)
|
||||
{
|
||||
string str = printDlgt(meterTestRslt);
|
||||
return (str == null) ? string.Empty : str;
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Function to pick a MeterTestResult field and convert it into a string
|
||||
///
|
||||
public delegate string PrintCombinedDlgt(MeterTestRslt mainMtrTestResult,
|
||||
MeterTestRslt auxMtrTestResult,
|
||||
MeterTestRslt compoundMtrTestResult);
|
||||
|
||||
private readonly PrintCombinedDlgt printCombinedDlgt;
|
||||
|
||||
public bool CanPrintCombined { get { return (printCombinedDlgt != null); } }
|
||||
|
||||
/// <summary> Safe wrapper which replaces null-s by empty strings </summary>
|
||||
public string PrintCombined(MeterTestRslt mainMtrTestResult,
|
||||
MeterTestRslt auxMtrTestResult,
|
||||
MeterTestRslt compoundMtrTestResult)
|
||||
{
|
||||
string str = printCombinedDlgt(mainMtrTestResult, auxMtrTestResult, compoundMtrTestResult);
|
||||
return (str == null) ? string.Empty : str;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///
|
||||
/// Public constructor
|
||||
///
|
||||
public ItemSpec(string name, string clmnHeaderText, PrintDlgt printDlgt, PrintCombinedDlgt printCombinedDlgt)
|
||||
{
|
||||
Name = name;
|
||||
ClmnHeaderText = clmnHeaderText;
|
||||
this.printDlgt = printDlgt;
|
||||
this.printCombinedDlgt = printCombinedDlgt;
|
||||
}
|
||||
|
||||
|
||||
/// Static list of all available items
|
||||
public static readonly IList<ItemSpec> AllItems;
|
||||
|
||||
/// Static constructor that initializes the list of all items
|
||||
static ItemSpec()
|
||||
{
|
||||
AllItems = new List<ItemSpec>();
|
||||
|
||||
/// Common
|
||||
|
||||
//AllItems.Add(new ResultItemSpec("Bench ID", "Bench ID", x => x.BenchID,
|
||||
// (x, y, z) => x.BenchID));
|
||||
AllItems.Add(new ItemSpec("Test name", "Test", x => x.Name(), (x, y, z) => z.Name()));
|
||||
AllItems.Add(new ItemSpec("Procedure name", "Procedure", x => x.ProcedureName(), (x, y, z) => z.ProcedureName()));
|
||||
AllItems.Add(new ItemSpec("Batch number", "Batch nr.", x => x.BatchNr().ToString(), (x, y, z) => z.BatchNr().ToString()));
|
||||
AllItems.Add(new ItemSpec("Test method", "Test method", x => x.Method(), (x, y, z) => z.Method()));
|
||||
AllItems.Add(new ItemSpec("Density", "Density", x => x.DensityOut().ToString("F1"), (x, y, z) => z.DensityOut().ToString("F1"))); /// [kg/m3]
|
||||
|
||||
/// Target values
|
||||
AllItems.Add(new ItemSpec("Q from", "Q from [m3/h]", x => x.Qfrom().ToString("F3"), (x, y, z) => z.Qfrom().ToString("F3")));
|
||||
AllItems.Add(new ItemSpec("Q to", "Q to [m3/h]", x => x.Qto().ToString("F3"), (x, y, z) => z.Qto().ToString("F3")));
|
||||
AllItems.Add(new ItemSpec("Test volume", "Test vol. [l]", x => x.TargetVolume().ToString("F1"),(x, y, z) => z.TargetVolume().ToString("F1")));
|
||||
AllItems.Add(new ItemSpec("Error limit Lo", "Err.Lim.Lo [%]", x => x.ErrLimLo().ToString("F1"), (x, y, z) => z.ErrLimLo().ToString("F1")));
|
||||
AllItems.Add(new ItemSpec("Error limit Hi", "Err.Lim.Hi [%]", x => x.ErrLimHi().ToString("F1"), (x, y, z) => z.ErrLimHi().ToString("F1")));
|
||||
AllItems.Add(new ItemSpec("Uncertainty", "Uncertainty [%]",x => x.Uncertainty().ToString("F2"), (x, y, z) => z.Uncertainty().ToString("F2")));
|
||||
|
||||
/// Test results
|
||||
AllItems.Add(new ItemSpec("Start time", "T start", x => x.StartTime().ToShortTimeString(), (x, y, z) => z.StartTime().ToShortTimeString()));
|
||||
AllItems.Add(new ItemSpec("End time", "T end", x => x.EndTime().ToShortTimeString(), (x, y, z) => z.EndTime().ToShortTimeString()));
|
||||
AllItems.Add(new ItemSpec("Test time", "T [s]", x => x.TestTime.ToString("F2"), (x, y, z) => z.TestTime.ToString("F2")));
|
||||
AllItems.Add(new ItemSpec("Flow", "Flow [m3/h]", x => DoubleToStr(x.FlowVolume(), 4), (x, y, z) => DoubleToStr(z.FlowVolume(), 4)));
|
||||
AllItems.Add(new ItemSpec("T in", "T in", x => x.TestRslt.TempInAvrg.ToString("F2"), (x, y, z) => z.TestRslt.TempInAvrg.ToString("F2")));
|
||||
AllItems.Add(new ItemSpec("T out", "T out", x => x.TestRslt.TempOutAvrg.ToString("F2"), (x, y, z) => z.TestRslt.TempOutAvrg.ToString("F2")));
|
||||
AllItems.Add(new ItemSpec("T div", "T div", x => x.TestRslt.TempDivAvrg.ToString("F2"), (x, y, z) => z.TestRslt.TempDivAvrg.ToString("F2")));
|
||||
AllItems.Add(new ItemSpec("P up", "P up", x => x.TestRslt.PressUpAvrg.ToString("F3"), (x, y, z) => z.TestRslt.PressUpAvrg.ToString("F3")));
|
||||
AllItems.Add(new ItemSpec("P up start", "P up start", x => x.TestRslt.PressUpStart.ToString("F3"), (x, y, z) => z.TestRslt.PressUpStart.ToString("F3")));
|
||||
AllItems.Add(new ItemSpec("P up end", "P up end", x => x.TestRslt.PressUpEnd.ToString("F3"), (x, y, z) => z.TestRslt.PressUpEnd.ToString("F3")));
|
||||
AllItems.Add(new ItemSpec("P down", "P down", x => x.TestRslt.PressDownAvrg.ToString("F3"), (x, y, z) => z.TestRslt.PressDownAvrg.ToString("F3")));
|
||||
AllItems.Add(new ItemSpec("P down start", "P down start", x => x.TestRslt.PressDownStart.ToString("F3"), (x, y, z) => z.TestRslt.PressDownStart.ToString("F3")));
|
||||
AllItems.Add(new ItemSpec("P down end", "P down end", x => x.TestRslt.PressDownEnd.ToString("F3"), (x, y, z) => z.TestRslt.PressDownEnd.ToString("F3")));
|
||||
AllItems.Add(new ItemSpec("Reference error","Err.ref. [%]", x => x.TestRslt.ErrorMaster.ToString("F3"), (x, y, z) => z.TestRslt.ErrorMaster.ToString("F3")));
|
||||
AllItems.Add(new ItemSpec("Ambient temperature","T amb", x => x.TestRslt.AmbientTempAve.ToString("F1"), (x, y, z) => z.TestRslt.AmbientTempAve.ToString("F1")));
|
||||
AllItems.Add(new ItemSpec("Ambient pressure", "P amb", x => x.TestRslt.AmbientPressAve.ToString("F0"), (x, y, z) => z.TestRslt.AmbientPressAve.ToString("F0")));
|
||||
AllItems.Add(new ItemSpec("Ambient humidity", "H amb [%]",x => x.TestRslt.AmbientHumiAve.ToString("F1"), (x, y, z) => z.TestRslt.AmbientHumiAve.ToString("F1")));
|
||||
|
||||
/// Single and combined meter results
|
||||
AllItems.Add(new ItemSpec("Volume", "Volume [l]", x => x.VolumeMeter.ToString("F3"), (x, y, z) => z.VolumeMeter.ToString("F3")));
|
||||
AllItems.Add(new ItemSpec("Reference volume", "Vol.ref. [l]", x => x.VolumeRef.ToString("F3"), (x, y, z) => z.VolumeRef.ToString("F3")));
|
||||
AllItems.Add(new ItemSpec("Error", "Error [%]", x => x.Error.ToString("F2"), (x, y, z) => z.Error.ToString("F2")));
|
||||
AllItems.Add(new ItemSpec("Passed", "Result", x => x.PassedColorStr(), (x, y, z) => z.PassedColorStr()));
|
||||
/// Single water meters only results
|
||||
AllItems.Add(new ItemSpec("Serial Nr", "s/n", x => x.SerialNr(), null));
|
||||
AllItems.Add(new ItemSpec("End state", "End state", x => x.EndState(), null));
|
||||
AllItems.Add(new ItemSpec("Pulses", "Pulses", x => x.PulsesMeter.ToString(), null));
|
||||
AllItems.Add(new ItemSpec("Pulses/liter", "Pulses/liter", x => x.PulsesPerLiter.ToString(), null));
|
||||
AllItems.Add(new ItemSpec("Reference pulses", "Ref.pulses", x => x.PulsesMaster.ToString(), null));
|
||||
|
||||
/// Combined water meters only results
|
||||
AllItems.Add(new ItemSpec("Q rise", "Q rise [m3/h]", null, (x, y, z) => (z.QRise() == 0) ? "-" : DoubleToStr(z.QRise(), 4)));
|
||||
AllItems.Add(new ItemSpec("Q fall", "Q fall [m3/h]", null, (x, y, z) => (z.QFall() == 0) ? "-" : DoubleToStr(z.QFall(), 4)));
|
||||
AllItems.Add(new ItemSpec("Error large WM", "Error-L [%]", null, (x, y, z) => x.Error.ToString("F2")));
|
||||
AllItems.Add(new ItemSpec("Error small WM", "Error-S [%]", null, (x, y, z) => y.Error.ToString("F2")));
|
||||
AllItems.Add(new ItemSpec("Serial Nr large WM", "s/n", null, (x, y, z) => x.SerialNr()));
|
||||
AllItems.Add(new ItemSpec("Serial Nr small WM", "s/n", null, (x, y, z) => y.SerialNr()));
|
||||
AllItems.Add(new ItemSpec("End state large WM", "End state", null, (x, y, z) => x.EndState()));
|
||||
AllItems.Add(new ItemSpec("End state small WM", "End state", null, (x, y, z) => y.EndState()));
|
||||
}
|
||||
|
||||
public static ItemSpec GetItem(string name)
|
||||
{
|
||||
foreach (var item in AllItems) if (item.Name.Equals(name)) return item;
|
||||
return null;
|
||||
}
|
||||
|
||||
public static string[] ToStrArray(IList<ItemSpec> items)
|
||||
{
|
||||
int count = (items != null) ? items.Count : 0;
|
||||
string[] result = new string[count];
|
||||
for (int i = 0; i < count; i++) result[i] = items[i].Name;
|
||||
return result;
|
||||
}
|
||||
|
||||
public static IList<ItemSpec> FromStrArray(string[] strArray)
|
||||
{
|
||||
IList<ItemSpec> result = new List<ItemSpec>();
|
||||
if (strArray != null)
|
||||
{
|
||||
for (int i = 0; i < strArray.Length; i++)
|
||||
{
|
||||
ItemSpec item = GetItem(strArray[i]);
|
||||
if (item != null) result.Add(item);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts float number to a string with the specified number of valid digits
|
||||
/// </summary>
|
||||
/// <param name="value">Float value to be converted to a string</param>
|
||||
/// <param name="validDigits">Number of valid digits: 4, 3, or 2 (otherwise a full precision number is printed)</param>
|
||||
/// <returns>String representation of the float number</returns>
|
||||
public static string DoubleToStr(double value, int validDigits)
|
||||
{
|
||||
if (-float.Epsilon <= value && value <= float.Epsilon)
|
||||
{
|
||||
return "0";
|
||||
}
|
||||
else if (validDigits == 4)
|
||||
{
|
||||
if (value >= 999.5 || value < -999.5) return value.ToString("F0");
|
||||
else if (value >= 99.95 || value < -99.95) return value.ToString("F1");
|
||||
else if (value >= 9.995 || value < -9.995) return value.ToString("F2");
|
||||
else if (value >= 0.9995 || value < -0.9995) return value.ToString("F3");
|
||||
else if (value >= 0.09995 || value < -0.09995) return value.ToString("F4");
|
||||
else if (value >= 0.009995 || value < -0.009995) return value.ToString("F5");
|
||||
else return value.ToString("F6");
|
||||
}
|
||||
else if (validDigits == 3)
|
||||
{
|
||||
if (value >= 99.5 || value < -99.5) return value.ToString("F0");
|
||||
else if (value >= 9.95 || value < -9.95) return value.ToString("F1");
|
||||
else if (value >= 0.995 || value < -0.995) return value.ToString("F2");
|
||||
else if (value >= 0.0995 || value < -0.0995) return value.ToString("F3");
|
||||
else if (value >= 0.00995 || value < -0.00995) return value.ToString("F4");
|
||||
else if (value >= 0.000995 || value < -0.000995) return value.ToString("F5");
|
||||
else return value.ToString("F6");
|
||||
}
|
||||
else if (validDigits == 2)
|
||||
{
|
||||
if (value >= 9.5 || value < -9.5) return value.ToString("F0");
|
||||
else if (value >= 0.95 || value < -0.95) return value.ToString("F1");
|
||||
else if (value >= 0.095 || value < -0.095) return value.ToString("F2");
|
||||
else if (value >= 0.0095 || value < -0.0095) return value.ToString("F3");
|
||||
else if (value >= 0.00095 || value < -0.00095) return value.ToString("F4");
|
||||
else return value.ToString("F5");
|
||||
}
|
||||
else return value.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
///
|
||||
using FluentNHibernate.Mapping;
|
||||
using Results.Entities;
|
||||
|
||||
namespace Results.Mappings
|
||||
{
|
||||
class BatchMap : ClassMap<Batch>
|
||||
{
|
||||
public BatchMap()
|
||||
{
|
||||
Id(x => x.Id);
|
||||
Map(x => x.BatchNr);
|
||||
Map(x => x.TestBenchId);
|
||||
Map(x => x.ProgramVersion);
|
||||
Map(x => x.UserName);
|
||||
Map(x => x.UserNumber);
|
||||
Map(x => x.ProcedureName);
|
||||
Map(x => x.ProcedureRevision);
|
||||
Map(x => x.ProtocolTitle);
|
||||
Map(x => x.Remark)
|
||||
.CustomType("StringClob")
|
||||
.CustomSqlType("varchar(2000)");
|
||||
Map(x => x.Custom1);
|
||||
Map(x => x.Custom2);
|
||||
Map(x => x.Custom3);
|
||||
Map(x => x.StartTime);
|
||||
Map(x => x.EndTime);
|
||||
Map(x => x.RsltsSent);
|
||||
Map(x => x.RsltsPrinted);
|
||||
HasMany(x => x.Tests)
|
||||
.Cascade.All();
|
||||
HasMany(x => x.WaterMeters)
|
||||
.Cascade.All();
|
||||
HasMany(x => x.TestRslts)
|
||||
.Cascade.All();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
using FluentNHibernate.Mapping;
|
||||
using Results.Entities;
|
||||
|
||||
namespace Results.Mappings
|
||||
{
|
||||
class ComponentsMap : ClassMap<Components>
|
||||
{
|
||||
public ComponentsMap()
|
||||
{
|
||||
Id(x => x.Id);
|
||||
Map(x => x.TestBenchId);
|
||||
Map(x => x.TestBenchName);
|
||||
Map(x => x.Pump);
|
||||
Map(x => x.RegValve);
|
||||
Map(x => x.Flowmeter);
|
||||
Map(x => x.Diverter);
|
||||
Map(x => x.Scale);
|
||||
Map(x => x.Custom1);
|
||||
Map(x => x.Custom2);
|
||||
Map(x => x.Custom3);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
///
|
||||
using FluentNHibernate.Mapping;
|
||||
using Results.Entities;
|
||||
|
||||
namespace Results.Mappings
|
||||
{
|
||||
class MeterTestRsltMap : ClassMap<MeterTestRslt>
|
||||
{
|
||||
public MeterTestRsltMap()
|
||||
{
|
||||
Id(x => x.Id);
|
||||
Map(x => x.CompoundMeterId);
|
||||
Map(x => x.PulsesMeter);
|
||||
Map(x => x.PulsesMaster);
|
||||
Map(x => x.PulsesPerLiter);
|
||||
Map(x => x.VolumeStart);
|
||||
Map(x => x.VolumeEnd);
|
||||
Map(x => x.VolumeMeter);
|
||||
Map(x => x.VolumeRef);
|
||||
Map(x => x.TimestampStart);
|
||||
Map(x => x.TimestampEnd);
|
||||
Map(x => x.TestTime);
|
||||
Map(x => x.Error);
|
||||
Map(x => x.TestDone);
|
||||
Map(x => x.Passed);
|
||||
|
||||
References(x => x.WaterMeter);
|
||||
References(x => x.TestRslt);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
///
|
||||
using FluentNHibernate.Mapping;
|
||||
using Results.Entities;
|
||||
|
||||
namespace Results.Mappings
|
||||
{
|
||||
class TestDataMap : ClassMap<TestData>
|
||||
{
|
||||
public TestDataMap()
|
||||
{
|
||||
Id(x => x.Id);
|
||||
Map(x => x.Name);
|
||||
Map(x => x.Qfrom);
|
||||
Map(x => x.Qto);
|
||||
Map(x => x.TargetVolume);
|
||||
Map(x => x.TargetTime);
|
||||
Map(x => x.Repeats);
|
||||
Map(x => x.Method);
|
||||
Map(x => x.ErrLimLo);
|
||||
Map(x => x.ErrLimHi);
|
||||
Map(x => x.Uncertainty);
|
||||
Map(x => x.Publish);
|
||||
Map(x => x.Evaluate);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
///
|
||||
using FluentNHibernate.Mapping;
|
||||
using Results.Entities;
|
||||
|
||||
namespace Results.Mappings
|
||||
{
|
||||
class TestRsltMap : ClassMap<TestRslt>
|
||||
{
|
||||
public TestRsltMap()
|
||||
{
|
||||
Id(x => x.Id);
|
||||
References<Batch>(x => x.Batch);
|
||||
References<TestData>(x => x.TestData);
|
||||
References<Components>(x => x.Components);
|
||||
Map(x => x.Part);
|
||||
Map(x => x.RepetitionNr);
|
||||
|
||||
Map(x => x.StartTime);
|
||||
Map(x => x.EndTime);
|
||||
Map(x => x.FlowSetTime);
|
||||
Map(x => x.TestTime);
|
||||
Map(x => x.PulsesMaster);
|
||||
Map(x => x.ConstMaster);
|
||||
Map(x => x.MassStartRaw);
|
||||
Map(x => x.MassStart);
|
||||
Map(x => x.MassEndRaw);
|
||||
Map(x => x.MassEnd);
|
||||
Map(x => x.DensityIn);
|
||||
Map(x => x.DensityOut);
|
||||
Map(x => x.DensityDiv);
|
||||
Map(x => x.Buoyancy);
|
||||
Map(x => x.FlowMass);
|
||||
Map(x => x.FlowVolume);
|
||||
Map(x => x.VolumeCTV);
|
||||
Map(x => x.VolumeMaster);
|
||||
Map(x => x.ErrorMaster);
|
||||
|
||||
Map(x => x.AmbientTempAve);
|
||||
Map(x => x.AmbientPressAve);
|
||||
Map(x => x.AmbientHumiAve);
|
||||
Map(x => x.PressUpAvrg);
|
||||
Map(x => x.PressUpStart);
|
||||
Map(x => x.PressUpEnd);
|
||||
Map(x => x.PressUpMin);
|
||||
Map(x => x.PressUpMax);
|
||||
Map(x => x.PressDownAvrg);
|
||||
Map(x => x.PressDownStart);
|
||||
Map(x => x.PressDownEnd);
|
||||
Map(x => x.PressDownMin);
|
||||
Map(x => x.PressDownMax);
|
||||
Map(x => x.TempInAvrg);
|
||||
Map(x => x.TempInStart);
|
||||
Map(x => x.TempInEnd);
|
||||
Map(x => x.TempInMin);
|
||||
Map(x => x.TempInMax);
|
||||
Map(x => x.TempOutAvrg);
|
||||
Map(x => x.TempOutStart);
|
||||
Map(x => x.TempOutEnd);
|
||||
Map(x => x.TempOutMin);
|
||||
Map(x => x.TempOutMax);
|
||||
Map(x => x.TempDivAvrg);
|
||||
Map(x => x.TempDivStart);
|
||||
Map(x => x.TempDivEnd);
|
||||
Map(x => x.TempDivMin);
|
||||
Map(x => x.TempDivMax);
|
||||
Map(x => x.FlowMin);
|
||||
Map(x => x.FlowMax);
|
||||
|
||||
Map(x => x.Custom1);
|
||||
Map(x => x.Custom2);
|
||||
Map(x => x.Custom3);
|
||||
Map(x => x.Custom4);
|
||||
Map(x => x.Custom5);
|
||||
Map(x => x.Custom6);
|
||||
Map(x => x.Custom7);
|
||||
Map(x => x.Custom8);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
///
|
||||
using FluentNHibernate.Mapping;
|
||||
using Results.Entities;
|
||||
|
||||
namespace Results.Mappings
|
||||
{
|
||||
class WaterMeterDataMap : ClassMap<WaterMeterData>
|
||||
{
|
||||
public WaterMeterDataMap()
|
||||
{
|
||||
Id(x => x.Id);
|
||||
Map(x => x.ProductName);
|
||||
Map(x => x.Producer);
|
||||
|
||||
Map(x => x.DN);
|
||||
Map(x => x.L);
|
||||
Map(x => x.Mounting);
|
||||
|
||||
Map(x => x.Q4_Qmax);
|
||||
Map(x => x.Q3_Qn);
|
||||
Map(x => x.Q2_Qt);
|
||||
Map(x => x.Q1_Qmin);
|
||||
|
||||
Map(x => x.MetrologicalClass);
|
||||
Map(x => x.TemperatureClass);
|
||||
Map(x => x.PressureLossClass);
|
||||
Map(x => x.MaxAdmissiblePressure);
|
||||
Map(x => x.FlowProfileSensitivityClass);
|
||||
|
||||
Map(x => x.ApprovalInfo);
|
||||
Map(x => x.Certificate);
|
||||
|
||||
Map(x => x.PulsesPerLtr);
|
||||
|
||||
Map(x => x.ProducerAux);
|
||||
Map(x => x.Q3_Qn_Aux);
|
||||
Map(x => x.MetrologicalClassAux);
|
||||
Map(x => x.ApprovalInfoAux);
|
||||
|
||||
Map(x => x.Text1);
|
||||
Map(x => x.Text2);
|
||||
Map(x => x.Text3);
|
||||
Map(x => x.Text4);
|
||||
Map(x => x.Text5);
|
||||
|
||||
Map(x => x.Compound);
|
||||
#if HEAT_METER_SUPPORT
|
||||
Map(x => x.HeatMeter);
|
||||
#endif
|
||||
#if IPERLST || IPERLST_SPECIAL
|
||||
Map(x => x.WMTypeId);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2020 Sensus Slovansko a.s.
|
||||
///
|
||||
using FluentNHibernate.Mapping;
|
||||
using Results.Entities;
|
||||
|
||||
namespace Results.Mappings
|
||||
{
|
||||
class WaterMeterMap : ClassMap<WaterMeter>
|
||||
{
|
||||
public WaterMeterMap()
|
||||
{
|
||||
Id(x => x.Id);
|
||||
Map(x => x.SerialNr);
|
||||
Map(x => x.SerialNrAux);
|
||||
Map(x => x.PurchaseOrder);
|
||||
Map(x => x.YearOfProduction);
|
||||
Map(x => x.WMPosition);
|
||||
Map(x => x.EndState);
|
||||
Map(x => x.EndStateAux);
|
||||
Map(x => x.QRise);
|
||||
Map(x => x.QFall);
|
||||
Map(x => x.Passed);
|
||||
Map(x => x.ResultCode);
|
||||
|
||||
#if IPERLST || IPERLST_SPECIAL
|
||||
Map(x => x.OrigCalibFactor);
|
||||
Map(x => x.CalibFactor);
|
||||
Map(x => x.Q2ErrWOCorrection);
|
||||
Map(x => x.Q2CorrFlowRight);
|
||||
Map(x => x.Diff2Hz8Hz);
|
||||
Map(x => x.Hz2CorrectionDone);
|
||||
Map(x => x.Hz2Correction);
|
||||
#endif
|
||||
References(x => x.WaterMeterData);
|
||||
References(x => x.Batch);
|
||||
HasMany(x => x.MeterTestRslts)
|
||||
.Cascade.All();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,9 +8,9 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyTitle("Results")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyCompany("Sensus")]
|
||||
[assembly: AssemblyProduct("Results")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2015")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
@@ -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.0.2.0")]
|
||||
[assembly: AssemblyFileVersion("2.0.2.0")]
|
||||
[assembly: AssemblyVersion("2.9.329.0")]
|
||||
[assembly: AssemblyFileVersion("2.9.329.0")]
|
||||
|
||||
+23
-5
@@ -18,7 +18,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;IPERLST</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
@@ -27,7 +27,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DefineConstants>TRACE;IPERLST</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
@@ -38,6 +38,9 @@
|
||||
<Reference Include="Iesi.Collections">
|
||||
<HintPath>..\packages\Iesi.Collections.3.2.0.4000\lib\Net35\Iesi.Collections.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net">
|
||||
<HintPath>..\packages\log4net.2.0.2\lib\net40-full\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MySql.Data, Version=6.6.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MySql.Data.6.6.5\lib\net20\MySql.Data.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -53,9 +56,25 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Class1.cs" />
|
||||
<Compile Include="Entities\WaterMeterResult.cs" />
|
||||
<Compile Include="BatchResults.cs" />
|
||||
<Compile Include="Entities\Batch.cs" />
|
||||
<Compile Include="Entities\Components.cs" />
|
||||
<Compile Include="Entities\MeterTestRslt.cs" />
|
||||
<Compile Include="Entities\TestData.cs" />
|
||||
<Compile Include="Entities\TestRslt.cs" />
|
||||
<Compile Include="Entities\WaterMeterData.cs" />
|
||||
<Compile Include="Entities\WaterMeter.cs" />
|
||||
<Compile Include="DB.cs" />
|
||||
<Compile Include="Mappings\BatchMap.cs" />
|
||||
<Compile Include="Mappings\ComponentsMap.cs" />
|
||||
<Compile Include="Mappings\MeterTestRsltMap.cs" />
|
||||
<Compile Include="Mappings\TestDataMap.cs" />
|
||||
<Compile Include="Mappings\TestRsltMap.cs" />
|
||||
<Compile Include="Mappings\WaterMeterDataMap.cs" />
|
||||
<Compile Include="Mappings\WaterMeterMap.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ItemSpec.cs" />
|
||||
<Compile Include="Utils.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Config\Config.csproj">
|
||||
@@ -65,7 +84,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="FileWriters\" />
|
||||
<Folder Include="Mappings\" />
|
||||
<Folder Include="Printers\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
|
||||
namespace Results
|
||||
{
|
||||
public static class Utils
|
||||
{
|
||||
public static string GetTestName(string name, int repeats, int repetitionNr)
|
||||
{
|
||||
if (repeats == 1) return name;
|
||||
return string.Format("{0} ({1}/{2})", name, repetitionNr, repeats);
|
||||
}
|
||||
|
||||
public static int BenchIdOracle2Asc(int benchIdOracle)
|
||||
{
|
||||
switch (benchIdOracle)
|
||||
{
|
||||
case 4: return 35; /// WR9
|
||||
case 5: return 33; /// WR10
|
||||
case 6: return 34; /// WR11
|
||||
case 7: return 29; /// PT7, special
|
||||
case 8: return 36; /// WR13
|
||||
case 9: return 37; /// WR15
|
||||
case 10: return 38; /// WR16
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
-130
@@ -1,130 +0,0 @@
|
||||
namespace ResultsBrowser
|
||||
{
|
||||
partial class BenchesDlg
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BenchesDlg));
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.testBenchesListBox = new System.Windows.Forms.ListBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.editButton = new System.Windows.Forms.Button();
|
||||
this.addButton = new System.Windows.Forms.Button();
|
||||
this.removeButton = new System.Windows.Forms.Button();
|
||||
this.copyButton = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
resources.ApplyResources(this.okButton, "okButton");
|
||||
this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
resources.ApplyResources(this.cancelButton, "cancelButton");
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// testBenchesListBox
|
||||
//
|
||||
resources.ApplyResources(this.testBenchesListBox, "testBenchesListBox");
|
||||
this.testBenchesListBox.FormattingEnabled = true;
|
||||
this.testBenchesListBox.Name = "testBenchesListBox";
|
||||
this.testBenchesListBox.DoubleClick += new System.EventHandler(this.testBenchesListBox_DoubleClick);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
resources.ApplyResources(this.label1, "label1");
|
||||
this.label1.Name = "label1";
|
||||
//
|
||||
// editButton
|
||||
//
|
||||
resources.ApplyResources(this.editButton, "editButton");
|
||||
this.editButton.Name = "editButton";
|
||||
this.editButton.UseVisualStyleBackColor = true;
|
||||
this.editButton.Click += new System.EventHandler(this.editButton_Click);
|
||||
//
|
||||
// addButton
|
||||
//
|
||||
resources.ApplyResources(this.addButton, "addButton");
|
||||
this.addButton.Name = "addButton";
|
||||
this.addButton.UseVisualStyleBackColor = true;
|
||||
this.addButton.Click += new System.EventHandler(this.addButton_Click);
|
||||
//
|
||||
// removeButton
|
||||
//
|
||||
resources.ApplyResources(this.removeButton, "removeButton");
|
||||
this.removeButton.Name = "removeButton";
|
||||
this.removeButton.UseVisualStyleBackColor = true;
|
||||
this.removeButton.Click += new System.EventHandler(this.removeButton_Click);
|
||||
//
|
||||
// copyButton
|
||||
//
|
||||
resources.ApplyResources(this.copyButton, "copyButton");
|
||||
this.copyButton.Name = "copyButton";
|
||||
this.copyButton.UseVisualStyleBackColor = true;
|
||||
this.copyButton.Click += new System.EventHandler(this.copyButton_Click);
|
||||
//
|
||||
// BenchesDlg
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.copyButton);
|
||||
this.Controls.Add(this.removeButton);
|
||||
this.Controls.Add(this.addButton);
|
||||
this.Controls.Add(this.editButton);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.testBenchesListBox);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "BenchesDlg";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.ListBox testBenchesListBox;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Button editButton;
|
||||
private System.Windows.Forms.Button addButton;
|
||||
private System.Windows.Forms.Button removeButton;
|
||||
private System.Windows.Forms.Button copyButton;
|
||||
}
|
||||
}
|
||||
@@ -1,205 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using ResultsBrowser.Resources;
|
||||
|
||||
namespace ResultsBrowser
|
||||
{
|
||||
/// <summary>
|
||||
/// Dialog to edit local settings that specify database parameters (S1.2)
|
||||
/// </summary>
|
||||
public partial class BenchesDlg : Form
|
||||
{
|
||||
// Local copy of 'local settings' initialized to Program.localSettings.
|
||||
// Dialog modifies this copy and updates Program.localSettings just
|
||||
// when 'OK' is pressed.
|
||||
LocalSettings localSettings;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor, initializes the dialog
|
||||
/// </summary>
|
||||
public BenchesDlg()
|
||||
{
|
||||
Program.LocalSettings.Save();
|
||||
localSettings = LocalSettings.Load(Program.LocalSettingsFileName);
|
||||
if (localSettings == null) throw new Exception("Cannot load local settings");
|
||||
|
||||
InitializeComponent();
|
||||
RedrawTestBenchesListBox();
|
||||
}
|
||||
|
||||
void RedrawTestBenchesListBox()
|
||||
{
|
||||
testBenchesListBox.Items.Clear();
|
||||
if (localSettings.TestBenches != null)
|
||||
{
|
||||
int nrBenches = localSettings.TestBenches.GetLength(0);
|
||||
for (int i = 0; i < nrBenches; i++)
|
||||
{
|
||||
testBenchesListBox.Items.Add(localSettings.TestBenches[i].BenchName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a new test bench DB specification and append it to the list
|
||||
/// </summary>
|
||||
/// <param name="sender">Not used</param>
|
||||
/// <param name="e">Not used</param>
|
||||
private void addButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
Config.DatabaseSettings bench = new Config.DatabaseSettings();
|
||||
Config.DatabaseSettingsDlg dlg = new Config.DatabaseSettingsDlg(bench);
|
||||
DialogResult dr = dlg.ShowDialog();
|
||||
if (dr == DialogResult.OK)
|
||||
{
|
||||
int nrBenches =
|
||||
(localSettings.TestBenches == null) ? 0 : localSettings.TestBenches.GetLength(0);
|
||||
|
||||
if (nrBenches == 0)
|
||||
{
|
||||
localSettings.TestBenches = new Config.DatabaseSettings[1];
|
||||
localSettings.TestBenches[0] = bench;
|
||||
}
|
||||
else
|
||||
{
|
||||
Config.DatabaseSettings[] newTestBenches = new Config.DatabaseSettings[nrBenches + 1];
|
||||
for (int i = 0; i < nrBenches; i++)
|
||||
{
|
||||
newTestBenches[i] = localSettings.TestBenches[i];
|
||||
}
|
||||
newTestBenches[nrBenches] = bench;
|
||||
localSettings.TestBenches = newTestBenches;
|
||||
}
|
||||
|
||||
testBenchesListBox.Items.Add(bench.BenchName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a new test bench DB specification,which is a copy of the
|
||||
/// selected bench, and append it to the list
|
||||
/// </summary>
|
||||
/// <param name="sender">Not used</param>
|
||||
/// <param name="e">Not used</param>
|
||||
private void copyButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (testBenchesListBox.SelectedIndex >= 0)
|
||||
{
|
||||
Config.DatabaseSettings ori = localSettings.TestBenches[testBenchesListBox.SelectedIndex];
|
||||
Config.DatabaseSettings bench = (Config.DatabaseSettings)ori.Clone();
|
||||
|
||||
Config.DatabaseSettingsDlg dlg = new Config.DatabaseSettingsDlg(bench);
|
||||
DialogResult dr = dlg.ShowDialog();
|
||||
if (dr == DialogResult.OK)
|
||||
{
|
||||
int nrBenches =
|
||||
(localSettings.TestBenches == null) ? 0 : localSettings.TestBenches.GetLength(0);
|
||||
|
||||
Config.DatabaseSettings[] newTestBenches = new Config.DatabaseSettings[nrBenches + 1];
|
||||
for (int i = 0; i < nrBenches; i++)
|
||||
{
|
||||
newTestBenches[i] = localSettings.TestBenches[i];
|
||||
}
|
||||
newTestBenches[nrBenches] = bench;
|
||||
localSettings.TestBenches = newTestBenches;
|
||||
|
||||
testBenchesListBox.Items.Add(bench.BenchName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Edit selected test bench DB specification
|
||||
/// </summary>
|
||||
/// <param name="sender">Not used</param>
|
||||
/// <param name="e">Not used</param>
|
||||
private void editButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (testBenchesListBox.SelectedIndex >= 0)
|
||||
{
|
||||
Config.DatabaseSettingsDlg dlg = new Config.DatabaseSettingsDlg(localSettings.TestBenches[testBenchesListBox.SelectedIndex]);
|
||||
DialogResult dr = dlg.ShowDialog();
|
||||
if (dr == DialogResult.OK)
|
||||
{
|
||||
// Update the item name
|
||||
testBenchesListBox.Items[testBenchesListBox.SelectedIndex] =
|
||||
localSettings.TestBenches[testBenchesListBox.SelectedIndex].BenchName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove selected test bench DB specification from the list
|
||||
/// </summary>
|
||||
/// <param name="sender">Not used</param>
|
||||
/// <param name="e">Not used</param>
|
||||
private void removeButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
int selectedIx = testBenchesListBox.SelectedIndex;
|
||||
if (selectedIx >= 0)
|
||||
{
|
||||
int nrBenches =
|
||||
(localSettings.TestBenches == null) ? 0 : localSettings.TestBenches.GetLength(0);
|
||||
|
||||
if (nrBenches == 1)
|
||||
{
|
||||
localSettings.TestBenches = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
Config.DatabaseSettings[] newTestBenches = new Config.DatabaseSettings[nrBenches - 1];
|
||||
for (int i = 0; i < selectedIx; i++)
|
||||
{
|
||||
newTestBenches[i] = localSettings.TestBenches[i];
|
||||
}
|
||||
for (int i = selectedIx + 1; i < nrBenches; i++)
|
||||
{
|
||||
newTestBenches[i - 1] = localSettings.TestBenches[i];
|
||||
}
|
||||
localSettings.TestBenches = newTestBenches;
|
||||
}
|
||||
|
||||
RedrawTestBenchesListBox();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update setting, return 'OK'
|
||||
/// </summary>
|
||||
/// <param name="sender">Not used</param>
|
||||
/// <param name="e">Not used</param>
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
localSettings.Save();
|
||||
Program.LocalSettings = LocalSettings.Load(Program.LocalSettingsFileName);
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Throw away changes, return 'Cancel'
|
||||
/// </summary>
|
||||
/// <param name="sender">Not used</param>
|
||||
/// <param name="e">Not used</param>
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Double click on an item = edit item
|
||||
/// </summary>
|
||||
/// <param name="sender">Not used</param>
|
||||
/// <param name="e">Not used</param>
|
||||
private void testBenchesListBox_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
editButton_Click(sender, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,336 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="testBenchesListBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>13</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="editButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>192, 105</value>
|
||||
</data>
|
||||
<data name=">>copyButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name="cancelButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 28</value>
|
||||
</data>
|
||||
<data name="addButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>192, 37</value>
|
||||
</data>
|
||||
<data name="okButton.Text" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name="addButton.Text" xml:space="preserve">
|
||||
<value>&Add</value>
|
||||
</data>
|
||||
<data name=">>removeButton.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="editButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name=">>editButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>BenchesDlg</value>
|
||||
</data>
|
||||
<data name=">>testBenchesListBox.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name=">>label1.Name" xml:space="preserve">
|
||||
<value>label1</value>
|
||||
</data>
|
||||
<data name="removeButton.Text" xml:space="preserve">
|
||||
<value>&Remove</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name="cancelButton.Text" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name=">>testBenchesListBox.Name" xml:space="preserve">
|
||||
<value>testBenchesListBox</value>
|
||||
</data>
|
||||
<data name="copyButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>192, 71</value>
|
||||
</data>
|
||||
<data name=">>okButton.Name" xml:space="preserve">
|
||||
<value>okButton</value>
|
||||
</data>
|
||||
<data name=">>label1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>testBenchesListBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="editButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 28</value>
|
||||
</data>
|
||||
<data name="copyButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>14</value>
|
||||
</data>
|
||||
<data name=">>editButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>79, 13</value>
|
||||
</data>
|
||||
<data name="addButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 28</value>
|
||||
</data>
|
||||
<data name=">>removeButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name="testBenchesListBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 37</value>
|
||||
</data>
|
||||
<data name="cancelButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name=">>copyButton.Name" xml:space="preserve">
|
||||
<value>copyButton</value>
|
||||
</data>
|
||||
<data name="okButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 28</value>
|
||||
</data>
|
||||
<data name="editButton.Text" xml:space="preserve">
|
||||
<value>&Edit</value>
|
||||
</data>
|
||||
<data name=">>addButton.Name" xml:space="preserve">
|
||||
<value>addButton</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterParent</value>
|
||||
</data>
|
||||
<data name=">>okButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="removeButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>192, 139</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="okButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>344, 37</value>
|
||||
</data>
|
||||
<data name="copyButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 28</value>
|
||||
</data>
|
||||
<data name="removeButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>17</value>
|
||||
</data>
|
||||
<data name=">>removeButton.Name" xml:space="preserve">
|
||||
<value>removeButton</value>
|
||||
</data>
|
||||
<data name="copyButton.Text" xml:space="preserve">
|
||||
<value>&Copy</value>
|
||||
</data>
|
||||
<data name="cancelButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>344, 71</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name=">>addButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>okButton.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name=">>addButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>okButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>editButton.Name" xml:space="preserve">
|
||||
<value>editButton</value>
|
||||
</data>
|
||||
<data name="removeButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 28</value>
|
||||
</data>
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name=">>editButton.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="testBenchesListBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>164, 134</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Name" xml:space="preserve">
|
||||
<value>cancelButton</value>
|
||||
</data>
|
||||
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 15</value>
|
||||
</data>
|
||||
<data name=">>removeButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>copyButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>testBenchesListBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>addButton.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Database Settings</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>459, 185</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>copyButton.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="okButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>12</value>
|
||||
</data>
|
||||
<data name="addButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>16</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>Test Benches :</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -1,146 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using Config.Entities;
|
||||
|
||||
namespace ResultsBrowser
|
||||
{
|
||||
public static class DataDeposit
|
||||
{
|
||||
public static IList<TestResult> ReportTestResults;
|
||||
public static IList<Results.Entities.WaterMeterResult> ReportWaterMeterResults;
|
||||
|
||||
public static IList<TestResult> QueryTestResults;
|
||||
public static IList<Results.Entities.WaterMeterResult> QueryWaterMeterResults;
|
||||
|
||||
static DataDeposit()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
public static void Clear()
|
||||
{
|
||||
ReportTestResults = new List<TestResult>();
|
||||
ReportWaterMeterResults = new List<Results.Entities.WaterMeterResult>();
|
||||
|
||||
QueryTestResults = new List<TestResult>();
|
||||
QueryWaterMeterResults = new List<Results.Entities.WaterMeterResult>();
|
||||
}
|
||||
|
||||
public static void ProcessQueryTestResults(IList<TestResult> testResults, bool resolveManually)
|
||||
{
|
||||
IList<TestResult> selectedTestResults = new List<TestResult>();
|
||||
|
||||
///
|
||||
/// Place all batch numbers into one list without duplicates
|
||||
///
|
||||
IList<int> batchNrs = new List<int>();
|
||||
foreach (var tr in testResults)
|
||||
{
|
||||
if (tr.TestName.ToLower().Contains("q") && !tr.TestName.ToLower().Contains("adj") /*&& tr.TestName.Length == 2*/)
|
||||
{
|
||||
selectedTestResults.Insert(0, tr);
|
||||
|
||||
if (!batchNrs.Contains(tr.BatchNr))
|
||||
{
|
||||
batchNrs.Add(tr.BatchNr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// TODO: Optionally sort them in reverse order (they should be now sorted in this way)
|
||||
|
||||
///
|
||||
/// Iterate through all batch numbers
|
||||
///
|
||||
foreach (var batchNr in batchNrs)
|
||||
{
|
||||
IList<Results.Entities.WaterMeterResult> wmResults = new List<Results.Entities.WaterMeterResult>();
|
||||
bool waterMetersCreated = false;
|
||||
|
||||
foreach (var tr in selectedTestResults)
|
||||
{
|
||||
//if (tr.TestName.ToLower().Contains("q2"))
|
||||
{
|
||||
if (tr.BatchNr == batchNr)
|
||||
{
|
||||
if (!waterMetersCreated)
|
||||
{
|
||||
foreach (var mtr in tr.Meters) wmResults.Add(new Results.Entities.WaterMeterResult(mtr, 5));
|
||||
waterMetersCreated = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < Math.Min(tr.Meters.Count, wmResults.Count); i++)
|
||||
{
|
||||
wmResults[i].Append(tr.Meters[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Exclude 'failed' water meters
|
||||
for (int i = wmResults.Count - 1; i >= 0; i--)
|
||||
{
|
||||
if (string.IsNullOrEmpty(wmResults[i].SerialNr) || !wmResults[i].Passed())
|
||||
{
|
||||
wmResults.RemoveAt(i);
|
||||
}
|
||||
}
|
||||
|
||||
int added = AddWMResultsAvoidDuplicates(wmResults, resolveManually);
|
||||
Console.WriteLine("batch={0} added={1}", batchNr, added);
|
||||
}
|
||||
|
||||
foreach (var tr in selectedTestResults) QueryTestResults.Add(tr);
|
||||
}
|
||||
|
||||
public static int AddWMResultsAvoidDuplicates(IList<Results.Entities.WaterMeterResult> wmResults, bool resolveManually)
|
||||
{
|
||||
int added = 0;
|
||||
foreach (var wmr in wmResults)
|
||||
{
|
||||
Results.Entities.WaterMeterResult foundWM = null;
|
||||
|
||||
foreach (var wm in QueryWaterMeterResults)
|
||||
{
|
||||
if (wm.SerialNr.Equals(wmr.SerialNr))
|
||||
{
|
||||
foundWM = wm;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (foundWM == null)
|
||||
{
|
||||
QueryWaterMeterResults.Add(wmr);
|
||||
added++;
|
||||
}
|
||||
else if (resolveManually)
|
||||
{
|
||||
if (DialogResult.Yes == MessageBox.Show(string.Format("New watermeter: {0}\r\nWatermeter in data set: {1}\r\nDou you want to replace the watermeter in the data set?", wmr, foundWM),
|
||||
"Resolve duplicity", MessageBoxButtons.YesNo, MessageBoxIcon.Question))
|
||||
{
|
||||
QueryWaterMeterResults.Remove(foundWM);
|
||||
QueryWaterMeterResults.Add(wmr);
|
||||
added++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return added;
|
||||
}
|
||||
|
||||
public static void AddQueryToReport()
|
||||
{
|
||||
foreach (var wm in QueryWaterMeterResults) ReportWaterMeterResults.Add(wm);
|
||||
QueryWaterMeterResults.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
-349
@@ -1,349 +0,0 @@
|
||||
namespace ResultsBrowser
|
||||
{
|
||||
partial class DatabaseSettingsDlg
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DatabaseSettingsDlg));
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.benchNameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.usersConnectionStringTextBox = new System.Windows.Forms.TextBox();
|
||||
this.connectionStringLabel = new System.Windows.Forms.Label();
|
||||
this.benchConnectionStringTextBox = new System.Windows.Forms.TextBox();
|
||||
this.proceduresConnectionStringTextBox = new System.Windows.Forms.TextBox();
|
||||
this.wmTypesConnectionStringTextBox = new System.Windows.Forms.TextBox();
|
||||
this.watermetersConnectionStringTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.testConnUsersBtn = new System.Windows.Forms.Button();
|
||||
this.createUsersDbBtn = new System.Windows.Forms.Button();
|
||||
this.realBenchCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.dbTypeLabel = new System.Windows.Forms.Label();
|
||||
this.usersDbTypeComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.benchDbTypeComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.proceduresDbTypeComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.wmTypesDbTypeComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.watermetersDbTypeComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.testConnBenchBtn = new System.Windows.Forms.Button();
|
||||
this.testConnProceduresBtn = new System.Windows.Forms.Button();
|
||||
this.testConnWMTypesBtn = new System.Windows.Forms.Button();
|
||||
this.testConnWaterMetersBtn = new System.Windows.Forms.Button();
|
||||
this.createBenchDbBtn = new System.Windows.Forms.Button();
|
||||
this.createProceduresDbBtn = new System.Windows.Forms.Button();
|
||||
this.createWMTypesDbBtn = new System.Windows.Forms.Button();
|
||||
this.createWaterMetersDbBtn = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
resources.ApplyResources(this.okButton, "okButton");
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.cancelButton, "cancelButton");
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
resources.ApplyResources(this.label1, "label1");
|
||||
this.label1.Name = "label1";
|
||||
//
|
||||
// benchNameTextBox
|
||||
//
|
||||
resources.ApplyResources(this.benchNameTextBox, "benchNameTextBox");
|
||||
this.benchNameTextBox.Name = "benchNameTextBox";
|
||||
//
|
||||
// usersConnectionStringTextBox
|
||||
//
|
||||
resources.ApplyResources(this.usersConnectionStringTextBox, "usersConnectionStringTextBox");
|
||||
this.usersConnectionStringTextBox.Name = "usersConnectionStringTextBox";
|
||||
//
|
||||
// connectionStringLabel
|
||||
//
|
||||
resources.ApplyResources(this.connectionStringLabel, "connectionStringLabel");
|
||||
this.connectionStringLabel.Name = "connectionStringLabel";
|
||||
//
|
||||
// benchConnectionStringTextBox
|
||||
//
|
||||
resources.ApplyResources(this.benchConnectionStringTextBox, "benchConnectionStringTextBox");
|
||||
this.benchConnectionStringTextBox.Name = "benchConnectionStringTextBox";
|
||||
//
|
||||
// proceduresConnectionStringTextBox
|
||||
//
|
||||
resources.ApplyResources(this.proceduresConnectionStringTextBox, "proceduresConnectionStringTextBox");
|
||||
this.proceduresConnectionStringTextBox.Name = "proceduresConnectionStringTextBox";
|
||||
//
|
||||
// wmTypesConnectionStringTextBox
|
||||
//
|
||||
resources.ApplyResources(this.wmTypesConnectionStringTextBox, "wmTypesConnectionStringTextBox");
|
||||
this.wmTypesConnectionStringTextBox.Name = "wmTypesConnectionStringTextBox";
|
||||
//
|
||||
// watermetersConnectionStringTextBox
|
||||
//
|
||||
resources.ApplyResources(this.watermetersConnectionStringTextBox, "watermetersConnectionStringTextBox");
|
||||
this.watermetersConnectionStringTextBox.Name = "watermetersConnectionStringTextBox";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
resources.ApplyResources(this.label2, "label2");
|
||||
this.label2.Name = "label2";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
resources.ApplyResources(this.label3, "label3");
|
||||
this.label3.Name = "label3";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
resources.ApplyResources(this.label4, "label4");
|
||||
this.label4.Name = "label4";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
resources.ApplyResources(this.label5, "label5");
|
||||
this.label5.Name = "label5";
|
||||
//
|
||||
// label6
|
||||
//
|
||||
resources.ApplyResources(this.label6, "label6");
|
||||
this.label6.Name = "label6";
|
||||
//
|
||||
// testConnUsersBtn
|
||||
//
|
||||
this.testConnUsersBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.testConnUsersBtn, "testConnUsersBtn");
|
||||
this.testConnUsersBtn.Name = "testConnUsersBtn";
|
||||
this.testConnUsersBtn.UseVisualStyleBackColor = true;
|
||||
this.testConnUsersBtn.Click += new System.EventHandler(this.testConnUsersBtn_Click);
|
||||
//
|
||||
// createUsersDbBtn
|
||||
//
|
||||
this.createUsersDbBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.createUsersDbBtn, "createUsersDbBtn");
|
||||
this.createUsersDbBtn.Name = "createUsersDbBtn";
|
||||
this.createUsersDbBtn.UseVisualStyleBackColor = true;
|
||||
this.createUsersDbBtn.Click += new System.EventHandler(this.createDatabasesButton_Click);
|
||||
//
|
||||
// realBenchCheckBox
|
||||
//
|
||||
resources.ApplyResources(this.realBenchCheckBox, "realBenchCheckBox");
|
||||
this.realBenchCheckBox.Name = "realBenchCheckBox";
|
||||
this.realBenchCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// dbTypeLabel
|
||||
//
|
||||
resources.ApplyResources(this.dbTypeLabel, "dbTypeLabel");
|
||||
this.dbTypeLabel.Name = "dbTypeLabel";
|
||||
//
|
||||
// usersDbTypeComboBox
|
||||
//
|
||||
this.usersDbTypeComboBox.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.usersDbTypeComboBox, "usersDbTypeComboBox");
|
||||
this.usersDbTypeComboBox.Name = "usersDbTypeComboBox";
|
||||
//
|
||||
// benchDbTypeComboBox
|
||||
//
|
||||
this.benchDbTypeComboBox.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.benchDbTypeComboBox, "benchDbTypeComboBox");
|
||||
this.benchDbTypeComboBox.Name = "benchDbTypeComboBox";
|
||||
//
|
||||
// proceduresDbTypeComboBox
|
||||
//
|
||||
this.proceduresDbTypeComboBox.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.proceduresDbTypeComboBox, "proceduresDbTypeComboBox");
|
||||
this.proceduresDbTypeComboBox.Name = "proceduresDbTypeComboBox";
|
||||
//
|
||||
// wmTypesDbTypeComboBox
|
||||
//
|
||||
this.wmTypesDbTypeComboBox.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.wmTypesDbTypeComboBox, "wmTypesDbTypeComboBox");
|
||||
this.wmTypesDbTypeComboBox.Name = "wmTypesDbTypeComboBox";
|
||||
//
|
||||
// watermetersDbTypeComboBox
|
||||
//
|
||||
this.watermetersDbTypeComboBox.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.watermetersDbTypeComboBox, "watermetersDbTypeComboBox");
|
||||
this.watermetersDbTypeComboBox.Name = "watermetersDbTypeComboBox";
|
||||
//
|
||||
// testConnBenchBtn
|
||||
//
|
||||
this.testConnBenchBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.testConnBenchBtn, "testConnBenchBtn");
|
||||
this.testConnBenchBtn.Name = "testConnBenchBtn";
|
||||
this.testConnBenchBtn.UseVisualStyleBackColor = true;
|
||||
this.testConnBenchBtn.Click += new System.EventHandler(this.testConnBenchBtn_Click);
|
||||
//
|
||||
// testConnProceduresBtn
|
||||
//
|
||||
this.testConnProceduresBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.testConnProceduresBtn, "testConnProceduresBtn");
|
||||
this.testConnProceduresBtn.Name = "testConnProceduresBtn";
|
||||
this.testConnProceduresBtn.UseVisualStyleBackColor = true;
|
||||
this.testConnProceduresBtn.Click += new System.EventHandler(this.testConnProceduresBtn_Click);
|
||||
//
|
||||
// testConnWMTypesBtn
|
||||
//
|
||||
this.testConnWMTypesBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.testConnWMTypesBtn, "testConnWMTypesBtn");
|
||||
this.testConnWMTypesBtn.Name = "testConnWMTypesBtn";
|
||||
this.testConnWMTypesBtn.UseVisualStyleBackColor = true;
|
||||
this.testConnWMTypesBtn.Click += new System.EventHandler(this.testConnWMTypesBtn_Click);
|
||||
//
|
||||
// testConnWaterMetersBtn
|
||||
//
|
||||
this.testConnWaterMetersBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.testConnWaterMetersBtn, "testConnWaterMetersBtn");
|
||||
this.testConnWaterMetersBtn.Name = "testConnWaterMetersBtn";
|
||||
this.testConnWaterMetersBtn.UseVisualStyleBackColor = true;
|
||||
this.testConnWaterMetersBtn.Click += new System.EventHandler(this.testConnWaterMetersBtn_Click);
|
||||
//
|
||||
// createBenchDbBtn
|
||||
//
|
||||
this.createBenchDbBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.createBenchDbBtn, "createBenchDbBtn");
|
||||
this.createBenchDbBtn.Name = "createBenchDbBtn";
|
||||
this.createBenchDbBtn.UseVisualStyleBackColor = true;
|
||||
this.createBenchDbBtn.Click += new System.EventHandler(this.createbenchDbBtn_Click);
|
||||
//
|
||||
// createProceduresDbBtn
|
||||
//
|
||||
this.createProceduresDbBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.createProceduresDbBtn, "createProceduresDbBtn");
|
||||
this.createProceduresDbBtn.Name = "createProceduresDbBtn";
|
||||
this.createProceduresDbBtn.UseVisualStyleBackColor = true;
|
||||
this.createProceduresDbBtn.Click += new System.EventHandler(this.createProecduresDbBtn_Click);
|
||||
//
|
||||
// createWMTypesDbBtn
|
||||
//
|
||||
this.createWMTypesDbBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.createWMTypesDbBtn, "createWMTypesDbBtn");
|
||||
this.createWMTypesDbBtn.Name = "createWMTypesDbBtn";
|
||||
this.createWMTypesDbBtn.UseVisualStyleBackColor = true;
|
||||
this.createWMTypesDbBtn.Click += new System.EventHandler(this.createWMTypesDbBtn_Click);
|
||||
//
|
||||
// createWaterMetersDbBtn
|
||||
//
|
||||
this.createWaterMetersDbBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.createWaterMetersDbBtn, "createWaterMetersDbBtn");
|
||||
this.createWaterMetersDbBtn.Name = "createWaterMetersDbBtn";
|
||||
this.createWaterMetersDbBtn.UseVisualStyleBackColor = true;
|
||||
this.createWaterMetersDbBtn.Click += new System.EventHandler(this.createWaterMetersDbBtn_Click);
|
||||
//
|
||||
// DatabaseSettingsDlg
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.createWaterMetersDbBtn);
|
||||
this.Controls.Add(this.createWMTypesDbBtn);
|
||||
this.Controls.Add(this.createProceduresDbBtn);
|
||||
this.Controls.Add(this.createBenchDbBtn);
|
||||
this.Controls.Add(this.testConnWaterMetersBtn);
|
||||
this.Controls.Add(this.testConnWMTypesBtn);
|
||||
this.Controls.Add(this.testConnProceduresBtn);
|
||||
this.Controls.Add(this.testConnBenchBtn);
|
||||
this.Controls.Add(this.watermetersDbTypeComboBox);
|
||||
this.Controls.Add(this.wmTypesDbTypeComboBox);
|
||||
this.Controls.Add(this.proceduresDbTypeComboBox);
|
||||
this.Controls.Add(this.benchDbTypeComboBox);
|
||||
this.Controls.Add(this.usersDbTypeComboBox);
|
||||
this.Controls.Add(this.dbTypeLabel);
|
||||
this.Controls.Add(this.realBenchCheckBox);
|
||||
this.Controls.Add(this.createUsersDbBtn);
|
||||
this.Controls.Add(this.testConnUsersBtn);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.watermetersConnectionStringTextBox);
|
||||
this.Controls.Add(this.wmTypesConnectionStringTextBox);
|
||||
this.Controls.Add(this.proceduresConnectionStringTextBox);
|
||||
this.Controls.Add(this.benchConnectionStringTextBox);
|
||||
this.Controls.Add(this.connectionStringLabel);
|
||||
this.Controls.Add(this.usersConnectionStringTextBox);
|
||||
this.Controls.Add(this.benchNameTextBox);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "DatabaseSettingsDlg";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.Load += new System.EventHandler(this.BenchSettingsDlg_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox benchNameTextBox;
|
||||
private System.Windows.Forms.TextBox usersConnectionStringTextBox;
|
||||
private System.Windows.Forms.Label connectionStringLabel;
|
||||
private System.Windows.Forms.TextBox benchConnectionStringTextBox;
|
||||
private System.Windows.Forms.TextBox proceduresConnectionStringTextBox;
|
||||
private System.Windows.Forms.TextBox wmTypesConnectionStringTextBox;
|
||||
private System.Windows.Forms.TextBox watermetersConnectionStringTextBox;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.Button testConnUsersBtn;
|
||||
private System.Windows.Forms.Button createUsersDbBtn;
|
||||
private System.Windows.Forms.CheckBox realBenchCheckBox;
|
||||
private System.Windows.Forms.Label dbTypeLabel;
|
||||
private System.Windows.Forms.ComboBox usersDbTypeComboBox;
|
||||
private System.Windows.Forms.ComboBox benchDbTypeComboBox;
|
||||
private System.Windows.Forms.ComboBox proceduresDbTypeComboBox;
|
||||
private System.Windows.Forms.ComboBox wmTypesDbTypeComboBox;
|
||||
private System.Windows.Forms.ComboBox watermetersDbTypeComboBox;
|
||||
private System.Windows.Forms.Button testConnBenchBtn;
|
||||
private System.Windows.Forms.Button testConnProceduresBtn;
|
||||
private System.Windows.Forms.Button testConnWMTypesBtn;
|
||||
private System.Windows.Forms.Button testConnWaterMetersBtn;
|
||||
private System.Windows.Forms.Button createBenchDbBtn;
|
||||
private System.Windows.Forms.Button createProceduresDbBtn;
|
||||
private System.Windows.Forms.Button createWMTypesDbBtn;
|
||||
private System.Windows.Forms.Button createWaterMetersDbBtn;
|
||||
}
|
||||
}
|
||||
@@ -1,264 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using ResultsBrowser.Resources;
|
||||
|
||||
namespace ResultsBrowser
|
||||
{
|
||||
/// <summary>
|
||||
/// Dialog to process test bench name and database settings (BenchSettings)
|
||||
/// </summary>
|
||||
public partial class DatabaseSettingsDlg : Form
|
||||
{
|
||||
// Reference to bench DB settins (not a local copy)
|
||||
Config.DatabaseSettings bench;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="bench">Test bench database settings</param>
|
||||
public DatabaseSettingsDlg(Config.DatabaseSettings bench)
|
||||
{
|
||||
this.bench = bench;
|
||||
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Test_Bench_Databases_Specification;
|
||||
label1.Text = Strings.Test_bench_name;
|
||||
realBenchCheckBox.Text = Strings.Test_bench_is_controlled_by_this_computer;
|
||||
dbTypeLabel.Text = Strings.Database_type;
|
||||
connectionStringLabel.Text = Strings.Connection_string;
|
||||
label2.Text = Strings.Users_and_groups;
|
||||
label3.Text = Strings.Bench_parameters;
|
||||
label4.Text = Strings.Procedures;
|
||||
label5.Text = Strings.Water_meter_types;
|
||||
label6.Text = Strings.Water_meter_data;
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
cancelButton.Text = Strings.CancelBtnText;
|
||||
|
||||
testConnBenchBtn.Text = Strings.Test_connection;
|
||||
testConnProceduresBtn.Text = Strings.Test_connection;
|
||||
testConnUsersBtn.Text = Strings.Test_connection;
|
||||
testConnWaterMetersBtn.Text = Strings.Test_connection;
|
||||
testConnWMTypesBtn.Text = Strings.Test_connection;
|
||||
|
||||
createBenchDbBtn.Text = Strings.Create_DB;
|
||||
createProceduresDbBtn.Text = Strings.Create_DB;
|
||||
createUsersDbBtn.Text = Strings.Create_DB;
|
||||
createWaterMetersDbBtn.Text = Strings.Create_DB;
|
||||
createWMTypesDbBtn.Text = Strings.Create_DB;
|
||||
}
|
||||
|
||||
private void BenchSettingsDlg_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
|
||||
benchNameTextBox.Text = bench.BenchName;
|
||||
realBenchCheckBox.Checked = bench.IsRealBench;
|
||||
|
||||
/// Initialize 'Database type' combo-boxes
|
||||
for (int i = 0; i < (int)Config.DBType.DbTypesCount; i++)
|
||||
{
|
||||
Config.DBType dbType = (Config.DBType)i;
|
||||
usersDbTypeComboBox.Items.Add(dbType);
|
||||
benchDbTypeComboBox.Items.Add(dbType);
|
||||
proceduresDbTypeComboBox.Items.Add(dbType);
|
||||
wmTypesDbTypeComboBox.Items.Add(dbType);
|
||||
watermetersDbTypeComboBox.Items.Add(dbType);
|
||||
}
|
||||
usersDbTypeComboBox.SelectedIndex = (int)bench.UsersDBSettings.DbType;
|
||||
benchDbTypeComboBox.SelectedIndex = (int)bench.BenchDBSettings.DbType;
|
||||
proceduresDbTypeComboBox.SelectedIndex = (int)bench.ProceduresDBSettings.DbType;
|
||||
wmTypesDbTypeComboBox.SelectedIndex = (int)bench.WMTypesDBSettings.DbType;
|
||||
watermetersDbTypeComboBox.SelectedIndex = (int)bench.WaterMetersDBSettings.DbType;
|
||||
|
||||
/// Initialize connection strings
|
||||
usersConnectionStringTextBox.Text = bench.UsersDBSettings.ConnectionString;
|
||||
benchConnectionStringTextBox.Text = bench.BenchDBSettings.ConnectionString;
|
||||
proceduresConnectionStringTextBox.Text = bench.ProceduresDBSettings.ConnectionString;
|
||||
wmTypesConnectionStringTextBox.Text = bench.WMTypesDBSettings.ConnectionString;
|
||||
watermetersConnectionStringTextBox.Text = bench.WaterMetersDBSettings.ConnectionString;
|
||||
}
|
||||
|
||||
bool UpdateBenchFromUIControls()
|
||||
{
|
||||
for (int i = 0; i < Program.LocalSettings.BenchesCount; i++)
|
||||
{
|
||||
if (bench != Program.LocalSettings.TestBenches[i] &&
|
||||
benchNameTextBox.Text == Program.LocalSettings.TestBenches[i].BenchName)
|
||||
{
|
||||
MessageBox.Show(Strings.Bench_name_conflict_Use_another_name_pls, Strings.Error, MessageBoxButtons.OK);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bench.BenchName = benchNameTextBox.Text;
|
||||
bench.IsRealBench = realBenchCheckBox.Checked;
|
||||
|
||||
bench.UsersDBSettings.ConnectionString = usersConnectionStringTextBox.Text;
|
||||
bench.BenchDBSettings.ConnectionString = benchConnectionStringTextBox.Text;
|
||||
bench.ProceduresDBSettings.ConnectionString = proceduresConnectionStringTextBox.Text;
|
||||
bench.WMTypesDBSettings.ConnectionString = wmTypesConnectionStringTextBox.Text;
|
||||
bench.WaterMetersDBSettings.ConnectionString = watermetersConnectionStringTextBox.Text;
|
||||
|
||||
bench.UsersDBSettings.DbType = (Config.DBType)usersDbTypeComboBox.SelectedIndex;
|
||||
bench.BenchDBSettings.DbType = (Config.DBType)benchDbTypeComboBox.SelectedIndex;
|
||||
bench.ProceduresDBSettings.DbType = (Config.DBType)proceduresDbTypeComboBox.SelectedIndex;
|
||||
bench.WMTypesDBSettings.DbType = (Config.DBType)wmTypesDbTypeComboBox.SelectedIndex;
|
||||
bench.WaterMetersDBSettings.DbType = (Config.DBType)watermetersDbTypeComboBox.SelectedIndex;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update bench DB setting, return 'OK'
|
||||
/// </summary>
|
||||
/// <param name="sender">Not used</param>
|
||||
/// <param name="e">Not used</param>
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (UpdateBenchFromUIControls())
|
||||
{
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
|
||||
DialogResult = DialogResult.None;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Throw away changes, return 'Cancel'
|
||||
/// </summary>
|
||||
/// <param name="sender">Not used</param>
|
||||
/// <param name="e">Not used</param>
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void createDatabasesButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!UpdateBenchFromUIControls()) return;
|
||||
|
||||
if (DialogResult.OK == MessageBox.Show(Strings.DB_will_be_overwritten + Environment.NewLine +
|
||||
Strings.Do_you_want_to_proceed, Strings.Warning,
|
||||
MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation))
|
||||
try
|
||||
{
|
||||
Cursor.Current = Cursors.WaitCursor;
|
||||
Config.FluentCommon.CreateEmptyUsersDB(bench.UsersDBSettings);
|
||||
MessageBox.Show(Strings.DB_was_successfully_created, Strings.Notification);
|
||||
Cursor.Current = Cursors.Default;
|
||||
DialogResult = DialogResult.None;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Cursor.Current = Cursors.Default;
|
||||
MessageBox.Show(Strings.Error_while_creating_DB_Reason + exception.Message, Strings.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void createbenchDbBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!UpdateBenchFromUIControls()) return;
|
||||
|
||||
if (DialogResult.OK == MessageBox.Show(Strings.DB_will_be_overwritten + Environment.NewLine +
|
||||
Strings.Do_you_want_to_proceed, Strings.Warning,
|
||||
MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation))
|
||||
try
|
||||
{
|
||||
Cursor.Current = Cursors.WaitCursor;
|
||||
Config.FluentCommon.CreateEmptyBenchDB(bench.BenchDBSettings);
|
||||
MessageBox.Show(Strings.DB_was_successfully_created, Strings.Notification);
|
||||
Cursor.Current = Cursors.Default;
|
||||
DialogResult = DialogResult.None;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Cursor.Current = Cursors.Default;
|
||||
MessageBox.Show(Strings.Error_while_creating_DB_Reason + exception.Message, Strings.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void createProecduresDbBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!UpdateBenchFromUIControls()) return;
|
||||
|
||||
if (DialogResult.OK == MessageBox.Show(Strings.DB_will_be_overwritten + Environment.NewLine +
|
||||
Strings.Do_you_want_to_proceed, Strings.Warning,
|
||||
MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation))
|
||||
try
|
||||
{
|
||||
Cursor.Current = Cursors.WaitCursor;
|
||||
Config.FluentCommon.CreateEmptyProceduresDB(bench.ProceduresDBSettings);
|
||||
MessageBox.Show(Strings.DB_was_successfully_created, Strings.Notification);
|
||||
Cursor.Current = Cursors.Default;
|
||||
DialogResult = DialogResult.None;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Cursor.Current = Cursors.Default;
|
||||
MessageBox.Show(Strings.Error_while_creating_DB_Reason + exception.Message, Strings.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void createWMTypesDbBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void createWaterMetersDbBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!UpdateBenchFromUIControls()) return;
|
||||
|
||||
if (DialogResult.OK == MessageBox.Show(Strings.DB_will_be_overwritten + Environment.NewLine +
|
||||
Strings.Do_you_want_to_proceed, Strings.Warning,
|
||||
MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation))
|
||||
try
|
||||
{
|
||||
Cursor.Current = Cursors.WaitCursor;
|
||||
Config.FluentCommon.CreateEmptyWaterMetersDB(bench.WaterMetersDBSettings);
|
||||
MessageBox.Show(Strings.DB_was_successfully_created, Strings.Notification);
|
||||
Cursor.Current = Cursors.Default;
|
||||
DialogResult = DialogResult.None;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Cursor.Current = Cursors.Default;
|
||||
MessageBox.Show(Strings.Error_while_creating_DB_Reason + exception.Message, Strings.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void testConnUsersBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
private void testConnBenchBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
private void testConnProceduresBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
private void testConnWMTypesBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
private void testConnWaterMetersBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,930 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="okButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>614, 15</value>
|
||||
</data>
|
||||
<data name="okButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>217, 28</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="okButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>14</value>
|
||||
</data>
|
||||
<data name="okButton.Text" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name=">>okButton.Name" xml:space="preserve">
|
||||
<value>okButton</value>
|
||||
</data>
|
||||
<data name=">>okButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>okButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>okButton.ZOrder" xml:space="preserve">
|
||||
<value>30</value>
|
||||
</data>
|
||||
<data name="cancelButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>614, 49</value>
|
||||
</data>
|
||||
<data name="cancelButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>217, 28</value>
|
||||
</data>
|
||||
<data name="cancelButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>13</value>
|
||||
</data>
|
||||
<data name="cancelButton.Text" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Name" xml:space="preserve">
|
||||
<value>cancelButton</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.ZOrder" xml:space="preserve">
|
||||
<value>31</value>
|
||||
</data>
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 18</value>
|
||||
</data>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>93, 13</value>
|
||||
</data>
|
||||
<data name="label1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>Test Bench Name</value>
|
||||
</data>
|
||||
<data name=">>label1.Name" xml:space="preserve">
|
||||
<value>label1</value>
|
||||
</data>
|
||||
<data name=">>label1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>29</value>
|
||||
</data>
|
||||
<data name="benchNameTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>116, 15</value>
|
||||
</data>
|
||||
<data name="benchNameTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>315, 20</value>
|
||||
</data>
|
||||
<data name="benchNameTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>16</value>
|
||||
</data>
|
||||
<data name=">>benchNameTextBox.Name" xml:space="preserve">
|
||||
<value>benchNameTextBox</value>
|
||||
</data>
|
||||
<data name=">>benchNameTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>benchNameTextBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>benchNameTextBox.ZOrder" xml:space="preserve">
|
||||
<value>28</value>
|
||||
</data>
|
||||
<data name="usersConnectionStringTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>202, 101</value>
|
||||
</data>
|
||||
<data name="usersConnectionStringTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>406, 20</value>
|
||||
</data>
|
||||
<data name="usersConnectionStringTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>17</value>
|
||||
</data>
|
||||
<data name=">>usersConnectionStringTextBox.Name" xml:space="preserve">
|
||||
<value>usersConnectionStringTextBox</value>
|
||||
</data>
|
||||
<data name=">>usersConnectionStringTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>usersConnectionStringTextBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>usersConnectionStringTextBox.ZOrder" xml:space="preserve">
|
||||
<value>27</value>
|
||||
</data>
|
||||
<data name="connectionStringLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="connectionStringLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>199, 82</value>
|
||||
</data>
|
||||
<data name="connectionStringLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>89, 13</value>
|
||||
</data>
|
||||
<data name="connectionStringLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>18</value>
|
||||
</data>
|
||||
<data name="connectionStringLabel.Text" xml:space="preserve">
|
||||
<value>Connection string</value>
|
||||
</data>
|
||||
<data name=">>connectionStringLabel.Name" xml:space="preserve">
|
||||
<value>connectionStringLabel</value>
|
||||
</data>
|
||||
<data name=">>connectionStringLabel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>connectionStringLabel.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>connectionStringLabel.ZOrder" xml:space="preserve">
|
||||
<value>26</value>
|
||||
</data>
|
||||
<data name="benchConnectionStringTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>202, 127</value>
|
||||
</data>
|
||||
<data name="benchConnectionStringTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>406, 20</value>
|
||||
</data>
|
||||
<data name="benchConnectionStringTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>19</value>
|
||||
</data>
|
||||
<data name=">>benchConnectionStringTextBox.Name" xml:space="preserve">
|
||||
<value>benchConnectionStringTextBox</value>
|
||||
</data>
|
||||
<data name=">>benchConnectionStringTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>benchConnectionStringTextBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>benchConnectionStringTextBox.ZOrder" xml:space="preserve">
|
||||
<value>25</value>
|
||||
</data>
|
||||
<data name="proceduresConnectionStringTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>202, 153</value>
|
||||
</data>
|
||||
<data name="proceduresConnectionStringTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>406, 20</value>
|
||||
</data>
|
||||
<data name="proceduresConnectionStringTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>20</value>
|
||||
</data>
|
||||
<data name=">>proceduresConnectionStringTextBox.Name" xml:space="preserve">
|
||||
<value>proceduresConnectionStringTextBox</value>
|
||||
</data>
|
||||
<data name=">>proceduresConnectionStringTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>proceduresConnectionStringTextBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>proceduresConnectionStringTextBox.ZOrder" xml:space="preserve">
|
||||
<value>24</value>
|
||||
</data>
|
||||
<data name="wmTypesConnectionStringTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>202, 179</value>
|
||||
</data>
|
||||
<data name="wmTypesConnectionStringTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>406, 20</value>
|
||||
</data>
|
||||
<data name="wmTypesConnectionStringTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>21</value>
|
||||
</data>
|
||||
<data name=">>wmTypesConnectionStringTextBox.Name" xml:space="preserve">
|
||||
<value>wmTypesConnectionStringTextBox</value>
|
||||
</data>
|
||||
<data name=">>wmTypesConnectionStringTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>wmTypesConnectionStringTextBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>wmTypesConnectionStringTextBox.ZOrder" xml:space="preserve">
|
||||
<value>23</value>
|
||||
</data>
|
||||
<data name="watermetersConnectionStringTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>202, 205</value>
|
||||
</data>
|
||||
<data name="watermetersConnectionStringTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>406, 20</value>
|
||||
</data>
|
||||
<data name="watermetersConnectionStringTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>22</value>
|
||||
</data>
|
||||
<data name=">>watermetersConnectionStringTextBox.Name" xml:space="preserve">
|
||||
<value>watermetersConnectionStringTextBox</value>
|
||||
</data>
|
||||
<data name=">>watermetersConnectionStringTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>watermetersConnectionStringTextBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>watermetersConnectionStringTextBox.ZOrder" xml:space="preserve">
|
||||
<value>22</value>
|
||||
</data>
|
||||
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 104</value>
|
||||
</data>
|
||||
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>90, 13</value>
|
||||
</data>
|
||||
<data name="label2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>47</value>
|
||||
</data>
|
||||
<data name="label2.Text" xml:space="preserve">
|
||||
<value>Users and groups</value>
|
||||
</data>
|
||||
<data name=">>label2.Name" xml:space="preserve">
|
||||
<value>label2</value>
|
||||
</data>
|
||||
<data name=">>label2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label2.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label2.ZOrder" xml:space="preserve">
|
||||
<value>21</value>
|
||||
</data>
|
||||
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 130</value>
|
||||
</data>
|
||||
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>93, 13</value>
|
||||
</data>
|
||||
<data name="label3.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>48</value>
|
||||
</data>
|
||||
<data name="label3.Text" xml:space="preserve">
|
||||
<value>Bench parameters</value>
|
||||
</data>
|
||||
<data name=">>label3.Name" xml:space="preserve">
|
||||
<value>label3</value>
|
||||
</data>
|
||||
<data name=">>label3.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label3.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label3.ZOrder" xml:space="preserve">
|
||||
<value>20</value>
|
||||
</data>
|
||||
<data name="label4.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label4.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 156</value>
|
||||
</data>
|
||||
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>61, 13</value>
|
||||
</data>
|
||||
<data name="label4.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>49</value>
|
||||
</data>
|
||||
<data name="label4.Text" xml:space="preserve">
|
||||
<value>Procedures</value>
|
||||
</data>
|
||||
<data name=">>label4.Name" xml:space="preserve">
|
||||
<value>label4</value>
|
||||
</data>
|
||||
<data name=">>label4.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label4.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label4.ZOrder" xml:space="preserve">
|
||||
<value>19</value>
|
||||
</data>
|
||||
<data name="label5.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label5.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 182</value>
|
||||
</data>
|
||||
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>90, 13</value>
|
||||
</data>
|
||||
<data name="label5.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>50</value>
|
||||
</data>
|
||||
<data name="label5.Text" xml:space="preserve">
|
||||
<value>Watermeter types</value>
|
||||
</data>
|
||||
<data name=">>label5.Name" xml:space="preserve">
|
||||
<value>label5</value>
|
||||
</data>
|
||||
<data name=">>label5.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label5.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label5.ZOrder" xml:space="preserve">
|
||||
<value>18</value>
|
||||
</data>
|
||||
<data name="label6.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label6.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 208</value>
|
||||
</data>
|
||||
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>67, 13</value>
|
||||
</data>
|
||||
<data name="label6.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>51</value>
|
||||
</data>
|
||||
<data name="label6.Text" xml:space="preserve">
|
||||
<value>Watermeters</value>
|
||||
</data>
|
||||
<data name=">>label6.Name" xml:space="preserve">
|
||||
<value>label6</value>
|
||||
</data>
|
||||
<data name=">>label6.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label6.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label6.ZOrder" xml:space="preserve">
|
||||
<value>17</value>
|
||||
</data>
|
||||
<data name="testConnUsersBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>614, 99</value>
|
||||
</data>
|
||||
<data name="testConnUsersBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>95, 23</value>
|
||||
</data>
|
||||
<data name="testConnUsersBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>52</value>
|
||||
</data>
|
||||
<data name="testConnUsersBtn.Text" xml:space="preserve">
|
||||
<value>Test Connection</value>
|
||||
</data>
|
||||
<data name=">>testConnUsersBtn.Name" xml:space="preserve">
|
||||
<value>testConnUsersBtn</value>
|
||||
</data>
|
||||
<data name=">>testConnUsersBtn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>testConnUsersBtn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>testConnUsersBtn.ZOrder" xml:space="preserve">
|
||||
<value>16</value>
|
||||
</data>
|
||||
<data name="createUsersDbBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>711, 99</value>
|
||||
</data>
|
||||
<data name="createUsersDbBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>120, 23</value>
|
||||
</data>
|
||||
<data name="createUsersDbBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>53</value>
|
||||
</data>
|
||||
<data name="createUsersDbBtn.Text" xml:space="preserve">
|
||||
<value>Create DB</value>
|
||||
</data>
|
||||
<data name=">>createUsersDbBtn.Name" xml:space="preserve">
|
||||
<value>createUsersDbBtn</value>
|
||||
</data>
|
||||
<data name=">>createUsersDbBtn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>createUsersDbBtn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>createUsersDbBtn.ZOrder" xml:space="preserve">
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name="realBenchCheckBox.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="realBenchCheckBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>116, 47</value>
|
||||
</data>
|
||||
<data name="realBenchCheckBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>219, 17</value>
|
||||
</data>
|
||||
<data name="realBenchCheckBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>54</value>
|
||||
</data>
|
||||
<data name="realBenchCheckBox.Text" xml:space="preserve">
|
||||
<value>Test bench is controlled by this computer</value>
|
||||
</data>
|
||||
<data name=">>realBenchCheckBox.Name" xml:space="preserve">
|
||||
<value>realBenchCheckBox</value>
|
||||
</data>
|
||||
<data name=">>realBenchCheckBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>realBenchCheckBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>realBenchCheckBox.ZOrder" xml:space="preserve">
|
||||
<value>14</value>
|
||||
</data>
|
||||
<data name="dbTypeLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="dbTypeLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>113, 82</value>
|
||||
</data>
|
||||
<data name="dbTypeLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>76, 13</value>
|
||||
</data>
|
||||
<data name="dbTypeLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>55</value>
|
||||
</data>
|
||||
<data name="dbTypeLabel.Text" xml:space="preserve">
|
||||
<value>Database type</value>
|
||||
</data>
|
||||
<data name=">>dbTypeLabel.Name" xml:space="preserve">
|
||||
<value>dbTypeLabel</value>
|
||||
</data>
|
||||
<data name=">>dbTypeLabel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>dbTypeLabel.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>dbTypeLabel.ZOrder" xml:space="preserve">
|
||||
<value>13</value>
|
||||
</data>
|
||||
<data name="usersDbTypeComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>116, 101</value>
|
||||
</data>
|
||||
<data name="usersDbTypeComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>80, 21</value>
|
||||
</data>
|
||||
<data name="usersDbTypeComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>56</value>
|
||||
</data>
|
||||
<data name=">>usersDbTypeComboBox.Name" xml:space="preserve">
|
||||
<value>usersDbTypeComboBox</value>
|
||||
</data>
|
||||
<data name=">>usersDbTypeComboBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>usersDbTypeComboBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>usersDbTypeComboBox.ZOrder" xml:space="preserve">
|
||||
<value>12</value>
|
||||
</data>
|
||||
<data name="benchDbTypeComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>116, 127</value>
|
||||
</data>
|
||||
<data name="benchDbTypeComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>80, 21</value>
|
||||
</data>
|
||||
<data name="benchDbTypeComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>57</value>
|
||||
</data>
|
||||
<data name=">>benchDbTypeComboBox.Name" xml:space="preserve">
|
||||
<value>benchDbTypeComboBox</value>
|
||||
</data>
|
||||
<data name=">>benchDbTypeComboBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>benchDbTypeComboBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>benchDbTypeComboBox.ZOrder" xml:space="preserve">
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="proceduresDbTypeComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>116, 153</value>
|
||||
</data>
|
||||
<data name="proceduresDbTypeComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>80, 21</value>
|
||||
</data>
|
||||
<data name="proceduresDbTypeComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>58</value>
|
||||
</data>
|
||||
<data name=">>proceduresDbTypeComboBox.Name" xml:space="preserve">
|
||||
<value>proceduresDbTypeComboBox</value>
|
||||
</data>
|
||||
<data name=">>proceduresDbTypeComboBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>proceduresDbTypeComboBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>proceduresDbTypeComboBox.ZOrder" xml:space="preserve">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="wmTypesDbTypeComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>116, 179</value>
|
||||
</data>
|
||||
<data name="wmTypesDbTypeComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>80, 21</value>
|
||||
</data>
|
||||
<data name="wmTypesDbTypeComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>59</value>
|
||||
</data>
|
||||
<data name=">>wmTypesDbTypeComboBox.Name" xml:space="preserve">
|
||||
<value>wmTypesDbTypeComboBox</value>
|
||||
</data>
|
||||
<data name=">>wmTypesDbTypeComboBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>wmTypesDbTypeComboBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>wmTypesDbTypeComboBox.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="watermetersDbTypeComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>116, 205</value>
|
||||
</data>
|
||||
<data name="watermetersDbTypeComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>80, 21</value>
|
||||
</data>
|
||||
<data name="watermetersDbTypeComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>60</value>
|
||||
</data>
|
||||
<data name=">>watermetersDbTypeComboBox.Name" xml:space="preserve">
|
||||
<value>watermetersDbTypeComboBox</value>
|
||||
</data>
|
||||
<data name=">>watermetersDbTypeComboBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>watermetersDbTypeComboBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>watermetersDbTypeComboBox.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="testConnBenchBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="testConnBenchBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>614, 125</value>
|
||||
</data>
|
||||
<data name="testConnBenchBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>95, 23</value>
|
||||
</data>
|
||||
<data name="testConnBenchBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>61</value>
|
||||
</data>
|
||||
<data name="testConnBenchBtn.Text" xml:space="preserve">
|
||||
<value>Test Connection</value>
|
||||
</data>
|
||||
<data name=">>testConnBenchBtn.Name" xml:space="preserve">
|
||||
<value>testConnBenchBtn</value>
|
||||
</data>
|
||||
<data name=">>testConnBenchBtn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>testConnBenchBtn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>testConnBenchBtn.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="testConnProceduresBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="testConnProceduresBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>614, 151</value>
|
||||
</data>
|
||||
<data name="testConnProceduresBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>95, 23</value>
|
||||
</data>
|
||||
<data name="testConnProceduresBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>62</value>
|
||||
</data>
|
||||
<data name="testConnProceduresBtn.Text" xml:space="preserve">
|
||||
<value>Test Connection</value>
|
||||
</data>
|
||||
<data name=">>testConnProceduresBtn.Name" xml:space="preserve">
|
||||
<value>testConnProceduresBtn</value>
|
||||
</data>
|
||||
<data name=">>testConnProceduresBtn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>testConnProceduresBtn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>testConnProceduresBtn.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="testConnWMTypesBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="testConnWMTypesBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>614, 177</value>
|
||||
</data>
|
||||
<data name="testConnWMTypesBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>95, 23</value>
|
||||
</data>
|
||||
<data name="testConnWMTypesBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>63</value>
|
||||
</data>
|
||||
<data name="testConnWMTypesBtn.Text" xml:space="preserve">
|
||||
<value>Test Connection</value>
|
||||
</data>
|
||||
<data name=">>testConnWMTypesBtn.Name" xml:space="preserve">
|
||||
<value>testConnWMTypesBtn</value>
|
||||
</data>
|
||||
<data name=">>testConnWMTypesBtn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>testConnWMTypesBtn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>testConnWMTypesBtn.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="testConnWaterMetersBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="testConnWaterMetersBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>614, 203</value>
|
||||
</data>
|
||||
<data name="testConnWaterMetersBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>95, 23</value>
|
||||
</data>
|
||||
<data name="testConnWaterMetersBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>64</value>
|
||||
</data>
|
||||
<data name="testConnWaterMetersBtn.Text" xml:space="preserve">
|
||||
<value>Test Connection</value>
|
||||
</data>
|
||||
<data name=">>testConnWaterMetersBtn.Name" xml:space="preserve">
|
||||
<value>testConnWaterMetersBtn</value>
|
||||
</data>
|
||||
<data name=">>testConnWaterMetersBtn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>testConnWaterMetersBtn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>testConnWaterMetersBtn.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="createBenchDbBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="createBenchDbBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>711, 124</value>
|
||||
</data>
|
||||
<data name="createBenchDbBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>120, 23</value>
|
||||
</data>
|
||||
<data name="createBenchDbBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>65</value>
|
||||
</data>
|
||||
<data name="createBenchDbBtn.Text" xml:space="preserve">
|
||||
<value>Create DB</value>
|
||||
</data>
|
||||
<data name=">>createBenchDbBtn.Name" xml:space="preserve">
|
||||
<value>createBenchDbBtn</value>
|
||||
</data>
|
||||
<data name=">>createBenchDbBtn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>createBenchDbBtn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>createBenchDbBtn.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="createProceduresDbBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="createProceduresDbBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>711, 150</value>
|
||||
</data>
|
||||
<data name="createProceduresDbBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>120, 23</value>
|
||||
</data>
|
||||
<data name="createProceduresDbBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>66</value>
|
||||
</data>
|
||||
<data name="createProceduresDbBtn.Text" xml:space="preserve">
|
||||
<value>Create DB</value>
|
||||
</data>
|
||||
<data name=">>createProceduresDbBtn.Name" xml:space="preserve">
|
||||
<value>createProceduresDbBtn</value>
|
||||
</data>
|
||||
<data name=">>createProceduresDbBtn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>createProceduresDbBtn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>createProceduresDbBtn.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="createWMTypesDbBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="createWMTypesDbBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>711, 176</value>
|
||||
</data>
|
||||
<data name="createWMTypesDbBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>120, 23</value>
|
||||
</data>
|
||||
<data name="createWMTypesDbBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>67</value>
|
||||
</data>
|
||||
<data name="createWMTypesDbBtn.Text" xml:space="preserve">
|
||||
<value>Create DB</value>
|
||||
</data>
|
||||
<data name=">>createWMTypesDbBtn.Name" xml:space="preserve">
|
||||
<value>createWMTypesDbBtn</value>
|
||||
</data>
|
||||
<data name=">>createWMTypesDbBtn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>createWMTypesDbBtn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>createWMTypesDbBtn.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="createWaterMetersDbBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="createWaterMetersDbBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>711, 202</value>
|
||||
</data>
|
||||
<data name="createWaterMetersDbBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>120, 23</value>
|
||||
</data>
|
||||
<data name="createWaterMetersDbBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>68</value>
|
||||
</data>
|
||||
<data name="createWaterMetersDbBtn.Text" xml:space="preserve">
|
||||
<value>Create DB</value>
|
||||
</data>
|
||||
<data name=">>createWaterMetersDbBtn.Name" xml:space="preserve">
|
||||
<value>createWaterMetersDbBtn</value>
|
||||
</data>
|
||||
<data name=">>createWaterMetersDbBtn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>createWaterMetersDbBtn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>createWaterMetersDbBtn.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>836, 241</value>
|
||||
</data>
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterParent</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Test Bench Databases Specification</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>DatabaseSettingsDlg</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
</root>
|
||||
-142
@@ -1,142 +0,0 @@
|
||||
namespace ResultsBrowser.Forms
|
||||
{
|
||||
partial class AdditionalDataDlg
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.typeApprovalTextBox = new System.Windows.Forms.TextBox();
|
||||
this.metrologicalClassTextBox = new System.Windows.Forms.TextBox();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.typeTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(34, 56);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(75, 13);
|
||||
this.label1.TabIndex = 2;
|
||||
this.label1.Text = "Type approval";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(34, 88);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(91, 13);
|
||||
this.label2.TabIndex = 4;
|
||||
this.label2.Text = "Metrological class";
|
||||
//
|
||||
// typeApprovalTextBox
|
||||
//
|
||||
this.typeApprovalTextBox.Location = new System.Drawing.Point(154, 53);
|
||||
this.typeApprovalTextBox.Name = "typeApprovalTextBox";
|
||||
this.typeApprovalTextBox.Size = new System.Drawing.Size(133, 20);
|
||||
this.typeApprovalTextBox.TabIndex = 3;
|
||||
//
|
||||
// metrologicalClassTextBox
|
||||
//
|
||||
this.metrologicalClassTextBox.Location = new System.Drawing.Point(154, 85);
|
||||
this.metrologicalClassTextBox.Name = "metrologicalClassTextBox";
|
||||
this.metrologicalClassTextBox.Size = new System.Drawing.Size(133, 20);
|
||||
this.metrologicalClassTextBox.TabIndex = 5;
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.Location = new System.Drawing.Point(246, 200);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(75, 50);
|
||||
this.okButton.TabIndex = 6;
|
||||
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(337, 200);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(75, 50);
|
||||
this.cancelButton.TabIndex = 7;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// typeTextBox
|
||||
//
|
||||
this.typeTextBox.Location = new System.Drawing.Point(154, 21);
|
||||
this.typeTextBox.Name = "typeTextBox";
|
||||
this.typeTextBox.Size = new System.Drawing.Size(133, 20);
|
||||
this.typeTextBox.TabIndex = 1;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(34, 24);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(31, 13);
|
||||
this.label3.TabIndex = 0;
|
||||
this.label3.Text = "Type";
|
||||
//
|
||||
// AdditionalDataDlg
|
||||
//
|
||||
this.AcceptButton = this.okButton;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.cancelButton;
|
||||
this.ClientSize = new System.Drawing.Size(428, 262);
|
||||
this.Controls.Add(this.typeTextBox);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Controls.Add(this.metrologicalClassTextBox);
|
||||
this.Controls.Add(this.typeApprovalTextBox);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Name = "AdditionalDataDlg";
|
||||
this.Text = "AdditionalDataDlg";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox typeApprovalTextBox;
|
||||
private System.Windows.Forms.TextBox metrologicalClassTextBox;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.TextBox typeTextBox;
|
||||
private System.Windows.Forms.Label label3;
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ResultsBrowser.Forms
|
||||
{
|
||||
public partial class AdditionalDataDlg : Form
|
||||
{
|
||||
public string Type { get { return typeTextBox.Text; } }
|
||||
public string TypeApproval { get { return typeApprovalTextBox.Text; } }
|
||||
public string MetrologicalClass { get { return metrologicalClassTextBox.Text; } }
|
||||
|
||||
public AdditionalDataDlg()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
+144
@@ -0,0 +1,144 @@
|
||||
namespace ResultsBrowser.Forms
|
||||
{
|
||||
partial class DatabaseSettings
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.textBox10 = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.textBox11 = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.textBox12 = new System.Windows.Forms.TextBox();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// textBox10
|
||||
//
|
||||
this.textBox10.Location = new System.Drawing.Point(85, 23);
|
||||
this.textBox10.Name = "textBox10";
|
||||
this.textBox10.Size = new System.Drawing.Size(555, 20);
|
||||
this.textBox10.TabIndex = 0;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(26, 26);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(38, 13);
|
||||
this.label1.TabIndex = 1;
|
||||
this.label1.Text = "WR10";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(26, 52);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(38, 13);
|
||||
this.label2.TabIndex = 3;
|
||||
this.label2.Text = "WR11";
|
||||
//
|
||||
// textBox11
|
||||
//
|
||||
this.textBox11.Location = new System.Drawing.Point(85, 49);
|
||||
this.textBox11.Name = "textBox11";
|
||||
this.textBox11.Size = new System.Drawing.Size(555, 20);
|
||||
this.textBox11.TabIndex = 2;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(26, 78);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(38, 13);
|
||||
this.label3.TabIndex = 5;
|
||||
this.label3.Text = "WR12";
|
||||
//
|
||||
// textBox12
|
||||
//
|
||||
this.textBox12.Location = new System.Drawing.Point(85, 75);
|
||||
this.textBox12.Name = "textBox12";
|
||||
this.textBox12.Size = new System.Drawing.Size(555, 20);
|
||||
this.textBox12.TabIndex = 4;
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.Location = new System.Drawing.Point(434, 109);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(95, 38);
|
||||
this.okButton.TabIndex = 6;
|
||||
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(545, 109);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(95, 38);
|
||||
this.cancelButton.TabIndex = 7;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// DatabaseSettings
|
||||
//
|
||||
this.AcceptButton = this.okButton;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.cancelButton;
|
||||
this.ClientSize = new System.Drawing.Size(668, 159);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.textBox12);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.textBox11);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.textBox10);
|
||||
this.Name = "DatabaseSettings";
|
||||
this.Text = "Database Settings";
|
||||
this.Load += new System.EventHandler(this.DatabaseSettings_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox textBox10;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox textBox11;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.TextBox textBox12;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ResultsBrowser.Forms
|
||||
{
|
||||
public partial class DatabaseSettings : Form
|
||||
{
|
||||
public DatabaseSettings()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void DatabaseSettings_Load(object sender, EventArgs e)
|
||||
{
|
||||
textBox10.Text = Program.LocalSettings.ConnectionString_WR10;
|
||||
textBox11.Text = Program.LocalSettings.ConnectionString_WR11;
|
||||
textBox12.Text = Program.LocalSettings.ConnectionString_WR12;
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
Program.LocalSettings.ConnectionString_WR10 = textBox10.Text;
|
||||
Program.LocalSettings.ConnectionString_WR11 = textBox11.Text;
|
||||
Program.LocalSettings.ConnectionString_WR12 = textBox12.Text;
|
||||
|
||||
Program.LocalSettings.Save();
|
||||
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
-107
@@ -1,107 +0,0 @@
|
||||
namespace ResultsBrowser.Forms
|
||||
{
|
||||
partial class LoginDlg
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LoginDlg));
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.passwordTextBox = new System.Windows.Forms.TextBox();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.userNameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
resources.ApplyResources(this.label1, "label1");
|
||||
this.label1.Name = "label1";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
resources.ApplyResources(this.label2, "label2");
|
||||
this.label2.Name = "label2";
|
||||
//
|
||||
// passwordTextBox
|
||||
//
|
||||
resources.ApplyResources(this.passwordTextBox, "passwordTextBox");
|
||||
this.passwordTextBox.Name = "passwordTextBox";
|
||||
this.passwordTextBox.UseSystemPasswordChar = true;
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.cancelButton, "cancelButton");
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
resources.ApplyResources(this.okButton, "okButton");
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// userNameTextBox
|
||||
//
|
||||
resources.ApplyResources(this.userNameTextBox, "userNameTextBox");
|
||||
this.userNameTextBox.Name = "userNameTextBox";
|
||||
//
|
||||
// LoginDlg
|
||||
//
|
||||
this.AcceptButton = this.okButton;
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.cancelButton;
|
||||
this.Controls.Add(this.userNameTextBox);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.passwordTextBox);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Name = "LoginDlg";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.Load += new System.EventHandler(this.LoginDlg_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox userNameTextBox;
|
||||
private System.Windows.Forms.TextBox passwordTextBox;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
}
|
||||
}
|
||||
@@ -1,132 +0,0 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using Config.Entities;
|
||||
using ResultsBrowser.Resources;
|
||||
|
||||
namespace ResultsBrowser.Forms
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides login dialog as well as user authorization using TBF.User.Authorize(...)
|
||||
/// (i.e. when DialogResult is OK, user was authorized).
|
||||
/// </summary>
|
||||
public partial class LoginDlg : Form
|
||||
{
|
||||
// Private fields
|
||||
string user;
|
||||
string password;
|
||||
Config.Grp.GID requiredGroupMembership = Config.Grp.GID.Invalid;
|
||||
bool noDatabase;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
public LoginDlg()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor with a predefined user.
|
||||
/// </summary>
|
||||
public LoginDlg(string predefinedUser)
|
||||
: this()
|
||||
{
|
||||
user = predefinedUser;
|
||||
userNameTextBox.Text = predefinedUser;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor with 'no Database' flag.
|
||||
/// </summary>
|
||||
public LoginDlg(bool noDatabase)
|
||||
: this()
|
||||
{
|
||||
this.noDatabase = noDatabase;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor when a specific group membership is required.
|
||||
/// </summary>
|
||||
public LoginDlg(Config.Grp.GID requiredGroupMembership)
|
||||
: this()
|
||||
{
|
||||
this.requiredGroupMembership = requiredGroupMembership;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor with a predefined user when a specific group membership is required.
|
||||
/// </summary>
|
||||
public LoginDlg(string predefinedUser, Config.Grp.GID requiredGroupMembership)
|
||||
: this()
|
||||
{
|
||||
user = predefinedUser;
|
||||
userNameTextBox.Text = predefinedUser;
|
||||
this.requiredGroupMembership = requiredGroupMembership;
|
||||
}
|
||||
|
||||
private void LoginDlg_Load(object sender, EventArgs e)
|
||||
{
|
||||
Text = Strings.User_Login;
|
||||
label1.Text = Strings.Username;
|
||||
label2.Text = Strings.Password;
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
cancelButton.Text = Strings.CancelBtnText;
|
||||
|
||||
if (user == null) userNameTextBox.Select();
|
||||
else passwordTextBox.Select();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Try to authorize the user when OK clicked.
|
||||
/// </summary>
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
user = userNameTextBox.Text;
|
||||
password = passwordTextBox.Text;
|
||||
|
||||
bool authorized = Config.Entities.User.IsPowerUser(user, password);
|
||||
|
||||
if (!authorized && !noDatabase)
|
||||
{
|
||||
User loadedUser = User.LoadUserByName(user);
|
||||
if (loadedUser != null)
|
||||
{
|
||||
if (requiredGroupMembership == Config.Grp.GID.Invalid)
|
||||
{
|
||||
authorized = loadedUser.Authorize(user, password);
|
||||
}
|
||||
else
|
||||
{
|
||||
authorized = loadedUser.Authorize(user, password, requiredGroupMembership);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (authorized)
|
||||
{
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
|
||||
MessageBox.Show(Strings.Invalid_username_or_password, Strings.Error, MessageBoxButtons.OK);
|
||||
DialogResult = DialogResult.None;
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cancel clicked, do not try to authorize.
|
||||
/// </summary>
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (requiredGroupMembership == Config.Grp.GID.Invalid)
|
||||
{
|
||||
User.Unauthorize();
|
||||
}
|
||||
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,288 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="label1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="passwordTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>168, 20</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterScreen</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Name" xml:space="preserve">
|
||||
<value>cancelButton</value>
|
||||
</data>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name=">>okButton.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="okButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 28</value>
|
||||
</data>
|
||||
<data name=">>passwordTextBox.Name" xml:space="preserve">
|
||||
<value>passwordTextBox</value>
|
||||
</data>
|
||||
<data name="cancelButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 28</value>
|
||||
</data>
|
||||
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>8, 51</value>
|
||||
</data>
|
||||
<data name="passwordTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>96, 48</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>User name</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name=">>label2.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name="cancelButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="passwordTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>8, 24</value>
|
||||
</data>
|
||||
<data name=">>label2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>LoginDlg</value>
|
||||
</data>
|
||||
<data name="userNameTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>168, 20</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>402, 88</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="okButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>285, 14</value>
|
||||
</data>
|
||||
<data name=">>okButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label1.Name" xml:space="preserve">
|
||||
<value>label1</value>
|
||||
</data>
|
||||
<data name=">>label2.Name" xml:space="preserve">
|
||||
<value>label2</value>
|
||||
</data>
|
||||
<data name="cancelButton.Text" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>okButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>okButton.Name" xml:space="preserve">
|
||||
<value>okButton</value>
|
||||
</data>
|
||||
<data name="label2.Text" xml:space="preserve">
|
||||
<value>Password</value>
|
||||
</data>
|
||||
<data name=">>passwordTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>53, 13</value>
|
||||
</data>
|
||||
<data name="userNameTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="cancelButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>285, 48</value>
|
||||
</data>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>58, 13</value>
|
||||
</data>
|
||||
<data name="okButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="label2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name=">>passwordTextBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>userNameTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="okButton.Text" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name=">>userNameTextBox.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>userNameTextBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name="userNameTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>96, 22</value>
|
||||
</data>
|
||||
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>passwordTextBox.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>User login</value>
|
||||
</data>
|
||||
<data name=">>label2.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name=">>label1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>userNameTextBox.Name" xml:space="preserve">
|
||||
<value>userNameTextBox</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -1,117 +0,0 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using ResultsBrowser.Resources;
|
||||
|
||||
|
||||
namespace ResultsBrowser.Forms
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides login dialog that includes test bench selection.
|
||||
/// It is used only once on program startup. Does not do authorisation
|
||||
/// as User.users have not been loadded from the DB yet.
|
||||
/// </summary>
|
||||
public partial class LoginDlgWithBenchSelection : Form
|
||||
{
|
||||
// Private fields
|
||||
string user;
|
||||
string password;
|
||||
string benchName = null;
|
||||
|
||||
// Readonly public properties to do the authorization.
|
||||
public string User { get { return user; } }
|
||||
public string Password { get { return password; } }
|
||||
public string BenchName { get { return benchName; } }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
public LoginDlgWithBenchSelection()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor with a predefined bench.
|
||||
/// </summary>
|
||||
public LoginDlgWithBenchSelection(string predefinedBench)
|
||||
: this()
|
||||
{
|
||||
benchName = predefinedBench;
|
||||
}
|
||||
|
||||
private void LoginDlgWithBenchSelection_Load(object sender, EventArgs e)
|
||||
{
|
||||
#if DEBUG
|
||||
userNameTextBox.Text = Config.Data.AdminUsername;
|
||||
passwordTextBox.Text = Config.Data.AdminPassword;
|
||||
#endif
|
||||
for (int i = 0; i < Program.LocalSettings.BenchesCount; i++)
|
||||
{
|
||||
testBenchComboBox.Items.Add(Program.LocalSettings.TestBenches[i].BenchName);
|
||||
if (benchName != null && benchName == Program.LocalSettings.TestBenches[i].BenchName)
|
||||
{
|
||||
testBenchComboBox.Text = benchName;
|
||||
}
|
||||
}
|
||||
|
||||
Localize();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.User_Login;
|
||||
label1.Text = Strings.Username;
|
||||
label2.Text = Strings.Password;
|
||||
label3.Text = Strings.Test_bench;
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
cancelButton.Text = Strings.CancelBtnText;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OK clicked (authorization is done outside this dialog).
|
||||
/// </summary>
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (testBenchComboBox.SelectedItem != null)
|
||||
{
|
||||
user = userNameTextBox.Text;
|
||||
password = passwordTextBox.Text;
|
||||
benchName = testBenchComboBox.SelectedItem.ToString();
|
||||
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(Strings.PLs_select_testbench, Strings.Warning, MessageBoxButtons.OK);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cancel clicked.
|
||||
/// </summary>
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
|
||||
private void passwordTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (passwordTextBox.Text != "")
|
||||
{
|
||||
this.AcceptButton = okButton;
|
||||
}
|
||||
}
|
||||
|
||||
private void userNameTextBox_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (Convert.ToInt32(e.KeyChar) == 13)
|
||||
{
|
||||
passwordTextBox.Focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,125 +0,0 @@
|
||||
namespace ResultsBrowser.Forms
|
||||
{
|
||||
partial class LoginDlgWithBenchSelection
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LoginDlgWithBenchSelection));
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.testBenchComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.passwordTextBox = new System.Windows.Forms.TextBox();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.userNameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
resources.ApplyResources(this.label1, "label1");
|
||||
this.label1.Name = "label1";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
resources.ApplyResources(this.label2, "label2");
|
||||
this.label2.Name = "label2";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
resources.ApplyResources(this.label3, "label3");
|
||||
this.label3.Name = "label3";
|
||||
//
|
||||
// testBenchComboBox
|
||||
//
|
||||
resources.ApplyResources(this.testBenchComboBox, "testBenchComboBox");
|
||||
this.testBenchComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.testBenchComboBox.FormattingEnabled = true;
|
||||
this.testBenchComboBox.Name = "testBenchComboBox";
|
||||
//
|
||||
// passwordTextBox
|
||||
//
|
||||
resources.ApplyResources(this.passwordTextBox, "passwordTextBox");
|
||||
this.passwordTextBox.Name = "passwordTextBox";
|
||||
this.passwordTextBox.UseSystemPasswordChar = true;
|
||||
this.passwordTextBox.TextChanged += new System.EventHandler(this.passwordTextBox_TextChanged);
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
resources.ApplyResources(this.cancelButton, "cancelButton");
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
resources.ApplyResources(this.okButton, "okButton");
|
||||
this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// userNameTextBox
|
||||
//
|
||||
resources.ApplyResources(this.userNameTextBox, "userNameTextBox");
|
||||
this.userNameTextBox.Name = "userNameTextBox";
|
||||
this.userNameTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.userNameTextBox_KeyPress);
|
||||
//
|
||||
// LoginDlgWithBenchSelection
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.userNameTextBox);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.passwordTextBox);
|
||||
this.Controls.Add(this.testBenchComboBox);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Name = "LoginDlgWithBenchSelection";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.Load += new System.EventHandler(this.LoginDlgWithBenchSelection_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.TextBox userNameTextBox;
|
||||
private System.Windows.Forms.TextBox passwordTextBox;
|
||||
private System.Windows.Forms.ComboBox testBenchComboBox;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
}
|
||||
}
|
||||
@@ -1,336 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>User name</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="cancelButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 28</value>
|
||||
</data>
|
||||
<data name="okButton.Text" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name="cancelButton.Text" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>testBenchComboBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>LoginDlgWithBenchSelection</value>
|
||||
</data>
|
||||
<data name=">>label1.Name" xml:space="preserve">
|
||||
<value>label1</value>
|
||||
</data>
|
||||
<data name=">>passwordTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="testBenchComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name=">>label3.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name="userNameTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>96, 15</value>
|
||||
</data>
|
||||
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>61, 13</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name="testBenchComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>96, 67</value>
|
||||
</data>
|
||||
<data name=">>label3.Name" xml:space="preserve">
|
||||
<value>label3</value>
|
||||
</data>
|
||||
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterScreen</value>
|
||||
</data>
|
||||
<data name=">>label1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>8, 70</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="passwordTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>96, 41</value>
|
||||
</data>
|
||||
<data name=">>userNameTextBox.Name" xml:space="preserve">
|
||||
<value>userNameTextBox</value>
|
||||
</data>
|
||||
<data name="label2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>58, 13</value>
|
||||
</data>
|
||||
<data name=">>testBenchComboBox.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name=">>label2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>passwordTextBox.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name=">>label2.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>53, 13</value>
|
||||
</data>
|
||||
<data name=">>testBenchComboBox.Name" xml:space="preserve">
|
||||
<value>testBenchComboBox</value>
|
||||
</data>
|
||||
<data name="userNameTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>168, 20</value>
|
||||
</data>
|
||||
<data name="okButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 28</value>
|
||||
</data>
|
||||
<data name=">>userNameTextBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name="testBenchComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>168, 21</value>
|
||||
</data>
|
||||
<data name="label1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="passwordTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>168, 20</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="okButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>285, 14</value>
|
||||
</data>
|
||||
<data name=">>userNameTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="label3.Text" xml:space="preserve">
|
||||
<value>Test bench</value>
|
||||
</data>
|
||||
<data name=">>okButton.Name" xml:space="preserve">
|
||||
<value>okButton</value>
|
||||
</data>
|
||||
<data name="cancelButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>285, 48</value>
|
||||
</data>
|
||||
<data name=">>label2.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>okButton.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name=">>testBenchComboBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name=">>okButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name="userNameTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name=">>label2.Name" xml:space="preserve">
|
||||
<value>label2</value>
|
||||
</data>
|
||||
<data name=">>passwordTextBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Name" xml:space="preserve">
|
||||
<value>cancelButton</value>
|
||||
</data>
|
||||
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>8, 17</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>User login</value>
|
||||
</data>
|
||||
<data name=">>passwordTextBox.Name" xml:space="preserve">
|
||||
<value>passwordTextBox</value>
|
||||
</data>
|
||||
<data name="label2.Text" xml:space="preserve">
|
||||
<value>Password</value>
|
||||
</data>
|
||||
<data name="label3.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>8, 44</value>
|
||||
</data>
|
||||
<data name="cancelButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name=">>okButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>402, 102</value>
|
||||
</data>
|
||||
<data name="passwordTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name=">>label3.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name=">>label1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="okButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name=">>label3.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>userNameTextBox.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -9,8 +9,7 @@ using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using Config;
|
||||
using Config.Entities;
|
||||
using Results.Entities;
|
||||
using ResultsBrowser.Resources;
|
||||
|
||||
namespace ResultsBrowser.Forms
|
||||
@@ -21,24 +20,24 @@ namespace ResultsBrowser.Forms
|
||||
/// Required access rights to make changes with this form
|
||||
/// </summary>
|
||||
const Config.Grp.GID RequiredGroupMembership = Config.Grp.GID.Metrologists;
|
||||
public TestsArrangement TestsArrangement;
|
||||
public MetersArrangement MetersArrangement;
|
||||
public Config.Entities.TestsArrangement TestsArrangement;
|
||||
public Config.Entities.MetersArrangement MetersArrangement;
|
||||
public int NrMetersInOneGroup;
|
||||
|
||||
public IList<ResultItemSpec> currentlyAvailableItems;
|
||||
public IList<ResultItemSpec> ReportItems_Single;
|
||||
public IList<ResultItemSpec> ReportItems_Compound;
|
||||
public IList<Results.ItemSpec> currentlyAvailableItems;
|
||||
public IList<Results.ItemSpec> ReportItems_Single;
|
||||
public IList<Results.ItemSpec> ReportItems_Compound;
|
||||
|
||||
bool combined; /// false = single meter items, true = combined meter items
|
||||
Device device; /// Screen, Printer or Disk
|
||||
bool unlocked; /// true = changes enabled
|
||||
bool combined; /// false = single meter items, true = combined meter items
|
||||
Config.Entities.Device device; /// Screen, Printer or Disk
|
||||
bool unlocked; /// true = changes enabled
|
||||
|
||||
public ResultsConfig(bool combined)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.combined = combined;
|
||||
device = Device.Screen;
|
||||
device = Config.Entities.Device.Screen;
|
||||
unlocked = false;
|
||||
cancelButton.Visible = false;
|
||||
}
|
||||
@@ -74,7 +73,7 @@ namespace ResultsBrowser.Forms
|
||||
/// Gets the list of selected items based on watermeter type and device selections
|
||||
/// </summary>
|
||||
/// <returns>List of selected result items</returns>
|
||||
IList<ResultItemSpec> GetSelectedItems()
|
||||
IList<Results.ItemSpec> GetSelectedItems()
|
||||
{
|
||||
if (combined)
|
||||
{
|
||||
@@ -92,8 +91,8 @@ namespace ResultsBrowser.Forms
|
||||
void RedrawAvailable()
|
||||
{
|
||||
availableResultsListBox.Items.Clear();
|
||||
currentlyAvailableItems = new List<ResultItemSpec>();
|
||||
foreach (var item in ResultItemSpec.AllItems)
|
||||
currentlyAvailableItems = new List<Results.ItemSpec>();
|
||||
foreach (var item in Results.ItemSpec.AllItems)
|
||||
{
|
||||
if (!GetSelectedItems().Contains(item) && (combined ? item.CanPrintCombined : item.CanPrintSingle))
|
||||
{
|
||||
@@ -119,10 +118,10 @@ namespace ResultsBrowser.Forms
|
||||
{
|
||||
if (!unlocked)
|
||||
{
|
||||
if (!User.CurrentUser.IsMemberOf(RequiredGroupMembership))
|
||||
{
|
||||
if ((new LoginDlg(RequiredGroupMembership)).ShowDialog() != DialogResult.OK) return;
|
||||
}
|
||||
//if (!User.CurrentUser.IsMemberOf(RequiredGroupMembership))
|
||||
//{
|
||||
// if ((new LoginDlg(RequiredGroupMembership)).ShowDialog() != DialogResult.OK) return;
|
||||
//}
|
||||
|
||||
unlocked = true;
|
||||
|
||||
@@ -149,7 +148,7 @@ namespace ResultsBrowser.Forms
|
||||
void availableResultsListBox_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
/// Double click works when just one item is selected
|
||||
IList<ResultItemSpec> itemsToRemove = new List<ResultItemSpec>();
|
||||
IList<Results.ItemSpec> itemsToRemove = new List<Results.ItemSpec>();
|
||||
if (availableResultsListBox.SelectedIndices.Count == 1)
|
||||
{
|
||||
var item = currentlyAvailableItems[availableResultsListBox.SelectedIndices[0]];
|
||||
|
||||
@@ -26,12 +26,10 @@ namespace ResultsBrowser
|
||||
/// <summary>C:\VSProjects\TBF\TestBenchFramework\LocalSettings.cs
|
||||
/// Names and database settings of test benches.
|
||||
/// </summary>
|
||||
[XmlArrayAttribute("TestBenches")]
|
||||
public Config.DatabaseSettings[] TestBenches;
|
||||
[XmlIgnore]
|
||||
public int BenchesCount { get { return (TestBenches != null) ? TestBenches.GetLength(0) : 0; } }
|
||||
public string ConnectionString_WR10;
|
||||
public string ConnectionString_WR11;
|
||||
public string ConnectionString_WR12;
|
||||
|
||||
public string LastBenchName;
|
||||
public bool FilterPurchaseOrder;
|
||||
public bool FilterProcedure;
|
||||
public bool FilterBatchNr;
|
||||
@@ -46,11 +44,13 @@ namespace ResultsBrowser
|
||||
public bool ManiWndMaximized;
|
||||
|
||||
/// Purchase order history
|
||||
public string LastPurchaseOrder;
|
||||
public string[] PurchaseOrderHistory;
|
||||
[XmlIgnore]
|
||||
public int PurchaseOrderHistoryCount { get { return (PurchaseOrderHistory != null) ? PurchaseOrderHistory.Length : 0; } }
|
||||
|
||||
/// Procedure history
|
||||
public string LastProcedure;
|
||||
public string[] ProcedureHistory;
|
||||
[XmlIgnore]
|
||||
public int ProcedureHistoryCount { get { return (ProcedureHistory != null) ? ProcedureHistory.Length : 0; } }
|
||||
@@ -60,6 +60,7 @@ namespace ResultsBrowser
|
||||
public string BatchTo;
|
||||
|
||||
/// Report file name history
|
||||
public string LastReportFileName;
|
||||
public string[] ReportFileNameHistory;
|
||||
[XmlIgnore]
|
||||
public int ReportFileNameHistoryCount { get { return (ReportFileNameHistory != null) ? ReportFileNameHistory.Length : 0; } }
|
||||
|
||||
Generated
+85
-32
@@ -28,8 +28,10 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.queryButton = new System.Windows.Forms.Button();
|
||||
this.queryBatchesButton = new System.Windows.Forms.Button();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.queryResultsItemsLabel = new System.Windows.Forms.Label();
|
||||
this.queryWatermetersButton = new System.Windows.Forms.Button();
|
||||
this.batchNrGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.batchNrToTextBox = new System.Windows.Forms.TextBox();
|
||||
this.batchNrFromTextBox = new System.Windows.Forms.TextBox();
|
||||
@@ -42,7 +44,6 @@
|
||||
this.procedureGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.procedureCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.procedureComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.clearButton = new System.Windows.Forms.Button();
|
||||
this.fromGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
@@ -56,6 +57,9 @@
|
||||
this.configReportButton = new System.Windows.Forms.Button();
|
||||
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
|
||||
this.splitContainer3 = new System.Windows.Forms.SplitContainer();
|
||||
this.makeAscFileDewaButton = new System.Windows.Forms.Button();
|
||||
this.reportItemsLabel = new System.Windows.Forms.Label();
|
||||
this.configButton = new System.Windows.Forms.Button();
|
||||
this.makeReportButton = new System.Windows.Forms.Button();
|
||||
this.removeFromReportButton = new System.Windows.Forms.Button();
|
||||
this.reportFileGroupBox = new System.Windows.Forms.GroupBox();
|
||||
@@ -83,15 +87,15 @@
|
||||
this.reportFileGroupBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// queryButton
|
||||
// queryBatchesButton
|
||||
//
|
||||
this.queryButton.Location = new System.Drawing.Point(15, 178);
|
||||
this.queryButton.Name = "queryButton";
|
||||
this.queryButton.Size = new System.Drawing.Size(108, 29);
|
||||
this.queryButton.TabIndex = 3;
|
||||
this.queryButton.Text = "Query";
|
||||
this.queryButton.UseVisualStyleBackColor = true;
|
||||
this.queryButton.Click += new System.EventHandler(this.queryButton_Click);
|
||||
this.queryBatchesButton.Location = new System.Drawing.Point(15, 178);
|
||||
this.queryBatchesButton.Name = "queryBatchesButton";
|
||||
this.queryBatchesButton.Size = new System.Drawing.Size(108, 29);
|
||||
this.queryBatchesButton.TabIndex = 3;
|
||||
this.queryBatchesButton.Text = "Query batches";
|
||||
this.queryBatchesButton.UseVisualStyleBackColor = true;
|
||||
this.queryBatchesButton.Click += new System.EventHandler(this.queryBatchesButton_Click);
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
@@ -104,14 +108,15 @@
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.queryResultsItemsLabel);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.queryWatermetersButton);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.batchNrGroupBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.removeFromQueryButton);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.addToReportButton);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.resolveManuallyCheckBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.procedureGroupBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.clearButton);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.fromGroupBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.queryButton);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.queryBatchesButton);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.purchaseOrderGroupBox);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
@@ -121,6 +126,25 @@
|
||||
this.splitContainer1.SplitterDistance = 220;
|
||||
this.splitContainer1.TabIndex = 5;
|
||||
//
|
||||
// queryResultsItemsLabel
|
||||
//
|
||||
this.queryResultsItemsLabel.AutoSize = true;
|
||||
this.queryResultsItemsLabel.Location = new System.Drawing.Point(255, 207);
|
||||
this.queryResultsItemsLabel.Name = "queryResultsItemsLabel";
|
||||
this.queryResultsItemsLabel.Size = new System.Drawing.Size(40, 13);
|
||||
this.queryResultsItemsLabel.TabIndex = 13;
|
||||
this.queryResultsItemsLabel.Text = "0 items";
|
||||
//
|
||||
// queryWatermetersButton
|
||||
//
|
||||
this.queryWatermetersButton.Location = new System.Drawing.Point(129, 178);
|
||||
this.queryWatermetersButton.Name = "queryWatermetersButton";
|
||||
this.queryWatermetersButton.Size = new System.Drawing.Size(108, 29);
|
||||
this.queryWatermetersButton.TabIndex = 12;
|
||||
this.queryWatermetersButton.Text = "Query water meters";
|
||||
this.queryWatermetersButton.UseVisualStyleBackColor = true;
|
||||
this.queryWatermetersButton.Click += new System.EventHandler(this.queryWatermetersButton_Click);
|
||||
//
|
||||
// batchNrGroupBox
|
||||
//
|
||||
this.batchNrGroupBox.Controls.Add(this.batchNrToTextBox);
|
||||
@@ -133,6 +157,7 @@
|
||||
this.batchNrGroupBox.Size = new System.Drawing.Size(242, 50);
|
||||
this.batchNrGroupBox.TabIndex = 11;
|
||||
this.batchNrGroupBox.TabStop = false;
|
||||
this.batchNrGroupBox.Visible = false;
|
||||
//
|
||||
// batchNrToTextBox
|
||||
//
|
||||
@@ -175,14 +200,15 @@
|
||||
this.batchNrCheckBox.TabIndex = 1;
|
||||
this.batchNrCheckBox.Text = "Filter batch number";
|
||||
this.batchNrCheckBox.UseVisualStyleBackColor = true;
|
||||
this.batchNrCheckBox.Visible = false;
|
||||
//
|
||||
// removeFromQueryButton
|
||||
//
|
||||
this.removeFromQueryButton.Location = new System.Drawing.Point(453, 162);
|
||||
this.removeFromQueryButton.Location = new System.Drawing.Point(380, 178);
|
||||
this.removeFromQueryButton.Name = "removeFromQueryButton";
|
||||
this.removeFromQueryButton.Size = new System.Drawing.Size(46, 40);
|
||||
this.removeFromQueryButton.Size = new System.Drawing.Size(114, 29);
|
||||
this.removeFromQueryButton.TabIndex = 9;
|
||||
this.removeFromQueryButton.Text = "Delete";
|
||||
this.removeFromQueryButton.Text = "Remove selected";
|
||||
this.removeFromQueryButton.UseVisualStyleBackColor = true;
|
||||
this.removeFromQueryButton.Click += new System.EventHandler(this.removeFromQueryButton_Click);
|
||||
//
|
||||
@@ -235,16 +261,6 @@
|
||||
this.procedureComboBox.Size = new System.Drawing.Size(201, 21);
|
||||
this.procedureComboBox.TabIndex = 0;
|
||||
//
|
||||
// clearButton
|
||||
//
|
||||
this.clearButton.Location = new System.Drawing.Point(149, 178);
|
||||
this.clearButton.Name = "clearButton";
|
||||
this.clearButton.Size = new System.Drawing.Size(108, 29);
|
||||
this.clearButton.TabIndex = 4;
|
||||
this.clearButton.Text = "Clear";
|
||||
this.clearButton.UseVisualStyleBackColor = true;
|
||||
this.clearButton.Click += new System.EventHandler(this.clearButton_Click);
|
||||
//
|
||||
// fromGroupBox
|
||||
//
|
||||
this.fromGroupBox.Controls.Add(this.label2);
|
||||
@@ -376,6 +392,9 @@
|
||||
//
|
||||
// splitContainer3.Panel1
|
||||
//
|
||||
this.splitContainer3.Panel1.Controls.Add(this.makeAscFileDewaButton);
|
||||
this.splitContainer3.Panel1.Controls.Add(this.reportItemsLabel);
|
||||
this.splitContainer3.Panel1.Controls.Add(this.configButton);
|
||||
this.splitContainer3.Panel1.Controls.Add(this.makeReportButton);
|
||||
this.splitContainer3.Panel1.Controls.Add(this.removeFromReportButton);
|
||||
this.splitContainer3.Panel1.Controls.Add(this.reportFileGroupBox);
|
||||
@@ -390,6 +409,35 @@
|
||||
this.splitContainer3.SplitterDistance = 220;
|
||||
this.splitContainer3.TabIndex = 6;
|
||||
//
|
||||
// makeAscFileDewaButton
|
||||
//
|
||||
this.makeAscFileDewaButton.Location = new System.Drawing.Point(443, 146);
|
||||
this.makeAscFileDewaButton.Name = "makeAscFileDewaButton";
|
||||
this.makeAscFileDewaButton.Size = new System.Drawing.Size(103, 47);
|
||||
this.makeAscFileDewaButton.TabIndex = 15;
|
||||
this.makeAscFileDewaButton.Text = "Make *.asc File DEWA, Columbia";
|
||||
this.makeAscFileDewaButton.UseVisualStyleBackColor = true;
|
||||
this.makeAscFileDewaButton.Click += new System.EventHandler(this.makeAscFileDewaButton_Click);
|
||||
//
|
||||
// reportItemsLabel
|
||||
//
|
||||
this.reportItemsLabel.AutoSize = true;
|
||||
this.reportItemsLabel.Location = new System.Drawing.Point(261, 207);
|
||||
this.reportItemsLabel.Name = "reportItemsLabel";
|
||||
this.reportItemsLabel.Size = new System.Drawing.Size(40, 13);
|
||||
this.reportItemsLabel.TabIndex = 14;
|
||||
this.reportItemsLabel.Text = "0 items";
|
||||
//
|
||||
// configButton
|
||||
//
|
||||
this.configButton.Location = new System.Drawing.Point(589, 14);
|
||||
this.configButton.Name = "configButton";
|
||||
this.configButton.Size = new System.Drawing.Size(75, 71);
|
||||
this.configButton.TabIndex = 12;
|
||||
this.configButton.Text = "Configure";
|
||||
this.configButton.UseVisualStyleBackColor = true;
|
||||
this.configButton.Click += new System.EventHandler(this.configButton_Click);
|
||||
//
|
||||
// makeReportButton
|
||||
//
|
||||
this.makeReportButton.Location = new System.Drawing.Point(335, 95);
|
||||
@@ -402,11 +450,11 @@
|
||||
//
|
||||
// removeFromReportButton
|
||||
//
|
||||
this.removeFromReportButton.Location = new System.Drawing.Point(58, 162);
|
||||
this.removeFromReportButton.Location = new System.Drawing.Point(55, 178);
|
||||
this.removeFromReportButton.Name = "removeFromReportButton";
|
||||
this.removeFromReportButton.Size = new System.Drawing.Size(46, 40);
|
||||
this.removeFromReportButton.Size = new System.Drawing.Size(114, 29);
|
||||
this.removeFromReportButton.TabIndex = 10;
|
||||
this.removeFromReportButton.Text = "Delete";
|
||||
this.removeFromReportButton.Text = "Remove selected";
|
||||
this.removeFromReportButton.UseVisualStyleBackColor = true;
|
||||
this.removeFromReportButton.Click += new System.EventHandler(this.removeFromReportButton_Click);
|
||||
//
|
||||
@@ -476,7 +524,7 @@
|
||||
this.ClientSize = new System.Drawing.Size(1284, 624);
|
||||
this.Controls.Add(this.splitContainer2);
|
||||
this.Name = "MainWnd";
|
||||
this.Text = "Form1";
|
||||
this.Text = "Results browser";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainWnd_FormClosing);
|
||||
this.Load += new System.EventHandler(this.MainWnd_Load);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
@@ -497,6 +545,7 @@
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
|
||||
this.splitContainer2.ResumeLayout(false);
|
||||
this.splitContainer3.Panel1.ResumeLayout(false);
|
||||
this.splitContainer3.Panel1.PerformLayout();
|
||||
this.splitContainer3.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit();
|
||||
this.splitContainer3.ResumeLayout(false);
|
||||
@@ -507,7 +556,7 @@
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button queryButton;
|
||||
private System.Windows.Forms.Button queryBatchesButton;
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private System.Windows.Forms.GroupBox fromGroupBox;
|
||||
private System.Windows.Forms.Label label2;
|
||||
@@ -517,8 +566,7 @@
|
||||
private System.Windows.Forms.DateTimePicker fromDateTimePicker;
|
||||
private System.Windows.Forms.GroupBox purchaseOrderGroupBox;
|
||||
private System.Windows.Forms.CheckBox purchaseOrderCheckBox;
|
||||
private System.Windows.Forms.ComboBox purchaseOrderComboBox;
|
||||
private System.Windows.Forms.Button clearButton;
|
||||
private System.Windows.Forms.ComboBox purchaseOrderComboBox;
|
||||
private System.Windows.Forms.Button configReportButton;
|
||||
private System.Windows.Forms.CheckBox resolveManuallyCheckBox;
|
||||
private System.Windows.Forms.GroupBox procedureGroupBox;
|
||||
@@ -543,6 +591,11 @@
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.CheckBox batchNrCheckBox;
|
||||
private System.Windows.Forms.Button makeReportButton;
|
||||
private System.Windows.Forms.Button configButton;
|
||||
private System.Windows.Forms.Button queryWatermetersButton;
|
||||
private System.Windows.Forms.Label queryResultsItemsLabel;
|
||||
private System.Windows.Forms.Label reportItemsLabel;
|
||||
private System.Windows.Forms.Button makeAscFileDewaButton;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+392
-226
@@ -10,8 +10,7 @@ using log4net;
|
||||
using NHibernate;
|
||||
using Oracle.DataAccess.Client; // ODP.NET Oracle managed provider
|
||||
using Oracle.DataAccess.Types;
|
||||
using Config;
|
||||
using Config.Entities;
|
||||
using Results.Entities;
|
||||
|
||||
namespace ResultsBrowser
|
||||
{
|
||||
@@ -19,13 +18,30 @@ namespace ResultsBrowser
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(MainWnd));
|
||||
|
||||
public IList<ResultItemSpec> ReportItems_Single;
|
||||
public IList<ResultItemSpec> ReportItems_Compound;
|
||||
bool batchesQueried;
|
||||
|
||||
public static IList<Batch> QueryBatches;
|
||||
public static IList<WaterMeter> QueryWaterMeters;
|
||||
|
||||
public static IList<Batch> ReportBatches;
|
||||
public static IList<WaterMeter> ReportWaterMeters;
|
||||
|
||||
public IList<Results.ItemSpec> ReportItems_Single;
|
||||
public IList<Results.ItemSpec> ReportItems_Compound;
|
||||
|
||||
|
||||
public MainWnd()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
Text = string.Format("Results browser ver. {0}",
|
||||
Program.Version);
|
||||
|
||||
QueryBatches = new List<Batch>();
|
||||
QueryWaterMeters = new List<WaterMeter>();
|
||||
|
||||
ReportBatches = new List<Batch>();
|
||||
ReportWaterMeters = new List<WaterMeter>();
|
||||
}
|
||||
|
||||
private void MainWnd_Load(object sender, EventArgs e)
|
||||
@@ -33,9 +49,12 @@ namespace ResultsBrowser
|
||||
PrepareComboBoxHistory(Program.LocalSettings.PurchaseOrderHistory, purchaseOrderComboBox);
|
||||
PrepareComboBoxHistory(Program.LocalSettings.ProcedureHistory, procedureComboBox);
|
||||
PrepareComboBoxHistory(Program.LocalSettings.ReportFileNameHistory, reportFileComboBox);
|
||||
purchaseOrderComboBox.Text = Program.LocalSettings.LastPurchaseOrder;
|
||||
procedureComboBox.Text = Program.LocalSettings.LastProcedure;
|
||||
reportFileComboBox.Text = Program.LocalSettings.LastReportFileName;
|
||||
|
||||
ReportItems_Single = ResultItemSpec.FromStrArray(Program.LocalSettings.ReportItems_Single);
|
||||
ReportItems_Compound = ResultItemSpec.FromStrArray(Program.LocalSettings.ReportItems_Compound);
|
||||
ReportItems_Single = Results.ItemSpec.FromStrArray(Program.LocalSettings.ReportItems_Single);
|
||||
ReportItems_Compound = Results.ItemSpec.FromStrArray(Program.LocalSettings.ReportItems_Compound);
|
||||
|
||||
purchaseOrderCheckBox.Checked = Program.LocalSettings.FilterPurchaseOrder;
|
||||
procedureCheckBox.Checked = Program.LocalSettings.FilterProcedure;
|
||||
@@ -46,6 +65,8 @@ namespace ResultsBrowser
|
||||
|
||||
batchNrFromTextBox.Text = Program.LocalSettings.BatchFrom;
|
||||
batchNrToTextBox.Text = Program.LocalSettings.BatchTo;
|
||||
|
||||
Results.DB.ConnectionString = Program.LocalSettings.ConnectionString_WR10;
|
||||
}
|
||||
|
||||
private void MainWnd_FormClosing(object sender, FormClosingEventArgs e)
|
||||
@@ -53,9 +74,12 @@ namespace ResultsBrowser
|
||||
Program.LocalSettings.UpdateHistory(purchaseOrderComboBox.Text, ref Program.LocalSettings.PurchaseOrderHistory);
|
||||
Program.LocalSettings.UpdateHistory(procedureComboBox.Text, ref Program.LocalSettings.PurchaseOrderHistory);
|
||||
Program.LocalSettings.UpdateHistory(reportFileComboBox.Text, ref Program.LocalSettings.ReportFileNameHistory);
|
||||
Program.LocalSettings.LastPurchaseOrder = purchaseOrderComboBox.Text;
|
||||
Program.LocalSettings.LastProcedure = procedureComboBox.Text;
|
||||
Program.LocalSettings.LastReportFileName = reportFileComboBox.Text;
|
||||
|
||||
Program.LocalSettings.ReportItems_Single = ResultItemSpec.ToStrArray(ReportItems_Single);
|
||||
Program.LocalSettings.ReportItems_Compound = ResultItemSpec.ToStrArray(ReportItems_Compound);
|
||||
Program.LocalSettings.ReportItems_Single = Results.ItemSpec.ToStrArray(ReportItems_Single);
|
||||
Program.LocalSettings.ReportItems_Compound = Results.ItemSpec.ToStrArray(ReportItems_Compound);
|
||||
|
||||
Program.LocalSettings.FilterPurchaseOrder = purchaseOrderCheckBox.Checked;
|
||||
Program.LocalSettings.FilterProcedure = procedureCheckBox.Checked;
|
||||
@@ -72,13 +96,35 @@ namespace ResultsBrowser
|
||||
|
||||
void RedrawLists()
|
||||
{
|
||||
queryResultsListBox.Items.Clear();
|
||||
foreach (var wmr in DataDeposit.QueryWaterMeterResults) queryResultsListBox.Items.Add(wmr);
|
||||
|
||||
reportListBox.Items.Clear();
|
||||
foreach (var wmr in DataDeposit.ReportWaterMeterResults) reportListBox.Items.Add(wmr);
|
||||
RedrawQueryList();
|
||||
RedrawReportList();
|
||||
}
|
||||
|
||||
void RedrawQueryList()
|
||||
{
|
||||
queryResultsListBox.Items.Clear();
|
||||
if (batchesQueried)
|
||||
{
|
||||
foreach (var b in QueryBatches) queryResultsListBox.Items.Add(b.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var wmr in QueryWaterMeters) queryResultsListBox.Items.Add(wmr);
|
||||
}
|
||||
int nrItems = queryResultsListBox.Items.Count;
|
||||
if (nrItems == 0) queryResultsListBox.Items.Add("<empty>");
|
||||
queryResultsItemsLabel.Text = string.Format("{0} items", nrItems);
|
||||
}
|
||||
|
||||
void RedrawReportList()
|
||||
{
|
||||
reportListBox.Items.Clear();
|
||||
foreach (var wmr in ReportWaterMeters) reportListBox.Items.Add(wmr);
|
||||
int nrItems = reportListBox.Items.Count;
|
||||
if (nrItems == 0) reportListBox.Items.Add("<empty>");
|
||||
reportItemsLabel.Text = string.Format("{0} items", nrItems);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load Purchase order combo box items from the LocalSettings PurchaseOrderHistory array
|
||||
/// </summary>
|
||||
@@ -106,140 +152,14 @@ namespace ResultsBrowser
|
||||
procedureComboBox.Enabled = procedureCheckBox.Checked;
|
||||
}
|
||||
|
||||
private void queryButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!purchaseOrderCheckBox.Checked &&
|
||||
!procedureCheckBox.Checked &&
|
||||
!filterDateCheckBox.Checked &&
|
||||
!batchNrCheckBox.Checked)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
ISession session = FluentCommon.CreateSession(Database.Procedures);
|
||||
|
||||
IList<TestResult> testResults;
|
||||
IList<TestResult> partialTestResults;
|
||||
|
||||
if (batchNrCheckBox.Checked)
|
||||
{
|
||||
int from, to;
|
||||
if (!int.TryParse(batchNrFromTextBox.Text, out from) || !int.TryParse(batchNrToTextBox.Text, out to) || from > to)
|
||||
{
|
||||
MessageBox.Show("Please check 'From' and 'To' values", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
testResults = new List<TestResult>();
|
||||
for (int batch = from; batch <= to; batch++)
|
||||
{
|
||||
IQueryOver<TestResult> qo = session.QueryOver<TestResult>().Where(x => (x.BatchNr == batch));
|
||||
//if (procedureCheckBox.Checked) qo = qo.Where(x => (x.ProcedureName == "IPRT02AB - MI120 - Q2s"));
|
||||
partialTestResults = qo.List<TestResult>();
|
||||
|
||||
foreach (var tr in partialTestResults) testResults.Add(tr);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (procedureCheckBox.Checked)
|
||||
{
|
||||
if (filterDateCheckBox.Checked)
|
||||
{
|
||||
if (purchaseOrderCheckBox.Checked)
|
||||
{
|
||||
testResults = session.QueryOver<TestResult>()
|
||||
.WhereRestrictionOn(x => x.TimeStart)
|
||||
.IsBetween(fromDateTimePicker.Value)
|
||||
.And(toDateTimePicker.Value)
|
||||
.Where(x => (x.PurchaseOrder == purchaseOrderComboBox.Text))
|
||||
.Where(x => (x.ProcedureName == procedureComboBox.Text))
|
||||
.OrderBy(x => x.BatchNr).Desc
|
||||
.List<TestResult>();
|
||||
}
|
||||
else
|
||||
{
|
||||
testResults = session.QueryOver<TestResult>()
|
||||
.WhereRestrictionOn(x => x.TimeStart)
|
||||
.IsBetween(fromDateTimePicker.Value)
|
||||
.And(toDateTimePicker.Value)
|
||||
.Where(x => (x.ProcedureName == procedureComboBox.Text))
|
||||
.OrderBy(x => x.BatchNr).Desc
|
||||
.List<TestResult>();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (purchaseOrderCheckBox.Checked)
|
||||
{
|
||||
testResults = session.QueryOver<TestResult>()
|
||||
.Where(x => (x.PurchaseOrder == purchaseOrderComboBox.Text))
|
||||
.Where(x => (x.ProcedureName == procedureComboBox.Text))
|
||||
.OrderBy(x => x.BatchNr).Desc
|
||||
.List<TestResult>();
|
||||
}
|
||||
else
|
||||
{
|
||||
testResults = session.QueryOver<TestResult>()
|
||||
.Where(x => (x.ProcedureName == procedureComboBox.Text))
|
||||
.OrderBy(x => x.BatchNr).Desc
|
||||
.List<TestResult>();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!purchaseOrderCheckBox.Checked)
|
||||
{
|
||||
testResults = session.QueryOver<TestResult>()
|
||||
.WhereRestrictionOn(x => x.TimeStart)
|
||||
.IsBetween(fromDateTimePicker.Value)
|
||||
.And(toDateTimePicker.Value)
|
||||
.OrderBy(x => x.BatchNr).Desc
|
||||
.List<TestResult>();
|
||||
}
|
||||
else if (!filterDateCheckBox.Checked)
|
||||
{
|
||||
testResults = session.QueryOver<TestResult>()
|
||||
.Where(x => (x.PurchaseOrder == purchaseOrderComboBox.Text))
|
||||
.OrderBy(x => x.BatchNr).Desc
|
||||
.List<TestResult>();
|
||||
}
|
||||
else
|
||||
{
|
||||
testResults = session.QueryOver<TestResult>()
|
||||
.WhereRestrictionOn(x => x.TimeStart)
|
||||
.IsBetween(fromDateTimePicker.Value)
|
||||
.And(toDateTimePicker.Value)
|
||||
.Where(x => (x.PurchaseOrder == purchaseOrderComboBox.Text))
|
||||
.OrderBy(x => x.BatchNr).Desc
|
||||
.List<TestResult>();
|
||||
}
|
||||
}
|
||||
|
||||
DataDeposit.ProcessQueryTestResults(testResults, resolveManuallyCheckBox.Checked);
|
||||
|
||||
int cnt = 1;
|
||||
foreach (var wm in DataDeposit.QueryWaterMeterResults)
|
||||
{
|
||||
queryResultsListBox.Items.Add(cnt.ToString() + " " + wm.ToString());
|
||||
cnt++;
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
MessageBox.Show(exc.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void clearButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DataDeposit.QueryWaterMeterResults.Clear();
|
||||
QueryWaterMeters.Clear();
|
||||
queryResultsListBox.Items.Clear();
|
||||
}
|
||||
|
||||
|
||||
private void configReportButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
Forms.ResultsConfig dlg = new Forms.ResultsConfig(false);
|
||||
@@ -252,36 +172,67 @@ namespace ResultsBrowser
|
||||
ReportItems_Single = dlg.ReportItems_Single;
|
||||
ReportItems_Compound = dlg.ReportItems_Compound;
|
||||
|
||||
Program.LocalSettings.ReportItems_Single = ResultItemSpec.ToStrArray(ReportItems_Single);
|
||||
Program.LocalSettings.ReportItems_Compound = ResultItemSpec.ToStrArray(ReportItems_Compound);
|
||||
Program.LocalSettings.ReportItems_Single = Results.ItemSpec.ToStrArray(ReportItems_Single);
|
||||
Program.LocalSettings.ReportItems_Compound = Results.ItemSpec.ToStrArray(ReportItems_Compound);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void removeFromQueryButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
/// Remove from the list (the last selected item first so that the indexes are not affected)
|
||||
for (int i = queryResultsListBox.SelectedIndices.Count - 1; i >= 0; i--)
|
||||
try
|
||||
{
|
||||
DataDeposit.QueryWaterMeterResults.RemoveAt(queryResultsListBox.SelectedIndices[i]);
|
||||
}
|
||||
/// Remove from the list (the last selected item first so that the indexes are not affected)
|
||||
for (int i = queryResultsListBox.SelectedIndices.Count - 1; i >= 0; i--)
|
||||
{
|
||||
if (batchesQueried)
|
||||
{
|
||||
QueryBatches.RemoveAt(queryResultsListBox.SelectedIndices[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
QueryWaterMeters.RemoveAt(queryResultsListBox.SelectedIndices[i]);
|
||||
}
|
||||
}
|
||||
|
||||
RedrawLists();
|
||||
RedrawLists();
|
||||
}
|
||||
catch
|
||||
{
|
||||
MessageBox.Show("Something strange happened", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void removeFromReportButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
/// Remove from the list (the last selected item first so that the indexes are not affected)
|
||||
for (int i = reportListBox.SelectedIndices.Count - 1; i >= 0; i--)
|
||||
{
|
||||
DataDeposit.ReportWaterMeterResults.RemoveAt(reportListBox.SelectedIndices[i]);
|
||||
ReportWaterMeters.RemoveAt(reportListBox.SelectedIndices[i]);
|
||||
}
|
||||
|
||||
RedrawLists();
|
||||
}
|
||||
|
||||
|
||||
private void addToReportButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DataDeposit.AddQueryToReport();
|
||||
if (batchesQueried)
|
||||
{
|
||||
foreach (var b in QueryBatches)
|
||||
{
|
||||
foreach (var wm in b.WaterMeters) ReportWaterMeters.Add(wm);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var wm in QueryWaterMeters)
|
||||
{
|
||||
if (!ReportWaterMeters.Contains(wm)) ReportWaterMeters.Add(wm);
|
||||
}
|
||||
}
|
||||
|
||||
RedrawLists();
|
||||
}
|
||||
|
||||
@@ -296,55 +247,64 @@ namespace ResultsBrowser
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void addOracleDataButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (DataDeposit.ReportWaterMeterResults.Count == 0) return;
|
||||
#if IPERLST
|
||||
if (ReportWaterMeters.Count == 0) return;
|
||||
|
||||
const int Step = 100;
|
||||
for (int i = 0; i < DataDeposit.ReportWaterMeterResults.Count; i += Step)
|
||||
{
|
||||
try
|
||||
{
|
||||
/// Oracle database connection
|
||||
OracleConnection conn = new OracleConnection("Data Source=STARA01.WORLD;User Id=deltachef;Password=deltachef;");
|
||||
conn.Open();
|
||||
/// Oracle database connection
|
||||
OracleConnection conn = new OracleConnection("Data Source=STARA01.WORLD;User Id=deltachef;Password=deltachef;");
|
||||
|
||||
for (int j = i; j < Math.Min(j + Step, DataDeposit.ReportWaterMeterResults.Count); j++)
|
||||
try
|
||||
{
|
||||
conn.Open();
|
||||
|
||||
for (int i = 0; i < ReportWaterMeters.Count; i++)
|
||||
{
|
||||
Results.Entities.WaterMeter wm = ReportWaterMeters[i];
|
||||
|
||||
IList<int> serialNrExes = new List<int>();
|
||||
{
|
||||
Results.Entities.WaterMeterResult wm = DataDeposit.ReportWaterMeterResults[j];
|
||||
OracleParameter parm = new OracleParameter();
|
||||
parm.OracleDbType = OracleDbType.Varchar2;
|
||||
parm.Value = wm.SerialNr; /// PCB Nr.
|
||||
|
||||
IList<int> serialNrExes = new List<int>();
|
||||
OracleCommand cmd1 = new OracleCommand("SELECT Zaehlernummer, Auftragsnummer FROM VT_ZAEHLER_PD WHERE VT_Fernum = :1 AND ANBID = 4", conn);
|
||||
cmd1.Parameters.Add(parm);
|
||||
|
||||
OracleDataReader dr = cmd1.ExecuteReader();
|
||||
|
||||
if (dr.Read())
|
||||
{
|
||||
OracleParameter parm = new OracleParameter();
|
||||
parm.OracleDbType = OracleDbType.Varchar2;
|
||||
parm.Value = wm.SerialNr; /// PCB Nr.
|
||||
|
||||
OracleCommand cmd1 = new OracleCommand("SELECT Zaehlernummer FROM VT_ZAEHLER_PD WHERE VT_Fernum = :1 AND ANBID = 4", conn);
|
||||
cmd1.Parameters.Add(parm);
|
||||
|
||||
OracleDataReader dr = cmd1.ExecuteReader();
|
||||
|
||||
if (dr.Read())
|
||||
{
|
||||
wm.SerialNrEx = dr.GetInt32(0);
|
||||
}
|
||||
wm.SerialNrEx = dr.GetInt32(0);
|
||||
wm.PurchaseOrder = dr.GetString(1);
|
||||
}
|
||||
}
|
||||
|
||||
conn.Close();
|
||||
dr.Close();
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
MessageBox.Show(string.Format("Error when querying Oracle database:\r\n{0}", exc.Message),
|
||||
"Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
|
||||
RedrawLists();
|
||||
return;
|
||||
}
|
||||
|
||||
conn.Close();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
MessageBox.Show(string.Format("Error when querying Oracle database:\r\n{0}", exc.Message),
|
||||
"Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
|
||||
RedrawLists();
|
||||
return;
|
||||
}
|
||||
|
||||
RedrawLists();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Create ASC file in R.Uhlik format
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void makeAscFileButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(reportFileComboBox.Text))
|
||||
@@ -353,51 +313,38 @@ namespace ResultsBrowser
|
||||
return;
|
||||
}
|
||||
|
||||
if (ReportItems_Single == null || ReportItems_Single.Count == 0)
|
||||
{
|
||||
MessageBox.Show("Please, configure the report first", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return;
|
||||
}
|
||||
|
||||
Forms.AdditionalDataDlg dlg = new Forms.AdditionalDataDlg();
|
||||
if (dlg.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
foreach (var wm in DataDeposit.ReportWaterMeterResults)
|
||||
{
|
||||
wm.Type = dlg.Type;
|
||||
wm.TypeApproval = dlg.TypeApproval;
|
||||
wm.MetrologicalClass = dlg.MetrologicalClass;
|
||||
}
|
||||
}
|
||||
|
||||
using (TextWriter report = new StreamWriter(reportFileComboBox.Text, true))
|
||||
{
|
||||
foreach (var wm in DataDeposit.ReportWaterMeterResults)
|
||||
foreach (var wm in ReportWaterMeters)
|
||||
{
|
||||
try
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
#if IPERLST
|
||||
sb.Append(wm.SerialNrEx);
|
||||
sb.Append(';'); sb.Append(wm.Type);
|
||||
sb.Append(';'); sb.Append(wm.TypeApproval);
|
||||
sb.Append(';'); sb.Append(wm.MetrologicalClass);
|
||||
#else
|
||||
sb.Append(wm.SerialNr);
|
||||
#endif
|
||||
sb.Append(';'); sb.Append(wm.ProductName());
|
||||
sb.Append(';'); sb.Append(wm.ApprovalInfo());
|
||||
sb.Append(';'); sb.Append(wm.MetrologicalClass());
|
||||
sb.Append(';'); sb.Append("0");
|
||||
sb.Append(';'); sb.Append((1000 * (wm.TestResult("q1") != null ? wm.TestResult("q1").Qfrom : 0)).ToString("F0")); /// Q1 nominal
|
||||
sb.Append(';'); sb.Append((1000 * (wm.TestResult("q2") != null ? wm.TestResult("q2").Qfrom : 0)).ToString("F0")); /// Q2 nominal
|
||||
sb.Append(';'); sb.Append((1000 * (wm.TestResult("q3") != null ? wm.TestResult("q3").Qto : 0)).ToString("F0")); /// Q3 nominal
|
||||
sb.Append(';'); sb.Append((1000 * (wm.GetTestRslt("Q1") != null ? wm.GetTestRslt("Q1").Qfrom() : 0)).ToString("F0")); /// Q1 nominal
|
||||
sb.Append(';'); sb.Append((1000 * (wm.GetTestRslt("Q2") != null ? wm.GetTestRslt("Q2").Qfrom() : 0)).ToString("F0")); /// Q2 nominal
|
||||
sb.Append(';'); sb.Append((1000 * (wm.GetTestRslt("Q3") != null ? wm.GetTestRslt("Q3").Qto() : 0)).ToString("F0")); /// Q3 nominal
|
||||
sb.Append(';'); sb.Append("0"); /// Q4 nominal
|
||||
sb.Append(';'); sb.Append("6"); /// Worker code
|
||||
sb.Append(';'); sb.Append(ToShortStr(wm.TestEnd));
|
||||
sb.Append(';'); sb.Append((wm.MeterTestResult("q1") != null ? wm.MeterTestResult("q1").VolumeErrorPct : 99).ToString("F1")); /// Q1 Error [%]
|
||||
sb.Append(';'); sb.Append((wm.MeterTestResult("q2") != null ? wm.MeterTestResult("q2").VolumeErrorPct : 99).ToString("F1")); /// Q2 Error [%]
|
||||
sb.Append(';'); sb.Append((wm.MeterTestResult("q3") != null ? wm.MeterTestResult("q3").VolumeErrorPct : 99).ToString("F1")); /// Q3 Error [%]
|
||||
sb.Append(';'); sb.Append("0"); /// Q4 Error [%]
|
||||
sb.Append(';'); sb.Append(wm.BenchId.ToString()); ///
|
||||
sb.Append(';'); sb.Append(wm.Batch.UserNumber); /// Worker code
|
||||
sb.Append(';'); sb.Append(ToShortStr(wm.EndTime()));
|
||||
sb.Append(';'); sb.Append((wm.GetMeterTestRslt("Q1") != null ? wm.GetMeterTestRslt("Q1").Error : 99).ToString("F1")); /// Q1 Error [%]
|
||||
sb.Append(';'); sb.Append((wm.GetMeterTestRslt("Q2") != null ? wm.GetMeterTestRslt("Q2").Error : 99).ToString("F1")); /// Q2 Error [%]
|
||||
sb.Append(';'); sb.Append((wm.GetMeterTestRslt("Q3") != null ? wm.GetMeterTestRslt("Q3").Error : 99).ToString("F1")); /// Q3 Error [%]
|
||||
sb.Append(';'); sb.Append("0"); /// Q4 Error [%]
|
||||
sb.Append(';'); sb.Append(Results.Utils.BenchIdOracle2Asc(wm.BenchId()).ToString()); ///
|
||||
sb.Append(';'); sb.Append(wm.PurchaseOrder);
|
||||
sb.Append(';'); sb.Append("");
|
||||
sb.Append(';'); sb.Append("10000");
|
||||
sb.Append(';'); sb.Append(wm.ProcedureName.Substring(0, 8));
|
||||
sb.Append(';'); sb.Append(wm.ProcedureName().Substring(0, 8));
|
||||
sb.Append(";\""); sb.Append(wm.SerialNr); sb.Append('"');
|
||||
|
||||
report.WriteLine(sb);
|
||||
@@ -412,11 +359,67 @@ namespace ResultsBrowser
|
||||
MessageBox.Show("Report saved", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
private void makeAscFileDewaButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(reportFileComboBox.Text))
|
||||
{
|
||||
MessageBox.Show("No report file selected.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return;
|
||||
}
|
||||
|
||||
using (TextWriter report = new StreamWriter(reportFileComboBox.Text, true))
|
||||
{
|
||||
foreach (var wm in ReportWaterMeters)
|
||||
{
|
||||
try
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
#if IPERLST
|
||||
sb.Append(wm.SerialNrEx);
|
||||
#else
|
||||
sb.Append(wm.SerialNr);
|
||||
#endif
|
||||
sb.Append(';'); sb.Append(wm.ProductName());
|
||||
sb.Append(';'); sb.Append(wm.ApprovalInfo());
|
||||
sb.Append(';'); sb.Append(wm.MetrologicalClass());
|
||||
sb.Append(';'); sb.Append("0");
|
||||
sb.Append(';'); sb.Append((1000 * (wm.GetTestRslt("Q1") != null ? wm.GetTestRslt("Q1").Qfrom() : 0)).ToString("F1")); /// Q1 nominal
|
||||
sb.Append(';'); sb.Append((1000 * (wm.GetTestRslt("Q2est") != null ? wm.GetTestRslt("Q2est").Qfrom() : 0)).ToString("F1")); /// Q2 nominal
|
||||
sb.Append(';'); sb.Append((1000 * (wm.GetTestRslt("Q3") != null ? wm.GetTestRslt("Q3").Qto() : 0)).ToString("F0")); /// Q3 nominal
|
||||
sb.Append(';'); sb.Append((1000 * (wm.GetTestRslt("Q4") != null ? wm.GetTestRslt("Q4").Qto() : 0)).ToString("F0")); /// Q4 nominal
|
||||
sb.Append(';'); sb.Append(wm.Batch.UserNumber); /// Worker code
|
||||
sb.Append(';'); sb.Append(ToShortStr(wm.EndTime()));
|
||||
sb.Append(';'); sb.Append((wm.GetMeterTestRslt("Q1") != null ? wm.GetMeterTestRslt("Q1").Error : 99).ToString("F2")); /// Q1 Error [%]
|
||||
sb.Append(';'); sb.Append((wm.GetMeterTestRslt("Q2est") != null ? wm.GetMeterTestRslt("Q2est").Error : 99).ToString("F2")); /// Q2 Error [%]
|
||||
sb.Append(';'); sb.Append((wm.GetMeterTestRslt("Q3") != null ? wm.GetMeterTestRslt("Q3").Error : 99).ToString("F2")); /// Q3 Error [%]
|
||||
sb.Append(';'); sb.Append((wm.GetMeterTestRslt("Q4") != null ? wm.GetMeterTestRslt("Q4").Error : 99).ToString("F2")); /// Q4 Error [%]
|
||||
sb.Append(';'); sb.Append(Results.Utils.BenchIdOracle2Asc(wm.BenchId()).ToString()); ///
|
||||
sb.Append(';'); sb.Append(wm.PurchaseOrder);
|
||||
sb.Append(';'); sb.Append("");
|
||||
sb.Append(';'); sb.Append("10000");
|
||||
sb.Append(';'); sb.Append(wm.ProcedureName().Substring(0, 8));
|
||||
sb.Append(";\""); sb.Append(wm.SerialNr); sb.Append('"');
|
||||
|
||||
report.WriteLine(sb);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
string msg = exc.Message;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MessageBox.Show("Report saved", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
|
||||
static string ToShortStr(DateTime date)
|
||||
{
|
||||
return (((date.Year % 100) * 100 + date.Month) * 100 + date.Day).ToString();
|
||||
}
|
||||
|
||||
|
||||
private void makeReportButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(reportFileComboBox.Text))
|
||||
@@ -433,22 +436,26 @@ namespace ResultsBrowser
|
||||
|
||||
using (TextWriter report = new StreamWriter(reportFileComboBox.Text, true))
|
||||
{
|
||||
foreach (var wm in DataDeposit.ReportWaterMeterResults)
|
||||
foreach (var wm in ReportWaterMeters)
|
||||
{
|
||||
try
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
#if IPERLST
|
||||
sb.Append(wm.SerialNrEx);
|
||||
sb.Append(";\""); sb.Append(wm.SerialNr); sb.Append('"'); /// PCB number
|
||||
sb.Append(";\""); sb.Append(wm.ProcedureName); sb.Append('"'); /// Procedure name
|
||||
sb.Append(';'); sb.Append((1000 * (wm.TestResult("q3") != null ? wm.TestResult("q3").Qto : 0)).ToString("F0")); /// Q3 nominal
|
||||
sb.Append(';'); sb.Append((wm.MeterTestResult("adjustment") != null ? wm.MeterTestResult("adjustment").VolumeErrorPct : 99).ToString("F2"));/// Adjustment Error [%]
|
||||
sb.Append(';'); sb.Append((wm.MeterTestResult("q3") != null ? wm.MeterTestResult("q1").VolumeErrorPct : 99).ToString("F2")); /// Q1 Error [%]
|
||||
sb.Append(';'); sb.Append((wm.MeterTestResult("q2") != null ? wm.MeterTestResult("q2").VolumeErrorPct : 99).ToString("F2")); /// Q2 Error [%]
|
||||
sb.Append(';'); sb.Append((wm.MeterTestResult("q1") != null ? wm.MeterTestResult("q3").VolumeErrorPct : 99).ToString("F2")); /// Q3 Error [%]
|
||||
sb.Append(';'); sb.Append(wm.TestStart.ToShortTimeString());
|
||||
sb.Append(';'); sb.Append(wm.TestEnd.ToShortTimeString());
|
||||
#else
|
||||
sb.Append(wm.SerialNr);
|
||||
#endif
|
||||
sb.Append(";\""); sb.Append(wm.SerialNr); sb.Append('"'); /// PCB number
|
||||
sb.Append(";\""); sb.Append(wm.ProcedureName()); sb.Append('"'); /// Procedure name
|
||||
sb.Append(';'); sb.Append((1000 * (wm.GetTestRslt("q3") != null ? wm.GetTestRslt("q3").Qto() : 0)).ToString("F0")); /// Q3 nominal
|
||||
sb.Append(';'); sb.Append((wm.GetMeterTestRslt("adjustment") != null ? wm.GetMeterTestRslt("adjustment").Error : 99).ToString("F2"));/// Adjustment Error [%]
|
||||
sb.Append(';'); sb.Append((wm.GetMeterTestRslt("q3") != null ? wm.GetMeterTestRslt("q1").Error : 99).ToString("F2")); /// Q1 Error [%]
|
||||
sb.Append(';'); sb.Append((wm.GetMeterTestRslt("q2") != null ? wm.GetMeterTestRslt("q2").Error : 99).ToString("F2")); /// Q2 Error [%]
|
||||
sb.Append(';'); sb.Append((wm.GetMeterTestRslt("q1") != null ? wm.GetMeterTestRslt("q3").Error : 99).ToString("F2")); /// Q3 Error [%]
|
||||
sb.Append(';'); sb.Append(wm.StartTime().ToShortTimeString());
|
||||
sb.Append(';'); sb.Append(wm.EndTime().ToShortTimeString());
|
||||
|
||||
report.WriteLine(sb);
|
||||
}
|
||||
@@ -461,5 +468,164 @@ namespace ResultsBrowser
|
||||
|
||||
MessageBox.Show("Report saved", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
|
||||
private void configButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if ((new Forms.DatabaseSettings()).ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
Results.DB.ConnectionString = Program.LocalSettings.ConnectionString_WR10;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void queryBatchesButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!purchaseOrderCheckBox.Checked && !procedureCheckBox.Checked &&
|
||||
!filterDateCheckBox.Checked && !batchNrCheckBox.Checked)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
queryResultsListBox.Items.Clear();
|
||||
|
||||
try
|
||||
{
|
||||
ISession session = Results.DB.CreateSession();
|
||||
|
||||
IList<Batch> batches;
|
||||
|
||||
if (filterDateCheckBox.Checked)
|
||||
{
|
||||
batches = session.QueryOver<Batch>()
|
||||
.WhereRestrictionOn(x => x.EndTime)
|
||||
.IsBetween(fromDateTimePicker.Value.Date)
|
||||
.And(toDateTimePicker.Value.Date.AddDays(1).AddTicks(-1))
|
||||
//.OrderBy(x => x.BatchNr).Asc
|
||||
.List<Batch>();
|
||||
}
|
||||
else
|
||||
{
|
||||
batches = session.QueryOver<Batch>()
|
||||
.List<Batch>();
|
||||
}
|
||||
|
||||
if (procedureCheckBox.Checked)
|
||||
{
|
||||
IList<Batch> batches2 = new List<Batch>();
|
||||
foreach (var b in batches)
|
||||
{
|
||||
if (b.ProcedureName.Equals(procedureComboBox.Text)) batches2.Add(b);
|
||||
}
|
||||
batches = batches2;
|
||||
}
|
||||
|
||||
if (purchaseOrderCheckBox.Checked)
|
||||
{
|
||||
IList<Batch> batches3 = new List<Batch>();
|
||||
foreach (var b in batches)
|
||||
{
|
||||
if (b.WaterMeters[0].PurchaseOrder.Equals(purchaseOrderComboBox.Text)) batches3.Add(b);
|
||||
}
|
||||
batches = batches3;
|
||||
}
|
||||
|
||||
QueryBatches = batches;
|
||||
batchesQueried = true;
|
||||
RedrawQueryList();
|
||||
///
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
MessageBox.Show(exc.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void queryWatermetersButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!purchaseOrderCheckBox.Checked && !procedureCheckBox.Checked &&
|
||||
!filterDateCheckBox.Checked && !batchNrCheckBox.Checked)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
queryResultsListBox.Items.Clear();
|
||||
|
||||
try
|
||||
{
|
||||
bool purchaseOrderFiltered = false;
|
||||
bool procedureFiltered = false;
|
||||
|
||||
ISession session = Results.DB.CreateSession();
|
||||
|
||||
IList<WaterMeter> waterMeters;
|
||||
|
||||
if (filterDateCheckBox.Checked)
|
||||
{
|
||||
IList<Batch> batches = session.QueryOver<Batch>()
|
||||
.WhereRestrictionOn(x => x.EndTime)
|
||||
.IsBetween(fromDateTimePicker.Value.Date)
|
||||
.And(toDateTimePicker.Value.Date.AddDays(1).AddTicks(-1))
|
||||
//.OrderBy(x => x.BatchNr).Asc
|
||||
.List<Batch>();
|
||||
|
||||
waterMeters = new List<WaterMeter>();
|
||||
foreach (var b in batches)
|
||||
{
|
||||
foreach (var wm in b.WaterMeters) waterMeters.Add(wm);
|
||||
}
|
||||
}
|
||||
else if (purchaseOrderCheckBox.Checked)
|
||||
{
|
||||
waterMeters = session.QueryOver<WaterMeter>()
|
||||
.Where(x => (x.PurchaseOrder == purchaseOrderCheckBox.Text))
|
||||
.List<WaterMeter>();
|
||||
purchaseOrderFiltered = true;
|
||||
}
|
||||
else if (procedureCheckBox.Checked && !procedureFiltered)
|
||||
{
|
||||
waterMeters = session.QueryOver<WaterMeter>()
|
||||
.Where(x => (x.Batch.ProcedureName == procedureComboBox.Text))
|
||||
.List<WaterMeter>();
|
||||
procedureFiltered = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
waterMeters = session.QueryOver<WaterMeter>().List<WaterMeter>();
|
||||
}
|
||||
|
||||
|
||||
if (purchaseOrderCheckBox.Checked && !purchaseOrderFiltered)
|
||||
{
|
||||
IList<WaterMeter> waterMeters3 = new List<WaterMeter>();
|
||||
foreach (var wm in waterMeters)
|
||||
{
|
||||
if (wm.PurchaseOrder.Equals(purchaseOrderComboBox.Text)) waterMeters3.Add(wm);
|
||||
}
|
||||
waterMeters = waterMeters3;
|
||||
purchaseOrderFiltered = true;
|
||||
}
|
||||
|
||||
if (procedureCheckBox.Checked && !procedureFiltered)
|
||||
{
|
||||
IList<WaterMeter> waterMeters2 = new List<WaterMeter>();
|
||||
foreach (var wm in waterMeters)
|
||||
{
|
||||
if (wm.Batch.ProcedureName.Equals(procedureComboBox.Text)) waterMeters2.Add(wm);
|
||||
}
|
||||
waterMeters = waterMeters2;
|
||||
procedureFiltered = true;
|
||||
}
|
||||
|
||||
QueryWaterMeters = waterMeters;
|
||||
batchesQueried = false;
|
||||
RedrawQueryList();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
MessageBox.Show(exc.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+12
-122
@@ -19,6 +19,9 @@ namespace ResultsBrowser
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(Program));
|
||||
const string log4netConfigFName = "log4netConfig.xml";
|
||||
|
||||
/// Program version string
|
||||
public static string Version;
|
||||
|
||||
/// Local settings
|
||||
public static LocalSettings LocalSettings;
|
||||
public const string LocalSettingsFileName = "ResultsBrowser.xml";
|
||||
@@ -39,9 +42,11 @@ namespace ResultsBrowser
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
log.Fatal("--------------------------------------------------------------------------------");
|
||||
/// Program version string
|
||||
Version ver = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
|
||||
Version = string.Format("{0}.{1}.{2}", ver.Major, ver.Minor, ver.Build);
|
||||
|
||||
/// Local program configuration directory including the trailing backslash
|
||||
/// Local program configuration directory including the trailing backslash
|
||||
string locAppDataDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) +
|
||||
Path.DirectorySeparatorChar + "TestBenchFramework" + Path.DirectorySeparatorChar;
|
||||
|
||||
@@ -77,17 +82,18 @@ namespace ResultsBrowser
|
||||
|
||||
/// Configue and start logging
|
||||
log4net.Config.XmlConfigurator.Configure(new System.IO.FileInfo(locAppDataDir + log4netConfigFName));
|
||||
log.Info("Entering application.");
|
||||
log.Fatal("--------------------------------------------------------------------------------");
|
||||
log.Info("Entering application.");
|
||||
|
||||
///
|
||||
/// Load the local settings
|
||||
///
|
||||
LocalSettings = LocalSettings.Load(Program.LocalSettingsFileName);
|
||||
if (LocalSettings == null || LocalSettings.TestBenches == null)
|
||||
if (LocalSettings == null)
|
||||
{
|
||||
/// Loading local seetings from regular config file failed. Use the backup
|
||||
LocalSettings = LocalSettings.Load(Program.LocalSettingsBackupName);
|
||||
if (LocalSettings == null || LocalSettings.TestBenches == null)
|
||||
if (LocalSettings == null)
|
||||
{
|
||||
if (MessageBox.Show("No program settings found. Do you want to use default settings?",
|
||||
"Question", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
||||
@@ -126,128 +132,12 @@ namespace ResultsBrowser
|
||||
//AltCulture = null;
|
||||
AltCulture = new System.Globalization.CultureInfo("SK");
|
||||
|
||||
|
||||
/// This belongs to Application.Run(new MainWnd()) ...
|
||||
/// and should be executed before opening 'loginDlg'
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
|
||||
/// Ensure that there is at least one bench in the configuration
|
||||
while (Program.LocalSettings.BenchesCount == 0)
|
||||
{
|
||||
log.Warn("No test benches in the local configuration -> display an appropriate dialog.");
|
||||
|
||||
/// Ask what to do, ask for the password, open 'DatabaseSetingsDlg' and continue on OK
|
||||
if ((new Forms.NoBenchOrDatabaseDlg { Message = "No test bench in the program configuration." }.ShowDialog() != DialogResult.OK) ||
|
||||
(new LoginDlg(true).ShowDialog() == DialogResult.Cancel) ||
|
||||
(new BenchesDlg().ShowDialog() == DialogResult.Cancel))
|
||||
{
|
||||
return; /// Exit program
|
||||
}
|
||||
|
||||
log.Warn("Loading the local settings again.");
|
||||
Program.LocalSettings = LocalSettings.Load(Program.LocalSettingsFileName);
|
||||
if (Program.LocalSettings == null) return; /// Fatal error
|
||||
}
|
||||
|
||||
/// User login
|
||||
bool retryLogin = true; /// true = stay in a login loop
|
||||
do
|
||||
{
|
||||
LoginDlgWithBenchSelection loginDlgBench;
|
||||
if (LocalSettings.LastBenchName != null)
|
||||
{
|
||||
loginDlgBench = new LoginDlgWithBenchSelection(LocalSettings.LastBenchName);
|
||||
}
|
||||
else
|
||||
{
|
||||
loginDlgBench = new LoginDlgWithBenchSelection();
|
||||
}
|
||||
DialogResult dr = loginDlgBench.ShowDialog();
|
||||
|
||||
if (dr == DialogResult.Cancel)
|
||||
{
|
||||
return; /// Login canceled --> Exit application
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < LocalSettings.BenchesCount; i++)
|
||||
{
|
||||
if (LocalSettings.TestBenches[i].BenchName == loginDlgBench.BenchName)
|
||||
{
|
||||
User loadedUser = null;
|
||||
try
|
||||
{
|
||||
bool authorized = false;
|
||||
|
||||
if (User.IsPowerUser(loginDlgBench.User, loginDlgBench.Password))
|
||||
{
|
||||
loadedUser = new User(loginDlgBench.User);
|
||||
authorized = loadedUser.Authorize(loginDlgBench.User, loginDlgBench.Password);
|
||||
}
|
||||
|
||||
if (!authorized)
|
||||
{
|
||||
/// Load user from the UsersAndGroupsDB database
|
||||
loadedUser = User.LoadUserByName(loginDlgBench.User,
|
||||
LocalSettings.TestBenches[i].UsersDBSettings);
|
||||
if (loadedUser != null)
|
||||
{
|
||||
authorized = loadedUser.Authorize(loginDlgBench.User, loginDlgBench.Password);
|
||||
}
|
||||
}
|
||||
|
||||
if (authorized)
|
||||
{
|
||||
log.InfoFormat("Password accepted, bench '{0}' parameters loaded.", LocalSettings.TestBenches[i].BenchName);
|
||||
|
||||
/// Copy the selected bench settings to CurrentBench.
|
||||
/// Clone() guarantees that current bench settings wont be modified
|
||||
/// when user modifies the database settings in DatabaseSettingsDlg.
|
||||
Config.Data.CurrentBench = (Config.DatabaseSettings)LocalSettings.TestBenches[i].Clone();
|
||||
|
||||
/// Save the selection to local settings
|
||||
LocalSettings.LastBenchName = Config.Data.CurrentBench.BenchName;
|
||||
LocalSettings.Save();
|
||||
|
||||
retryLogin = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (retryLogin)
|
||||
{
|
||||
/// Close Fluent NHibernate
|
||||
MessageBox.Show("Invalid user, password, or bench", "Error", MessageBoxButtons.OK);
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
/// Database connect failed, ask what to do
|
||||
switch ((new Forms.NoBenchOrDatabaseDlg { Message = "Cannot connect to the database.", ShowRetry = true }).ShowDialog())
|
||||
{
|
||||
case DialogResult.Abort:
|
||||
return; /// Exit program
|
||||
///
|
||||
case DialogResult.Retry:
|
||||
break; /// Retry the loop
|
||||
///
|
||||
default:
|
||||
/// Open 'DatabaseSetingsDlg' and retry DB connect on OK
|
||||
if (new LoginDlg(true).ShowDialog() == DialogResult.Cancel ||
|
||||
new BenchesDlg().ShowDialog() == DialogResult.Cancel)
|
||||
{
|
||||
return; /// Exit program
|
||||
}
|
||||
Program.LocalSettings = LocalSettings.Load(Program.LocalSettingsFileName);
|
||||
if (Program.LocalSettings == null) return; /// Fatal error
|
||||
break; /// Retry the loop
|
||||
}
|
||||
}
|
||||
} // if benchname is OK
|
||||
} // for all benches in local settings loop
|
||||
} // not Canceled
|
||||
} //do
|
||||
while (retryLogin);
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyTitle("ResultsBrowser")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyCompany("Sensus")]
|
||||
[assembly: AssemblyProduct("ResultsBrowser")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2015")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2015 - 2020 Sensus Slovensko a.s.")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
@@ -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.0.2.0")]
|
||||
[assembly: AssemblyFileVersion("2.0.2.0")]
|
||||
[assembly: AssemblyVersion("2.9.1584.0")]
|
||||
[assembly: AssemblyFileVersion("2.9.1584.0")]
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;IPERLST</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
@@ -31,7 +31,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;MUNICH</DefineConstants>
|
||||
<DefineConstants>TRACE;IPERLST</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
@@ -73,36 +73,11 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="BenchesDlg.cs">
|
||||
<Compile Include="Forms\DatabaseSettings.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="BenchesDlg.designer.cs">
|
||||
<DependentUpon>BenchesDlg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DatabaseSettingsDlg.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="DatabaseSettingsDlg.designer.cs">
|
||||
<DependentUpon>DatabaseSettingsDlg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DataDeposit.cs" />
|
||||
<Compile Include="Forms\AdditionalDataDlg.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\AdditionalDataDlg.Designer.cs">
|
||||
<DependentUpon>AdditionalDataDlg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\LoginDlg.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\LoginDlg.designer.cs">
|
||||
<DependentUpon>LoginDlg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\LoginDlgWithBenchSelection.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\LoginDlgWithBenchSelection.designer.cs">
|
||||
<DependentUpon>LoginDlgWithBenchSelection.cs</DependentUpon>
|
||||
<Compile Include="Forms\DatabaseSettings.Designer.cs">
|
||||
<DependentUpon>DatabaseSettings.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\NoBenchOrDatabaseDlg.cs">
|
||||
<SubType>Form</SubType>
|
||||
@@ -126,20 +101,8 @@
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Resources\Strings.Designer.cs" />
|
||||
<EmbeddedResource Include="BenchesDlg.resx">
|
||||
<DependentUpon>BenchesDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="DatabaseSettingsDlg.resx">
|
||||
<DependentUpon>DatabaseSettingsDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\AdditionalDataDlg.resx">
|
||||
<DependentUpon>AdditionalDataDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\LoginDlg.resx">
|
||||
<DependentUpon>LoginDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\LoginDlgWithBenchSelection.resx">
|
||||
<DependentUpon>LoginDlgWithBenchSelection.cs</DependentUpon>
|
||||
<EmbeddedResource Include="Forms\DatabaseSettings.resx">
|
||||
<DependentUpon>DatabaseSettings.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\NoBenchOrDatabaseDlg.resx">
|
||||
<DependentUpon>NoBenchOrDatabaseDlg.cs</DependentUpon>
|
||||
@@ -182,6 +145,9 @@
|
||||
<Name>Results</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Printers\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,10 +1,7 @@
|
||||
iPerl:
|
||||
- naimplementovat Spooler pre OracleDB
|
||||
- updatovat progress bary pre iPerl comm.
|
||||
- neukaldat process data pre UnknownPcbNr... vodomery
|
||||
|
||||
- 'publish' a 'evaluate' pre vsetky metody
|
||||
- prechadzat na double (results)
|
||||
- neukladat process data pre UnknownPcbNr... vodomery
|
||||
|
||||
- log pre pevny start, podobne (zarazky) ako pre letmy
|
||||
- 'Q2 corrected from ...' Evaluate a Publish parametre
|
||||
@@ -20,6 +17,10 @@ iPerl:
|
||||
|
||||
|
||||
|
||||
- 'publish' a 'evaluate' pre vsetky metody
|
||||
- prechadzat na double (results)
|
||||
- make results item config a process parameter
|
||||
|
||||
- ak sa skusa s pevnym startom treba merat priemerny prietok az po uplynuti
|
||||
urcitej doby inak bude vzdy nizsi ako ma byt - rozbeh
|
||||
- bude potrebne doregulovavat pocas merania, Jano poslal moznosti - inak nam
|
||||
|
||||
+70
-81
@@ -1,81 +1,70 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TBF", "TestBenchFramework\TBF.csproj", "{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}"
|
||||
EndProject
|
||||
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "TBFSetup", "TBFSetup\TBFSetup.vdproj", "{4890DE5C-9F68-40D7-B075-92C8EAB79833}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Results", "Results\Results.csproj", "{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Config", "Config\Config.csproj", "{743DF7DB-C7B6-42EB-986D-0F485E5588E4}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResultsBrowser", "ResultsBrowser\ResultsBrowser.csproj", "{07BA543A-54CA-4A59-9AD9-DDE7038E1BF9}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB} = {9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48} = {8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|Mixed Platforms = Debug|Mixed Platforms
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|Mixed Platforms = Release|Mixed Platforms
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Release|x86.ActiveCfg = Release|x86
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Release|x86.Build.0 = Release|x86
|
||||
{4890DE5C-9F68-40D7-B075-92C8EAB79833}.Debug|Any CPU.ActiveCfg = Debug
|
||||
{4890DE5C-9F68-40D7-B075-92C8EAB79833}.Debug|Mixed Platforms.ActiveCfg = Debug
|
||||
{4890DE5C-9F68-40D7-B075-92C8EAB79833}.Debug|Mixed Platforms.Build.0 = Debug
|
||||
{4890DE5C-9F68-40D7-B075-92C8EAB79833}.Debug|x86.ActiveCfg = Debug
|
||||
{4890DE5C-9F68-40D7-B075-92C8EAB79833}.Release|Any CPU.ActiveCfg = Release
|
||||
{4890DE5C-9F68-40D7-B075-92C8EAB79833}.Release|Any CPU.Build.0 = Release
|
||||
{4890DE5C-9F68-40D7-B075-92C8EAB79833}.Release|Mixed Platforms.ActiveCfg = Release
|
||||
{4890DE5C-9F68-40D7-B075-92C8EAB79833}.Release|Mixed Platforms.Build.0 = Release
|
||||
{4890DE5C-9F68-40D7-B075-92C8EAB79833}.Release|x86.ActiveCfg = Release
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{07BA543A-54CA-4A59-9AD9-DDE7038E1BF9}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{07BA543A-54CA-4A59-9AD9-DDE7038E1BF9}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{07BA543A-54CA-4A59-9AD9-DDE7038E1BF9}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
{07BA543A-54CA-4A59-9AD9-DDE7038E1BF9}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{07BA543A-54CA-4A59-9AD9-DDE7038E1BF9}.Debug|x86.Build.0 = Debug|x86
|
||||
{07BA543A-54CA-4A59-9AD9-DDE7038E1BF9}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{07BA543A-54CA-4A59-9AD9-DDE7038E1BF9}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{07BA543A-54CA-4A59-9AD9-DDE7038E1BF9}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{07BA543A-54CA-4A59-9AD9-DDE7038E1BF9}.Release|x86.ActiveCfg = Release|x86
|
||||
{07BA543A-54CA-4A59-9AD9-DDE7038E1BF9}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TBF", "TestBenchFramework\TBF.csproj", "{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Results", "Results\Results.csproj", "{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Config", "Config\Config.csproj", "{743DF7DB-C7B6-42EB-986D-0F485E5588E4}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResultsBrowser", "ResultsBrowser\ResultsBrowser.csproj", "{07BA543A-54CA-4A59-9AD9-DDE7038E1BF9}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB} = {9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48} = {8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|Mixed Platforms = Debug|Mixed Platforms
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|Mixed Platforms = Release|Mixed Platforms
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Release|x86.ActiveCfg = Release|x86
|
||||
{8648FD92-CDA1-4C3A-B5F9-FE547CE1FA48}.Release|x86.Build.0 = Release|x86
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{9D0DCC88-DC81-47EB-9FDD-4C3907871BFB}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{743DF7DB-C7B6-42EB-986D-0F485E5588E4}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{07BA543A-54CA-4A59-9AD9-DDE7038E1BF9}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{07BA543A-54CA-4A59-9AD9-DDE7038E1BF9}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{07BA543A-54CA-4A59-9AD9-DDE7038E1BF9}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
{07BA543A-54CA-4A59-9AD9-DDE7038E1BF9}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{07BA543A-54CA-4A59-9AD9-DDE7038E1BF9}.Debug|x86.Build.0 = Debug|x86
|
||||
{07BA543A-54CA-4A59-9AD9-DDE7038E1BF9}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{07BA543A-54CA-4A59-9AD9-DDE7038E1BF9}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{07BA543A-54CA-4A59-9AD9-DDE7038E1BF9}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{07BA543A-54CA-4A59-9AD9-DDE7038E1BF9}.Release|x86.ActiveCfg = Release|x86
|
||||
{07BA543A-54CA-4A59-9AD9-DDE7038E1BF9}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
@@ -22,7 +22,8 @@ namespace TBF.BenchControl.BenchInfo.Munich
|
||||
|
||||
readonly ComponentCfg benchInfoCfg;
|
||||
|
||||
public string TestBenchId { get { return benchInfoCfg.TestBenchId; } }
|
||||
public string TestBenchName { get { return benchInfoCfg.TestBenchName; } }
|
||||
public int TestBenchId { get { return benchInfoCfg.TestBenchId; } }
|
||||
|
||||
public Component()
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
/// Author: Milan Hanajík
|
||||
///
|
||||
using System;
|
||||
@@ -20,15 +20,17 @@ namespace TBF.BenchControl.BenchInfo.Munich
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
public string TestBenchId;
|
||||
public string TestBenchName;
|
||||
public int TestBenchId;
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
ComponentCfg()
|
||||
{
|
||||
Name = "BenchInfo";
|
||||
ParentName = string.Empty;
|
||||
TestBenchId = "1";
|
||||
}
|
||||
TestBenchName = "1";
|
||||
TestBenchId = 1;
|
||||
}
|
||||
|
||||
public ComponentCfg(IComponentFactory factory)
|
||||
: this()
|
||||
@@ -38,7 +40,7 @@ namespace TBF.BenchControl.BenchInfo.Munich
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("Name={0}, TestBenchId={1}", Name, TestBenchId);
|
||||
return string.Format("Name={0}, Bench name={1}, Bench Id={2}", Name, TestBenchName, TestBenchId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,8 @@ namespace TBF.BenchControl.BenchInfo.Munich
|
||||
private void EntryFormCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
nameLabel.Text = Strings.Name;
|
||||
numberLabel.Text = Strings.Test_bench_number;
|
||||
benchNameLabel.Text = Strings.Test_bench_name;
|
||||
benchIdLabel.Text = Strings.Test_bench_number;
|
||||
Redraw();
|
||||
}
|
||||
|
||||
@@ -46,20 +47,30 @@ namespace TBF.BenchControl.BenchInfo.Munich
|
||||
void Redraw()
|
||||
{
|
||||
if (config == null) return; /// Control was not loaded, settings were not changed
|
||||
|
||||
classNameLabel.Text = config.Factory.ClassName;
|
||||
nameTextBox.Text = config.Name;
|
||||
numberTextBox.Text = config.TestBenchId;
|
||||
benchNameTextBox.Text = config.TestBenchName;
|
||||
benchIdTextBox.Text = config.TestBenchId.ToString();
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
numberTextBox.Enabled = true;
|
||||
benchNameTextBox.Enabled = true;
|
||||
benchIdTextBox.Enabled = true;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.None;
|
||||
|
||||
int dummy;
|
||||
if (!int.TryParse(benchIdTextBox.Text, out dummy) || dummy < 0)
|
||||
{
|
||||
flags = CfgUpdateFlags.Error;
|
||||
message = string.Format("Invalid {0} parameter", Strings.Test_bench_number);
|
||||
}
|
||||
return flags;
|
||||
}
|
||||
|
||||
@@ -70,7 +81,8 @@ namespace TBF.BenchControl.BenchInfo.Munich
|
||||
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
|
||||
///
|
||||
config.Name = nameTextBox.Text;
|
||||
config.TestBenchId = numberTextBox.Text;
|
||||
config.TestBenchName = benchNameTextBox.Text;
|
||||
config.TestBenchId = int.Parse(benchIdTextBox.Text);
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
+44
-21
@@ -34,14 +34,16 @@ namespace TBF.BenchControl.BenchInfo.Munich
|
||||
this.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.numberLabel = new System.Windows.Forms.Label();
|
||||
this.numberTextBox = new System.Windows.Forms.TextBox();
|
||||
this.benchNameLabel = new System.Windows.Forms.Label();
|
||||
this.benchNameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.benchIdTextBox = new System.Windows.Forms.TextBox();
|
||||
this.benchIdLabel = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(135, 55);
|
||||
this.nameTextBox.Location = new System.Drawing.Point(140, 55);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.nameTextBox.TabIndex = 5;
|
||||
@@ -58,35 +60,54 @@ namespace TBF.BenchControl.BenchInfo.Munich
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(132, 31);
|
||||
this.classNameLabel.Location = new System.Drawing.Point(137, 31);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(60, 13);
|
||||
this.classNameLabel.TabIndex = 3;
|
||||
this.classNameLabel.Text = "ClassName";
|
||||
//
|
||||
// numberLabel
|
||||
// benchNameLabel
|
||||
//
|
||||
this.numberLabel.AutoSize = true;
|
||||
this.numberLabel.Location = new System.Drawing.Point(25, 86);
|
||||
this.numberLabel.Name = "numberLabel";
|
||||
this.numberLabel.Size = new System.Drawing.Size(44, 13);
|
||||
this.numberLabel.TabIndex = 6;
|
||||
this.numberLabel.Text = "Number";
|
||||
this.benchNameLabel.AutoSize = true;
|
||||
this.benchNameLabel.Location = new System.Drawing.Point(25, 84);
|
||||
this.benchNameLabel.Name = "benchNameLabel";
|
||||
this.benchNameLabel.Size = new System.Drawing.Size(90, 13);
|
||||
this.benchNameLabel.TabIndex = 6;
|
||||
this.benchNameLabel.Text = "Test bench name";
|
||||
//
|
||||
// numberTextBox
|
||||
// benchNameTextBox
|
||||
//
|
||||
this.numberTextBox.Enabled = false;
|
||||
this.numberTextBox.Location = new System.Drawing.Point(135, 83);
|
||||
this.numberTextBox.Name = "numberTextBox";
|
||||
this.numberTextBox.Size = new System.Drawing.Size(57, 20);
|
||||
this.numberTextBox.TabIndex = 7;
|
||||
this.benchNameTextBox.Enabled = false;
|
||||
this.benchNameTextBox.Location = new System.Drawing.Point(140, 81);
|
||||
this.benchNameTextBox.Name = "benchNameTextBox";
|
||||
this.benchNameTextBox.Size = new System.Drawing.Size(67, 20);
|
||||
this.benchNameTextBox.TabIndex = 7;
|
||||
//
|
||||
// benchIdTextBox
|
||||
//
|
||||
this.benchIdTextBox.Enabled = false;
|
||||
this.benchIdTextBox.Location = new System.Drawing.Point(140, 107);
|
||||
this.benchIdTextBox.Name = "benchIdTextBox";
|
||||
this.benchIdTextBox.Size = new System.Drawing.Size(67, 20);
|
||||
this.benchIdTextBox.TabIndex = 9;
|
||||
//
|
||||
// benchIdLabel
|
||||
//
|
||||
this.benchIdLabel.AutoSize = true;
|
||||
this.benchIdLabel.Location = new System.Drawing.Point(25, 110);
|
||||
this.benchIdLabel.Name = "benchIdLabel";
|
||||
this.benchIdLabel.Size = new System.Drawing.Size(99, 13);
|
||||
this.benchIdLabel.TabIndex = 8;
|
||||
this.benchIdLabel.Text = "Test bench number";
|
||||
//
|
||||
// ComponentCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.numberTextBox);
|
||||
this.Controls.Add(this.numberLabel);
|
||||
this.Controls.Add(this.benchIdTextBox);
|
||||
this.Controls.Add(this.benchIdLabel);
|
||||
this.Controls.Add(this.benchNameTextBox);
|
||||
this.Controls.Add(this.benchNameLabel);
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
@@ -103,7 +124,9 @@ namespace TBF.BenchControl.BenchInfo.Munich
|
||||
private System.Windows.Forms.TextBox nameTextBox;
|
||||
private System.Windows.Forms.Label nameLabel;
|
||||
private System.Windows.Forms.Label classNameLabel;
|
||||
private System.Windows.Forms.Label numberLabel;
|
||||
private System.Windows.Forms.TextBox numberTextBox;
|
||||
private System.Windows.Forms.Label benchNameLabel;
|
||||
private System.Windows.Forms.TextBox benchNameTextBox;
|
||||
private System.Windows.Forms.TextBox benchIdTextBox;
|
||||
private System.Windows.Forms.Label benchIdLabel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,8 @@ namespace TBF.BenchControl.BenchInfo.Polska
|
||||
|
||||
readonly ComponentCfg benchInfoCfg;
|
||||
|
||||
public string TestBenchId { get { return benchInfoCfg.TestBenchId; } }
|
||||
public string TestBenchName { get { return benchInfoCfg.TestBenchName; } }
|
||||
public int TestBenchId { get { return benchInfoCfg.TestBenchId; } }
|
||||
|
||||
public Component()
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2015-2016 Sensus Metering Systems
|
||||
/// Author: Milan Hanajík
|
||||
///
|
||||
using System;
|
||||
@@ -20,7 +20,8 @@ namespace TBF.BenchControl.BenchInfo.Polska
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
public string TestBenchId;
|
||||
public string TestBenchName;
|
||||
public int TestBenchId;
|
||||
public string Address1;
|
||||
public string Address2;
|
||||
public string Address3;
|
||||
@@ -35,7 +36,8 @@ namespace TBF.BenchControl.BenchInfo.Polska
|
||||
{
|
||||
Name = "BenchInfo";
|
||||
ParentName = string.Empty;
|
||||
TestBenchId = "1";
|
||||
TestBenchName = "1";
|
||||
TestBenchId = 1;
|
||||
|
||||
Address1 = string.Empty;
|
||||
Address2 = string.Empty;
|
||||
@@ -56,7 +58,7 @@ namespace TBF.BenchControl.BenchInfo.Polska
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("Name={0}, TestBenchId={1}", Name, TestBenchId);
|
||||
return string.Format("Name={0}, Bench name={1}, Bench Id={2}", Name, TestBenchName, TestBenchId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ namespace TBF.BenchControl.BenchInfo.Polska
|
||||
private void EntryFormCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
nameLabel.Text = Strings.Name;
|
||||
benchNameLabel.Text = Strings.Test_bench_name;
|
||||
benchIdLabel.Text = Strings.Test_bench_number;
|
||||
|
||||
address1Label.Text = Strings.Address + " 1";
|
||||
@@ -56,10 +57,11 @@ namespace TBF.BenchControl.BenchInfo.Polska
|
||||
void Redraw()
|
||||
{
|
||||
if (config == null) return; /// Control was not loaded, settings were not changed
|
||||
///
|
||||
|
||||
classNameLabel.Text = config.Factory.ClassName;
|
||||
nameTextBox.Text = config.Name;
|
||||
benchIdTextBox.Text = config.TestBenchId;
|
||||
benchNameTextBox.Text = config.TestBenchName;
|
||||
benchIdTextBox.Text = config.TestBenchId.ToString();
|
||||
|
||||
address1TextBox.Text = config.Address1;
|
||||
address2TextBox.Text = config.Address2;
|
||||
@@ -75,6 +77,7 @@ namespace TBF.BenchControl.BenchInfo.Polska
|
||||
public void Unlock()
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
benchNameTextBox.Enabled = true;
|
||||
benchIdTextBox.Enabled = true;
|
||||
|
||||
address1TextBox.Enabled = true;
|
||||
@@ -91,6 +94,13 @@ namespace TBF.BenchControl.BenchInfo.Polska
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.None;
|
||||
|
||||
int dummy;
|
||||
if (!int.TryParse(benchIdTextBox.Text, out dummy) || dummy < 0)
|
||||
{
|
||||
flags = CfgUpdateFlags.Error;
|
||||
message = string.Format("Invalid {0} parameter", Strings.Test_bench_number);
|
||||
}
|
||||
return flags;
|
||||
}
|
||||
|
||||
@@ -101,7 +111,8 @@ namespace TBF.BenchControl.BenchInfo.Polska
|
||||
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
|
||||
///
|
||||
config.Name = nameTextBox.Text;
|
||||
config.TestBenchId = benchIdTextBox.Text;
|
||||
config.TestBenchName = benchNameTextBox.Text;
|
||||
config.TestBenchId = int.Parse(benchIdTextBox.Text);
|
||||
|
||||
config.Address1 = address1TextBox.Text;
|
||||
config.Address2 = address2TextBox.Text;
|
||||
|
||||
+64
-41
@@ -52,23 +52,25 @@ namespace TBF.BenchControl.BenchInfo.Polska
|
||||
this.approvalDateLabel = new System.Windows.Forms.Label();
|
||||
this.approvalIdTextBox = new System.Windows.Forms.TextBox();
|
||||
this.approvalIdLabel = new System.Windows.Forms.Label();
|
||||
this.benchNameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.benchNameLabel = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(113, 26);
|
||||
this.nameTextBox.Location = new System.Drawing.Point(113, 24);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(88, 20);
|
||||
this.nameTextBox.TabIndex = 5;
|
||||
this.nameTextBox.TabIndex = 2;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(6, 29);
|
||||
this.nameLabel.Location = new System.Drawing.Point(6, 27);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 4;
|
||||
this.nameLabel.TabIndex = 1;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// classNameLabel
|
||||
@@ -77,109 +79,109 @@ namespace TBF.BenchControl.BenchInfo.Polska
|
||||
this.classNameLabel.Location = new System.Drawing.Point(110, 6);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(60, 13);
|
||||
this.classNameLabel.TabIndex = 3;
|
||||
this.classNameLabel.TabIndex = 0;
|
||||
this.classNameLabel.Text = "ClassName";
|
||||
//
|
||||
// benchIdLabel
|
||||
//
|
||||
this.benchIdLabel.AutoSize = true;
|
||||
this.benchIdLabel.Location = new System.Drawing.Point(6, 50);
|
||||
this.benchIdLabel.Location = new System.Drawing.Point(6, 66);
|
||||
this.benchIdLabel.Name = "benchIdLabel";
|
||||
this.benchIdLabel.Size = new System.Drawing.Size(52, 13);
|
||||
this.benchIdLabel.TabIndex = 6;
|
||||
this.benchIdLabel.Text = "Bench ID";
|
||||
this.benchIdLabel.Size = new System.Drawing.Size(99, 13);
|
||||
this.benchIdLabel.TabIndex = 5;
|
||||
this.benchIdLabel.Text = "Test bench number";
|
||||
//
|
||||
// benchIdTextBox
|
||||
//
|
||||
this.benchIdTextBox.Enabled = false;
|
||||
this.benchIdTextBox.Location = new System.Drawing.Point(113, 47);
|
||||
this.benchIdTextBox.Location = new System.Drawing.Point(113, 64);
|
||||
this.benchIdTextBox.Name = "benchIdTextBox";
|
||||
this.benchIdTextBox.Size = new System.Drawing.Size(57, 20);
|
||||
this.benchIdTextBox.TabIndex = 7;
|
||||
this.benchIdTextBox.TabIndex = 6;
|
||||
//
|
||||
// address1TextBox
|
||||
//
|
||||
this.address1TextBox.Enabled = false;
|
||||
this.address1TextBox.Location = new System.Drawing.Point(73, 75);
|
||||
this.address1TextBox.Location = new System.Drawing.Point(73, 86);
|
||||
this.address1TextBox.Name = "address1TextBox";
|
||||
this.address1TextBox.Size = new System.Drawing.Size(220, 20);
|
||||
this.address1TextBox.TabIndex = 9;
|
||||
this.address1TextBox.TabIndex = 8;
|
||||
//
|
||||
// address1Label
|
||||
//
|
||||
this.address1Label.AutoSize = true;
|
||||
this.address1Label.Location = new System.Drawing.Point(6, 78);
|
||||
this.address1Label.Location = new System.Drawing.Point(6, 89);
|
||||
this.address1Label.Name = "address1Label";
|
||||
this.address1Label.Size = new System.Drawing.Size(54, 13);
|
||||
this.address1Label.TabIndex = 8;
|
||||
this.address1Label.TabIndex = 7;
|
||||
this.address1Label.Text = "Address 1";
|
||||
//
|
||||
// address2TextBox
|
||||
//
|
||||
this.address2TextBox.Enabled = false;
|
||||
this.address2TextBox.Location = new System.Drawing.Point(73, 95);
|
||||
this.address2TextBox.Location = new System.Drawing.Point(73, 106);
|
||||
this.address2TextBox.Name = "address2TextBox";
|
||||
this.address2TextBox.Size = new System.Drawing.Size(220, 20);
|
||||
this.address2TextBox.TabIndex = 11;
|
||||
this.address2TextBox.TabIndex = 10;
|
||||
//
|
||||
// address2Label
|
||||
//
|
||||
this.address2Label.AutoSize = true;
|
||||
this.address2Label.Location = new System.Drawing.Point(6, 98);
|
||||
this.address2Label.Location = new System.Drawing.Point(6, 109);
|
||||
this.address2Label.Name = "address2Label";
|
||||
this.address2Label.Size = new System.Drawing.Size(54, 13);
|
||||
this.address2Label.TabIndex = 10;
|
||||
this.address2Label.TabIndex = 9;
|
||||
this.address2Label.Text = "Address 2";
|
||||
//
|
||||
// address3TextBox
|
||||
//
|
||||
this.address3TextBox.Enabled = false;
|
||||
this.address3TextBox.Location = new System.Drawing.Point(73, 115);
|
||||
this.address3TextBox.Location = new System.Drawing.Point(73, 126);
|
||||
this.address3TextBox.Name = "address3TextBox";
|
||||
this.address3TextBox.Size = new System.Drawing.Size(220, 20);
|
||||
this.address3TextBox.TabIndex = 13;
|
||||
this.address3TextBox.TabIndex = 12;
|
||||
//
|
||||
// address3Label
|
||||
//
|
||||
this.address3Label.AutoSize = true;
|
||||
this.address3Label.Location = new System.Drawing.Point(6, 118);
|
||||
this.address3Label.Location = new System.Drawing.Point(6, 129);
|
||||
this.address3Label.Name = "address3Label";
|
||||
this.address3Label.Size = new System.Drawing.Size(54, 13);
|
||||
this.address3Label.TabIndex = 12;
|
||||
this.address3Label.TabIndex = 11;
|
||||
this.address3Label.Text = "Address 3";
|
||||
//
|
||||
// address4TextBox
|
||||
//
|
||||
this.address4TextBox.Enabled = false;
|
||||
this.address4TextBox.Location = new System.Drawing.Point(73, 136);
|
||||
this.address4TextBox.Location = new System.Drawing.Point(73, 146);
|
||||
this.address4TextBox.Name = "address4TextBox";
|
||||
this.address4TextBox.Size = new System.Drawing.Size(220, 20);
|
||||
this.address4TextBox.TabIndex = 15;
|
||||
this.address4TextBox.TabIndex = 14;
|
||||
//
|
||||
// address4Label
|
||||
//
|
||||
this.address4Label.AutoSize = true;
|
||||
this.address4Label.Location = new System.Drawing.Point(6, 139);
|
||||
this.address4Label.Location = new System.Drawing.Point(6, 149);
|
||||
this.address4Label.Name = "address4Label";
|
||||
this.address4Label.Size = new System.Drawing.Size(54, 13);
|
||||
this.address4Label.TabIndex = 14;
|
||||
this.address4Label.TabIndex = 13;
|
||||
this.address4Label.Text = "Address 4";
|
||||
//
|
||||
// address5TextBox
|
||||
//
|
||||
this.address5TextBox.Enabled = false;
|
||||
this.address5TextBox.Location = new System.Drawing.Point(73, 157);
|
||||
this.address5TextBox.Location = new System.Drawing.Point(73, 166);
|
||||
this.address5TextBox.Name = "address5TextBox";
|
||||
this.address5TextBox.Size = new System.Drawing.Size(220, 20);
|
||||
this.address5TextBox.TabIndex = 17;
|
||||
this.address5TextBox.TabIndex = 16;
|
||||
//
|
||||
// address5Label
|
||||
//
|
||||
this.address5Label.AutoSize = true;
|
||||
this.address5Label.Location = new System.Drawing.Point(6, 160);
|
||||
this.address5Label.Location = new System.Drawing.Point(6, 169);
|
||||
this.address5Label.Name = "address5Label";
|
||||
this.address5Label.Size = new System.Drawing.Size(54, 13);
|
||||
this.address5Label.TabIndex = 16;
|
||||
this.address5Label.TabIndex = 15;
|
||||
this.address5Label.Text = "Address 5";
|
||||
//
|
||||
// approvedByTextBox
|
||||
@@ -188,7 +190,7 @@ namespace TBF.BenchControl.BenchInfo.Polska
|
||||
this.approvedByTextBox.Location = new System.Drawing.Point(113, 227);
|
||||
this.approvedByTextBox.Name = "approvedByTextBox";
|
||||
this.approvedByTextBox.Size = new System.Drawing.Size(180, 20);
|
||||
this.approvedByTextBox.TabIndex = 23;
|
||||
this.approvedByTextBox.TabIndex = 22;
|
||||
//
|
||||
// approvedByLabel
|
||||
//
|
||||
@@ -196,47 +198,66 @@ namespace TBF.BenchControl.BenchInfo.Polska
|
||||
this.approvedByLabel.Location = new System.Drawing.Point(6, 230);
|
||||
this.approvedByLabel.Name = "approvedByLabel";
|
||||
this.approvedByLabel.Size = new System.Drawing.Size(67, 13);
|
||||
this.approvedByLabel.TabIndex = 22;
|
||||
this.approvedByLabel.TabIndex = 21;
|
||||
this.approvedByLabel.Text = "Approved by";
|
||||
//
|
||||
// approvalDateTextBox
|
||||
//
|
||||
this.approvalDateTextBox.Enabled = false;
|
||||
this.approvalDateTextBox.Location = new System.Drawing.Point(113, 206);
|
||||
this.approvalDateTextBox.Location = new System.Drawing.Point(113, 207);
|
||||
this.approvalDateTextBox.Name = "approvalDateTextBox";
|
||||
this.approvalDateTextBox.Size = new System.Drawing.Size(180, 20);
|
||||
this.approvalDateTextBox.TabIndex = 21;
|
||||
this.approvalDateTextBox.TabIndex = 20;
|
||||
//
|
||||
// approvalDateLabel
|
||||
//
|
||||
this.approvalDateLabel.AutoSize = true;
|
||||
this.approvalDateLabel.Location = new System.Drawing.Point(6, 209);
|
||||
this.approvalDateLabel.Location = new System.Drawing.Point(6, 210);
|
||||
this.approvalDateLabel.Name = "approvalDateLabel";
|
||||
this.approvalDateLabel.Size = new System.Drawing.Size(73, 13);
|
||||
this.approvalDateLabel.TabIndex = 20;
|
||||
this.approvalDateLabel.TabIndex = 19;
|
||||
this.approvalDateLabel.Text = "Approval date";
|
||||
//
|
||||
// approvalIdTextBox
|
||||
//
|
||||
this.approvalIdTextBox.Enabled = false;
|
||||
this.approvalIdTextBox.Location = new System.Drawing.Point(113, 185);
|
||||
this.approvalIdTextBox.Location = new System.Drawing.Point(113, 187);
|
||||
this.approvalIdTextBox.Name = "approvalIdTextBox";
|
||||
this.approvalIdTextBox.Size = new System.Drawing.Size(180, 20);
|
||||
this.approvalIdTextBox.TabIndex = 19;
|
||||
this.approvalIdTextBox.TabIndex = 18;
|
||||
//
|
||||
// approvalIdLabel
|
||||
//
|
||||
this.approvalIdLabel.AutoSize = true;
|
||||
this.approvalIdLabel.Location = new System.Drawing.Point(6, 188);
|
||||
this.approvalIdLabel.Location = new System.Drawing.Point(6, 190);
|
||||
this.approvalIdLabel.Name = "approvalIdLabel";
|
||||
this.approvalIdLabel.Size = new System.Drawing.Size(61, 13);
|
||||
this.approvalIdLabel.TabIndex = 18;
|
||||
this.approvalIdLabel.TabIndex = 17;
|
||||
this.approvalIdLabel.Text = "Approval Id";
|
||||
//
|
||||
// benchNameTextBox
|
||||
//
|
||||
this.benchNameTextBox.Enabled = false;
|
||||
this.benchNameTextBox.Location = new System.Drawing.Point(113, 44);
|
||||
this.benchNameTextBox.Name = "benchNameTextBox";
|
||||
this.benchNameTextBox.Size = new System.Drawing.Size(57, 20);
|
||||
this.benchNameTextBox.TabIndex = 4;
|
||||
//
|
||||
// benchNameLabel
|
||||
//
|
||||
this.benchNameLabel.AutoSize = true;
|
||||
this.benchNameLabel.Location = new System.Drawing.Point(6, 46);
|
||||
this.benchNameLabel.Name = "benchNameLabel";
|
||||
this.benchNameLabel.Size = new System.Drawing.Size(90, 13);
|
||||
this.benchNameLabel.TabIndex = 3;
|
||||
this.benchNameLabel.Text = "Test bench name";
|
||||
//
|
||||
// ComponentCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.benchNameTextBox);
|
||||
this.Controls.Add(this.benchNameLabel);
|
||||
this.Controls.Add(this.approvedByTextBox);
|
||||
this.Controls.Add(this.approvedByLabel);
|
||||
this.Controls.Add(this.approvalDateTextBox);
|
||||
@@ -289,5 +310,7 @@ namespace TBF.BenchControl.BenchInfo.Polska
|
||||
private System.Windows.Forms.Label approvalDateLabel;
|
||||
private System.Windows.Forms.TextBox approvalIdTextBox;
|
||||
private System.Windows.Forms.Label approvalIdLabel;
|
||||
private System.Windows.Forms.TextBox benchNameTextBox;
|
||||
private System.Windows.Forms.Label benchNameLabel;
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -73,13 +73,13 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
radioButton2.Text = ProtocolName2;
|
||||
radioButton3.Text = ProtocolName3;
|
||||
|
||||
qRise1TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qrise, 3);
|
||||
qFall1TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qfall, 3);
|
||||
qRise1TextBox.Text = Utils.DoubleToStr(Sequences.SequenceBase.Qrise, 3);
|
||||
qFall1TextBox.Text = Utils.DoubleToStr(Sequences.SequenceBase.Qfall, 3);
|
||||
|
||||
if (Config.Data.CompoundWMsCount >= 2)
|
||||
{
|
||||
qRise2TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qrise, 3);
|
||||
qFall2TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qfall, 3);
|
||||
qRise2TextBox.Text = Utils.DoubleToStr(Sequences.SequenceBase.Qrise, 3);
|
||||
qFall2TextBox.Text = Utils.DoubleToStr(Sequences.SequenceBase.Qfall, 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -89,8 +89,8 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
|
||||
if (Config.Data.CompoundWMsCount >= 3)
|
||||
{
|
||||
qRise3TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qrise, 3);
|
||||
qFall3TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qfall, 3);
|
||||
qRise3TextBox.Text = Utils.DoubleToStr(Sequences.SequenceBase.Qrise, 3);
|
||||
qFall3TextBox.Text = Utils.DoubleToStr(Sequences.SequenceBase.Qfall, 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -43,13 +43,13 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
|
||||
System.Windows.Forms.Form modelessDlg;
|
||||
|
||||
float refVolume;
|
||||
float errLimLo;
|
||||
float errLimHi;
|
||||
double refVolume;
|
||||
double errLimLo;
|
||||
double errLimHi;
|
||||
|
||||
bool resultSaved;
|
||||
bool resultSaved; /// Set in Run() when results are saved
|
||||
|
||||
IList<IWaterMeter> waterMeters;
|
||||
Results.Entities.WaterMeter[] waterMeters; /// Reference to ...ProcessData.BatchRslts.WaterMeters[]
|
||||
|
||||
public enum CurrentOp
|
||||
{
|
||||
@@ -83,20 +83,20 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp(IList<IWaterMeter> waterMeters)
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleBeginning;
|
||||
this.waterMeters = waterMeters;
|
||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleEndFormOp(IList<IWaterMeter> waterMeters)
|
||||
public IOperation ShowCycleEndFormOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
||||
this.waterMeters = waterMeters;
|
||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestEndFormOp(float refVolume, float errLimLo, float errLimHi)
|
||||
public IOperation ShowTestEndFormOp(double refVolume, double errLimLo, double errLimHi)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestEndStates;
|
||||
@@ -142,14 +142,14 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
///
|
||||
void OpenTestEndStatesDlg(EntryForm myRef)
|
||||
{
|
||||
string[] mainStartSateStr = new string[Config.Data.CompoundWMsCount];
|
||||
string[] auxStartSateStr = new string[Config.Data.CompoundWMsCount];
|
||||
string[] mainStartStateStr = new string[Config.Data.CompoundWMsCount];
|
||||
string[] auxStartStateStr = new string[Config.Data.CompoundWMsCount];
|
||||
for (int i = 0; i < Config.Data.CompoundWMsCount; i++)
|
||||
{
|
||||
mainStartSateStr[i] = wmStartStateStr[2 * i];
|
||||
auxStartSateStr[i] = wmStartStateStr[2 * i + 1];
|
||||
mainStartStateStr[i] = wmStartStateStr[2 * i];
|
||||
auxStartStateStr[i] = wmStartStateStr[2 * i + 1];
|
||||
}
|
||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.CompoundWMsCount, mainStartSateStr, auxStartSateStr, disabled, refVolume, errLimLo, errLimHi);
|
||||
myRef.modelessDlg = new TestStartEndForm(Config.Data.CompoundWMsCount, mainStartStateStr, auxStartStateStr, disabled, refVolume, errLimLo, errLimHi);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
|
||||
@@ -196,13 +196,13 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
{
|
||||
purchaseOrder = dlg.PurchaseOrder;
|
||||
|
||||
for (int i = 0; i < Math.Min(dlg.WaterMetersCount, waterMeters.Count / 2); i++)
|
||||
for (int i = 0; i < Math.Min(dlg.WaterMetersCount, waterMeters.Length / 2); i++)
|
||||
{
|
||||
if (waterMeters[i] != null)
|
||||
{
|
||||
serialNr[2 * i] = waterMeters[2 * i].SerialNr = dlg.MainSNText[i];
|
||||
serialNr[2 * i + 1] = waterMeters[2 * i + 1].SerialNr = dlg.AuxSNText[i];
|
||||
disabled[i] = waterMeters[i].Disabled = dlg.Disabled[i];
|
||||
serialNr[2 * i] = waterMeters[i].SerialNr = dlg.MainSNText[i];
|
||||
serialNr[2 * i + 1] = waterMeters[i].SerialNrAux = dlg.AuxSNText[i];
|
||||
disabled[i] = waterMeters[i].Disabled = dlg.Disabled[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -269,21 +269,9 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
/// </summary>
|
||||
/// <param name="waterMeters">Watermetes with information entered in the forms</param>
|
||||
/// <param name="testResults">Test results to be updated with the information</param>
|
||||
public void UpdateTestResults(IList<IWaterMeter> waterMeters, IList<TestResult> testResults)
|
||||
public void UpdateTestResults(Results.BatchResults results)
|
||||
{
|
||||
foreach (var testRslt in testResults)
|
||||
{
|
||||
if (testRslt.MetersKind != MetersKind.Combined) continue;
|
||||
|
||||
testRslt.PurchaseOrder = PurchaseOrder;
|
||||
|
||||
for (int i = 0; i < testRslt.Meters.Count; i++)
|
||||
{
|
||||
testRslt.Meters[i].SerialNr = SerialNr(i);
|
||||
testRslt.Meters[i].Disabled = Disabled(i);
|
||||
testRslt.Meters[i].EndState = WMCycleEndState(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// Nothing to be done
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,9 +35,9 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
public float[] AuxEndState;
|
||||
|
||||
bool endStates; /// false=start states, true=end states
|
||||
float refVolume;
|
||||
float warningLimLo; /// limit to display exclamation mark, typically 2x errLimLo
|
||||
float warningLimHi; /// limit to display exclamation mark, typically 2x errLimHi
|
||||
double refVolume;
|
||||
double warningLimLo; /// limit to display exclamation mark, typically 2x errLimLo
|
||||
double warningLimHi; /// limit to display exclamation mark, typically 2x errLimHi
|
||||
|
||||
int TextBoxesCount;
|
||||
///
|
||||
@@ -103,7 +103,7 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
/// <param name="errLimLo">Error limit low, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
/// <param name="errLimHi">Error limit high, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
public TestStartEndForm(int waterMetersCount, string[] mainStartStateStr, string[] auxStartStateStr,
|
||||
bool[] disabled, float refVolume, float errLimLo, float errLimHi)
|
||||
bool[] disabled, double refVolume, double errLimLo, double errLimHi)
|
||||
: this()
|
||||
{
|
||||
endStates = true;
|
||||
@@ -290,12 +290,12 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
/// </summary>
|
||||
private void main1EndTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
//float err = 0;
|
||||
//double err = 0;
|
||||
//try
|
||||
//{
|
||||
// float endState = Utils.ParseUFloat(main1EndTextBox.Text);
|
||||
// float startState = Utils.ParseUFloat(main1StartTextBox.Text);
|
||||
// err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
// err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
//}
|
||||
//catch { };
|
||||
|
||||
@@ -304,12 +304,12 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
|
||||
private void aux1EndTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
//float err = 0;
|
||||
//double err = 0;
|
||||
//try
|
||||
//{
|
||||
// float endState = Utils.ParseUFloat(aux1EndTextBox.Text);
|
||||
// float startState = Utils.ParseUFloat(aux1StartTextBox.Text);
|
||||
// err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
// err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
//}
|
||||
//catch { err = 1000.0f; };
|
||||
|
||||
@@ -318,12 +318,12 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
|
||||
private void main2EndTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
//float err = 0;
|
||||
//double err = 0;
|
||||
//try
|
||||
//{
|
||||
// float endState = Utils.ParseUFloat(main2EndTextBox.Text);
|
||||
// float startState = Utils.ParseUFloat(main2StartTextBox.Text);
|
||||
// err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
// err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
//}
|
||||
//catch { err = 1000.0f; };
|
||||
|
||||
@@ -332,12 +332,12 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
|
||||
private void aux2EndTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
//float err = 0;
|
||||
//double err = 0;
|
||||
//try
|
||||
//{
|
||||
// float endState = Utils.ParseUFloat(aux2EndTextBox.Text);
|
||||
// float startState = Utils.ParseUFloat(aux2StartTextBox.Text);
|
||||
// err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
// err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
//}
|
||||
//catch { err = 1000.0f; };
|
||||
|
||||
@@ -346,12 +346,12 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
|
||||
private void main3EndTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
//float err = 0;
|
||||
//double err = 0;
|
||||
//try
|
||||
//{
|
||||
// float endState = Utils.ParseUFloat(main3EndTextBox.Text);
|
||||
// float startState = Utils.ParseUFloat(main3StartTextBox.Text);
|
||||
// err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
// err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
//}
|
||||
//catch { err = 1000.0f; };
|
||||
|
||||
@@ -360,12 +360,12 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
|
||||
private void aux3EndTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
//float err = 0;
|
||||
//double err = 0;
|
||||
//try
|
||||
//{
|
||||
// float endState = Utils.ParseUFloat(aux3EndTextBox.Text);
|
||||
// float startState = Utils.ParseUFloat(aux3StartTextBox.Text);
|
||||
// err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
// err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
//}
|
||||
//catch { err = 1000.0f; };
|
||||
|
||||
|
||||
@@ -73,13 +73,13 @@ namespace TBF.BenchControl.DataEntry.Munich
|
||||
radioButton2.Text = ProtocolName2;
|
||||
radioButton3.Text = ProtocolName3;
|
||||
|
||||
qRise1TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qrise, 3);
|
||||
qFall1TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qfall, 3);
|
||||
qRise1TextBox.Text = Utils.DoubleToStr(Sequences.SequenceBase.Qrise, 3);
|
||||
qFall1TextBox.Text = Utils.DoubleToStr(Sequences.SequenceBase.Qfall, 3);
|
||||
|
||||
if (Config.Data.CompoundWMsCount >= 2)
|
||||
{
|
||||
qRise2TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qrise, 3);
|
||||
qFall2TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qfall, 3);
|
||||
qRise2TextBox.Text = Utils.DoubleToStr(Sequences.SequenceBase.Qrise, 3);
|
||||
qFall2TextBox.Text = Utils.DoubleToStr(Sequences.SequenceBase.Qfall, 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -89,8 +89,8 @@ namespace TBF.BenchControl.DataEntry.Munich
|
||||
|
||||
if (Config.Data.CompoundWMsCount >= 3)
|
||||
{
|
||||
qRise3TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qrise, 3);
|
||||
qFall3TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qfall, 3);
|
||||
qRise3TextBox.Text = Utils.DoubleToStr(Sequences.SequenceBase.Qrise, 3);
|
||||
qFall3TextBox.Text = Utils.DoubleToStr(Sequences.SequenceBase.Qfall, 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -43,9 +43,9 @@ namespace TBF.BenchControl.DataEntry.Munich
|
||||
|
||||
System.Windows.Forms.Form modelessDlg;
|
||||
|
||||
bool resultSaved;
|
||||
bool resultSaved; /// Set in Run() when results are saved
|
||||
|
||||
IList<IWaterMeter> wMeters;
|
||||
Results.Entities.WaterMeter[] wMeters; /// Reference to ...ProcessData.BatchRslts.WaterMeters[]
|
||||
|
||||
public enum CurrentOp
|
||||
{
|
||||
@@ -73,20 +73,20 @@ namespace TBF.BenchControl.DataEntry.Munich
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp(IList<IWaterMeter> waterMeters)
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleBeginning;
|
||||
this.wMeters = waterMeters;
|
||||
this.wMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleEndFormOp(IList<IWaterMeter> waterMeters)
|
||||
public IOperation ShowCycleEndFormOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
||||
this.wMeters = waterMeters;
|
||||
this.wMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -142,21 +142,21 @@ namespace TBF.BenchControl.DataEntry.Munich
|
||||
{
|
||||
if (modelessDlg is CycleBeginningForm)
|
||||
{
|
||||
if (wMeters.Count >= 2 && wMeters[0] != null) wMeters[0].SerialNr = (modelessDlg as CycleBeginningForm).MainSNText[0];
|
||||
if (wMeters.Count >= 2 && wMeters[1] != null) wMeters[1].SerialNr = (modelessDlg as CycleBeginningForm).AuxSNText[0];
|
||||
if (wMeters.Count >= 4 && wMeters[2] != null) wMeters[2].SerialNr = (modelessDlg as CycleBeginningForm).MainSNText[1];
|
||||
if (wMeters.Count >= 4 && wMeters[3] != null) wMeters[3].SerialNr = (modelessDlg as CycleBeginningForm).AuxSNText[1];
|
||||
if (wMeters.Count >= 6 && wMeters[4] != null) wMeters[4].SerialNr = (modelessDlg as CycleBeginningForm).MainSNText[2];
|
||||
if (wMeters.Count >= 6 && wMeters[5] != null) wMeters[5].SerialNr = (modelessDlg as CycleBeginningForm).AuxSNText[2];
|
||||
if (wMeters.Length >= 1 && wMeters[0] != null) wMeters[0].SerialNr = (modelessDlg as CycleBeginningForm).MainSNText[0];
|
||||
if (wMeters.Length >= 1 && wMeters[0] != null) wMeters[0].SerialNrAux = (modelessDlg as CycleBeginningForm).AuxSNText[0];
|
||||
if (wMeters.Length >= 2 && wMeters[1] != null) wMeters[1].SerialNr = (modelessDlg as CycleBeginningForm).MainSNText[1];
|
||||
if (wMeters.Length >= 2 && wMeters[1] != null) wMeters[1].SerialNrAux = (modelessDlg as CycleBeginningForm).AuxSNText[1];
|
||||
if (wMeters.Length >= 3 && wMeters[2] != null) wMeters[2].SerialNr = (modelessDlg as CycleBeginningForm).MainSNText[2];
|
||||
if (wMeters.Length >= 3 && wMeters[2] != null) wMeters[2].SerialNrAux = (modelessDlg as CycleBeginningForm).AuxSNText[2];
|
||||
}
|
||||
else if (modelessDlg is CycleEndForm)
|
||||
{
|
||||
if (wMeters.Count >= 2 && wMeters[0] != null) wMeters[0].EndState = (modelessDlg as CycleEndForm).MainStateText[0];
|
||||
if (wMeters.Count >= 2 && wMeters[1] != null) wMeters[1].EndState = (modelessDlg as CycleEndForm).AuxStateText[0];
|
||||
if (wMeters.Count >= 4 && wMeters[2] != null) wMeters[2].EndState = (modelessDlg as CycleEndForm).MainStateText[1];
|
||||
if (wMeters.Count >= 4 && wMeters[3] != null) wMeters[3].EndState = (modelessDlg as CycleEndForm).AuxStateText[1];
|
||||
if (wMeters.Count >= 6 && wMeters[4] != null) wMeters[4].EndState = (modelessDlg as CycleEndForm).MainStateText[2];
|
||||
if (wMeters.Count >= 6 && wMeters[5] != null) wMeters[5].EndState = (modelessDlg as CycleEndForm).AuxStateText[2];
|
||||
if (wMeters.Length >= 1 && wMeters[0] != null) wMeters[0].EndState = (modelessDlg as CycleEndForm).MainStateText[0];
|
||||
if (wMeters.Length >= 1 && wMeters[0] != null) wMeters[0].EndStateAux = (modelessDlg as CycleEndForm).AuxStateText[0];
|
||||
if (wMeters.Length >= 2 && wMeters[1] != null) wMeters[1].EndState = (modelessDlg as CycleEndForm).MainStateText[1];
|
||||
if (wMeters.Length >= 2 && wMeters[1] != null) wMeters[1].EndStateAux = (modelessDlg as CycleEndForm).AuxStateText[1];
|
||||
if (wMeters.Length >= 3 && wMeters[2] != null) wMeters[2].EndState = (modelessDlg as CycleEndForm).MainStateText[2];
|
||||
if (wMeters.Length >= 3 && wMeters[2] != null) wMeters[2].EndStateAux = (modelessDlg as CycleEndForm).AuxStateText[2];
|
||||
protocolTitle = (modelessDlg as CycleEndForm).ProtocolTitle;
|
||||
}
|
||||
resultSaved = true;
|
||||
@@ -182,18 +182,9 @@ namespace TBF.BenchControl.DataEntry.Munich
|
||||
/// </summary>
|
||||
/// <param name="waterMeters">Watermetes with information entered in the forms</param>
|
||||
/// <param name="results">Test results to be updated with the information</param>
|
||||
public void UpdateTestResults(IList<IWaterMeter> waterMeters, IList<TestResult> results)
|
||||
public void UpdateTestResults(Results.BatchResults results)
|
||||
{
|
||||
foreach (var test in results)
|
||||
{
|
||||
if (test.MetersKind != MetersKind.Combined) continue;
|
||||
|
||||
/// Todo: Generalize !!! Now implemented for Munich = one combined meter.
|
||||
test.Meters[0].SerialNr = waterMeters[0].SerialNr;
|
||||
test.Meters[0].EndState = waterMeters[0].EndState;
|
||||
test.Meters[1].SerialNr = waterMeters[1].SerialNr;
|
||||
test.Meters[1].EndState = waterMeters[1].EndState;
|
||||
}
|
||||
/// Nothing to be done
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace TBF.BenchControl.DataEntry.Munich3
|
||||
|
||||
bool resultSaved;
|
||||
|
||||
IList<IWaterMeter> waterMeters;
|
||||
Results.Entities.WaterMeter[] waterMeters; /// Reference to ...ProcessData.BatchRslts.WaterMeters[]
|
||||
|
||||
public enum CurrentOp
|
||||
{
|
||||
@@ -73,20 +73,20 @@ namespace TBF.BenchControl.DataEntry.Munich3
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp(IList<IWaterMeter> waterMeters)
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleBeginning;
|
||||
this.waterMeters = waterMeters;
|
||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleEndFormOp(IList<IWaterMeter> waterMeters)
|
||||
public IOperation ShowCycleEndFormOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
||||
this.waterMeters = waterMeters;
|
||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ namespace TBF.BenchControl.DataEntry.Munich3
|
||||
{
|
||||
CycleBeginningForm dlg = (modelessDlg as CycleBeginningForm);
|
||||
|
||||
for (int i = 0; i < Math.Min(dlg.WaterMetersCount, waterMeters.Count); i++)
|
||||
for (int i = 0; i < Math.Min(dlg.WaterMetersCount, waterMeters.Length); i++)
|
||||
{
|
||||
if (waterMeters[i] != null)
|
||||
{
|
||||
@@ -158,7 +158,7 @@ namespace TBF.BenchControl.DataEntry.Munich3
|
||||
|
||||
protocolTitle = dlg.ProtocolTitle;
|
||||
|
||||
for (int i = 0; i < Math.Min(dlg.WaterMetersCount, waterMeters.Count); i++)
|
||||
for (int i = 0; i < Math.Min(dlg.WaterMetersCount, waterMeters.Length); i++)
|
||||
{
|
||||
if (waterMeters[i] != null)
|
||||
{
|
||||
@@ -189,19 +189,9 @@ namespace TBF.BenchControl.DataEntry.Munich3
|
||||
/// </summary>
|
||||
/// <param name="waterMeters">Watermetes with information entered in the forms</param>
|
||||
/// <param name="results">Test results to be updated with the information</param>
|
||||
public void UpdateTestResults(IList<IWaterMeter> waterMeters, IList<TestResult> results)
|
||||
{
|
||||
foreach (var test in results)
|
||||
{
|
||||
if (test.MetersKind != MetersKind.Single) continue;
|
||||
|
||||
int nrMtrsToUpdate = Math.Min(waterMeters.Count, test.Meters.Count);
|
||||
for (int i = 0; i < nrMtrsToUpdate; i++)
|
||||
{
|
||||
test.Meters[i].SerialNr = waterMeters[i].SerialNr;
|
||||
test.Meters[i].EndState = waterMeters[i].EndState;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void UpdateTestResults(Results.BatchResults results)
|
||||
{
|
||||
/// Nothing to be done
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,13 +43,13 @@ namespace TBF.BenchControl.DataEntry.Standard
|
||||
|
||||
System.Windows.Forms.Form modelessDlg;
|
||||
|
||||
float refVolume;
|
||||
float errLimLo;
|
||||
float errLimHi;
|
||||
double refVolume;
|
||||
double errLimLo;
|
||||
double errLimHi;
|
||||
|
||||
bool resultSaved; /// Set in Run() when results are saved
|
||||
bool resultSaved; /// Set in Run() when results are saved
|
||||
|
||||
IList<IWaterMeter> waterMeters; /// Passesd as an argument of ShowCycleBeginFormOp/ShowCycleEndFormOp constructor
|
||||
Results.Entities.WaterMeter[] waterMeters; /// Reference to ...ProcessData.BatchRslts.WaterMeters[]
|
||||
|
||||
public enum CurrentOp
|
||||
{
|
||||
@@ -83,20 +83,20 @@ namespace TBF.BenchControl.DataEntry.Standard
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp(IList<IWaterMeter> waterMeters)
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleBeginning;
|
||||
this.waterMeters = waterMeters;
|
||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleEndFormOp(IList<IWaterMeter> waterMeters)
|
||||
public IOperation ShowCycleEndFormOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
||||
this.waterMeters = waterMeters;
|
||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ namespace TBF.BenchControl.DataEntry.Standard
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestEndFormOp(float refVolume, float errLimLo, float errLimHi)
|
||||
public IOperation ShowTestEndFormOp(double refVolume, double errLimLo, double errLimHi)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestEndStates;
|
||||
@@ -187,7 +187,7 @@ namespace TBF.BenchControl.DataEntry.Standard
|
||||
{
|
||||
purchaseOrder = dlg.PurchaseOrder;
|
||||
|
||||
for (int i = 0; i < Math.Min(dlg.WaterMetersCount, waterMeters.Count); i++)
|
||||
for (int i = 0; i < Math.Min(dlg.WaterMetersCount, waterMeters.Length); i++)
|
||||
{
|
||||
if (waterMeters[i] != null)
|
||||
{
|
||||
@@ -200,7 +200,7 @@ namespace TBF.BenchControl.DataEntry.Standard
|
||||
else if (currentOp == CurrentOp.ShowFormAtCycleEnd)
|
||||
{
|
||||
CycleEndForm dlg = (modelessDlg as CycleEndForm);
|
||||
int count = waterMeters.Count;
|
||||
int count = waterMeters.Length;
|
||||
if ((dlg != null) && (count > dlg.WaterMetersCount)) count = dlg.WaterMetersCount;
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
@@ -260,21 +260,18 @@ namespace TBF.BenchControl.DataEntry.Standard
|
||||
/// </summary>
|
||||
/// <param name="waterMeters">Watermetes with information entered in the forms</param>
|
||||
/// <param name="testResults">Test results to be updated with the information</param>
|
||||
public void UpdateTestResults(IList<IWaterMeter> waterMeters, IList<TestResult> testResults)
|
||||
{
|
||||
foreach (var testRslt in testResults)
|
||||
{
|
||||
if (testRslt.MetersKind != MetersKind.Single) continue;
|
||||
public void UpdateTestResults(Results.BatchResults results)
|
||||
{
|
||||
/// Nothing to be done
|
||||
|
||||
testRslt.PurchaseOrder = PurchaseOrder;
|
||||
//for (int i = 0; i < results.WMPositionsCount; i++)
|
||||
//{
|
||||
// if (results.Batch.WaterMeters[i] == null || results.Batch.WaterMeters[i].Compound()) continue;
|
||||
|
||||
for (int i = 0; i < testRslt.Meters.Count; i++)
|
||||
{
|
||||
testRslt.Meters[i].SerialNr = SerialNr(i);
|
||||
testRslt.Meters[i].Disabled = Disabled(i);
|
||||
testRslt.Meters[i].EndState = WMCycleEndState(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
// results.Batch.WaterMeters[i].SerialNr = SerialNr(i);
|
||||
// results.Batch.WaterMeters[i].Disabled = Disabled(i);
|
||||
// results.Batch.WaterMeters[i].EndState = WMCycleEndState(i);
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,9 +31,9 @@ namespace TBF.BenchControl.DataEntry.Standard
|
||||
public float[] WMEndState;
|
||||
|
||||
bool endStates; /// false=start states, true=end states
|
||||
float refVolume;
|
||||
float warningLimLo; /// limit to display exclamation mark, typically 2x errLimLo
|
||||
float warningLimHi; /// limit to display exclamation mark, typically 2x errLimHi
|
||||
double refVolume;
|
||||
double warningLimLo; /// limit to display exclamation mark, typically 2x errLimLo
|
||||
double warningLimHi; /// limit to display exclamation mark, typically 2x errLimHi
|
||||
|
||||
/// <summary>
|
||||
/// Constructor to fill in start states
|
||||
@@ -58,7 +58,7 @@ namespace TBF.BenchControl.DataEntry.Standard
|
||||
/// </summary>
|
||||
/// <param name="waterMetersCount">Number of text boxes for serial numbers</param>
|
||||
public TestStartEndForm(int waterMetersCount, string[] wmStartStateStr, bool[] disabled,
|
||||
float refVolume, float errLimLo, float errLimHi)
|
||||
double refVolume, double errLimLo, double errLimHi)
|
||||
{
|
||||
endStates = true;
|
||||
|
||||
@@ -219,12 +219,12 @@ namespace TBF.BenchControl.DataEntry.Standard
|
||||
|
||||
private void wmEndStateTextBox1_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(wmEndStateTextBox1.Text);
|
||||
float startState = Utils.ParseUFloat(wmStartStateTextBox1.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { };
|
||||
|
||||
@@ -233,12 +233,12 @@ namespace TBF.BenchControl.DataEntry.Standard
|
||||
|
||||
private void wmEndStateTextBox2_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(wmEndStateTextBox2.Text);
|
||||
float startState = Utils.ParseUFloat(wmStartStateTextBox2.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
|
||||
@@ -247,12 +247,12 @@ namespace TBF.BenchControl.DataEntry.Standard
|
||||
|
||||
private void wmEndStateTextBox3_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(wmEndStateTextBox3.Text);
|
||||
float startState = Utils.ParseUFloat(wmStartStateTextBox3.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
|
||||
@@ -261,12 +261,12 @@ namespace TBF.BenchControl.DataEntry.Standard
|
||||
|
||||
private void wmEndStateTextBox4_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(wmEndStateTextBox4.Text);
|
||||
float startState = Utils.ParseUFloat(wmStartStateTextBox4.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
|
||||
@@ -275,12 +275,12 @@ namespace TBF.BenchControl.DataEntry.Standard
|
||||
|
||||
private void wmEndStateTextBox5_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(wmEndStateTextBox5.Text);
|
||||
float startState = Utils.ParseUFloat(wmStartStateTextBox5.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
|
||||
@@ -289,12 +289,12 @@ namespace TBF.BenchControl.DataEntry.Standard
|
||||
|
||||
private void wmEndStateTextBox6_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(wmEndStateTextBox6.Text);
|
||||
float startState = Utils.ParseUFloat(wmStartStateTextBox6.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
|
||||
|
||||
@@ -43,13 +43,13 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
|
||||
System.Windows.Forms.Form modelessDlg;
|
||||
|
||||
float refVolume;
|
||||
float errLimLo;
|
||||
float errLimHi;
|
||||
double refVolume;
|
||||
double errLimLo;
|
||||
double errLimHi;
|
||||
|
||||
bool resultSaved; /// Set in Run() when results are saved
|
||||
bool resultSaved; /// Set in Run() when results are saved
|
||||
|
||||
IList<IWaterMeter> waterMeters; /// Passesd as an argument of ShowCycleBeginFormOp/ShowCycleEndFormOp constructor
|
||||
Results.Entities.WaterMeter[] waterMeters; /// Reference to ...ProcessData.BatchRslts.WaterMeters[]
|
||||
|
||||
public enum CurrentOp
|
||||
{
|
||||
@@ -83,20 +83,20 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp(IList<IWaterMeter> waterMeters)
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleBeginning;
|
||||
this.waterMeters = waterMeters;
|
||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleEndFormOp(IList<IWaterMeter> waterMeters)
|
||||
public IOperation ShowCycleEndFormOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
||||
this.waterMeters = waterMeters;
|
||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestEndFormOp(float refVolume, float errLimLo, float errLimHi)
|
||||
public IOperation ShowTestEndFormOp(double refVolume, double errLimLo, double errLimHi)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestEndStates;
|
||||
@@ -188,7 +188,7 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
{
|
||||
purchaseOrder = dlg.PurchaseOrder;
|
||||
|
||||
for (int i = 0; i < Math.Min(dlg.WaterMetersCount, waterMeters.Count); i++)
|
||||
for (int i = 0; i < Math.Min(dlg.WaterMetersCount, waterMeters.Length); i++)
|
||||
{
|
||||
if (waterMeters[i] != null)
|
||||
{
|
||||
@@ -201,7 +201,7 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
else if (currentOp == CurrentOp.ShowFormAtCycleEnd)
|
||||
{
|
||||
CycleEndForm dlg = (modelessDlg as CycleEndForm);
|
||||
int count = waterMeters.Count;
|
||||
int count = waterMeters.Length;
|
||||
if ((dlg != null) && (count > dlg.WaterMetersCount)) count = dlg.WaterMetersCount;
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
@@ -257,21 +257,18 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
/// </summary>
|
||||
/// <param name="waterMeters">Watermetes with information entered in the forms</param>
|
||||
/// <param name="testResults">Test results to be updated with the information</param>
|
||||
public void UpdateTestResults(IList<IWaterMeter> waterMeters, IList<TestResult> testResults)
|
||||
{
|
||||
foreach (var testRslt in testResults)
|
||||
{
|
||||
if (testRslt.MetersKind != MetersKind.Single) continue;
|
||||
public void UpdateTestResults(Results.BatchResults results)
|
||||
{
|
||||
/// Nothing to be done
|
||||
|
||||
testRslt.PurchaseOrder = PurchaseOrder;
|
||||
//for (int i = 0; i < results.WMPositionsCount; i++)
|
||||
//{
|
||||
// if (results.Batch.WaterMeters[i] == null || results.Batch.WaterMeters[i].Compound()) continue;
|
||||
|
||||
for (int i = 0; i < testRslt.Meters.Count; i++)
|
||||
{
|
||||
testRslt.Meters[i].SerialNr = SerialNr(i);
|
||||
testRslt.Meters[i].Disabled = Disabled(i);
|
||||
testRslt.Meters[i].EndState = WMCycleEndState(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
// results.Batch.WaterMeters[i].SerialNr = SerialNr(i);
|
||||
// results.Batch.WaterMeters[i].Disabled = Disabled(i);
|
||||
// results.Batch.WaterMeters[i].EndState = WMCycleEndState(i);
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,9 +32,9 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
public float[] WMEndState;
|
||||
|
||||
bool endStates; /// false=start states, true=end states
|
||||
float refVolume;
|
||||
float warningLimLo; /// limit to display exclamation mark, typically 2x errLimLo
|
||||
float warningLimHi; /// limit to display exclamation mark, typically 2x errLimHi
|
||||
double refVolume;
|
||||
double warningLimLo; /// limit to display exclamation mark, typically 2x errLimLo
|
||||
double warningLimHi; /// limit to display exclamation mark, typically 2x errLimHi
|
||||
|
||||
int TextBoxesCount;
|
||||
///
|
||||
@@ -102,7 +102,7 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
/// <param name="errLimLo">Error limit low, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
/// <param name="errLimHi">Error limit high, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
public TestStartEndForm(int waterMetersCount, string[] wmStartStateStr, bool[] disabled,
|
||||
float refVolume, float errLimLo, float errLimHi)
|
||||
double refVolume, double errLimLo, double errLimHi)
|
||||
: this()
|
||||
{
|
||||
endStates = true;
|
||||
@@ -272,108 +272,108 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
/// </summary>
|
||||
private void endTextBox1_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox1.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox1.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { };
|
||||
exclamation1.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox2_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox2.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox2.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation2.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox3_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox3.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox3.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation3.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox4_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox4.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox4.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation4.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox5_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox5.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox5.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation5.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox6_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox6.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox6.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation6.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox7_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox7.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox7.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation7.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox8_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox8.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox8.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation8.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox9_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox9.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox9.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation9.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
@@ -381,12 +381,12 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
|
||||
private void endTextBox10_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox10.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox10.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation10.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
@@ -394,24 +394,24 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
|
||||
private void endTextBox11_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox11.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox11.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation11.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox12_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox12.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox12.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation12.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
|
||||
+52
-52
@@ -32,9 +32,9 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
public float[] WMEndState;
|
||||
|
||||
bool endStates; /// false=start states, true=end states
|
||||
float refVolume;
|
||||
float warningLimLo; /// limit to display exclamation mark, typically 2x errLimLo
|
||||
float warningLimHi; /// limit to display exclamation mark, typically 2x errLimHi
|
||||
double refVolume;
|
||||
double warningLimLo; /// limit to display exclamation mark, typically 2x errLimLo
|
||||
double warningLimHi; /// limit to display exclamation mark, typically 2x errLimHi
|
||||
|
||||
int TextBoxesCount;
|
||||
///
|
||||
@@ -123,7 +123,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
/// <param name="errLimLo">Error limit low, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
/// <param name="errLimHi">Error limit high, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
public AdvancedFixedStartTestForm(int waterMetersCount, string[] wmStartStateStr, bool[] disabled,
|
||||
float refVolume, float errLimLo, float errLimHi)
|
||||
double refVolume, double errLimLo, double errLimHi)
|
||||
: this()
|
||||
{
|
||||
endStates = true;
|
||||
@@ -295,108 +295,108 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
/// </summary>
|
||||
private void endTextBox1_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox1.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox1.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { };
|
||||
exclamation1.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox2_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox2.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox2.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation2.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox3_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox3.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox3.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation3.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox4_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox4.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox4.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation4.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox5_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox5.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox5.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation5.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox6_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox6.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox6.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation6.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox7_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox7.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox7.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation7.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox8_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox8.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox8.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation8.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox9_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox9.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox9.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation9.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
@@ -404,12 +404,12 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
|
||||
private void endTextBox10_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox10.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox10.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation10.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
@@ -417,168 +417,168 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
|
||||
private void endTextBox11_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox11.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox11.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation11.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox12_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox12.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox12.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation12.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox13_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox13.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox13.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation13.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox14_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox14.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox14.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation14.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox15_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox15.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox15.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation15.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox16_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox16.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox16.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation16.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox17_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox17.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox17.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation17.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox18_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox18.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox18.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation18.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox19_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox19.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox19.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation19.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox20_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox20.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox20.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation20.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox21_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox21.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox21.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation21.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox22_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox22.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox22.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation22.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox23_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox23.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox23.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation23.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox24_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox24.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox24.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation24.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
|
||||
@@ -43,13 +43,13 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
|
||||
System.Windows.Forms.Form modelessDlg;
|
||||
|
||||
float refVolume;
|
||||
float errLimLo;
|
||||
float errLimHi;
|
||||
double refVolume;
|
||||
double errLimLo;
|
||||
double errLimHi;
|
||||
|
||||
bool resultSaved; /// Set in Run() when results are saved
|
||||
bool resultSaved; /// Set in Run() when results are saved
|
||||
|
||||
IList<IWaterMeter> waterMeters; /// Passesd as an argument of ShowCycleBeginFormOp/ShowCycleEndFormOp constructor
|
||||
Results.Entities.WaterMeter[] waterMeters; /// Reference to ...ProcessData.BatchRslts.WaterMeters[]
|
||||
|
||||
public enum CurrentOp
|
||||
{
|
||||
@@ -83,20 +83,20 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp(IList<IWaterMeter> waterMeters)
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleBeginning;
|
||||
this.waterMeters = waterMeters;
|
||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleEndFormOp(IList<IWaterMeter> waterMeters)
|
||||
public IOperation ShowCycleEndFormOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
||||
this.waterMeters = waterMeters;
|
||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestEndFormOp(float refVolume, float errLimLo, float errLimHi)
|
||||
public IOperation ShowTestEndFormOp(double refVolume, double errLimLo, double errLimHi)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestEndStates;
|
||||
@@ -188,7 +188,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
{
|
||||
purchaseOrder = dlg.PurchaseOrder;
|
||||
|
||||
for (int i = 0; i < Math.Min(dlg.WaterMetersCount, waterMeters.Count); i++)
|
||||
for (int i = 0; i < Math.Min(dlg.WaterMetersCount, waterMeters.Length); i++)
|
||||
{
|
||||
if (waterMeters[i] != null)
|
||||
{
|
||||
@@ -201,7 +201,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
else if (currentOp == CurrentOp.ShowFormAtCycleEnd)
|
||||
{
|
||||
CycleEndForm dlg = (modelessDlg as CycleEndForm);
|
||||
int count = waterMeters.Count;
|
||||
int count = waterMeters.Length;
|
||||
if ((dlg != null) && (count > dlg.WaterMetersCount)) count = dlg.WaterMetersCount;
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
@@ -257,21 +257,18 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
/// </summary>
|
||||
/// <param name="waterMeters">Watermetes with information entered in the forms</param>
|
||||
/// <param name="testResults">Test results to be updated with the information</param>
|
||||
public void UpdateTestResults(IList<IWaterMeter> waterMeters, IList<TestResult> testResults)
|
||||
{
|
||||
foreach (var testRslt in testResults)
|
||||
{
|
||||
if (testRslt.MetersKind != MetersKind.Single) continue;
|
||||
public void UpdateTestResults(Results.BatchResults results)
|
||||
{
|
||||
/// Nothing to be done
|
||||
|
||||
testRslt.PurchaseOrder = PurchaseOrder;
|
||||
//for (int i = 0; i < results.WMPositionsCount; i++)
|
||||
//{
|
||||
// if (results.Batch.WaterMeters[i] == null || results.Batch.WaterMeters[i].Compound()) continue;
|
||||
|
||||
for (int i = 0; i < testRslt.Meters.Count; i++)
|
||||
{
|
||||
testRslt.Meters[i].SerialNr = SerialNr(i);
|
||||
testRslt.Meters[i].Disabled = Disabled(i);
|
||||
testRslt.Meters[i].EndState = WMCycleEndState(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
// results.Batch.WaterMeters[i].SerialNr = SerialNr(i);
|
||||
// results.Batch.WaterMeters[i].Disabled = Disabled(i);
|
||||
// results.Batch.WaterMeters[i].EndState = WMCycleEndState(i);
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,9 +32,9 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
public float[] WMEndState;
|
||||
|
||||
bool endStates; /// false=start states, true=end states
|
||||
float refVolume;
|
||||
float warningLimLo; /// limit to display exclamation mark, typically 2x errLimLo
|
||||
float warningLimHi; /// limit to display exclamation mark, typically 2x errLimHi
|
||||
double refVolume;
|
||||
double warningLimLo; /// limit to display exclamation mark, typically 2x errLimLo
|
||||
double warningLimHi; /// limit to display exclamation mark, typically 2x errLimHi
|
||||
|
||||
int TextBoxesCount;
|
||||
///
|
||||
@@ -107,7 +107,7 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
/// <param name="errLimLo">Error limit low, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
/// <param name="errLimHi">Error limit high, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
public TestStartEndForm(int waterMetersCount, string[] wmStartStateStr, bool[] disabled,
|
||||
float refVolume, float errLimLo, float errLimHi)
|
||||
double refVolume, double errLimLo, double errLimHi)
|
||||
: this()
|
||||
{
|
||||
endStates = true;
|
||||
@@ -277,108 +277,108 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
/// </summary>
|
||||
private void endTextBox1_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox1.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox1.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { };
|
||||
exclamation1.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox2_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox2.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox2.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation2.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox3_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox3.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox3.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation3.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox4_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox4.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox4.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation4.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox5_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox5.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox5.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation5.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox6_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox6.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox6.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation6.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox7_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox7.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox7.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation7.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox8_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox8.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox8.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation8.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox9_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox9.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox9.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation9.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
@@ -386,12 +386,12 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
|
||||
private void endTextBox10_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox10.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox10.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation10.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
@@ -399,168 +399,168 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
|
||||
private void endTextBox11_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox11.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox11.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation11.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox12_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox12.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox12.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation12.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox13_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox13.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox13.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation13.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox14_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox14.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox14.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation14.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox15_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox15.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox15.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation15.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox16_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox16.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox16.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation16.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox17_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox17.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox17.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation17.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox18_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox18.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox18.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation18.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox19_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox19.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox19.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation19.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox20_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox20.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox20.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation20.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox21_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox21.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox21.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation21.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox22_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox22.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox22.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation22.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox23_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox23.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox23.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation23.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox24_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox24.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox24.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation24.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
|
||||
@@ -43,13 +43,13 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
|
||||
System.Windows.Forms.Form modelessDlg;
|
||||
|
||||
float refVolume;
|
||||
float errLimLo;
|
||||
float errLimHi;
|
||||
double refVolume;
|
||||
double errLimLo;
|
||||
double errLimHi;
|
||||
|
||||
bool resultSaved; /// Set in Run() when results are saved
|
||||
bool resultSaved; /// Set in Run() when results are saved
|
||||
|
||||
IList<IWaterMeter> waterMeters; /// Passesd as an argument of ShowCycleBeginFormOp/ShowCycleEndFormOp constructor
|
||||
Results.Entities.WaterMeter[] waterMeters; /// Reference to ...ProcessData.BatchRslts.WaterMeters[]
|
||||
|
||||
public enum CurrentOp
|
||||
{
|
||||
@@ -83,20 +83,20 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp(IList<IWaterMeter> waterMeters)
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleBeginning;
|
||||
this.waterMeters = waterMeters;
|
||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleEndFormOp(IList<IWaterMeter> waterMeters)
|
||||
public IOperation ShowCycleEndFormOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
||||
this.waterMeters = waterMeters;
|
||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestEndFormOp(float refVolume, float errLimLo, float errLimHi)
|
||||
public IOperation ShowTestEndFormOp(double refVolume, double errLimLo, double errLimHi)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestEndStates;
|
||||
@@ -188,7 +188,7 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
{
|
||||
purchaseOrder = dlg.PurchaseOrder;
|
||||
|
||||
for (int i = 0; i < Math.Min(dlg.WaterMetersCount, waterMeters.Count); i++)
|
||||
for (int i = 0; i < Math.Min(dlg.WaterMetersCount, waterMeters.Length); i++)
|
||||
{
|
||||
if (waterMeters[i] != null)
|
||||
{
|
||||
@@ -201,7 +201,7 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
else if (currentOp == CurrentOp.ShowFormAtCycleEnd)
|
||||
{
|
||||
CycleEndForm dlg = (modelessDlg as CycleEndForm);
|
||||
int count = waterMeters.Count;
|
||||
int count = waterMeters.Length;
|
||||
if ((dlg != null) && (count > dlg.WaterMetersCount)) count = dlg.WaterMetersCount;
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
@@ -257,21 +257,18 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
/// </summary>
|
||||
/// <param name="waterMeters">Watermetes with information entered in the forms</param>
|
||||
/// <param name="testResults">Test results to be updated with the information</param>
|
||||
public void UpdateTestResults(IList<IWaterMeter> waterMeters, IList<TestResult> testResults)
|
||||
{
|
||||
foreach (var testRslt in testResults)
|
||||
{
|
||||
if (testRslt.MetersKind != MetersKind.Single) continue;
|
||||
public void UpdateTestResults(Results.BatchResults results)
|
||||
{
|
||||
/// Nothing to be done
|
||||
|
||||
testRslt.PurchaseOrder = PurchaseOrder;
|
||||
//for (int i = 0; i < results.WMPositionsCount; i++)
|
||||
//{
|
||||
// if (results.Batch.WaterMeters[i] == null || results.Batch.WaterMeters[i].Compound()) continue;
|
||||
|
||||
for (int i = 0; i < testRslt.Meters.Count; i++)
|
||||
{
|
||||
testRslt.Meters[i].SerialNr = SerialNr(i);
|
||||
testRslt.Meters[i].Disabled = Disabled(i);
|
||||
testRslt.Meters[i].EndState = WMCycleEndState(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
// results.Batch.WaterMeters[i].SerialNr = SerialNr(i);
|
||||
// results.Batch.WaterMeters[i].Disabled = Disabled(i);
|
||||
// results.Batch.WaterMeters[i].EndState = WMCycleEndState(i);
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,9 +32,9 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
public float[] WMEndState;
|
||||
|
||||
bool endStates; /// false=start states, true=end states
|
||||
float refVolume;
|
||||
float warningLimLo; /// limit to display exclamation mark, typically 2x errLimLo
|
||||
float warningLimHi; /// limit to display exclamation mark, typically 2x errLimHi
|
||||
double refVolume;
|
||||
double warningLimLo; /// limit to display exclamation mark, typically 2x errLimLo
|
||||
double warningLimHi; /// limit to display exclamation mark, typically 2x errLimHi
|
||||
|
||||
int TextBoxesCount;
|
||||
///
|
||||
@@ -107,7 +107,7 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
/// <param name="errLimLo">Error limit low, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
/// <param name="errLimHi">Error limit high, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
public TestStartEndForm(int waterMetersCount, string[] wmStartStateStr, bool[] disabled,
|
||||
float refVolume, float errLimLo, float errLimHi)
|
||||
double refVolume, double errLimLo, double errLimHi)
|
||||
: this()
|
||||
{
|
||||
endStates = true;
|
||||
@@ -277,108 +277,108 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
/// </summary>
|
||||
private void endTextBox1_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox1.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox1.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { };
|
||||
exclamation1.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox2_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox2.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox2.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation2.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox3_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox3.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox3.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation3.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox4_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox4.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox4.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation4.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox5_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox5.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox5.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation5.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox6_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox6.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox6.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation6.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox7_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox7.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox7.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation7.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox8_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox8.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox8.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation8.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox9_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox9.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox9.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation9.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
@@ -386,12 +386,12 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
|
||||
private void endTextBox10_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox10.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox10.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation10.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
@@ -399,168 +399,168 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
|
||||
private void endTextBox11_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox11.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox11.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation11.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox12_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox12.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox12.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation12.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox13_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox13.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox13.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation13.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox14_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox14.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox14.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation14.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox15_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox15.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox15.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation15.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox16_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox16.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox16.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation16.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox17_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox17.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox17.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation17.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox18_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox18.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox18.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation18.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox19_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox19.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox19.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation19.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox20_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox20.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox20.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation20.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox21_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox21.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox21.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation21.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox22_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox22.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox22.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation22.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox23_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox23.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox23.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation23.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox24_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox24.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox24.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation24.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace TBF.BenchControl.DataEntry.WMStates
|
||||
}
|
||||
|
||||
/// <summary> Not supported </summary>
|
||||
public void UpdateTestResults(IList<IWaterMeter> waterMeters, IList<TestResult> results)
|
||||
public void UpdateTestResults(Results.BatchResults results)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace TBF.BenchControl.DataEntry.WMStates
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestEndFormOp(float refVolume, float errLimLo, float errLimHi)
|
||||
public IOperation ShowTestEndFormOp(double refVolume, double errLimLo, double errLimHi)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestEndStates;
|
||||
|
||||
@@ -43,13 +43,13 @@ namespace TBF.BenchControl.DataEntry.iPerl
|
||||
|
||||
System.Windows.Forms.Form modelessDlg;
|
||||
|
||||
float refVolume;
|
||||
float errLimLo;
|
||||
float errLimHi;
|
||||
double refVolume;
|
||||
double errLimLo;
|
||||
double errLimHi;
|
||||
|
||||
bool resultSaved; /// Set in Run() when results are saved
|
||||
bool resultSaved; /// Set in Run() when results are saved
|
||||
|
||||
IList<IWaterMeter> waterMeters; /// Passesd as an argument of ShowCycleBeginFormOp/ShowCycleEndFormOp constructor
|
||||
Results.Entities.WaterMeter[] waterMeters; /// Reference to ...ProcessData.BatchRslts.WaterMeters[]
|
||||
|
||||
public enum CurrentOp
|
||||
{
|
||||
@@ -83,20 +83,20 @@ namespace TBF.BenchControl.DataEntry.iPerl
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp(IList<IWaterMeter> waterMeters)
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleBeginning;
|
||||
this.waterMeters = waterMeters;
|
||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleEndFormOp(IList<IWaterMeter> waterMeters)
|
||||
public IOperation ShowCycleEndFormOp()
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.ShowFormAtCycleEnd;
|
||||
this.waterMeters = waterMeters;
|
||||
this.waterMeters = TBF.BenchControl.Sequences.ProcessData.BatchRslts.WaterMeters;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ namespace TBF.BenchControl.DataEntry.iPerl
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowTestEndFormOp(float refVolume, float errLimLo, float errLimHi)
|
||||
public IOperation ShowTestEndFormOp(double refVolume, double errLimLo, double errLimHi)
|
||||
{
|
||||
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
|
||||
currentOp = CurrentOp.EnterTestEndStates;
|
||||
@@ -221,13 +221,43 @@ namespace TBF.BenchControl.DataEntry.iPerl
|
||||
/// </summary>
|
||||
/// <param name="waterMeters">Watermetes with information entered in the forms</param>
|
||||
/// <param name="testResults">Test results to be updated with the information</param>
|
||||
public void UpdateTestResults(IList<IWaterMeter> waterMeters, IList<TestResult> testResults)
|
||||
public void UpdateTestResults(Results.BatchResults batchResults)
|
||||
{
|
||||
foreach (var testRslt in testResults)
|
||||
foreach (var wm in batchResults.WaterMeters)
|
||||
{
|
||||
if (testRslt.MetersKind != MetersKind.Single) continue;
|
||||
if (wm != null && !wm.Disabled)
|
||||
{
|
||||
wm.PurchaseOrder = PurchaseOrder;
|
||||
|
||||
testRslt.PurchaseOrder = PurchaseOrder;
|
||||
if (Sequences.SequenceBase.WaterMeters != null &&
|
||||
wm.WMPosition > 0 &&
|
||||
wm.WMPosition <= Sequences.SequenceBase.WaterMeters.Count)
|
||||
{
|
||||
WaterMeters.iPerl.WaterMeter iPerl = Sequences.SequenceBase.WaterMeters[wm.WMPosition - 1] as WaterMeters.iPerl.WaterMeter;
|
||||
if (iPerl != null)
|
||||
{
|
||||
#if IPERLST
|
||||
wm.OrigCalibFactor = iPerl.OriginalCalibFactor;
|
||||
wm.CalibFactor = iPerl.CalibrationFactor;
|
||||
wm.Q2ErrWOCorrection = iPerl.Q2ErrorWOCorrection;
|
||||
wm.Q2CorrectionDone = iPerl.Q2CorrectionDone;
|
||||
wm.Q2Correction = iPerl.CurrentQ2Correction;
|
||||
if (iPerl.CalibrationStruct == null)
|
||||
{
|
||||
wm.Q2CorrFlowRight = 0;
|
||||
}
|
||||
else if (iPerl.CalibrationStruct.FlowArrow == WaterMeters.iPerl.FlowArrow.Left)
|
||||
{
|
||||
wm.Q2CorrFlowRight = iPerl.PositiveCounting ? 1 : 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
wm.Q2CorrFlowRight = iPerl.PositiveCounting ? 2 : 1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,9 +32,9 @@ namespace TBF.BenchControl.DataEntry.iPerl
|
||||
public float[] WMEndState;
|
||||
|
||||
bool endStates; /// false=start states, true=end states
|
||||
float refVolume;
|
||||
float warningLimLo; /// limit to display exclamation mark, typically 2x errLimLo
|
||||
float warningLimHi; /// limit to display exclamation mark, typically 2x errLimHi
|
||||
double refVolume;
|
||||
double warningLimLo; /// limit to display exclamation mark, typically 2x errLimLo
|
||||
double warningLimHi; /// limit to display exclamation mark, typically 2x errLimHi
|
||||
|
||||
int TextBoxesCount;
|
||||
///
|
||||
@@ -107,7 +107,7 @@ namespace TBF.BenchControl.DataEntry.iPerl
|
||||
/// <param name="errLimLo">Error limit low, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
/// <param name="errLimHi">Error limit high, it is used to verify the end state, show/hide exclamation if necessary</param>
|
||||
public TestStartEndForm(int waterMetersCount, string[] wmStartStateStr, bool[] disabled,
|
||||
float refVolume, float errLimLo, float errLimHi)
|
||||
double refVolume, double errLimLo, double errLimHi)
|
||||
: this()
|
||||
{
|
||||
endStates = true;
|
||||
@@ -277,108 +277,108 @@ namespace TBF.BenchControl.DataEntry.iPerl
|
||||
/// </summary>
|
||||
private void endTextBox1_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox1.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox1.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { };
|
||||
exclamation1.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox2_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox2.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox2.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation2.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox3_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox3.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox3.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation3.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox4_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox4.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox4.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation4.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox5_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox5.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox5.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation5.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox6_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox6.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox6.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation6.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox7_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox7.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox7.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation7.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox8_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox8.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox8.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation8.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox9_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox9.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox9.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation9.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
@@ -386,12 +386,12 @@ namespace TBF.BenchControl.DataEntry.iPerl
|
||||
|
||||
private void endTextBox10_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox10.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox10.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation10.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
@@ -399,168 +399,168 @@ namespace TBF.BenchControl.DataEntry.iPerl
|
||||
|
||||
private void endTextBox11_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox11.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox11.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation11.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox12_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox12.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox12.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation12.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox13_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox13.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox13.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation13.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox14_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox14.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox14.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation14.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox15_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox15.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox15.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation15.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox16_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox16.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox16.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation16.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox17_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox17.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox17.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation17.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox18_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox18.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox18.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation18.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox19_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox19.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox19.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation19.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox20_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox20.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox20.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation20.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox21_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox21.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox21.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation21.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox22_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox22.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox22.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation22.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox23_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox23.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox23.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation23.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
}
|
||||
private void endTextBox24_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
float err = 0;
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
float endState = Utils.ParseUFloat(endTextBox24.Text);
|
||||
float startState = Utils.ParseUFloat(startTextBox24.Text);
|
||||
err = 100.0f * (endState - startState - refVolume) / refVolume;
|
||||
err = 100.0 * (endState - startState - refVolume) / refVolume;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
exclamation24.Visible = (err < warningLimLo) || (warningLimHi < err);
|
||||
|
||||
@@ -23,13 +23,13 @@ namespace TBF.BenchControl.Elde.FlowMeter
|
||||
|
||||
public float LtrPerPulse { get { return flowMeterCfg.NominalFlow / 7200.0f; } }
|
||||
|
||||
public float LtrPerPulseCorrected(float flow)
|
||||
public float LtrPerPulseCorrected(double flow)
|
||||
{
|
||||
if (flow < 0.1f * NominalFlow) return LtrPerPulse; /// No correction for small flow
|
||||
if (flow < 0.1 * NominalFlow) return LtrPerPulse; /// No correction for small flow
|
||||
|
||||
/// Apply correction
|
||||
float correctedFlow = BenchControl.Formulas.CorrectedValue(flow, Corrections);
|
||||
return LtrPerPulse * correctedFlow / flow;
|
||||
double correctedFlow = BenchControl.Formulas.CorrectedValue(flow, Corrections);
|
||||
return (float)(LtrPerPulse * correctedFlow / flow);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -27,9 +27,9 @@ namespace TBF.BenchControl.Elde.FlowMeterTwins
|
||||
public float LtrPerPulse { get { return flowMeterCfg.NominalFlow / 14400.0f; } }
|
||||
|
||||
/// Calculates the average of values of two flowmeters. Assumes the flow is divided evenly.
|
||||
public float LtrPerPulseCorrected(float flow)
|
||||
public float LtrPerPulseCorrected(double flow)
|
||||
{
|
||||
float flow2 = flow / 2;
|
||||
double flow2 = flow / 2.0;
|
||||
return (FlowMeter1.LtrPerPulseCorrected(flow2) + FlowMeter2.LtrPerPulseCorrected(flow2)) / 2;
|
||||
}
|
||||
|
||||
|
||||
@@ -139,8 +139,11 @@ namespace TBF.BenchControl
|
||||
MeasurementStarted,
|
||||
ReadAllRegistersDone,
|
||||
MeasurementCompleted,
|
||||
|
||||
/// At the end of cycle when saving /printing resultss
|
||||
ResultsPrinted,
|
||||
ResultsWritten,
|
||||
ResultsNotWritten,
|
||||
|
||||
/// Timer events
|
||||
TimerExpired,
|
||||
|
||||
@@ -3,17 +3,20 @@
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
|
||||
namespace TBF.BenchControl
|
||||
{
|
||||
public static class Formulas
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Formulas));
|
||||
|
||||
/// <summary>
|
||||
/// Calculate density of distilled water from temperature
|
||||
/// </summary>
|
||||
/// <param name="t">Temperature in [degC]</param>
|
||||
/// <returns>Density in [kg/m3]</returns>
|
||||
public static float DistilledWaterDensityFromTemp(float t)
|
||||
public static double DistilledWaterDensityFromTemp(float t)
|
||||
{
|
||||
double tt = (double)t;
|
||||
const double a0 = 999.842594;
|
||||
@@ -23,7 +26,7 @@ namespace TBF.BenchControl
|
||||
const double a4 = -0.000001120083;
|
||||
const double a5 = 6.536332e-09;
|
||||
|
||||
return (float)(((((a5 * tt + a4) * tt + a3) * tt + a2) * tt + a1) * tt + a0);
|
||||
return ((((a5 * tt + a4) * tt + a3) * tt + a2) * tt + a1) * tt + a0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -31,12 +34,12 @@ namespace TBF.BenchControl
|
||||
/// </summary>
|
||||
/// <param name="t">Temperature in [degC]</param>
|
||||
/// <returns>Density in [kg/m3]</returns>
|
||||
public static float WaterDensityFromTemp(float t)
|
||||
public static double WaterDensityFromTemp(float t)
|
||||
{
|
||||
float realDensity = Program.LocalSettings.RealDensity;
|
||||
double realDensity = Program.LocalSettings.RealDensity;
|
||||
float atTemperature = Program.LocalSettings.AtTemperature;
|
||||
|
||||
float c_rho = realDensity / DistilledWaterDensityFromTemp(atTemperature);
|
||||
double c_rho = realDensity / DistilledWaterDensityFromTemp(atTemperature);
|
||||
|
||||
return c_rho * DistilledWaterDensityFromTemp(t);
|
||||
}
|
||||
@@ -58,54 +61,31 @@ namespace TBF.BenchControl
|
||||
/// <summary>
|
||||
/// Convert 'pulses' to 'volume', prevent division by zero
|
||||
/// </summary>
|
||||
public static float VolumeFromPulses(int pulses, float pulsesPerLiter)
|
||||
public static double VolumeFromPulses(int pulses, double pulsesPerLiter)
|
||||
{
|
||||
if (pulsesPerLiter <= float.Epsilon) return 0;
|
||||
return Convert.ToSingle(pulses) / pulsesPerLiter;
|
||||
if (pulsesPerLiter <= double.Epsilon) return 0;
|
||||
return Convert.ToDouble(pulses) / pulsesPerLiter;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calculate the error in % from 'measured' and 'true' volume, prevent division by zero
|
||||
/// </summary>
|
||||
public static float ErrorFromVolumes(float measuredVolume, float trueVolume)
|
||||
public static double ErrorFromVolumes(double measuredVolume, double trueVolume)
|
||||
{
|
||||
if (trueVolume <= float.Epsilon)
|
||||
{
|
||||
if (measuredVolume <= float.Epsilon) return 0;
|
||||
return 100.0f;
|
||||
if (measuredVolume <= float.Epsilon)
|
||||
{
|
||||
log.WarnFormat("ErrorFromVolumes({0},{1}) returns {2}", measuredVolume, trueVolume, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
log.WarnFormat("ErrorFromVolumes({0},{1}) returns {2}", measuredVolume, trueVolume, 99.0);
|
||||
return 99.0;
|
||||
}
|
||||
return 100.0f * (measuredVolume - trueVolume) / trueVolume;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calcuate progress of the test while setting the flow.
|
||||
/// </summary>
|
||||
/// <param name="currentTime">Current time from the beginning in [s]</param>
|
||||
/// <param name="flowSetTime">Estimated time to set the flow in [s]</param>
|
||||
/// <param name="testTime">Estimated test time in [s]</param>
|
||||
/// <returns>Test progress 0 .. 1.0f</returns>
|
||||
public static float TestProgress(float currentTime, float flowSetTime, float testTime)
|
||||
{
|
||||
// Never return more then 'fixedPart'
|
||||
if (flowSetTime <= float.Epsilon) return 0;
|
||||
float fixedPart = flowSetTime / (flowSetTime + testTime);
|
||||
return (currentTime < flowSetTime) ? (currentTime / flowSetTime) * fixedPart : fixedPart;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calculate progress of the test during measurement.
|
||||
/// </summary>
|
||||
/// <param name="refPulses">Current number of reference pulses</param>
|
||||
/// <param name="totalPulses">Total number of reference pulses to complete the test</param>
|
||||
/// <param name="flowSetTime">Estimated time to set the flow in [s]</param>
|
||||
/// <param name="testTime">Estimated test time in [s]</param>
|
||||
/// <returns>Test progress 0 .. 1.0f</returns>
|
||||
public static float TestProgress(int refPulses, int totalPulses, float flowSetTime, float testTime)
|
||||
{
|
||||
// Never return less then 'fixedPart' and more then 1.0f
|
||||
if (refPulses > totalPulses) refPulses = totalPulses;
|
||||
float fixedPart = flowSetTime / (flowSetTime + testTime);
|
||||
return fixedPart + (1.0f - fixedPart) * Convert.ToSingle(refPulses) / Convert.ToSingle(totalPulses);
|
||||
double error = 100.0 * (measuredVolume - trueVolume) / trueVolume;
|
||||
log.InfoFormat("ErrorFromVolumes({0},{1}) returns {2}", measuredVolume, trueVolume, error);
|
||||
return error;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -115,7 +95,7 @@ namespace TBF.BenchControl
|
||||
/// <param name="rawMeasurement">Raw uncorrected value</param>
|
||||
/// <param name="corrections">Sorted (value, correction) pairs</param>
|
||||
/// <returns>Corrected value</returns>
|
||||
public static float CorrectedValue(float rawValue, IList<Config.Entities.MeasurementCorrection> corrections)
|
||||
public static double CorrectedValue(double rawValue, IList<Config.Entities.MeasurementCorrection> corrections)
|
||||
{
|
||||
if (corrections == null || corrections.Count == 0) return rawValue;
|
||||
|
||||
@@ -129,13 +109,13 @@ namespace TBF.BenchControl
|
||||
{
|
||||
if (rawValue < corrections[i].Measurement)
|
||||
{
|
||||
float d1 = rawValue - corrections[i-1].Measurement;
|
||||
float d2 = corrections[i].Measurement - rawValue;
|
||||
double d1 = rawValue - corrections[i-1].Measurement;
|
||||
double d2 = corrections[i].Measurement - rawValue;
|
||||
|
||||
float corr;
|
||||
double corr;
|
||||
if (d1 + d2 <= float.Epsilon)
|
||||
{
|
||||
corr = (corrections[i - 1].Correction + corrections[i].Correction) / 2.0f;
|
||||
corr = (corrections[i - 1].Correction + corrections[i].Correction) / 2.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace TBF.BenchControl.GenericDevices
|
||||
/// </summary>
|
||||
public interface IBenchInfo : IComponent
|
||||
{
|
||||
string TestBenchId { get; }
|
||||
string TestBenchName { get; }
|
||||
int TestBenchId { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,8 +12,7 @@ namespace TBF.BenchControl.GenericDevices
|
||||
/// <summary>
|
||||
/// Updates test results with the information collected in watermeters.
|
||||
/// </summary>
|
||||
/// <param name="waterMeters">Watermetes with information entered in the forms</param>
|
||||
/// <param name="results">Test results to be updated with the information</param>
|
||||
void UpdateTestResults(IList<IWaterMeter> waterMeters, IList<TestResult> results);
|
||||
/// <param name="results">Results of a batch of water meters to be updated with information from forms</param>
|
||||
void UpdateTestResults(Results.BatchResults results);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace TBF.BenchControl.GenericDevices
|
||||
/// Corrected volume per flowmeter pulse in [l].
|
||||
/// </summary>
|
||||
/// <param name="flow">Water flow in [m3/h]</param>
|
||||
float LtrPerPulseCorrected(float flow);
|
||||
float LtrPerPulseCorrected(double flow);
|
||||
|
||||
/// <summary>
|
||||
/// 1 based index of the reference flowmeter
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -25,8 +25,7 @@ namespace TBF.BenchControl.GenericDevices
|
||||
/// <summary>
|
||||
/// Displays form at the beginning of the cycle (usually to enter S/N).
|
||||
/// </summary>
|
||||
/// <param name="waterMeters">Watermetes to be updated by the operation</param>
|
||||
/// <returns>Operation to be used in the sequence</returns>
|
||||
IOperation ShowCycleBeginFormOp(IList<IWaterMeter> waterMeters);
|
||||
IOperation ShowCycleBeginFormOp();
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user