Compare commits
219
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
175d5b8d7f | ||
|
|
e5e6083c49 | ||
|
|
0a44598fb7 | ||
|
|
acd614a20d | ||
|
|
b36a965678 | ||
|
|
59fc7e30d8 | ||
|
|
52f600cb94 | ||
|
|
0bcfb489af | ||
|
|
18234bb713 | ||
|
|
ebffe9b1cb | ||
|
|
b0137f9384 | ||
|
|
8bb227393e | ||
|
|
cd671f9e77 | ||
|
|
f65fefe1ff | ||
|
|
cfcce08047 | ||
|
|
aa6c12e388 | ||
|
|
b34b031fcf | ||
|
|
19dff40664 | ||
|
|
2935bc2c77 | ||
|
|
1a4d20b6e2 | ||
|
|
5c93b55f58 | ||
|
|
6e418b1fc4 | ||
|
|
f81dcc1d82 | ||
|
|
63de7b9aa8 | ||
|
|
49ef7436b2 | ||
|
|
5ac9e40575 | ||
|
|
00619ab2c6 | ||
|
|
5ebef2d27f | ||
|
|
695a725b5f | ||
|
|
6fda6dcabc | ||
|
|
ef824531b8 | ||
|
|
483218ef02 | ||
|
|
4ea85a0644 | ||
|
|
03a992d480 | ||
|
|
4a25dac8ff | ||
|
|
1bcbe382d7 | ||
|
|
4ae4ba15cf | ||
|
|
775d3c67a4 | ||
|
|
ec82370934 | ||
|
|
baf87f63cc | ||
|
|
4c2ef35ac1 | ||
|
|
1b3fe413cb | ||
|
|
1af6a65a9f | ||
|
|
cf57f3ab01 | ||
|
|
af0de8734a | ||
|
|
cd43aa2f42 | ||
|
|
be76fb4001 | ||
|
|
7c7f330a0b | ||
|
|
3d844390e7 | ||
|
|
ea7adb31a6 | ||
|
|
8a563a7729 | ||
|
|
78bcf73f13 | ||
|
|
b5b15b2988 | ||
|
|
1eee432993 | ||
|
|
dc5afadd53 | ||
|
|
643699161a | ||
|
|
ed996cc27e | ||
|
|
7a544495f2 | ||
|
|
f44713eec3 | ||
|
|
dcd795b778 | ||
|
|
08a404beab | ||
|
|
63099d27c5 | ||
|
|
28b78c1345 | ||
|
|
6a4dff5cbc | ||
|
|
5239ed6d15 | ||
|
|
7b878be87d | ||
|
|
f746c9cd8f | ||
|
|
25b8bd8469 | ||
|
|
d1eb7b21d1 | ||
|
|
4ea8d66330 | ||
|
|
ca0bcc49ac | ||
|
|
d516441ff8 | ||
|
|
df58d05b84 | ||
|
|
ca2705421b | ||
|
|
291bb72cf5 | ||
|
|
7f3d1bb199 | ||
|
|
a41d0517d2 | ||
|
|
d09921ee5b | ||
|
|
e88c34e2f4 | ||
|
|
e09aad2a6d | ||
|
|
9500bc4656 | ||
|
|
a13c6a37fa | ||
|
|
1d924d7d40 | ||
|
|
b1e0e74d8a | ||
|
|
c58f639346 | ||
|
|
f0e9b74132 | ||
|
|
9a725de4a9 | ||
|
|
6efa998532 | ||
|
|
2d877877e2 | ||
|
|
e037720115 | ||
|
|
fdd4036797 | ||
|
|
e001d01f15 | ||
|
|
efad9eb0d9 | ||
|
|
f6169c962d | ||
|
|
b073e322d4 | ||
|
|
f901367817 | ||
|
|
e94443ad8a | ||
|
|
2d20ea1196 | ||
|
|
a275a911f6 | ||
|
|
1f08cf0b81 | ||
|
|
2a3f76c3dc | ||
|
|
45c6c10755 | ||
|
|
5a265d4ef6 | ||
|
|
63c12958f7 | ||
|
|
809c16e1e1 | ||
|
|
dc9b72f487 | ||
|
|
2bf0ab226f | ||
|
|
0c2c9bb1e2 | ||
|
|
b006e36d52 | ||
|
|
2392bfa2a7 | ||
|
|
16ef6bde34 | ||
|
|
933909c1e9 | ||
|
|
a9c7e1fa25 | ||
|
|
aee1990243 | ||
|
|
88caba317b | ||
|
|
3843b16587 | ||
|
|
b86ca9fac8 | ||
|
|
1fb82dad92 | ||
|
|
b879245df2 | ||
|
|
224c9c4372 | ||
|
|
c16964c1de | ||
|
|
1d52047559 | ||
|
|
0b9fd8712a | ||
|
|
edf53a91f9 | ||
|
|
5884f282e4 | ||
|
|
b6e368938d | ||
|
|
e7fa371c1b | ||
|
|
270c3b0aae | ||
|
|
27e0cd3b53 | ||
|
|
8ff2ff0c38 | ||
|
|
6c0c89a0dc | ||
|
|
e264f3b3dd | ||
|
|
e3605b647c | ||
|
|
25eff13c41 | ||
|
|
d2493b0331 | ||
|
|
82cede65ef | ||
|
|
3549376f34 | ||
|
|
7b61f7cb86 | ||
|
|
87b5c36e6a | ||
|
|
5c48dbf60e | ||
|
|
cc789ee7e0 | ||
|
|
087870b1ec | ||
|
|
393bc99d9b | ||
|
|
93b40740b5 | ||
|
|
140ec13626 | ||
|
|
2cab985bd0 | ||
|
|
4ab889b43e | ||
|
|
cd52a11d0e | ||
|
|
014ec3924f | ||
|
|
a62ce451c4 | ||
|
|
7badb8ef7b | ||
|
|
4d39805ef4 | ||
|
|
4b1a684d69 | ||
|
|
a22b4de1b6 | ||
|
|
462ed568de | ||
|
|
92bcd46549 | ||
|
|
e22d58101c | ||
|
|
193ede3d55 | ||
|
|
edc4d59f90 | ||
|
|
56e38831f1 | ||
|
|
6a159f773e | ||
|
|
e94e16c9e6 | ||
|
|
e70e5f7cb4 | ||
|
|
3946d26cb4 | ||
|
|
7534fc7c24 | ||
|
|
766562fb7d | ||
|
|
2c1e4e7d26 | ||
|
|
3775913a33 | ||
|
|
42a9ecda27 | ||
|
|
eafa88258f | ||
|
|
9a143bd266 | ||
|
|
b6c9c8cf22 | ||
|
|
f31843f665 | ||
|
|
6e2bf48b43 | ||
|
|
1278a2365d | ||
|
|
3407b51c27 | ||
|
|
adb37826a5 | ||
|
|
0fdcbffcae | ||
|
|
d575220aec | ||
|
|
69de3b038a | ||
|
|
773a1f2d15 | ||
|
|
a4331c8267 | ||
|
|
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 | ||
|
|
2b7f6a8dac | ||
|
|
2a4eeb2d77 | ||
|
|
a08be1ee73 | ||
|
|
21390eaba6 |
+12
-11
@@ -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" />
|
||||
@@ -117,16 +114,20 @@
|
||||
<Compile Include="Mappings\WatermeterMap.cs" />
|
||||
<Compile Include="Mappings\WMTypeMap.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Resources\Strings.Designer.cs" />
|
||||
<Compile Include="ResultItemSpec.cs" />
|
||||
<Compile Include="Resources\Strings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Strings.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Units.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="DatabaseSettingsDlg.resx">
|
||||
<DependentUpon>DatabaseSettingsDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\Strings.cs.resx" />
|
||||
<EmbeddedResource Include="Resources\Strings.de.resx" />
|
||||
<EmbeddedResource Include="Resources\Strings.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\Strings.zh-CN.resx" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
||||
@@ -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;
|
||||
|
||||
+9
-1
@@ -16,7 +16,7 @@ namespace Config
|
||||
public const int WMsCount = 3;
|
||||
public const int LineSize = 3;
|
||||
public const int CompoundWMsCount = 1;
|
||||
#elif FUZHOU300 || FUZHOU150 || PT200IL
|
||||
#elif FUZHOU300 || FUZHOU150 || PT200IL || PUCHONG_PT200
|
||||
public const int WMsCount = 6;
|
||||
public const int LineSize = 6;
|
||||
public const int CompoundWMsCount = 3;
|
||||
@@ -32,7 +32,15 @@ namespace Config
|
||||
public const int WMsCount = 40;
|
||||
public const int LineSize = 20;
|
||||
public const int CompoundWMsCount = 1;
|
||||
#elif IPERLST_SPECIAL
|
||||
public const int WMsCount = 6;
|
||||
public const int LineSize = 6;
|
||||
public const int CompoundWMsCount = 1;
|
||||
#endif
|
||||
public static int MaxPartNr()
|
||||
{
|
||||
return Math.Max(WMsCount / LineSize, CompoundWMsCount);
|
||||
}
|
||||
|
||||
///
|
||||
/// Database related: This object reference is set after a successful user login
|
||||
|
||||
@@ -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>
|
||||
@@ -17,6 +17,7 @@ namespace Config.Entities
|
||||
public virtual string TempOut { get; set; }
|
||||
public virtual string PressIn { get; set; }
|
||||
public virtual string PressOut { get; set; }
|
||||
public virtual string StopBFValve { get; set; }
|
||||
|
||||
/// Valves
|
||||
public virtual string ValvesOpen { get; set; }
|
||||
|
||||
+160
-15
@@ -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,93 @@ 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,
|
||||
}
|
||||
|
||||
public enum Medium
|
||||
public enum CompoundMeterId : byte
|
||||
{
|
||||
ColdWater,
|
||||
HotWater,
|
||||
Single,
|
||||
CompoundMain,
|
||||
CompoundAux,
|
||||
Compound,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Transition step is finished when this condition is fulfilled
|
||||
/// </summary>
|
||||
public enum Medium
|
||||
{
|
||||
[Description("")] NotSpecified,
|
||||
ColdWater,
|
||||
HotWater,
|
||||
Count
|
||||
}
|
||||
|
||||
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 +156,16 @@ namespace Config.Entities
|
||||
Scale2Empty,
|
||||
Scale3Empty,
|
||||
AllScalesEmpty,
|
||||
Count,
|
||||
Count
|
||||
}
|
||||
|
||||
public enum Publish : sbyte
|
||||
{
|
||||
[Description("nie")] Never = 0,
|
||||
[Description("immer")] Always = 1,
|
||||
[Description("Bildschirm")] OnScreen = 2,
|
||||
[Description("intern")] Internal = 3,
|
||||
Count
|
||||
}
|
||||
|
||||
public enum TestRedType
|
||||
@@ -56,6 +182,18 @@ namespace Config.Entities
|
||||
Count,
|
||||
}
|
||||
|
||||
public enum Progress
|
||||
{
|
||||
JustStarted,
|
||||
TransitionBefore,
|
||||
SwitchingFlowDetection,
|
||||
FlowSetting,
|
||||
Test,
|
||||
TransitionAfter,
|
||||
Completed,
|
||||
Count,
|
||||
}
|
||||
|
||||
public enum Device
|
||||
{
|
||||
Screen,
|
||||
@@ -76,9 +214,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 +243,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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -72,8 +72,8 @@ namespace Config.Entities
|
||||
{
|
||||
Procedure result = new Procedure();
|
||||
|
||||
result.ItemNr = ItemNr;
|
||||
result.Name = Name;
|
||||
result.MetersKind = MetersKind;
|
||||
result.Description = Description;
|
||||
result.CreationUser = CreationUser;
|
||||
result.CreationTime = CreationTime;
|
||||
@@ -81,10 +81,15 @@ namespace Config.Entities
|
||||
result.LastChgTime = LastChgTime;
|
||||
result.LongDescription = LongDescription;
|
||||
|
||||
result.ProcedureState = ProcedureState.Active;
|
||||
result.ProcedureState = ProcedureState;
|
||||
result.Revision = Revision;
|
||||
result.PredecessorId = Id;
|
||||
result.ObtainedByCopy = ObtainedByCopy;
|
||||
|
||||
result.MetersKind = MetersKind;
|
||||
result.Watermeters = Watermeters;
|
||||
result.ProtocolTitle = ProtocolTitle;
|
||||
|
||||
result.DataEntry = DataEntry;
|
||||
result.ResultsPrinter = ResultsPrinter;
|
||||
result.ResultsWriter = ResultsWriter;
|
||||
@@ -99,5 +104,10 @@ namespace Config.Entities
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0}, rev.{1}", Name, Revision);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+43
-13
@@ -17,22 +17,27 @@ 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; }
|
||||
@@ -57,18 +62,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 +99,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 +109,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 +126,20 @@ namespace Config.Entities
|
||||
result.BenchPath = BenchPath;
|
||||
result.OutputPath = OutputPath;
|
||||
result.MetersPath = MetersPath;
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,10 +55,10 @@ namespace Config.Entities
|
||||
result += indent + "Duration = " + Duration.ToString() + ", ";
|
||||
result += indent + "Message = " + Message + ", ";
|
||||
result += indent + "EndCondition = " + EndCondition.ToString() + ", ";
|
||||
result += indent + "ValvesOpen = " + ValvesOpen.ToString() + ", ";
|
||||
result += indent + "ValvesClose = " + ValvesClose.ToString() + ", ";
|
||||
result += indent + "RegulValvesPct = " + RegulValvesPct.ToString() + ", ";
|
||||
result += indent + "PumpsWithFMPct = " + RegulValvesPct.ToString() + Environment.NewLine;
|
||||
result += indent + "ValvesOpen = " + ValvesOpen + ", ";
|
||||
result += indent + "ValvesClose = " + ValvesClose + ", ";
|
||||
result += indent + "RegulValvesPct = " + RegulValvesPct + ", ";
|
||||
result += indent + "PumpsWithFMPct = " + PumpWithFMPcts + Environment.NewLine;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
+26
-15
@@ -7,40 +7,49 @@ using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Diagnostics;
|
||||
using Config.Resources;
|
||||
using log4net;
|
||||
|
||||
namespace Config.Entities
|
||||
{
|
||||
public class User
|
||||
{
|
||||
public virtual int Id { get; protected set; }
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(User));
|
||||
|
||||
public virtual int Id { get; protected set; }
|
||||
public virtual string Name { get; set; }
|
||||
public virtual int Number { get; set; }
|
||||
public virtual string Password { get; set; }
|
||||
public virtual string Description { get; set; }
|
||||
public virtual DateTime LastPwChange { get; set; }
|
||||
public virtual IList<Group> Groups { get; set; } //User can be a member of a list of groups
|
||||
|
||||
private bool powerUser; /// Set to tue for built-in users, power users have full access even with empty Groups
|
||||
private bool powerUser; /// true for built-in users, power users have full access even with empty Groups list
|
||||
|
||||
public User()
|
||||
{
|
||||
this.powerUser = false;
|
||||
Groups = new List<Group>();
|
||||
#if IPERLST
|
||||
Number = 6;
|
||||
#else
|
||||
Number = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
public User(string name, int number, bool powerUser)
|
||||
{
|
||||
Name = name;
|
||||
Number = number;
|
||||
this.powerUser = powerUser;
|
||||
Groups = new List<Group>();
|
||||
Description = "Power user";
|
||||
}
|
||||
|
||||
public virtual void AddGroup(Group group)
|
||||
{
|
||||
Groups.Add(group);
|
||||
}
|
||||
|
||||
|
||||
public User(string name)
|
||||
{
|
||||
this.powerUser = true;
|
||||
Name = name;
|
||||
Groups = new List<Group>();
|
||||
Description = "Power user";
|
||||
}
|
||||
|
||||
/// ------------- Additional stuff not mapped into the database -------------
|
||||
|
||||
///
|
||||
@@ -129,6 +138,7 @@ namespace Config.Entities
|
||||
{
|
||||
currentUser = this;
|
||||
lastAuthorization = DateTime.Now;
|
||||
log.FatalFormat("Power user '{0}' authorized @level '{1}'", userName, requiredGroupMembership);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -138,7 +148,8 @@ namespace Config.Entities
|
||||
{
|
||||
currentUser = this;
|
||||
lastAuthorization = DateTime.Now;
|
||||
return true;
|
||||
log.FatalFormat("User '{0}' authorized @level '{1}'", userName, requiredGroupMembership);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -184,7 +195,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 +211,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 +224,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>();
|
||||
|
||||
+27
-114
@@ -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;
|
||||
}
|
||||
@@ -124,8 +87,10 @@ namespace Config
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
MessageBox.Show(string.Format("Cannot open database.\r\nReason:\r\n{0}", exc.Message),
|
||||
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
MessageBox.Show(string.Format(Strings.Cannot_open_DB_Cause_0, exc.Message),
|
||||
Strings.Error,
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Error);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -147,20 +112,19 @@ 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)
|
||||
{
|
||||
ISession session = FluentCommon.CreateSession(database);
|
||||
SaveToDb(session, obj);
|
||||
SaveToDb(CreateSession(database), obj);
|
||||
}
|
||||
|
||||
public static void SaveToDb(ISession session, object obj)
|
||||
@@ -173,10 +137,9 @@ namespace Config
|
||||
}
|
||||
}
|
||||
|
||||
public static void DeleteFromDb(Database database, object obj)
|
||||
public static void DeleteFromDb(Entities.DBKind database, object obj)
|
||||
{
|
||||
ISession session = FluentCommon.CreateSession(database);
|
||||
SaveToDb(session, obj);
|
||||
DeleteFromDb(CreateSession(database), obj);
|
||||
}
|
||||
|
||||
public static void DeleteFromDb(ISession session, object obj)
|
||||
@@ -195,10 +158,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())
|
||||
@@ -220,7 +183,7 @@ namespace Config
|
||||
var admin = new Entities.User
|
||||
{
|
||||
Name = Data.AdminUsername,
|
||||
Description = "Administrator",
|
||||
Description = Strings.Administrator,
|
||||
LastPwChange = DateTime.Now
|
||||
};
|
||||
admin.SetPassword(Data.AdminPassword);
|
||||
@@ -245,65 +208,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
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace Config.Mappings
|
||||
Map(x => x.TempOut);
|
||||
Map(x => x.PressIn);
|
||||
Map(x => x.PressOut);
|
||||
Map(x => x.StopBFValve);
|
||||
Map(x => x.ValvesOpen)
|
||||
.CustomType("StringClob")
|
||||
.CustomSqlType("varchar(8000)");
|
||||
|
||||
@@ -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,16 +25,21 @@ 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);
|
||||
|
||||
@@ -11,7 +11,8 @@ namespace Config.Mappings
|
||||
{
|
||||
Id(x => x.Id);
|
||||
Map(x => x.Name);
|
||||
Map(x => x.Password);
|
||||
Map(x => x.Number);
|
||||
Map(x => x.Password);
|
||||
Map(x => x.Description);
|
||||
Map(x => x.LastPwChange);
|
||||
HasMany(x => x.Groups)
|
||||
|
||||
@@ -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.7.283.0")]
|
||||
[assembly: AssemblyFileVersion("2.7.283.0")]
|
||||
|
||||
Generated
+17
-3021
File diff suppressed because it is too large
Load Diff
@@ -117,19 +117,7 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="feedingTabPage.Text" xml:space="preserve">
|
||||
<value> Speisung </value>
|
||||
</data>
|
||||
<data name="benchTabPage.Text" xml:space="preserve">
|
||||
<value> Bank </value>
|
||||
</data>
|
||||
<data name="outputTabPage.Text" xml:space="preserve">
|
||||
<value> Ausgabe </value>
|
||||
</data>
|
||||
<data name="metersTabPage.Text" xml:space="preserve">
|
||||
<value> Messsensoren </value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Pfade</value>
|
||||
<data name="Error" xml:space="preserve">
|
||||
<value>Chyba</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,153 @@
|
||||
<?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="Administrator" xml:space="preserve">
|
||||
<value>Administrator</value>
|
||||
</data>
|
||||
<data name="Calibration_Specialist" xml:space="preserve">
|
||||
<value>Kalibriertechniker</value>
|
||||
</data>
|
||||
<data name="Head_of_Lab" xml:space="preserve">
|
||||
<value>Laborleiter</value>
|
||||
</data>
|
||||
<data name="Maintenance_Specialist" xml:space="preserve">
|
||||
<value>Wartungstechniker</value>
|
||||
</data>
|
||||
<data name="Metrologist" xml:space="preserve">
|
||||
<value>Messtechniker</value>
|
||||
</data>
|
||||
<data name="Tester" xml:space="preserve">
|
||||
<value>Prüfer</value>
|
||||
</data>
|
||||
<data name="Testing_Specialist" xml:space="preserve">
|
||||
<value>Prüftechniker</value>
|
||||
</data>
|
||||
<data name="Failed" xml:space="preserve">
|
||||
<value>NiO</value>
|
||||
</data>
|
||||
<data name="Passed" xml:space="preserve">
|
||||
<value>iO</value>
|
||||
</data>
|
||||
<data name="Error" xml:space="preserve">
|
||||
<value>Fehler</value>
|
||||
</data>
|
||||
<data name="Cannot_open_DB_Cause_0" xml:space="preserve">
|
||||
<value>Datenbank kann nicht geöffnet.\\r\\nUrsache:\\r\\n{0}</value>
|
||||
</data>
|
||||
</root>
|
||||
+4
-1007
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,128 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
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">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</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.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:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Administrator" xml:space="preserve">
|
||||
<value>管理员</value>
|
||||
</data>
|
||||
<data name="Calibration_Specialist" xml:space="preserve">
|
||||
<value>校准专员</value>
|
||||
</data>
|
||||
<data name="Failed" xml:space="preserve">
|
||||
<value>NOK</value>
|
||||
</data>
|
||||
<data name="Head_of_Lab" xml:space="preserve">
|
||||
<value>实验室负责人</value>
|
||||
</data>
|
||||
<data name="Maintenance_Specialist" xml:space="preserve">
|
||||
<value>维护专员</value>
|
||||
</data>
|
||||
<data name="Metrologist" xml:space="preserve">
|
||||
<value>计量者</value>
|
||||
</data>
|
||||
<data name="Passed" xml:space="preserve">
|
||||
<value>好</value>
|
||||
</data>
|
||||
<data name="Tester" xml:space="preserve">
|
||||
<value>测试仪</value>
|
||||
</data>
|
||||
<data name="Testing_Specialist" xml:space="preserve">
|
||||
<value>测试专员</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1,241 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Config.Entities;
|
||||
using Config.Resources;
|
||||
|
||||
namespace Config
|
||||
{
|
||||
public class ResultItemSpec
|
||||
{
|
||||
///
|
||||
/// 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(MeterTestResult meterTestResult);
|
||||
|
||||
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(MeterTestResult meterTestResult)
|
||||
{
|
||||
string str = printDlgt(meterTestResult);
|
||||
return (str == null) ? string.Empty : str;
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Function to pick a MeterTestResult field and convert it into a string
|
||||
///
|
||||
public delegate string PrintCombinedDlgt(MeterTestResult largeMeterTestResult,
|
||||
MeterTestResult smallMeterTestResult,
|
||||
MeterTestResult combinedMeterTestResult);
|
||||
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(MeterTestResult largeMeterTestResult,
|
||||
MeterTestResult smallMeterTestResult,
|
||||
MeterTestResult combinedMeterTestResult)
|
||||
{
|
||||
string str = printCombinedDlgt(largeMeterTestResult, smallMeterTestResult, combinedMeterTestResult);
|
||||
return (str == null) ? string.Empty : str;
|
||||
}
|
||||
|
||||
|
||||
|
||||
///
|
||||
/// Public constructor
|
||||
///
|
||||
public ResultItemSpec(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<ResultItemSpec> AllItems;
|
||||
|
||||
/// Static constructor that initializes the list of all items
|
||||
static ResultItemSpec()
|
||||
{
|
||||
AllItems = new List<ResultItemSpec>();
|
||||
|
||||
/// Common
|
||||
|
||||
//AllItems.Add(new ResultItemSpec("Bench ID", "Bench ID", x => x.TestResult.BenchID,
|
||||
// (x, y, z) => x.TestResult.BenchID));
|
||||
AllItems.Add(new ResultItemSpec("Test name", "Test", x => x.TestResult.TestName,
|
||||
(x, y, z) => x.TestResult.TestName));
|
||||
AllItems.Add(new ResultItemSpec("Procedure name", "Procedure", x => x.TestResult.ProcedureName,
|
||||
(x, y, z) => x.TestResult.ProcedureName));
|
||||
AllItems.Add(new ResultItemSpec("Batch number", "Batch nr.", x => x.TestResult.BatchNr.ToString(),
|
||||
(x, y, z) => x.TestResult.BatchNr.ToString()));
|
||||
AllItems.Add(new ResultItemSpec("Test method", "Test method", x => x.TestResult.Method,
|
||||
(x, y, z) => x.TestResult.Method));
|
||||
AllItems.Add(new ResultItemSpec("Density", "Density", x => x.TestResult.DensityOut.ToString("F1"),
|
||||
(x, y, z) => x.TestResult.DensityOut.ToString("F1"))); /// [kg/m3]
|
||||
|
||||
/// Target values
|
||||
AllItems.Add(new ResultItemSpec("Q from", "Q from [l/h]", x => x.TestResult.Qfrom.ToString("F3"),
|
||||
(x, y, z) => x.TestResult.Qfrom.ToString("F3")));
|
||||
AllItems.Add(new ResultItemSpec("Q to", "Q to [l/h]", x => x.TestResult.Qto.ToString("F3"),
|
||||
(x, y, z) => x.TestResult.Qto.ToString("F3")));
|
||||
AllItems.Add(new ResultItemSpec("Test volume", "Test vol. [l]", x => x.TestResult.Volume.ToString("F1"),
|
||||
(x, y, z) => x.TestResult.Volume.ToString("F1")));
|
||||
AllItems.Add(new ResultItemSpec("Error limit Lo", "Err.Lim.Lo [%]", x => x.TestResult.ErrLimLo.ToString("F1"),
|
||||
(x, y, z) => x.TestResult.ErrLimLo.ToString("F1")));
|
||||
AllItems.Add(new ResultItemSpec("Error limit Hi", "Err.Lim.Hi [%]", x => x.TestResult.ErrLimHi.ToString("F1"),
|
||||
(x, y, z) => x.TestResult.ErrLimHi.ToString("F1")));
|
||||
AllItems.Add(new ResultItemSpec("Error limit sum", "Err.Lim.Sum [%]", x => (x.TestResult.ErrLimHi - x.TestResult.ErrLimLo).ToString("F1"),
|
||||
(x, y, z) => (x.TestResult.ErrLimHi - x.TestResult.ErrLimLo).ToString("F1")));
|
||||
AllItems.Add(new ResultItemSpec("Uncertainty", "Uncertainty [%]", x => x.TestResult.Uncertainty.ToString("F2"),
|
||||
(x, y, z) => x.TestResult.Uncertainty.ToString("F2")));
|
||||
|
||||
/// Test results
|
||||
AllItems.Add(new ResultItemSpec("Start time", "T start", x => x.TestResult.TimeStart.ToShortTimeString(),
|
||||
(x, y, z) => z.TestResult.TimeStart.ToShortTimeString()));
|
||||
AllItems.Add(new ResultItemSpec("End time", "T end", x => x.TestResult.TimeEnd.ToShortTimeString(),
|
||||
(x, y, z) => z.TestResult.TimeEnd.ToShortTimeString()));
|
||||
AllItems.Add(new ResultItemSpec("Test time", "T [s]", x => x.TestResult.Time.ToString("F2"),
|
||||
(x, y, z) => z.TestResult.Time.ToString("F2")));
|
||||
AllItems.Add(new ResultItemSpec("Flow", "Flow [m3/h]", x => FloatToStr(x.TestResult.FlowVolume / 1000.0f, 4),
|
||||
(x, y, z) => FloatToStr(z.TestResult.FlowVolume / 1000.0f, 4)));
|
||||
AllItems.Add(new ResultItemSpec("T in", "T in", x => x.TestResult.TempInAvrg.ToString("F2"),
|
||||
(x, y, z) => z.TestResult.TempInAvrg.ToString("F2")));
|
||||
AllItems.Add(new ResultItemSpec("T out", "T out", x => x.TestResult.TempOutAvrg.ToString("F2"),
|
||||
(x, y, z) => z.TestResult.TempOutAvrg.ToString("F2")));
|
||||
AllItems.Add(new ResultItemSpec("T div", "T div", x => x.TestResult.TempDivAvrg.ToString("F2"),
|
||||
(x, y, z) => z.TestResult.TempDivAvrg.ToString("F2")));
|
||||
AllItems.Add(new ResultItemSpec("P up", "P up", x => x.TestResult.PressInAvrg.ToString("F3"),
|
||||
(x, y, z) => z.TestResult.PressInAvrg.ToString("F3")));
|
||||
AllItems.Add(new ResultItemSpec("P up start", "P up start", x => x.TestResult.PressInStart.ToString("F3"),
|
||||
(x, y, z) => z.TestResult.PressInStart.ToString("F3")));
|
||||
AllItems.Add(new ResultItemSpec("P up end", "P up end", x => x.TestResult.PressInEnd.ToString("F3"),
|
||||
(x, y, z) => z.TestResult.PressInEnd.ToString("F3")));
|
||||
AllItems.Add(new ResultItemSpec("P down", "P down", x => x.TestResult.PressOutAvrg.ToString("F3"),
|
||||
(x, y, z) => z.TestResult.PressOutAvrg.ToString("F3")));
|
||||
AllItems.Add(new ResultItemSpec("P down start", "P down start", x => x.TestResult.PressOutStart.ToString("F3"),
|
||||
(x, y, z) => z.TestResult.PressOutStart.ToString("F3")));
|
||||
AllItems.Add(new ResultItemSpec("P down end", "P down end", x => x.TestResult.PressOutEnd.ToString("F3"),
|
||||
(x, y, z) => z.TestResult.PressOutEnd.ToString("F3")));
|
||||
AllItems.Add(new ResultItemSpec("Reference error", "Err.ref. [%]", x => x.TestResult.ErrorMaster.ToString("F3"),
|
||||
(x, y, z) => z.TestResult.ErrorMaster.ToString("F3")));
|
||||
AllItems.Add(new ResultItemSpec("Ambient temperature", "T amb", x => x.TestResult.AmbientTempAve.ToString("F1"),
|
||||
(x, y, z) => z.TestResult.AmbientTempAve.ToString("F1")));
|
||||
AllItems.Add(new ResultItemSpec("Ambient pressure", "P amb", x => x.TestResult.AmbientPressAve.ToString("F0"),
|
||||
(x, y, z) => z.TestResult.AmbientPressAve.ToString("F0")));
|
||||
AllItems.Add(new ResultItemSpec("Ambient humidity", "H amb [%]", x => x.TestResult.AmbientHumiAve.ToString("F1"),
|
||||
(x, y, z) => z.TestResult.AmbientHumiAve.ToString("F1")));
|
||||
|
||||
/// Single and combined meter results
|
||||
AllItems.Add(new ResultItemSpec("Volume", "Volume [l]", x => x.VolumeMeter.ToString("F3"),
|
||||
(x, y, z) => z.VolumeMeter.ToString("F3")));
|
||||
AllItems.Add(new ResultItemSpec("Reference volume", "Vol.ref. [l]", x => x.VolumeRef.ToString("F3"),
|
||||
(x, y, z) => z.VolumeRef.ToString("F3")));
|
||||
AllItems.Add(new ResultItemSpec("Error", "Error [%]", x => x.VolumeErrorPct.ToString("F2"),
|
||||
(x, y, z) => z.VolumeErrorPct.ToString("F2")));
|
||||
AllItems.Add(new ResultItemSpec("Passed", "Result", x => (x.Passed ? Strings.Passed + "|Green" : Strings.Failed + "|Red"),
|
||||
(x, y, z) => (z.Passed ? Strings.Passed + "|Green" : Strings.Failed + "|Red")));
|
||||
|
||||
/// Single water meters only results
|
||||
AllItems.Add(new ResultItemSpec("Serial Nr", "s/n", x => x.SerialNr, null));
|
||||
AllItems.Add(new ResultItemSpec("End state", "End state", x => x.EndState, null));
|
||||
AllItems.Add(new ResultItemSpec("Pulses", "Pulses", x => x.PulsesMeter.ToString(), null));
|
||||
AllItems.Add(new ResultItemSpec("Pulses/liter", "Pulses/liter", x => x.PulsesPerLiter.ToString(), null));
|
||||
AllItems.Add(new ResultItemSpec("Reference pulses", "Ref.pulses", x => x.PulsesMaster.ToString(), null));
|
||||
|
||||
/// Combined water meters only results
|
||||
AllItems.Add(new ResultItemSpec("Q rise", "Q rise [m3/h]", null, (x, y, z) => (x.TestResult.QRise == 0) ? "-" : FloatToStr(x.TestResult.QRise, 4)));
|
||||
AllItems.Add(new ResultItemSpec("Q fall", "Q fall [m3/h]", null, (x, y, z) => (x.TestResult.QFall == 0) ? "-" : FloatToStr(x.TestResult.QFall, 4)));
|
||||
AllItems.Add(new ResultItemSpec("Error large WM", "Error-L [%]", null, (x, y, z) => x.VolumeErrorPct.ToString("F2")));
|
||||
AllItems.Add(new ResultItemSpec("Error small WM", "Error-S [%]", null, (x, y, z) => y.VolumeErrorPct.ToString("F2")));
|
||||
AllItems.Add(new ResultItemSpec("Serial Nr large WM", "s/n", null, (x, y, z) => x.SerialNr));
|
||||
AllItems.Add(new ResultItemSpec("Serial Nr small WM", "s/n", null, (x, y, z) => y.SerialNr));
|
||||
AllItems.Add(new ResultItemSpec("End state large WM", "End state", null, (x, y, z) => x.EndState));
|
||||
AllItems.Add(new ResultItemSpec("End state small WM", "End state", null, (x, y, z) => y.EndState));
|
||||
}
|
||||
|
||||
public static ResultItemSpec GetItem(string name)
|
||||
{
|
||||
foreach (var item in AllItems) if (item.Name.Equals(name)) return item;
|
||||
return null;
|
||||
}
|
||||
|
||||
public static string[] ToStrArray(IList<ResultItemSpec> 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<ResultItemSpec> FromStrArray(string[] strArray)
|
||||
{
|
||||
IList<ResultItemSpec> result = new List<ResultItemSpec>();
|
||||
if (strArray != null)
|
||||
{
|
||||
for (int i = 0; i < strArray.Length; i++)
|
||||
{
|
||||
ResultItemSpec 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 FloatToStr(float value, int validDigits)
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
+138
@@ -0,0 +1,138 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
|
||||
namespace Config
|
||||
{
|
||||
public enum Unit
|
||||
{
|
||||
None,
|
||||
l, /// 1 liter
|
||||
m3, /// 1000 l
|
||||
gal_UK, /// 1 gal(UK) = 4.54609 l
|
||||
gal_US, /// 1 gal(US) = 3.78541178 l
|
||||
lph, /// 1 liter/h
|
||||
m3ph, /// 1 m3/h = 1000 l/h
|
||||
g, /// 0.001 kg
|
||||
kg, /// 1 kilogram
|
||||
t, /// 1000 kg
|
||||
lb, /// 0.45359237 kg
|
||||
C, /// degree Celsius
|
||||
F, /// degree Fahrenheit
|
||||
K, /// degree Kelvin
|
||||
Pa, /// 1 Pa = 0.01 hPa
|
||||
hPa, /// 1 hPa = 100 Pa
|
||||
kPa, /// 1 kPa = 10 HPa
|
||||
MPa, /// 1 MPa = 10000 hPa
|
||||
mBar, /// 1 mbar = 1 hPa = 100 Pa
|
||||
Bar, /// 1 Bar = 1000 mbar = 100000 Pa
|
||||
inHg, /// 1 inHg = 33.864 hPa
|
||||
Pct, /// 1 %
|
||||
Promile, /// 1 promile = 0.1 %
|
||||
mm, /// 1 millimeter
|
||||
cm, /// 1 cm = 10 mm
|
||||
m, /// 1 m = 1000 mm
|
||||
inch, /// 1 inch = 25.4 mm
|
||||
Count
|
||||
}
|
||||
|
||||
public class Units
|
||||
{
|
||||
public static double ConvertTo(Unit units, double v)
|
||||
{
|
||||
switch (units)
|
||||
{
|
||||
/// Volume: internal representation in l
|
||||
case Unit.l: return v; /// 1 liter
|
||||
case Unit.m3: return 0.001 * v; /// 1000 l
|
||||
case Unit.gal_UK: return 0.21996925 * v; /// 1 gal(UK) = 4.54609 l
|
||||
case Unit.gal_US: return 0.26417205 * v; /// 1 gal(US) = 3.78541178 l
|
||||
|
||||
/// Flow: internal representation in m3/h
|
||||
case Unit.lph: return 1000 * v; /// 1 liter/h
|
||||
case Unit.m3ph: return v; /// 1 m3/h = 1000 l/h
|
||||
|
||||
/// Mass: internal representation in kg
|
||||
case Unit.g: return 1000 * v; /// 1 g = 0.001 kg
|
||||
case Unit.kg: return v; /// 1 kilogram
|
||||
case Unit.t: return 0.001 * v; /// 1 t = 1000 kg
|
||||
case Unit.lb: return 2.2046226 * v; /// 1 lb = 0.45359237 kg
|
||||
|
||||
/// Temperature: internal representation in degree C
|
||||
case Unit.C: return v; /// degree Celsius
|
||||
case Unit.F: return 1.8 * v + 32; /// degree Fahrenheit
|
||||
case Unit.K: return v + 273.15; /// degree Kelvin
|
||||
|
||||
/// Pressure: internal representation in hPa (???)
|
||||
case Unit.Pa: return 100 * v; /// 1 hPa = 100 Pa
|
||||
case Unit.hPa: return v; /// 1 hPa = 100 Pa
|
||||
case Unit.mBar: return v; /// 1 mbar = 1 hPa = 100 Pa
|
||||
case Unit.kPa: return 0.1 * v; /// 1 kPa = 10 HPa
|
||||
case Unit.Bar: return 0.001 * v; /// 1 Bar = 1000 mbar = 100000 Pa
|
||||
case Unit.MPa: return 0.0001 * v; /// 1 MPa = 10000 hPa
|
||||
case Unit.inHg: return 0.02953 * v; /// 1 inHg = 33.864 hPa
|
||||
|
||||
/// Error: internal representation in %
|
||||
case Unit.Pct: return v; /// 1 %
|
||||
case Unit.Promile: return 10 * v; /// 1 promile = 0.1 %
|
||||
|
||||
/// Diameter, length: internal representation in mm
|
||||
case Unit.mm: return v; /// 1 mm
|
||||
case Unit.cm: return 0.1 * v; /// 1 cm = 10 mm
|
||||
case Unit.m: return 0.001 * v; /// 1 m = 1000 mm
|
||||
case Unit.inch: return v / 25.4; /// 1 inch = 25.4 mm
|
||||
|
||||
default: return v;
|
||||
}
|
||||
}
|
||||
|
||||
public static double ConvertFrom(Unit units, double v)
|
||||
{
|
||||
switch (units)
|
||||
{
|
||||
/// Volume: internal representation in l
|
||||
case Unit.l: return v; /// 1 liter
|
||||
case Unit.m3: return 1000 * v; /// 1000 l
|
||||
case Unit.gal_UK: return 4.54609 * v; /// 1 gal(UK) = 4.54609 l
|
||||
case Unit.gal_US: return 3.78541178 * v; /// 1 gal(US) = 3.78541178 l
|
||||
|
||||
/// Flow: internal representation in m3/h
|
||||
case Unit.lph: return 0.001 * v; /// 1 liter/h
|
||||
case Unit.m3ph: return v; /// 1 m3/h = 1000 l/h
|
||||
|
||||
/// Mass: internal representation in kg
|
||||
case Unit.g: return 0.001 * v; /// 1 g = 0.001 kg
|
||||
case Unit.kg: return v; /// 1 kilogram
|
||||
case Unit.t: return 1000 * v; /// 1 t = 1000 kg
|
||||
case Unit.lb: return 0.45359237 * v; /// 1 lb = 0.45359237 kg
|
||||
|
||||
/// Temperature: internal representation in degree C
|
||||
case Unit.C: return v; /// degree Celsius
|
||||
case Unit.F: return 5 * (v-32) / 9; /// degree Fahrenheit
|
||||
case Unit.K: return v - 273.15; /// degree Kelvin
|
||||
|
||||
/// Pressure: internal representation in hPa (???)
|
||||
case Unit.Pa: return 0.01 * v; /// 1 hPa = 100 Pa
|
||||
case Unit.hPa: return v; /// 1 hPa = 100 Pa
|
||||
case Unit.mBar: return v; /// 1 mbar = 1 hPa = 100 Pa
|
||||
case Unit.kPa: return 10 * v; /// 1 kPa = 10 HPa
|
||||
case Unit.Bar: return 1000 * v; /// 1 Bar = 1000 mbar = 100000 Pa
|
||||
case Unit.MPa: return 10000 * v; /// 1 MPa = 10000 hPa
|
||||
case Unit.inHg: return 33.864 * v; /// 1 inHg = 33.864 hPa
|
||||
|
||||
/// Error: internal representation in %
|
||||
case Unit.Pct: return v; /// 1 %
|
||||
case Unit.Promile: return 0.1 * v; /// 1 promile = 0.1 %
|
||||
|
||||
/// Diameter, length: internal representation in mm
|
||||
case Unit.mm: return v; /// 1 mm
|
||||
case Unit.cm: return 10 * v; /// 1 cm = 10 mm
|
||||
case Unit.m: return 1000 * v; /// 1 m = 1000 mm
|
||||
case Unit.inch: return 25.4 * v; /// 1 inch = 25.4 mm
|
||||
|
||||
default: return v;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
Test StartTime: when? Start of flow set or start of real test?
|
||||
@@ -0,0 +1,173 @@
|
||||
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, int userNr, 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,
|
||||
UserNumber = userNr,
|
||||
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),
|
||||
};
|
||||
|
||||
///
|
||||
/// 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 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
|
||||
{
|
||||
}
|
||||
}
|
||||
+274
@@ -0,0 +1,274 @@
|
||||
///
|
||||
/// 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>
|
||||
/// Loads shared data from the database
|
||||
/// </summary>
|
||||
/// <exception>Throws NHibernate exceptions</exception>
|
||||
public static int GetMaxSavedBatchNr()
|
||||
{
|
||||
ISession session = DB.CreateSession();
|
||||
IList<Entities.Batch> batches = session.CreateQuery("FROM Batch").List<Entities.Batch>();
|
||||
|
||||
int maxBatchNr = 0;
|
||||
foreach (var b in batches)
|
||||
{
|
||||
if (b.BatchNr > maxBatchNr) maxBatchNr = b.BatchNr;
|
||||
}
|
||||
return maxBatchNr;
|
||||
}
|
||||
|
||||
|
||||
/// <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,79 @@
|
||||
///
|
||||
/// Copyright (c) 2015 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 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
|
||||
|
||||
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,86 @@
|
||||
///
|
||||
/// 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 (!Evaluate()) return Passed ? "OK|White" : "NOK|White";
|
||||
else return Passed ? "OK|Green" : "NOK|Red";
|
||||
}
|
||||
|
||||
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,141 @@
|
||||
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; }
|
||||
#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.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; }
|
||||
|
||||
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,125 @@
|
||||
///
|
||||
/// 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 IPERLST || IPERLST_SPECIAL
|
||||
public virtual int WMTypeId { get; set; }
|
||||
public virtual int WMTypeRev { 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 (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;
|
||||
if (WMTypeRev != wmd.WMTypeRev) 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,456 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Windows.Forms;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Results.Forms
|
||||
{
|
||||
/// <summary>
|
||||
/// Event Handler for SubItem events
|
||||
/// </summary>
|
||||
public delegate void SubItemEventHandler(object sender, SubItemEventArgs e);
|
||||
/// <summary>
|
||||
/// Event Handler for SubItemEndEditing events
|
||||
/// </summary>
|
||||
public delegate void SubItemEndEditingEventHandler(object sender, SubItemEndEditingEventArgs e);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Inherited ListView to allow in-place editing of subitems
|
||||
/// </summary>
|
||||
public class ListViewEx : System.Windows.Forms.ListView
|
||||
{
|
||||
#region Interop structs, imports and constants
|
||||
/// <summary>
|
||||
/// MessageHeader for WM_NOTIFY
|
||||
/// </summary>
|
||||
private struct NMHDR
|
||||
{
|
||||
#pragma warning disable
|
||||
public IntPtr hwndFrom;
|
||||
public Int32 idFrom;
|
||||
public Int32 code;
|
||||
#pragma warning restore
|
||||
}
|
||||
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
private static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wPar, IntPtr lPar);
|
||||
[DllImport("user32.dll", CharSet=CharSet.Ansi)]
|
||||
private static extern IntPtr SendMessage(IntPtr hWnd, int msg, int len, ref int [] order);
|
||||
|
||||
// ListView messages
|
||||
private const int LVM_FIRST = 0x1000;
|
||||
private const int LVM_GETCOLUMNORDERARRAY = (LVM_FIRST + 59);
|
||||
|
||||
// Windows Messages that will abort editing
|
||||
private const int WM_HSCROLL = 0x114;
|
||||
private const int WM_VSCROLL = 0x115;
|
||||
private const int WM_SIZE = 0x05;
|
||||
private const int WM_NOTIFY = 0x4E;
|
||||
|
||||
private const int HDN_FIRST = -300;
|
||||
private const int HDN_BEGINDRAG = (HDN_FIRST-10);
|
||||
private const int HDN_ITEMCHANGINGA = (HDN_FIRST-0);
|
||||
private const int HDN_ITEMCHANGINGW = (HDN_FIRST-20);
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.Container components = null;
|
||||
|
||||
public event SubItemEventHandler SubItemClicked;
|
||||
public event SubItemEventHandler SubItemBeginEditing;
|
||||
public event SubItemEndEditingEventHandler SubItemEndEditing;
|
||||
|
||||
public ListViewEx()
|
||||
{
|
||||
// This call is required by the Windows.Forms Form Designer.
|
||||
InitializeComponent();
|
||||
|
||||
base.FullRowSelect = true;
|
||||
base.View = View.Details;
|
||||
base.AllowColumnReorder = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
protected override void Dispose( bool disposing )
|
||||
{
|
||||
if( disposing )
|
||||
{
|
||||
if( components != null )
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose( disposing );
|
||||
}
|
||||
|
||||
#region Component 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()
|
||||
{
|
||||
components = new System.ComponentModel.Container();
|
||||
}
|
||||
#endregion
|
||||
|
||||
private bool _doubleClickActivation = false;
|
||||
/// <summary>
|
||||
/// Is a double click required to start editing a cell?
|
||||
/// </summary>
|
||||
public bool DoubleClickActivation
|
||||
{
|
||||
get { return _doubleClickActivation; }
|
||||
set { _doubleClickActivation = value; }
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve the order in which columns appear
|
||||
/// </summary>
|
||||
/// <returns>Current display order of column indices</returns>
|
||||
public int[] GetColumnOrder()
|
||||
{
|
||||
IntPtr lPar = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(int)) * Columns.Count);
|
||||
|
||||
IntPtr res = SendMessage(Handle, LVM_GETCOLUMNORDERARRAY, new IntPtr(Columns.Count), lPar);
|
||||
if (res.ToInt32() == 0) // Something went wrong
|
||||
{
|
||||
Marshal.FreeHGlobal(lPar);
|
||||
return null;
|
||||
}
|
||||
|
||||
int [] order = new int[Columns.Count];
|
||||
Marshal.Copy(lPar, order, 0, Columns.Count);
|
||||
|
||||
Marshal.FreeHGlobal(lPar);
|
||||
|
||||
return order;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Find ListViewItem and SubItem Index at position (x,y)
|
||||
/// </summary>
|
||||
/// <param name="x">relative to ListView</param>
|
||||
/// <param name="y">relative to ListView</param>
|
||||
/// <param name="item">Item at position (x,y)</param>
|
||||
/// <returns>SubItem index</returns>
|
||||
public int GetSubItemAt(int x, int y, out ListViewItem item)
|
||||
{
|
||||
item = this.GetItemAt(x, y);
|
||||
|
||||
if (item != null)
|
||||
{
|
||||
int[] order = GetColumnOrder();
|
||||
Rectangle lviBounds;
|
||||
int subItemX;
|
||||
|
||||
lviBounds = item.GetBounds(ItemBoundsPortion.Entire);
|
||||
subItemX = lviBounds.Left;
|
||||
for (int i=0; i<order.Length; i++)
|
||||
{
|
||||
ColumnHeader h = this.Columns[order[i]];
|
||||
if (x < subItemX+h.Width)
|
||||
{
|
||||
return h.Index;
|
||||
}
|
||||
subItemX += h.Width;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Get bounds for a SubItem
|
||||
/// </summary>
|
||||
/// <param name="Item">Target ListViewItem</param>
|
||||
/// <param name="SubItem">Target SubItem index</param>
|
||||
/// <returns>Bounds of SubItem (relative to ListView)</returns>
|
||||
public Rectangle GetSubItemBounds(ListViewItem Item, int SubItem)
|
||||
{
|
||||
int[] order = GetColumnOrder();
|
||||
|
||||
Rectangle subItemRect = Rectangle.Empty;
|
||||
if (SubItem >= order.Length)
|
||||
throw new IndexOutOfRangeException("SubItem "+SubItem+" out of range");
|
||||
|
||||
if (Item == null)
|
||||
throw new ArgumentNullException("Item");
|
||||
|
||||
Rectangle lviBounds = Item.GetBounds(ItemBoundsPortion.Entire);
|
||||
int subItemX = lviBounds.Left;
|
||||
|
||||
ColumnHeader col;
|
||||
int i;
|
||||
for (i=0; i<order.Length; i++)
|
||||
{
|
||||
col = this.Columns[order[i]];
|
||||
if (col.Index == SubItem)
|
||||
break;
|
||||
subItemX += col.Width;
|
||||
}
|
||||
subItemRect = new Rectangle(subItemX, lviBounds.Top, this.Columns[order[i]].Width, lviBounds.Height);
|
||||
return subItemRect;
|
||||
}
|
||||
|
||||
|
||||
protected override void WndProc(ref Message msg)
|
||||
{
|
||||
switch (msg.Msg)
|
||||
{
|
||||
// Look for WM_VSCROLL,WM_HSCROLL or WM_SIZE messages.
|
||||
case WM_VSCROLL:
|
||||
case WM_HSCROLL:
|
||||
case WM_SIZE:
|
||||
EndEditing(false);
|
||||
break;
|
||||
case WM_NOTIFY:
|
||||
// Look for WM_NOTIFY of events that might also change the
|
||||
// editor's position/size: Column reordering or resizing
|
||||
NMHDR h = (NMHDR)Marshal.PtrToStructure(msg.LParam, typeof(NMHDR));
|
||||
if (h.code == HDN_BEGINDRAG ||
|
||||
h.code == HDN_ITEMCHANGINGA ||
|
||||
h.code == HDN_ITEMCHANGINGW)
|
||||
EndEditing(false);
|
||||
break;
|
||||
}
|
||||
|
||||
base.WndProc(ref msg);
|
||||
}
|
||||
|
||||
|
||||
#region Initialize editing depending of DoubleClickActivation property
|
||||
protected override void OnMouseUp(System.Windows.Forms.MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseUp(e);
|
||||
|
||||
if (DoubleClickActivation)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
EditSubitemAt(new Point(e.X, e.Y));
|
||||
}
|
||||
|
||||
protected override void OnDoubleClick(EventArgs e)
|
||||
{
|
||||
base.OnDoubleClick (e);
|
||||
|
||||
if (!DoubleClickActivation)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Point pt = this.PointToClient(Cursor.Position);
|
||||
|
||||
EditSubitemAt(pt);
|
||||
}
|
||||
|
||||
///<summary>
|
||||
/// Fire SubItemClicked
|
||||
///</summary>
|
||||
///<param name="p">Point of click/doubleclick</param>
|
||||
private void EditSubitemAt(Point p)
|
||||
{
|
||||
ListViewItem item;
|
||||
int idx = GetSubItemAt(p.X, p.Y, out item);
|
||||
if (idx >= 0)
|
||||
{
|
||||
OnSubItemClicked(new SubItemEventArgs(item, idx));
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region In-place editing functions
|
||||
// The control performing the actual editing
|
||||
private Control _editingControl;
|
||||
// The LVI being edited
|
||||
private ListViewItem _editItem;
|
||||
// The SubItem being edited
|
||||
private int _editSubItem;
|
||||
|
||||
protected void OnSubItemBeginEditing(SubItemEventArgs e)
|
||||
{
|
||||
if (SubItemBeginEditing != null) SubItemBeginEditing(this, e);
|
||||
}
|
||||
|
||||
protected void OnSubItemEndEditing(SubItemEndEditingEventArgs e)
|
||||
{
|
||||
if (SubItemEndEditing != null) SubItemEndEditing(this, e);
|
||||
}
|
||||
|
||||
protected void OnSubItemClicked(SubItemEventArgs e)
|
||||
{
|
||||
if (SubItemClicked != null) SubItemClicked(this, e);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Begin in-place editing of given cell
|
||||
/// </summary>
|
||||
/// <param name="c">Control used as cell editor</param>
|
||||
/// <param name="Item">ListViewItem to edit</param>
|
||||
/// <param name="SubItem">SubItem index to edit</param>
|
||||
public void StartEditing(Control c, ListViewItem Item, int SubItem)
|
||||
{
|
||||
OnSubItemBeginEditing(new SubItemEventArgs(Item, SubItem));
|
||||
|
||||
Rectangle rcSubItem = GetSubItemBounds(Item, SubItem);
|
||||
|
||||
if (rcSubItem.X < 0)
|
||||
{
|
||||
// Left edge of SubItem not visible - adjust rectangle position and width
|
||||
rcSubItem.Width += rcSubItem.X;
|
||||
rcSubItem.X=0;
|
||||
}
|
||||
if (rcSubItem.X+rcSubItem.Width > this.Width)
|
||||
{
|
||||
// Right edge of SubItem not visible - adjust rectangle width
|
||||
rcSubItem.Width = this.Width-rcSubItem.Left;
|
||||
}
|
||||
|
||||
// Subitem bounds are relative to the location of the ListView!
|
||||
rcSubItem.Offset(Left, Top);
|
||||
|
||||
// In case the editing control and the listview are on different parents,
|
||||
// account for different origins
|
||||
Point origin = new Point(0,0);
|
||||
Point lvOrigin = this.Parent.PointToScreen(origin);
|
||||
Point ctlOrigin = c.Parent.PointToScreen(origin);
|
||||
|
||||
rcSubItem.Offset(lvOrigin.X-ctlOrigin.X, lvOrigin.Y-ctlOrigin.Y);
|
||||
|
||||
// Position and show editor
|
||||
c.Bounds = rcSubItem;
|
||||
c.Text = Item.SubItems[SubItem].Text;
|
||||
c.Visible = true;
|
||||
c.BringToFront();
|
||||
c.Focus();
|
||||
|
||||
_editingControl = c;
|
||||
_editingControl.Leave += new EventHandler(_editControl_Leave);
|
||||
_editingControl.KeyPress += new KeyPressEventHandler(_editControl_KeyPress);
|
||||
|
||||
_editItem = Item;
|
||||
_editSubItem = SubItem;
|
||||
}
|
||||
|
||||
|
||||
private void _editControl_Leave(object sender, EventArgs e)
|
||||
{
|
||||
// cell editor losing focus
|
||||
EndEditing(true);
|
||||
}
|
||||
|
||||
private void _editControl_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
|
||||
{
|
||||
switch (e.KeyChar)
|
||||
{
|
||||
case (char)(int)Keys.Escape:
|
||||
{
|
||||
EndEditing(false);
|
||||
break;
|
||||
}
|
||||
|
||||
case (char)(int)Keys.Enter:
|
||||
{
|
||||
EndEditing(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Accept or discard current value of cell editor control
|
||||
/// </summary>
|
||||
/// <param name="AcceptChanges">Use the _editingControl's Text as new SubItem text or discard changes?</param>
|
||||
public void EndEditing(bool AcceptChanges)
|
||||
{
|
||||
if (_editingControl == null)
|
||||
return;
|
||||
|
||||
SubItemEndEditingEventArgs e = new SubItemEndEditingEventArgs(
|
||||
_editItem, // The item being edited
|
||||
_editSubItem, // The subitem index being edited
|
||||
AcceptChanges ?
|
||||
_editingControl.Text : // Use editControl text if changes are accepted
|
||||
_editItem.SubItems[_editSubItem].Text, // or the original subitem's text, if changes are discarded
|
||||
!AcceptChanges // Cancel?
|
||||
);
|
||||
|
||||
OnSubItemEndEditing(e);
|
||||
|
||||
_editItem.SubItems[_editSubItem].Text = e.DisplayText;
|
||||
|
||||
_editingControl.Leave -= new EventHandler(_editControl_Leave);
|
||||
_editingControl.KeyPress -= new KeyPressEventHandler(_editControl_KeyPress);
|
||||
|
||||
_editingControl.Visible = false;
|
||||
|
||||
_editingControl = null;
|
||||
_editItem = null;
|
||||
_editSubItem = -1;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Event Args for SubItemClicked event
|
||||
/// </summary>
|
||||
public class SubItemEventArgs : EventArgs
|
||||
{
|
||||
int subItem = -1; /// Sub-item index
|
||||
ListViewItem item = null;
|
||||
|
||||
public int SubItem { get { return subItem; } }
|
||||
public ListViewItem Item { get { return item; } }
|
||||
|
||||
public SubItemEventArgs(ListViewItem item, int subItem)
|
||||
{
|
||||
this.subItem = subItem;
|
||||
this.item = item;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Event Args for SubItemEndEditingClicked event
|
||||
/// </summary>
|
||||
public class SubItemEndEditingEventArgs : SubItemEventArgs
|
||||
{
|
||||
string displayText = string.Empty;
|
||||
bool cancel = true;
|
||||
|
||||
public SubItemEndEditingEventArgs(ListViewItem item, int subItem, string displayText, bool cancel) :
|
||||
base(item, subItem)
|
||||
{
|
||||
this.displayText = displayText;
|
||||
this.cancel = cancel;
|
||||
}
|
||||
public string DisplayText
|
||||
{
|
||||
get { return displayText; }
|
||||
set { displayText = value; }
|
||||
}
|
||||
public bool Cancel
|
||||
{
|
||||
get { return cancel; }
|
||||
set { cancel = value; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<root>
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<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" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</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>1.0.0.0</value>
|
||||
</resheader>
|
||||
<resheader name="Reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3102.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="Writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3102.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,344 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using Results;
|
||||
using Results.Resources;
|
||||
|
||||
namespace Results.Forms
|
||||
{
|
||||
public partial class ResultsConfigDlg : Form
|
||||
{
|
||||
/// <summary>
|
||||
/// ListViewEx columns
|
||||
/// </summary>
|
||||
enum Column
|
||||
{
|
||||
Item,
|
||||
Caption,
|
||||
TestID,
|
||||
Units,
|
||||
Format,
|
||||
Precision,
|
||||
Width,
|
||||
Alignment,
|
||||
Count,
|
||||
}
|
||||
Control[] editors;
|
||||
|
||||
|
||||
public IList<WMeterRsltItemSpec> AvailableItems;
|
||||
public IList<WMeterRsltItemSpec> SelectedItems;
|
||||
|
||||
|
||||
public bool Compound; /// false = single meter items, true = combined meter items
|
||||
|
||||
public ResultsConfigDlg()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Configuration;
|
||||
availableResultsLabel.Text = Strings.Available_results;
|
||||
selectedResultsLabel.Text = Strings.Selected_results;
|
||||
addButton.Text = Strings.Add;
|
||||
removeButton.Text = Strings.Remove;
|
||||
removeAllButton.Text = Strings.Remove_all;
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
cancelButton.Text = Strings.CancelBtnText;
|
||||
upButton.Text = Strings.UpBtnText;
|
||||
downButton.Text = Strings.DownBtnText;
|
||||
}
|
||||
|
||||
void ResultsConfig_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
|
||||
/// Add columns to ListViewEx
|
||||
selectedResultsListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Item, Width = 120 });
|
||||
selectedResultsListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Caption });
|
||||
selectedResultsListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Test_ID });
|
||||
selectedResultsListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Units });
|
||||
selectedResultsListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Format });
|
||||
selectedResultsListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Precision });
|
||||
selectedResultsListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Width });
|
||||
selectedResultsListViewEx.Columns.Add(new ColumnHeader { Text = Strings.Alignment });
|
||||
|
||||
/// Create controls used by ListViewEx to edit items
|
||||
ComboBox unitsCB = new ComboBox();
|
||||
unitsCB.Items.Add("---"); /// Use "---" instead of "None"
|
||||
for (Config.Unit u = (Config.Unit)1; u < Config.Unit.Count; u++)
|
||||
{
|
||||
unitsCB.Items.Add(u.ToString().Replace("Pct", "%").Replace('p', '/'));
|
||||
}
|
||||
|
||||
ComboBox alignmentCB = new ComboBox();
|
||||
for (Config.Entities.Alignment a = 0; a < Config.Entities.Alignment.Count; a++)
|
||||
{
|
||||
alignmentCB.Items.Add(a.ToString());
|
||||
}
|
||||
|
||||
editors = new Control[]
|
||||
{
|
||||
null,
|
||||
new TextBox(),
|
||||
new TextBox(),
|
||||
unitsCB,
|
||||
new TextBox(),
|
||||
new TextBox(),
|
||||
new TextBox(),
|
||||
alignmentCB,
|
||||
};
|
||||
foreach (var edi in editors)
|
||||
{
|
||||
if (edi != null)
|
||||
{
|
||||
edi.Visible = false;
|
||||
Controls.Add(edi);
|
||||
}
|
||||
}
|
||||
|
||||
selectedResultsListViewEx.SubItemClicked += new SubItemEventHandler(selectedResultsListViewEx_SubItemClicked);
|
||||
selectedResultsListViewEx.SubItemEndEditing += new SubItemEndEditingEventHandler(selectedResultsListViewEx_SubItemEndEditing);
|
||||
|
||||
RedrawAvailable();
|
||||
RedrawSelected();
|
||||
}
|
||||
|
||||
void selectedResultsListViewEx_SubItemClicked(object sender, SubItemEventArgs e)
|
||||
{
|
||||
if ((e.SubItem > 0) && (e.SubItem < (int)Column.Count))
|
||||
{
|
||||
selectedResultsListViewEx.StartEditing(editors[e.SubItem], e.Item, e.SubItem);
|
||||
}
|
||||
}
|
||||
|
||||
void selectedResultsListViewEx_SubItemEndEditing(object sender, SubItemEndEditingEventArgs e)
|
||||
{
|
||||
ListViewItem lvi = e.Item;
|
||||
WMeterRsltItemSpec item = lvi.Tag as WMeterRsltItemSpec;
|
||||
|
||||
switch ((Column)e.SubItem)
|
||||
{
|
||||
case Column.Caption: item.Caption = e.DisplayText; return;
|
||||
case Column.TestID: item.TestID = e.DisplayText; return;
|
||||
case Column.Format: item.Format = e.DisplayText; return;
|
||||
case Column.Precision: item.Precision = e.DisplayText; return;
|
||||
|
||||
case Column.Units:
|
||||
if (editors[e.SubItem].Text == "---") { item.Units = 0; return; };
|
||||
for (Config.Unit u = (Config.Unit)1; u < Config.Unit.Count; u++)
|
||||
{
|
||||
if (u.ToString().Replace("Pct", "%").Replace('p', '/').Equals(editors[e.SubItem].Text))
|
||||
{
|
||||
item.Units = u;
|
||||
return; /// OK
|
||||
}
|
||||
}
|
||||
break; /// Error
|
||||
|
||||
case Column.Alignment:
|
||||
for (Config.Entities.Alignment a = 0; a < Config.Entities.Alignment.Count; a++)
|
||||
{
|
||||
if (a.ToString().Equals(editors[e.SubItem].Text))
|
||||
{
|
||||
item.Alignment = a;
|
||||
return;
|
||||
}
|
||||
}
|
||||
break; /// Error
|
||||
|
||||
case Column.Width:
|
||||
{
|
||||
int width;
|
||||
if (Int32.TryParse(editors[e.SubItem].Text, out width) && width >= 0)
|
||||
{
|
||||
item.Width = width;
|
||||
return; /// OK
|
||||
}
|
||||
break; /// Error
|
||||
}
|
||||
default:
|
||||
return; /// OK
|
||||
}
|
||||
|
||||
e.DisplayText = e.Item.SubItems[e.SubItem].Text;
|
||||
e.Cancel = true;
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Redraw selected items (right hand side)
|
||||
/// </summary>
|
||||
void RedrawAvailable()
|
||||
{
|
||||
availableResultsListBox.Items.Clear();
|
||||
AvailableItems = new List<WMeterRsltItemSpec>();
|
||||
foreach (var item in WMeterRsltItemSpec.AllItems)
|
||||
{
|
||||
AvailableItems.Add(item);
|
||||
availableResultsListBox.Items.Add(item.Name);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Redraw selected items (right hand side)
|
||||
/// </summary>
|
||||
void RedrawSelected()
|
||||
{
|
||||
selectedResultsListViewEx.Items.Clear();
|
||||
foreach (var item in SelectedItems)
|
||||
{
|
||||
ListViewItem lvi = new ListViewItem(item.Name); /// Item
|
||||
lvi.Tag = item;
|
||||
lvi.SubItems.Add(item.Caption); /// Header
|
||||
lvi.SubItems.Add(item.TestID); /// TestID
|
||||
lvi.SubItems.Add((item.Units == Config.Unit.None) ? "---" : item.Units.ToString().Replace("Pct", "%").Replace('p', '/')); /// Units
|
||||
lvi.SubItems.Add(item.Format); /// Format
|
||||
lvi.SubItems.Add(item.Precision); /// Precision
|
||||
lvi.SubItems.Add(item.Width.ToString()); /// Width
|
||||
lvi.SubItems.Add(item.Alignment.ToString()); /// Alignment
|
||||
|
||||
selectedResultsListViewEx.Items.Add(lvi);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateSelectedFromView()
|
||||
{
|
||||
}
|
||||
|
||||
void availableResultsListBox_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
/// Double click works when just one item is selected
|
||||
if (availableResultsListBox.SelectedIndices.Count == 1)
|
||||
{
|
||||
var oriItem = AvailableItems[availableResultsListBox.SelectedIndices[0]];
|
||||
SelectedItems.Add(oriItem.Clone());
|
||||
RedrawAvailable();
|
||||
RedrawSelected();
|
||||
|
||||
/// Select the last item
|
||||
selectedResultsListViewEx.Focus();
|
||||
selectedResultsListViewEx.Items[SelectedItems.Count - 1].Selected = true;
|
||||
selectedResultsListViewEx.Items[SelectedItems.Count - 1].EnsureVisible();
|
||||
}
|
||||
}
|
||||
|
||||
void addButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
/// Append at the end, this code supports multiple selected items,
|
||||
/// although ListBox control settings may limit the max.number of selected items to one.
|
||||
|
||||
for (int i = availableResultsListBox.SelectedIndices.Count - 1; i >= 0; i--)
|
||||
{
|
||||
var oriItem = AvailableItems[availableResultsListBox.SelectedIndices[i]];
|
||||
SelectedItems.Add(oriItem.Clone());
|
||||
}
|
||||
RedrawAvailable();
|
||||
RedrawSelected();
|
||||
|
||||
/// Select the last item
|
||||
selectedResultsListViewEx.Focus();
|
||||
selectedResultsListViewEx.Items[SelectedItems.Count - 1].Selected = true;
|
||||
selectedResultsListViewEx.Items[SelectedItems.Count - 1].EnsureVisible();
|
||||
}
|
||||
|
||||
private void selectedResultsListBox_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
/// Double click works when just one item is selected
|
||||
|
||||
if (selectedResultsListViewEx.SelectedIndices.Count == 1)
|
||||
{
|
||||
SelectedItems.RemoveAt(selectedResultsListViewEx.SelectedIndices[0]);
|
||||
RedrawAvailable();
|
||||
RedrawSelected();
|
||||
}
|
||||
}
|
||||
|
||||
void removeButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
/// Remove from the list (the last selected item first so that the indexes are not affected)
|
||||
|
||||
for (int i = selectedResultsListViewEx.SelectedIndices.Count - 1; i >= 0; i--)
|
||||
{
|
||||
SelectedItems.RemoveAt(selectedResultsListViewEx.SelectedIndices[i]);
|
||||
}
|
||||
RedrawAvailable();
|
||||
RedrawSelected();
|
||||
}
|
||||
|
||||
void removeAllButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
/// Remove all items from 'Selected' list
|
||||
|
||||
SelectedItems.Clear();
|
||||
RedrawAvailable();
|
||||
RedrawSelected();
|
||||
}
|
||||
|
||||
void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void ResultsConfigDlg_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void upButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (selectedResultsListViewEx.SelectedIndices.Count != 1) return;
|
||||
|
||||
int selIdx = selectedResultsListViewEx.SelectedIndices[0];
|
||||
if (selIdx == 0)
|
||||
{
|
||||
/// Cannot move up
|
||||
selectedResultsListViewEx.Focus();
|
||||
selectedResultsListViewEx.Items[0].Selected = true;
|
||||
return;
|
||||
}
|
||||
|
||||
WMeterRsltItemSpec tmp = SelectedItems[selIdx - 1];
|
||||
SelectedItems[selIdx - 1] = SelectedItems[selIdx];
|
||||
SelectedItems[selIdx] = tmp;
|
||||
|
||||
RedrawSelected();
|
||||
|
||||
selectedResultsListViewEx.Focus();
|
||||
selectedResultsListViewEx.Items[selIdx - 1].Selected = true;
|
||||
selectedResultsListViewEx.Items[selIdx - 1].EnsureVisible();
|
||||
}
|
||||
|
||||
private void downButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (selectedResultsListViewEx.SelectedIndices.Count != 1) return;
|
||||
|
||||
int selIdx = selectedResultsListViewEx.SelectedIndices[0];
|
||||
if (selIdx == SelectedItems.Count - 1)
|
||||
{
|
||||
/// Cannot move down
|
||||
selectedResultsListViewEx.Focus();
|
||||
selectedResultsListViewEx.Items[SelectedItems.Count - 1].Selected = true;
|
||||
return;
|
||||
}
|
||||
|
||||
WMeterRsltItemSpec tmp = SelectedItems[selIdx + 1];
|
||||
SelectedItems[selIdx + 1] = SelectedItems[selIdx];
|
||||
SelectedItems[selIdx] = tmp;
|
||||
|
||||
RedrawSelected();
|
||||
|
||||
selectedResultsListViewEx.Focus();
|
||||
selectedResultsListViewEx.Items[selIdx + 1].Selected = true;
|
||||
selectedResultsListViewEx.Items[selIdx + 1].EnsureVisible();
|
||||
}
|
||||
}
|
||||
}
|
||||
+202
@@ -0,0 +1,202 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
namespace Results.Forms
|
||||
{
|
||||
partial class ResultsConfigDlg
|
||||
{
|
||||
/// <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.okButton = new System.Windows.Forms.Button();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.availableResultsListBox = new System.Windows.Forms.ListBox();
|
||||
this.availableResultsLabel = new System.Windows.Forms.Label();
|
||||
this.selectedResultsLabel = new System.Windows.Forms.Label();
|
||||
this.removeAllButton = new System.Windows.Forms.Button();
|
||||
this.removeButton = new System.Windows.Forms.Button();
|
||||
this.addButton = new System.Windows.Forms.Button();
|
||||
this.selectedResultsListViewEx = new ListViewEx();
|
||||
this.upButton = new System.Windows.Forms.Button();
|
||||
this.downButton = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.Location = new System.Drawing.Point(344, 401);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(104, 30);
|
||||
this.okButton.TabIndex = 4;
|
||||
this.okButton.Text = "OK";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Location = new System.Drawing.Point(465, 401);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(104, 30);
|
||||
this.cancelButton.TabIndex = 5;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// availableResultsListBox
|
||||
//
|
||||
this.availableResultsListBox.FormattingEnabled = true;
|
||||
this.availableResultsListBox.Location = new System.Drawing.Point(12, 31);
|
||||
this.availableResultsListBox.Name = "availableResultsListBox";
|
||||
this.availableResultsListBox.Size = new System.Drawing.Size(162, 355);
|
||||
this.availableResultsListBox.TabIndex = 6;
|
||||
this.availableResultsListBox.DoubleClick += new System.EventHandler(this.availableResultsListBox_DoubleClick);
|
||||
//
|
||||
// availableResultsLabel
|
||||
//
|
||||
this.availableResultsLabel.AutoSize = true;
|
||||
this.availableResultsLabel.Location = new System.Drawing.Point(12, 9);
|
||||
this.availableResultsLabel.Name = "availableResultsLabel";
|
||||
this.availableResultsLabel.Size = new System.Drawing.Size(86, 13);
|
||||
this.availableResultsLabel.TabIndex = 8;
|
||||
this.availableResultsLabel.Text = "Available results:";
|
||||
//
|
||||
// selectedResultsLabel
|
||||
//
|
||||
this.selectedResultsLabel.AutoSize = true;
|
||||
this.selectedResultsLabel.Location = new System.Drawing.Point(284, 9);
|
||||
this.selectedResultsLabel.Name = "selectedResultsLabel";
|
||||
this.selectedResultsLabel.Size = new System.Drawing.Size(85, 13);
|
||||
this.selectedResultsLabel.TabIndex = 9;
|
||||
this.selectedResultsLabel.Text = "Selected results:";
|
||||
//
|
||||
// removeAllButton
|
||||
//
|
||||
this.removeAllButton.Location = new System.Drawing.Point(184, 144);
|
||||
this.removeAllButton.Name = "removeAllButton";
|
||||
this.removeAllButton.Size = new System.Drawing.Size(94, 30);
|
||||
this.removeAllButton.TabIndex = 46;
|
||||
this.removeAllButton.Text = "<< R&emove all";
|
||||
this.removeAllButton.UseVisualStyleBackColor = true;
|
||||
this.removeAllButton.Click += new System.EventHandler(this.removeAllButton_Click);
|
||||
//
|
||||
// removeButton
|
||||
//
|
||||
this.removeButton.Location = new System.Drawing.Point(184, 109);
|
||||
this.removeButton.Name = "removeButton";
|
||||
this.removeButton.Size = new System.Drawing.Size(93, 30);
|
||||
this.removeButton.TabIndex = 45;
|
||||
this.removeButton.Text = "< &Remove";
|
||||
this.removeButton.UseVisualStyleBackColor = true;
|
||||
this.removeButton.Click += new System.EventHandler(this.removeButton_Click);
|
||||
//
|
||||
// addButton
|
||||
//
|
||||
this.addButton.Location = new System.Drawing.Point(184, 74);
|
||||
this.addButton.Name = "addButton";
|
||||
this.addButton.Size = new System.Drawing.Size(93, 30);
|
||||
this.addButton.TabIndex = 44;
|
||||
this.addButton.Text = "&Add >";
|
||||
this.addButton.UseVisualStyleBackColor = true;
|
||||
this.addButton.Click += new System.EventHandler(this.addButton_Click);
|
||||
//
|
||||
// selectedResultsListViewEx
|
||||
//
|
||||
this.selectedResultsListViewEx.AllowColumnReorder = true;
|
||||
this.selectedResultsListViewEx.DoubleClickActivation = false;
|
||||
this.selectedResultsListViewEx.FullRowSelect = true;
|
||||
this.selectedResultsListViewEx.Location = new System.Drawing.Point(287, 31);
|
||||
this.selectedResultsListViewEx.Name = "selectedResultsListViewEx";
|
||||
this.selectedResultsListViewEx.Size = new System.Drawing.Size(594, 355);
|
||||
this.selectedResultsListViewEx.TabIndex = 47;
|
||||
this.selectedResultsListViewEx.UseCompatibleStateImageBehavior = false;
|
||||
this.selectedResultsListViewEx.View = System.Windows.Forms.View.Details;
|
||||
this.selectedResultsListViewEx.SubItemClicked += new SubItemEventHandler(this.selectedResultsListViewEx_SubItemClicked);
|
||||
this.selectedResultsListViewEx.SubItemEndEditing += new SubItemEndEditingEventHandler(this.selectedResultsListViewEx_SubItemEndEditing);
|
||||
//
|
||||
// upButton
|
||||
//
|
||||
this.upButton.Location = new System.Drawing.Point(184, 236);
|
||||
this.upButton.Name = "upButton";
|
||||
this.upButton.Size = new System.Drawing.Size(93, 30);
|
||||
this.upButton.TabIndex = 48;
|
||||
this.upButton.Text = "Up";
|
||||
this.upButton.UseVisualStyleBackColor = true;
|
||||
this.upButton.Click += new System.EventHandler(this.upButton_Click);
|
||||
//
|
||||
// downButton
|
||||
//
|
||||
this.downButton.Location = new System.Drawing.Point(184, 272);
|
||||
this.downButton.Name = "downButton";
|
||||
this.downButton.Size = new System.Drawing.Size(93, 30);
|
||||
this.downButton.TabIndex = 49;
|
||||
this.downButton.Text = "Down";
|
||||
this.downButton.UseVisualStyleBackColor = true;
|
||||
this.downButton.Click += new System.EventHandler(this.downButton_Click);
|
||||
//
|
||||
// ResultsConfigDlg
|
||||
//
|
||||
this.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(893, 445);
|
||||
this.Controls.Add(this.downButton);
|
||||
this.Controls.Add(this.upButton);
|
||||
this.Controls.Add(this.selectedResultsListViewEx);
|
||||
this.Controls.Add(this.removeAllButton);
|
||||
this.Controls.Add(this.removeButton);
|
||||
this.Controls.Add(this.addButton);
|
||||
this.Controls.Add(this.selectedResultsLabel);
|
||||
this.Controls.Add(this.availableResultsLabel);
|
||||
this.Controls.Add(this.availableResultsListBox);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.Name = "ResultsConfigDlg";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "ResultsConfig";
|
||||
this.Load += new System.EventHandler(this.ResultsConfig_Load);
|
||||
this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.ResultsConfigDlg_KeyPress);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.ListBox availableResultsListBox;
|
||||
private System.Windows.Forms.Label availableResultsLabel;
|
||||
private System.Windows.Forms.Label selectedResultsLabel;
|
||||
private System.Windows.Forms.Button removeAllButton;
|
||||
private System.Windows.Forms.Button removeButton;
|
||||
private System.Windows.Forms.Button addButton;
|
||||
private ListViewEx selectedResultsListViewEx;
|
||||
private System.Windows.Forms.Button upButton;
|
||||
private System.Windows.Forms.Button downButton;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,197 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Results.Entities;
|
||||
using Results.Resources;
|
||||
|
||||
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", Strings.Test, x => x.Name(), (x, y, z) => z.Name()));
|
||||
AllItems.Add(new ItemSpec("Procedure name", Strings.Procedure, x => x.ProcedureName(), (x, y, z) => z.ProcedureName()));
|
||||
AllItems.Add(new ItemSpec("Batch number", Strings.Batch_nr, x => x.BatchNr().ToString(), (x, y, z) => z.BatchNr().ToString()));
|
||||
AllItems.Add(new ItemSpec("Test method", Strings.Test_method, x => x.Method(), (x, y, z) => z.Method()));
|
||||
AllItems.Add(new ItemSpec("Density", Strings.Density, x => x.DensityOut().ToString("F1"), (x, y, z) => z.DensityOut().ToString("F1"))); /// [kg/m3]
|
||||
|
||||
/// Target values
|
||||
AllItems.Add(new ItemSpec("Q from", Strings.Q_from_m3ph, x => x.Qfrom().ToString("F3"), (x, y, z) => z.Qfrom().ToString("F3")));
|
||||
AllItems.Add(new ItemSpec("Q to", Strings.Q_to_m3ph, x => x.Qto().ToString("F3"), (x, y, z) => z.Qto().ToString("F3")));
|
||||
AllItems.Add(new ItemSpec("Test volume", Strings.Test_vol_l, x => x.TargetVolume().ToString("F1"), (x, y, z) => z.TargetVolume().ToString("F1")));
|
||||
AllItems.Add(new ItemSpec("Error limit Lo", Strings.ErrLimLo_pct, x => x.ErrLimLo().ToString("F1"), (x, y, z) => z.ErrLimLo().ToString("F1")));
|
||||
AllItems.Add(new ItemSpec("Error limit Hi", Strings.ErrLimHi_pct, x => x.ErrLimHi().ToString("F1"), (x, y, z) => z.ErrLimHi().ToString("F1")));
|
||||
AllItems.Add(new ItemSpec("Uncertainty", Strings.Uncertainty_pct, x => x.Uncertainty().ToString("F2"), (x, y, z) => z.Uncertainty().ToString("F2")));
|
||||
|
||||
/// Test results
|
||||
AllItems.Add(new ItemSpec("Test start time", Strings.T_start, x => x.StartTime().ToShortTimeString(), (x, y, z) => z.StartTime().ToShortTimeString()));
|
||||
AllItems.Add(new ItemSpec("Test end time", Strings.T_end, x => x.EndTime().ToShortTimeString(), (x, y, z) => z.EndTime().ToShortTimeString()));
|
||||
AllItems.Add(new ItemSpec("Test time", Strings.T_s, x => x.TestTime.ToString("F2"), (x, y, z) => z.TestTime.ToString("F2")));
|
||||
AllItems.Add(new ItemSpec("Flow", Strings.Flow_m3ph, x => Utils.DoubleToStr(x.FlowVolume(), 4), (x, y, z) => Utils.DoubleToStr(z.FlowVolume(), 4)));
|
||||
AllItems.Add(new ItemSpec("T in", Strings.T_in_degC, x => x.TestRslt.TempInAvrg.ToString("F2"), (x, y, z) => z.TestRslt.TempInAvrg.ToString("F2")));
|
||||
AllItems.Add(new ItemSpec("T out", Strings.T_out_degC, x => x.TestRslt.TempOutAvrg.ToString("F2"), (x, y, z) => z.TestRslt.TempOutAvrg.ToString("F2")));
|
||||
AllItems.Add(new ItemSpec("T div", Strings.T_div_degC, x => x.TestRslt.TempDivAvrg.ToString("F2"), (x, y, z) => z.TestRslt.TempDivAvrg.ToString("F2")));
|
||||
AllItems.Add(new ItemSpec("P up", Strings.P_up_kPa, x => x.TestRslt.PressUpAvrg.ToString("F3"), (x, y, z) => z.TestRslt.PressUpAvrg.ToString("F3")));
|
||||
AllItems.Add(new ItemSpec("P up start", Strings.P_up_start_kPa, x => x.TestRslt.PressUpStart.ToString("F3"), (x, y, z) => z.TestRslt.PressUpStart.ToString("F3")));
|
||||
AllItems.Add(new ItemSpec("P up end", Strings.P_up_end_kPa, x => x.TestRslt.PressUpEnd.ToString("F3"), (x, y, z) => z.TestRslt.PressUpEnd.ToString("F3")));
|
||||
AllItems.Add(new ItemSpec("P down", Strings.P_dn_kPa, x => x.TestRslt.PressDownAvrg.ToString("F3"), (x, y, z) => z.TestRslt.PressDownAvrg.ToString("F3")));
|
||||
AllItems.Add(new ItemSpec("P down start", Strings.P_dn_start_kPa, x => x.TestRslt.PressDownStart.ToString("F3"), (x, y, z) => z.TestRslt.PressDownStart.ToString("F3")));
|
||||
AllItems.Add(new ItemSpec("P down end", Strings.P_dn_end_kPa, x => x.TestRslt.PressDownEnd.ToString("F3"), (x, y, z) => z.TestRslt.PressDownEnd.ToString("F3")));
|
||||
AllItems.Add(new ItemSpec("Reference error", Strings.ErrRef_pct, x => x.TestRslt.ErrorMaster.ToString("F3"), (x, y, z) => z.TestRslt.ErrorMaster.ToString("F3")));
|
||||
AllItems.Add(new ItemSpec("Ambient temperature",Strings.T_amb_degC, x => x.TestRslt.AmbientTempAve.ToString("F1"), (x, y, z) => z.TestRslt.AmbientTempAve.ToString("F1")));
|
||||
AllItems.Add(new ItemSpec("Ambient pressure", Strings.P_amb_mbar, x => x.TestRslt.AmbientPressAve.ToString("F0"),(x, y, z) => z.TestRslt.AmbientPressAve.ToString("F0")));
|
||||
AllItems.Add(new ItemSpec("Ambient humidity", Strings.H_amb_pct, x => x.TestRslt.AmbientHumiAve.ToString("F1"), (x, y, z) => z.TestRslt.AmbientHumiAve.ToString("F1")));
|
||||
|
||||
/// Single and combined meter results
|
||||
AllItems.Add(new ItemSpec("Volume", Strings.Volume_l, x => x.VolumeMeter.ToString("F3"), (x, y, z) => z.VolumeMeter.ToString("F3")));
|
||||
AllItems.Add(new ItemSpec("Reference volume", Strings.VolRef_l, x => x.VolumeRef.ToString("F3"), (x, y, z) => z.VolumeRef.ToString("F3")));
|
||||
AllItems.Add(new ItemSpec("Error", Strings.Error_pct, x => x.Error.ToString("F2"), (x, y, z) => z.Error.ToString("F2")));
|
||||
AllItems.Add(new ItemSpec("Passed", Strings.Result, x => x.PassedColorStr(), (x, y, z) => z.PassedColorStr()));
|
||||
|
||||
/// Water meter info
|
||||
AllItems.Add(new ItemSpec("Watermeter type", Strings.WM_Type, x => x.WaterMeterData().ProductName, (x, y, z) => z.WaterMeterData().ProductName));
|
||||
AllItems.Add(new ItemSpec("Producer", Strings.Producer, x => x.WaterMeterData().Producer, (x, y, z) => z.WaterMeterData().Producer));
|
||||
AllItems.Add(new ItemSpec("Metrological class", Strings.MClass, x => x.WaterMeterData().MetrologicalClass, (x, y, z) => z.WaterMeterData().MetrologicalClass));
|
||||
AllItems.Add(new ItemSpec("Approval info", Strings.Approval, x => x.WaterMeterData().ApprovalInfo, (x, y, z) => z.WaterMeterData().ApprovalInfo));
|
||||
AllItems.Add(new ItemSpec("Q4", Strings.Q4_m3ph, x => x.WaterMeterData().Q4_Qmax.ToString(), (x, y, z) => z.WaterMeterData().Q4_Qmax.ToString()));
|
||||
AllItems.Add(new ItemSpec("Q3", Strings.Q3_m3ph, x => x.WaterMeterData().Q3_Qn.ToString(), (x, y, z) => z.WaterMeterData().Q3_Qn.ToString()));
|
||||
AllItems.Add(new ItemSpec("Q2", Strings.Q2_m3ph, x => x.WaterMeterData().Q2_Qt.ToString(), (x, y, z) => z.WaterMeterData().Q2_Qt.ToString()));
|
||||
AllItems.Add(new ItemSpec("Q1", Strings.Q1_m3ph, x => x.WaterMeterData().Q1_Qmin.ToString(), (x, y, z) => z.WaterMeterData().Q1_Qmin.ToString()));
|
||||
AllItems.Add(new ItemSpec("Qmax", Strings.Qmax_m3ph, x => x.WaterMeterData().Q4_Qmax.ToString(), (x, y, z) => z.WaterMeterData().Q4_Qmax.ToString()));
|
||||
AllItems.Add(new ItemSpec("Qn", Strings.Qn_m3ph, x => x.WaterMeterData().Q3_Qn.ToString(), (x, y, z) => z.WaterMeterData().Q3_Qn.ToString()));
|
||||
AllItems.Add(new ItemSpec("Qt", Strings.Qt_m3ph, x => x.WaterMeterData().Q2_Qt.ToString(), (x, y, z) => z.WaterMeterData().Q2_Qt.ToString()));
|
||||
AllItems.Add(new ItemSpec("Qmin", Strings.Qmin_m3ph, x => x.WaterMeterData().Q1_Qmin.ToString(), (x, y, z) => z.WaterMeterData().Q1_Qmin.ToString()));
|
||||
|
||||
/// Water meters results
|
||||
AllItems.Add(new ItemSpec("Serial Nr", Strings.sn, x => x.WaterMeter.SerialNr, (x, y, z) => z.WaterMeter.SerialNr));
|
||||
AllItems.Add(new ItemSpec("Purchase order", Strings.PO, x => x.WaterMeter.PurchaseOrder, (x, y, z) => z.WaterMeter.PurchaseOrder));
|
||||
AllItems.Add(new ItemSpec("Year of production", Strings.Year, x => x.WaterMeter.YearOfProduction.ToString(), (x, y, z) => z.WaterMeter.YearOfProduction.ToString()));
|
||||
AllItems.Add(new ItemSpec("WM Position", Strings.Pos, x => x.WaterMeter.WMPosition.ToString(), (x, y, z) => z.WaterMeter.WMPosition.ToString()));
|
||||
|
||||
/// Water meters results (single)
|
||||
AllItems.Add(new ItemSpec("End state", Strings.End_state, x => x.EndState(), null));
|
||||
AllItems.Add(new ItemSpec("Pulses", Strings.Pulses, x => x.PulsesMeter.ToString(), null));
|
||||
AllItems.Add(new ItemSpec("Pulses/liter", Strings.PulsesLiter, x => x.PulsesPerLiter.ToString(), null));
|
||||
AllItems.Add(new ItemSpec("Reference pulses", Strings.RefPulses, x => x.PulsesMaster.ToString(), null));
|
||||
|
||||
/// Water meters results (combined)
|
||||
AllItems.Add(new ItemSpec("Q rise", Strings.Q_rise_m3ph, null, (x, y, z) => (z.QRise() == 0) ? "-" : Utils.DoubleToStr(z.QRise(), 4)));
|
||||
AllItems.Add(new ItemSpec("Q fall", Strings.Q_fall_m3ph, null, (x, y, z) => (z.QFall() == 0) ? "-" : Utils.DoubleToStr(z.QFall(), 4)));
|
||||
AllItems.Add(new ItemSpec("Error large WM", Strings.Err_main_pct, null, (x, y, z) => x.Error.ToString("F2")));
|
||||
AllItems.Add(new ItemSpec("Error small WM", Strings.Err_aux_pct, null, (x, y, z) => y.Error.ToString("F2")));
|
||||
AllItems.Add(new ItemSpec("Serial Nr large WM", Strings.sn_main, null, (x, y, z) => x.SerialNr()));
|
||||
AllItems.Add(new ItemSpec("Serial Nr small WM", Strings.sn_aux, null, (x, y, z) => y.SerialNr()));
|
||||
AllItems.Add(new ItemSpec("End state large WM", Strings.EndState_main, null, (x, y, z) => x.EndState()));
|
||||
AllItems.Add(new ItemSpec("End state small WM", Strings.EndState_aux, null, (x, y, z) => y.EndState()));
|
||||
|
||||
/// Batch info
|
||||
AllItems.Add(new ItemSpec("Batch number", Strings.Batch_nr, x => x.Batch().BatchNr.ToString(), (x, y, z) => x.Batch().BatchNr.ToString()));
|
||||
AllItems.Add(new ItemSpec("Test bench ID", Strings.Bench, x => x.Batch().TestBenchId.ToString(), (x, y, z) => x.Batch().TestBenchId.ToString()));
|
||||
AllItems.Add(new ItemSpec("Program version", Strings.Ver, x => x.Batch().ProgramVersion, (x, y, z) => x.Batch().ProgramVersion));
|
||||
AllItems.Add(new ItemSpec("User name", Strings.User, x => x.Batch().UserName, (x, y, z) => x.Batch().UserName));
|
||||
AllItems.Add(new ItemSpec("User nr.", Strings.User_nr, x => x.Batch().UserNumber.ToString(), (x, y, z) => x.Batch().UserNumber.ToString()));
|
||||
AllItems.Add(new ItemSpec("Procedure name", Strings.Procedure, x => x.Batch().ProcedureName, (x, y, z) => x.Batch().ProcedureName));
|
||||
AllItems.Add(new ItemSpec("Watermeters", Strings.WMs, x => x.Batch().WatermetersStr, (x, y, z) => x.Batch().WatermetersStr));
|
||||
AllItems.Add(new ItemSpec("Protocol title", Strings.Protocol, x => x.Batch().ProtocolTitle, (x, y, z) => x.Batch().ProtocolTitle));
|
||||
AllItems.Add(new ItemSpec("Batch start time", Strings.Start, x => x.Batch().StartTime.ToShortTimeString(), (x, y, z) => x.Batch().StartTime.ToShortTimeString()));
|
||||
AllItems.Add(new ItemSpec("Batch end time", Strings.End, x => x.Batch().EndTime.ToShortTimeString(), (x, y, z) => x.Batch().EndTime.ToShortTimeString()));
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
///
|
||||
/// 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.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,56 @@
|
||||
///
|
||||
/// 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 IPERLST || IPERLST_SPECIAL
|
||||
Map(x => x.WMTypeId);
|
||||
Map(x => x.WMTypeRev);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
///
|
||||
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);
|
||||
#if IPERLST || IPERLST_SPECIAL
|
||||
Map(x => x.SerialNrEx);
|
||||
Map(x => x.OrigCalibFactor);
|
||||
Map(x => x.CalibFactor);
|
||||
Map(x => x.Q2ErrWOCorrection);
|
||||
Map(x => x.Q2CorrectionDone);
|
||||
Map(x => x.Q2Correction);
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,388 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Printing;
|
||||
using Config.Entities;
|
||||
|
||||
namespace Results.Output.Printers.Munich
|
||||
{
|
||||
public class MunichPrintDocument : PrintDocument
|
||||
{
|
||||
const string FontFamilyName = "Arial"; //"Times New Roman";
|
||||
|
||||
const int SpacingOne = 18;
|
||||
const int SpacingOneAndHalf = (3 * SpacingOne) / 2;
|
||||
const int TitleX = 240;
|
||||
const int TitleY = 180; /// Depends on the size of the header
|
||||
const int FirstLineNr = 14; /// Depends on the size of the header
|
||||
const int Tab1 = 80; /// Positions of columns above the table
|
||||
const int Tab2 = 240;
|
||||
const int Tab3 = 430;
|
||||
const int Tab4 = 590;
|
||||
const int BorderW = 1; /// Table border line width
|
||||
const int MarginTop = 7; /// Margins of the text from table lines
|
||||
const int MarginLeft = 4; /// Margins of the text from table lines
|
||||
|
||||
///
|
||||
/// Data to print
|
||||
///
|
||||
readonly string docVersion;
|
||||
readonly Results.Entities.WaterMeter wm;
|
||||
string zaehlertyp;
|
||||
string pruefvorlage;
|
||||
|
||||
readonly IList<Results.Entities.MeterTestRslt> results;
|
||||
readonly int resultsCount;
|
||||
readonly bool compound; /// true when MetersKind is MetersKind.Combined
|
||||
|
||||
readonly int secondTableOffset; /// Calculated in the constructor
|
||||
|
||||
/// Top coordinate of the table
|
||||
int top;
|
||||
|
||||
/// <summary>
|
||||
/// Property variable for the Font the user wishes to use
|
||||
/// </summary>
|
||||
Font font;
|
||||
Font boldFont;
|
||||
Font fontTitle;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="textToPrint">Text to be printed</param>
|
||||
public MunichPrintDocument(string docVersion,
|
||||
Results.Entities.WaterMeter wm,
|
||||
PageOrientation pageOrientation)
|
||||
{
|
||||
this.docVersion = docVersion;
|
||||
this.wm = wm;
|
||||
compound = wm.Compound();
|
||||
|
||||
string[] info = wm.ProductName().Split(new char[] { ';' });
|
||||
if (info.Length >= 2)
|
||||
{
|
||||
pruefvorlage = info[0];
|
||||
zaehlertyp = info[1];
|
||||
}
|
||||
else if (info.Length == 1)
|
||||
{
|
||||
pruefvorlage = info[0];
|
||||
zaehlertyp = compound ? "Verbundzähler" : "Einzelzähler";
|
||||
}
|
||||
else
|
||||
{
|
||||
pruefvorlage = wm.ProcedureName();
|
||||
zaehlertyp = compound ? "Verbundzähler" : "Einzelzähler";
|
||||
}
|
||||
|
||||
results = wm.MeterTestRslts;
|
||||
this.resultsCount = compound ? (results.Count / 3) : results.Count;
|
||||
|
||||
int resultsCount = wm.MeterTestRslts.Count;
|
||||
if (compound) resultsCount /= 3;
|
||||
|
||||
secondTableOffset = (resultsCount + 2) * SpacingOneAndHalf;
|
||||
|
||||
DefaultPageSettings.Landscape = (pageOrientation == PageOrientation.Landscape);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override the default onbeginPrint method of the PrintDocument Object.
|
||||
/// </summary>
|
||||
/// <param name=e></param>
|
||||
/// <remarks></remarks>
|
||||
protected override void OnBeginPrint(System.Drawing.Printing.PrintEventArgs e)
|
||||
{
|
||||
base.OnBeginPrint(e);
|
||||
|
||||
if (font == null) { font = new Font(FontFamilyName, 10, FontStyle.Regular); }
|
||||
if (boldFont == null) { boldFont = new Font(FontFamilyName, 10, FontStyle.Bold); }
|
||||
if (fontTitle == null) { fontTitle = new Font(FontFamilyName, 24, FontStyle.Bold); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override the default OnPrintPage method of the PrintDocument.
|
||||
/// </summary>
|
||||
/// <param name=e></param>
|
||||
/// <remarks>This provides the print logic for our document</remarks>
|
||||
protected override void OnPrintPage(System.Drawing.Printing.PrintPageEventArgs e)
|
||||
{
|
||||
// Run base code
|
||||
base.OnPrintPage(e);
|
||||
|
||||
e.Graphics.DrawImageUnscaled(Results.Properties.Resources.Headpic, 0, 0);
|
||||
|
||||
/// Set print area size and margins (in dots using 80 dpi)
|
||||
int printHeight = base.DefaultPageSettings.PaperSize.Height - base.DefaultPageSettings.Margins.Top - base.DefaultPageSettings.Margins.Bottom;
|
||||
int printWidth = base.DefaultPageSettings.PaperSize.Width - base.DefaultPageSettings.Margins.Left - base.DefaultPageSettings.Margins.Right;
|
||||
int leftMargin = base.DefaultPageSettings.Margins.Left; /// X
|
||||
int topMargin = base.DefaultPageSettings.Margins.Top; /// Y
|
||||
|
||||
/// Check if the user selected to print in Landscape mode
|
||||
/// if they did then we need to swap height/width parameters
|
||||
if (base.DefaultPageSettings.Landscape)
|
||||
{
|
||||
int tmp = printHeight;
|
||||
printHeight = printWidth;
|
||||
printWidth = tmp;
|
||||
}
|
||||
|
||||
int x = leftMargin;
|
||||
int y = topMargin;
|
||||
|
||||
/// Use the StringFormat class for the text layout of our document
|
||||
StringFormat format = new StringFormat(StringFormatFlags.LineLimit);
|
||||
|
||||
RectangleF printArea = new RectangleF(TitleX, TitleY, 667, 50);
|
||||
e.Graphics.DrawString(wm.Batch.ProtocolTitle, this.fontTitle, Brushes.Black, printArea);
|
||||
|
||||
int lineNr = FirstLineNr;
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, docVersion);
|
||||
lineNr++;
|
||||
PrintBoldAt(e, Tab1, lineNr * SpacingOne, "Prüfstand Nr :");
|
||||
PrintBoldAt(e, Tab2, lineNr * SpacingOne, wm.BenchId().ToString());
|
||||
PrintBoldAt(e, Tab3, lineNr * SpacingOne, "Datum :");
|
||||
PrintBoldAt(e, Tab4, lineNr * SpacingOne, wm.Batch.EndTime.Date.ToString("d"));
|
||||
lineNr++;
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Zählertyp :");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, zaehlertyp);
|
||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Eichjahr :");
|
||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.YearOfProduction.ToString());
|
||||
lineNr++;
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Prüfvorlage :");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, pruefvorlage);
|
||||
lineNr += 2;
|
||||
|
||||
if (compound)
|
||||
{
|
||||
PrintBoldAt(e, Tab1, lineNr * SpacingOne, "Hauptzahler");
|
||||
PrintBoldAt(e, Tab3, lineNr * SpacingOne, "Nebenzahler");
|
||||
lineNr++;
|
||||
}
|
||||
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Hersteller :");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.Producer());
|
||||
if (compound)
|
||||
{
|
||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Hersteller :");
|
||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.ProducerAux());
|
||||
}
|
||||
lineNr++;
|
||||
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Seriennummer :");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.SerialNr);
|
||||
if (compound)
|
||||
{
|
||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Seriennummer :");
|
||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.SerialNrAux);
|
||||
}
|
||||
lineNr++;
|
||||
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Qn :");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.Q3_Qn().ToString());
|
||||
if (compound)
|
||||
{
|
||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Qn :");
|
||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.Q3_Qn_Aux().ToString());
|
||||
}
|
||||
lineNr++;
|
||||
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Zulassungszeichen :");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.ApprovalInfo());
|
||||
if (compound)
|
||||
{
|
||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Zulassungszeichen :");
|
||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.ApprovalInfoAux());
|
||||
}
|
||||
lineNr++;
|
||||
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Metr. klasse :");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.MetrologicalClass());
|
||||
if (compound)
|
||||
{
|
||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Metr. klasse :");
|
||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.MetrologicalClassAux());
|
||||
}
|
||||
lineNr++;
|
||||
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Stand :");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.EndState);
|
||||
if (compound)
|
||||
{
|
||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Stand :");
|
||||
PrintAt(e, Tab4, lineNr * SpacingOne, wm.EndStateAux);
|
||||
|
||||
lineNr += 2;
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Umschaltpunkte :");
|
||||
lineNr++;
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Qsteig");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, (1000.0 * wm.QRise).ToString("F1") + " l/h");
|
||||
lineNr++;
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Qfall");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, (1000.0 * wm.QFall).ToString("F1") + " l/h");
|
||||
}
|
||||
|
||||
lineNr += 2;
|
||||
top = SpacingOne * lineNr;
|
||||
|
||||
PrintTable(e);
|
||||
DrawTable(e);
|
||||
|
||||
lineNr += (secondTableOffset * 2) / SpacingOne;
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Temperatur");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.Batch.AmbientTempAve().ToString("F1") + " \x00b0C");
|
||||
lineNr++;
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Feuchtigkeit");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.Batch.AmbientHumiAve().ToString("F0") + " %");
|
||||
lineNr++;
|
||||
PrintAt(e, Tab1, lineNr * SpacingOne, "Luftdruck");
|
||||
PrintAt(e, Tab2, lineNr * SpacingOne, wm.Batch.AmbientPressAve().ToString("F0") + " mbar");
|
||||
|
||||
lineNr++;
|
||||
PrintAt(e, Tab3, lineNr * SpacingOne, wm.Batch.EndTime.Date.ToString("d"));
|
||||
lineNr ++;
|
||||
PrintAt(e, Tab3, lineNr * SpacingOne, "Datum");
|
||||
PrintAt(e, Tab4, lineNr * SpacingOne, "Unterschrift");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Print table texts.
|
||||
/// </summary>
|
||||
void PrintTable(System.Drawing.Printing.PrintPageEventArgs e)
|
||||
{
|
||||
PrintAt(e, FromTest(-1, -1), "Prüflauf");
|
||||
PrintAt(e, FromTest(-1, 0), "Q [l/h]");
|
||||
PrintAt(e, FromTest(-1, 1), "Prüf-Vol.[l]");
|
||||
PrintAt(e, FromTest(-1, 2), compound ? "HZ-Vol.[l]" : "Z-Vol.[l]");
|
||||
PrintAt(e, FromTest(-1, 3), compound ? "NZ-Vol.[l]" : "-");
|
||||
PrintAt(e, FromTest(-1, 4), "Fehler [%]");
|
||||
PrintAt(e, FromTest(-1, 5), "Ergebnis");
|
||||
|
||||
PrintAt(e, FromTest(-1, 6), "Q [l/h]");
|
||||
PrintAt(e, FromTest(-1, 7), "Temperatur");
|
||||
PrintAt(e, FromTest(-1, 8), "Dichte");
|
||||
PrintAt(e, FromTest(-1, 9), "Prüfzeit");
|
||||
PrintAt(e, FromTest(-1, 10), "Druck Eing.");
|
||||
PrintAt(e, FromTest(-1, 11), "Druck Ausg.");
|
||||
|
||||
int rowCnt = 0;
|
||||
foreach (var mtr in wm.MeterTestRslts)
|
||||
{
|
||||
if (!compound || mtr.CompoundMeterId == (byte)CompoundMeterId.Compound)
|
||||
{
|
||||
Point p = FromTest(rowCnt, -1);
|
||||
PrintAt(e, p.X, p.Y, mtr.Name());
|
||||
PrintAt(e, p.X, p.Y + (resultsCount + 2) * SpacingOneAndHalf, mtr.Name());
|
||||
|
||||
PrintAt(e, FromTest(rowCnt, 0), mtr.TestRslt.FlowMass.ToString("F1"));
|
||||
PrintAt(e, FromTest(rowCnt, 1), mtr.TestRslt.VolumeCTV.ToString("F2"));
|
||||
if (compound)
|
||||
{
|
||||
Results.Entities.MeterTestRslt mainMtr = wm.GetMeterTestRslt(mtr.Name(), CompoundMeterId.CompoundMain);
|
||||
Results.Entities.MeterTestRslt auxMtr = wm.GetMeterTestRslt(mtr.Name(), CompoundMeterId.CompoundMain);
|
||||
|
||||
PrintAt(e, FromTest(rowCnt, 2), mainMtr.VolumeMeter.ToString("F2"));
|
||||
PrintAt(e, FromTest(rowCnt, 3), auxMtr.VolumeMeter.ToString("F2"));
|
||||
PrintAt(e, FromTest(rowCnt, 4), mtr.Error.ToString("F2"));
|
||||
PrintAt(e, FromTest(rowCnt, 5), mtr.Passed ? "iO" : "NiO");
|
||||
}
|
||||
else
|
||||
{
|
||||
PrintAt(e, FromTest(rowCnt, 2), mtr.VolumeMeter.ToString("F2"));
|
||||
PrintAt(e, FromTest(rowCnt, 3), "-");
|
||||
PrintAt(e, FromTest(rowCnt, 4), mtr.Error.ToString("F2"));
|
||||
PrintAt(e, FromTest(rowCnt, 5), mtr.Passed ? "iO" : "NiO");
|
||||
}
|
||||
PrintAt(e, FromTest(rowCnt, 6), mtr.TestRslt.FlowMass.ToString("F1"));
|
||||
PrintAt(e, FromTest(rowCnt, 7), mtr.TestRslt.TempOutAvrg.ToString("F2"));
|
||||
PrintAt(e, FromTest(rowCnt, 8), mtr.TestRslt.DensityDiv.ToString("F2"));
|
||||
PrintAt(e, FromTest(rowCnt, 9), mtr.TestTime.ToString("F1"));
|
||||
PrintAt(e, FromTest(rowCnt, 10), mtr.TestRslt.PressUpAvrg.ToString("F2"));
|
||||
PrintAt(e, FromTest(rowCnt, 11), mtr.TestRslt.PressDownAvrg.ToString("F2"));
|
||||
|
||||
rowCnt++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Draw table lines.
|
||||
/// </summary>
|
||||
void DrawTable(System.Drawing.Printing.PrintPageEventArgs e)
|
||||
{
|
||||
int mid = top + SpacingOneAndHalf;
|
||||
int bot = top + (resultsCount + 1) * SpacingOneAndHalf;
|
||||
|
||||
int top2 = top + secondTableOffset;
|
||||
int mid2 = mid + secondTableOffset;
|
||||
int bot2 = bot + secondTableOffset;
|
||||
|
||||
// Horizontal lines
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(80, top), new Point(747, top));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(80, mid), new Point(747, mid));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(80, bot), new Point(747, bot));
|
||||
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(80, top2), new Point(747, top2));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(80, mid2), new Point(747, mid2));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(80, bot2), new Point(747, bot2));
|
||||
|
||||
// Vertical lines
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point( 80, top), new Point( 80, bot));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(267, top), new Point(267, bot));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(347, top), new Point(347, bot));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(427, top), new Point(427, bot));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(507, top), new Point(507, bot));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(587, top), new Point(587, bot));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(667, top), new Point(667, bot));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(747, top), new Point(747, bot));
|
||||
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point( 80, top2), new Point( 80, bot2));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(267, top2), new Point(267, bot2));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(347, top2), new Point(347, bot2));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(427, top2), new Point(427, bot2));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(507, top2), new Point(507, bot2));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(587, top2), new Point(587, bot2));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(667, top2), new Point(667, bot2));
|
||||
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(747, top2), new Point(747, bot2));
|
||||
}
|
||||
|
||||
void PrintAt(System.Drawing.Printing.PrintPageEventArgs e, Point p, string text)
|
||||
{
|
||||
PrintAt(e, p.X, p.Y, text);
|
||||
}
|
||||
|
||||
void PrintAt(System.Drawing.Printing.PrintPageEventArgs e, int x, int y, string text)
|
||||
{
|
||||
RectangleF printArea = new RectangleF(x, y, 667, SpacingOne);
|
||||
e.Graphics.DrawString(text, this.font, Brushes.Black, printArea);
|
||||
}
|
||||
|
||||
void PrintBoldAt(System.Drawing.Printing.PrintPageEventArgs e, Point p, string text)
|
||||
{
|
||||
PrintBoldAt(e, p.X, p.Y, text);
|
||||
}
|
||||
|
||||
void PrintBoldAt(System.Drawing.Printing.PrintPageEventArgs e, int x, int y, string text)
|
||||
{
|
||||
RectangleF printArea = new RectangleF(x, y, 667, SpacingOne);
|
||||
e.Graphics.DrawString(text, this.boldFont, Brushes.Black, printArea);
|
||||
}
|
||||
|
||||
Point FromTest(int testNr, int parNr)
|
||||
{
|
||||
const int NrParamsInOneTableRow = 6;
|
||||
|
||||
int x = 267 + (parNr % NrParamsInOneTableRow) * 80 + MarginLeft;
|
||||
int y = top + SpacingOneAndHalf + MarginTop + testNr * SpacingOneAndHalf
|
||||
+ ((parNr >= NrParamsInOneTableRow) ? secondTableOffset : 0);
|
||||
|
||||
if (parNr < 0) x = 80 + MarginLeft; /// When parNr == -1 return the left column x coordinate
|
||||
|
||||
return new Point(x, y);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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.7.297.0")]
|
||||
[assembly: AssemblyFileVersion("2.7.297.0")]
|
||||
|
||||
Generated
+73
@@ -0,0 +1,73 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Results.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Results.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Headpic {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Headpic", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
<?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.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="Headpic" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Headpic.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
Generated
+837
@@ -0,0 +1,837 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Results.Resources {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Strings {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Strings() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Results.Resources.Strings", typeof(Strings).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Add >.
|
||||
/// </summary>
|
||||
internal static string Add {
|
||||
get {
|
||||
return ResourceManager.GetString("Add", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Alignment.
|
||||
/// </summary>
|
||||
internal static string Alignment {
|
||||
get {
|
||||
return ResourceManager.GetString("Alignment", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Approval.
|
||||
/// </summary>
|
||||
internal static string Approval {
|
||||
get {
|
||||
return ResourceManager.GetString("Approval", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Available results.
|
||||
/// </summary>
|
||||
internal static string Available_results {
|
||||
get {
|
||||
return ResourceManager.GetString("Available_results", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Batch nr..
|
||||
/// </summary>
|
||||
internal static string Batch_nr {
|
||||
get {
|
||||
return ResourceManager.GetString("Batch_nr", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Bench.
|
||||
/// </summary>
|
||||
internal static string Bench {
|
||||
get {
|
||||
return ResourceManager.GetString("Bench", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Cancel.
|
||||
/// </summary>
|
||||
internal static string CancelBtnText {
|
||||
get {
|
||||
return ResourceManager.GetString("CancelBtnText", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Caption.
|
||||
/// </summary>
|
||||
internal static string Caption {
|
||||
get {
|
||||
return ResourceManager.GetString("Caption", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Configuration.
|
||||
/// </summary>
|
||||
internal static string Configuration {
|
||||
get {
|
||||
return ResourceManager.GetString("Configuration", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Density.
|
||||
/// </summary>
|
||||
internal static string Density {
|
||||
get {
|
||||
return ResourceManager.GetString("Density", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Down.
|
||||
/// </summary>
|
||||
internal static string DownBtnText {
|
||||
get {
|
||||
return ResourceManager.GetString("DownBtnText", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to End.
|
||||
/// </summary>
|
||||
internal static string End {
|
||||
get {
|
||||
return ResourceManager.GetString("End", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to End state.
|
||||
/// </summary>
|
||||
internal static string End_state {
|
||||
get {
|
||||
return ResourceManager.GetString("End_state", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to End state aux..
|
||||
/// </summary>
|
||||
internal static string EndState_aux {
|
||||
get {
|
||||
return ResourceManager.GetString("EndState_aux", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to End state main.
|
||||
/// </summary>
|
||||
internal static string EndState_main {
|
||||
get {
|
||||
return ResourceManager.GetString("EndState_main", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Err. aux. [%].
|
||||
/// </summary>
|
||||
internal static string Err_aux_pct {
|
||||
get {
|
||||
return ResourceManager.GetString("Err_aux_pct", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Err. main [%].
|
||||
/// </summary>
|
||||
internal static string Err_main_pct {
|
||||
get {
|
||||
return ResourceManager.GetString("Err_main_pct", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Err.Lim.Hi [%].
|
||||
/// </summary>
|
||||
internal static string ErrLimHi_pct {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrLimHi_pct", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Err.Lim.Lo [%].
|
||||
/// </summary>
|
||||
internal static string ErrLimLo_pct {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrLimLo_pct", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Error [%].
|
||||
/// </summary>
|
||||
internal static string Error_pct {
|
||||
get {
|
||||
return ResourceManager.GetString("Error_pct", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Err.ref. [%].
|
||||
/// </summary>
|
||||
internal static string ErrRef_pct {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrRef_pct", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Flow [m3/h].
|
||||
/// </summary>
|
||||
internal static string Flow_m3ph {
|
||||
get {
|
||||
return ResourceManager.GetString("Flow_m3ph", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Format.
|
||||
/// </summary>
|
||||
internal static string Format {
|
||||
get {
|
||||
return ResourceManager.GetString("Format", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to H amb [%].
|
||||
/// </summary>
|
||||
internal static string H_amb_pct {
|
||||
get {
|
||||
return ResourceManager.GetString("H_amb_pct", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Item.
|
||||
/// </summary>
|
||||
internal static string Item {
|
||||
get {
|
||||
return ResourceManager.GetString("Item", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to M.Class.
|
||||
/// </summary>
|
||||
internal static string MClass {
|
||||
get {
|
||||
return ResourceManager.GetString("MClass", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to OK.
|
||||
/// </summary>
|
||||
internal static string OkBtnText {
|
||||
get {
|
||||
return ResourceManager.GetString("OkBtnText", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to P amb [mbar].
|
||||
/// </summary>
|
||||
internal static string P_amb_mbar {
|
||||
get {
|
||||
return ResourceManager.GetString("P_amb_mbar", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to P down end [kPa].
|
||||
/// </summary>
|
||||
internal static string P_dn_end_kPa {
|
||||
get {
|
||||
return ResourceManager.GetString("P_dn_end_kPa", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to P down [kPa].
|
||||
/// </summary>
|
||||
internal static string P_dn_kPa {
|
||||
get {
|
||||
return ResourceManager.GetString("P_dn_kPa", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to P down start [kPa].
|
||||
/// </summary>
|
||||
internal static string P_dn_start_kPa {
|
||||
get {
|
||||
return ResourceManager.GetString("P_dn_start_kPa", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to P up end [kPa].
|
||||
/// </summary>
|
||||
internal static string P_up_end_kPa {
|
||||
get {
|
||||
return ResourceManager.GetString("P_up_end_kPa", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to P up [kPa].
|
||||
/// </summary>
|
||||
internal static string P_up_kPa {
|
||||
get {
|
||||
return ResourceManager.GetString("P_up_kPa", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to P up start [kPa].
|
||||
/// </summary>
|
||||
internal static string P_up_start_kPa {
|
||||
get {
|
||||
return ResourceManager.GetString("P_up_start_kPa", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to PO.
|
||||
/// </summary>
|
||||
internal static string PO {
|
||||
get {
|
||||
return ResourceManager.GetString("PO", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Pos..
|
||||
/// </summary>
|
||||
internal static string Pos {
|
||||
get {
|
||||
return ResourceManager.GetString("Pos", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Precision.
|
||||
/// </summary>
|
||||
internal static string Precision {
|
||||
get {
|
||||
return ResourceManager.GetString("Precision", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Procedure.
|
||||
/// </summary>
|
||||
internal static string Procedure {
|
||||
get {
|
||||
return ResourceManager.GetString("Procedure", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Producer.
|
||||
/// </summary>
|
||||
internal static string Producer {
|
||||
get {
|
||||
return ResourceManager.GetString("Producer", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Protocol.
|
||||
/// </summary>
|
||||
internal static string Protocol {
|
||||
get {
|
||||
return ResourceManager.GetString("Protocol", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Pulses.
|
||||
/// </summary>
|
||||
internal static string Pulses {
|
||||
get {
|
||||
return ResourceManager.GetString("Pulses", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Pulses/l.
|
||||
/// </summary>
|
||||
internal static string PulsesLiter {
|
||||
get {
|
||||
return ResourceManager.GetString("PulsesLiter", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Q fall [m3/h].
|
||||
/// </summary>
|
||||
internal static string Q_fall_m3ph {
|
||||
get {
|
||||
return ResourceManager.GetString("Q_fall_m3ph", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Q from [m3/h].
|
||||
/// </summary>
|
||||
internal static string Q_from_m3ph {
|
||||
get {
|
||||
return ResourceManager.GetString("Q_from_m3ph", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Q rise [m3/h].
|
||||
/// </summary>
|
||||
internal static string Q_rise_m3ph {
|
||||
get {
|
||||
return ResourceManager.GetString("Q_rise_m3ph", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Q to [m3/h].
|
||||
/// </summary>
|
||||
internal static string Q_to_m3ph {
|
||||
get {
|
||||
return ResourceManager.GetString("Q_to_m3ph", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Q1 [m3/h].
|
||||
/// </summary>
|
||||
internal static string Q1_m3ph {
|
||||
get {
|
||||
return ResourceManager.GetString("Q1_m3ph", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Q2 [m3/h].
|
||||
/// </summary>
|
||||
internal static string Q2_m3ph {
|
||||
get {
|
||||
return ResourceManager.GetString("Q2_m3ph", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Q3 [m3/h].
|
||||
/// </summary>
|
||||
internal static string Q3_m3ph {
|
||||
get {
|
||||
return ResourceManager.GetString("Q3_m3ph", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Q4 [m3/h].
|
||||
/// </summary>
|
||||
internal static string Q4_m3ph {
|
||||
get {
|
||||
return ResourceManager.GetString("Q4_m3ph", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Qmax [m3/h].
|
||||
/// </summary>
|
||||
internal static string Qmax_m3ph {
|
||||
get {
|
||||
return ResourceManager.GetString("Qmax_m3ph", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Qmin [m3/h].
|
||||
/// </summary>
|
||||
internal static string Qmin_m3ph {
|
||||
get {
|
||||
return ResourceManager.GetString("Qmin_m3ph", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Qn [m3/h].
|
||||
/// </summary>
|
||||
internal static string Qn_m3ph {
|
||||
get {
|
||||
return ResourceManager.GetString("Qn_m3ph", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Qt [m3/h].
|
||||
/// </summary>
|
||||
internal static string Qt_m3ph {
|
||||
get {
|
||||
return ResourceManager.GetString("Qt_m3ph", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Ref.pulses.
|
||||
/// </summary>
|
||||
internal static string RefPulses {
|
||||
get {
|
||||
return ResourceManager.GetString("RefPulses", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to < Remove.
|
||||
/// </summary>
|
||||
internal static string Remove {
|
||||
get {
|
||||
return ResourceManager.GetString("Remove", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Remove all.
|
||||
/// </summary>
|
||||
internal static string Remove_all {
|
||||
get {
|
||||
return ResourceManager.GetString("Remove_all", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Result.
|
||||
/// </summary>
|
||||
internal static string Result {
|
||||
get {
|
||||
return ResourceManager.GetString("Result", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Selected results.
|
||||
/// </summary>
|
||||
internal static string Selected_results {
|
||||
get {
|
||||
return ResourceManager.GetString("Selected_results", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to s/n.
|
||||
/// </summary>
|
||||
internal static string sn {
|
||||
get {
|
||||
return ResourceManager.GetString("sn", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to s/n aux..
|
||||
/// </summary>
|
||||
internal static string sn_aux {
|
||||
get {
|
||||
return ResourceManager.GetString("sn_aux", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to s/n main.
|
||||
/// </summary>
|
||||
internal static string sn_main {
|
||||
get {
|
||||
return ResourceManager.GetString("sn_main", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Start.
|
||||
/// </summary>
|
||||
internal static string Start {
|
||||
get {
|
||||
return ResourceManager.GetString("Start", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to T amb [°C].
|
||||
/// </summary>
|
||||
internal static string T_amb_degC {
|
||||
get {
|
||||
return ResourceManager.GetString("T_amb_degC", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to T div [°C].
|
||||
/// </summary>
|
||||
internal static string T_div_degC {
|
||||
get {
|
||||
return ResourceManager.GetString("T_div_degC", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to T end.
|
||||
/// </summary>
|
||||
internal static string T_end {
|
||||
get {
|
||||
return ResourceManager.GetString("T_end", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to T in [°C].
|
||||
/// </summary>
|
||||
internal static string T_in_degC {
|
||||
get {
|
||||
return ResourceManager.GetString("T_in_degC", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to T out [°C].
|
||||
/// </summary>
|
||||
internal static string T_out_degC {
|
||||
get {
|
||||
return ResourceManager.GetString("T_out_degC", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to T [s].
|
||||
/// </summary>
|
||||
internal static string T_s {
|
||||
get {
|
||||
return ResourceManager.GetString("T_s", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to T start.
|
||||
/// </summary>
|
||||
internal static string T_start {
|
||||
get {
|
||||
return ResourceManager.GetString("T_start", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Test.
|
||||
/// </summary>
|
||||
internal static string Test {
|
||||
get {
|
||||
return ResourceManager.GetString("Test", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Test ID.
|
||||
/// </summary>
|
||||
internal static string Test_ID {
|
||||
get {
|
||||
return ResourceManager.GetString("Test_ID", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Test method.
|
||||
/// </summary>
|
||||
internal static string Test_method {
|
||||
get {
|
||||
return ResourceManager.GetString("Test_method", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Test vol. [l].
|
||||
/// </summary>
|
||||
internal static string Test_vol_l {
|
||||
get {
|
||||
return ResourceManager.GetString("Test_vol_l", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Uncertainty [%].
|
||||
/// </summary>
|
||||
internal static string Uncertainty_pct {
|
||||
get {
|
||||
return ResourceManager.GetString("Uncertainty_pct", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Units.
|
||||
/// </summary>
|
||||
internal static string Units {
|
||||
get {
|
||||
return ResourceManager.GetString("Units", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Up.
|
||||
/// </summary>
|
||||
internal static string UpBtnText {
|
||||
get {
|
||||
return ResourceManager.GetString("UpBtnText", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to User.
|
||||
/// </summary>
|
||||
internal static string User {
|
||||
get {
|
||||
return ResourceManager.GetString("User", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to User nr..
|
||||
/// </summary>
|
||||
internal static string User_nr {
|
||||
get {
|
||||
return ResourceManager.GetString("User_nr", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Ver..
|
||||
/// </summary>
|
||||
internal static string Ver {
|
||||
get {
|
||||
return ResourceManager.GetString("Ver", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Vol.ref. [l].
|
||||
/// </summary>
|
||||
internal static string VolRef_l {
|
||||
get {
|
||||
return ResourceManager.GetString("VolRef_l", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Volume [l].
|
||||
/// </summary>
|
||||
internal static string Volume_l {
|
||||
get {
|
||||
return ResourceManager.GetString("Volume_l", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Width.
|
||||
/// </summary>
|
||||
internal static string Width {
|
||||
get {
|
||||
return ResourceManager.GetString("Width", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to WM Type.
|
||||
/// </summary>
|
||||
internal static string WM_Type {
|
||||
get {
|
||||
return ResourceManager.GetString("WM_Type", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to WMs.
|
||||
/// </summary>
|
||||
internal static string WMs {
|
||||
get {
|
||||
return ResourceManager.GetString("WMs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Year.
|
||||
/// </summary>
|
||||
internal static string Year {
|
||||
get {
|
||||
return ResourceManager.GetString("Year", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,174 @@
|
||||
<?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="Add" xml:space="preserve">
|
||||
<value>Přidat ></value>
|
||||
</data>
|
||||
<data name="Alignment" xml:space="preserve">
|
||||
<value>Zarovnání</value>
|
||||
</data>
|
||||
<data name="Available_results" xml:space="preserve">
|
||||
<value>Dostupné výsledky</value>
|
||||
</data>
|
||||
<data name="CancelBtnText" xml:space="preserve">
|
||||
<value>Zrušit</value>
|
||||
</data>
|
||||
<data name="Caption" xml:space="preserve">
|
||||
<value>Nadpis</value>
|
||||
</data>
|
||||
<data name="Configuration" xml:space="preserve">
|
||||
<value>Konfigurace</value>
|
||||
</data>
|
||||
<data name="DownBtnText" xml:space="preserve">
|
||||
<value>Dolů</value>
|
||||
</data>
|
||||
<data name="Format" xml:space="preserve">
|
||||
<value>Formát</value>
|
||||
</data>
|
||||
<data name="Item" xml:space="preserve">
|
||||
<value>Položka</value>
|
||||
</data>
|
||||
<data name="OkBtnText" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name="Precision" xml:space="preserve">
|
||||
<value>Přesnost</value>
|
||||
</data>
|
||||
<data name="Remove" xml:space="preserve">
|
||||
<value>< Odebrat</value>
|
||||
</data>
|
||||
<data name="Remove_all" xml:space="preserve">
|
||||
<value>Odebrat vše</value>
|
||||
</data>
|
||||
<data name="Selected_results" xml:space="preserve">
|
||||
<value>Vybrané výsledky</value>
|
||||
</data>
|
||||
<data name="Test_ID" xml:space="preserve">
|
||||
<value>Test</value>
|
||||
</data>
|
||||
<data name="Units" xml:space="preserve">
|
||||
<value>Jednotky</value>
|
||||
</data>
|
||||
<data name="UpBtnText" xml:space="preserve">
|
||||
<value>Nahoru</value>
|
||||
</data>
|
||||
<data name="Width" xml:space="preserve">
|
||||
<value>Šířka</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,375 @@
|
||||
<?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="Add" xml:space="preserve">
|
||||
<value>Hinzufügen ></value>
|
||||
</data>
|
||||
<data name="Alignment" xml:space="preserve">
|
||||
<value>Ausrichtung</value>
|
||||
</data>
|
||||
<data name="Approval" xml:space="preserve">
|
||||
<value>Zulassung</value>
|
||||
</data>
|
||||
<data name="Available_results" xml:space="preserve">
|
||||
<value>Ergebnisse</value>
|
||||
</data>
|
||||
<data name="Batch_nr" xml:space="preserve">
|
||||
<value>Stapel Nr.</value>
|
||||
</data>
|
||||
<data name="Bench" xml:space="preserve">
|
||||
<value>Prüfstation</value>
|
||||
</data>
|
||||
<data name="CancelBtnText" xml:space="preserve">
|
||||
<value>Abbrechen</value>
|
||||
</data>
|
||||
<data name="Caption" xml:space="preserve">
|
||||
<value>Überschrift</value>
|
||||
</data>
|
||||
<data name="Configuration" xml:space="preserve">
|
||||
<value>Konfiguration</value>
|
||||
</data>
|
||||
<data name="Density" xml:space="preserve">
|
||||
<value>Dichte</value>
|
||||
</data>
|
||||
<data name="DownBtnText" xml:space="preserve">
|
||||
<value>Abwärts</value>
|
||||
</data>
|
||||
<data name="End" xml:space="preserve">
|
||||
<value>Endzeit</value>
|
||||
</data>
|
||||
<data name="EndState_aux" xml:space="preserve">
|
||||
<value>Eindstand Nebenz.</value>
|
||||
</data>
|
||||
<data name="EndState_main" xml:space="preserve">
|
||||
<value>Eindstand Hauptz.</value>
|
||||
</data>
|
||||
<data name="End_state" xml:space="preserve">
|
||||
<value>Eindstand</value>
|
||||
</data>
|
||||
<data name="ErrLimHi_pct" xml:space="preserve">
|
||||
<value>Fehlergrenze hoch [%]</value>
|
||||
</data>
|
||||
<data name="ErrLimLo_pct" xml:space="preserve">
|
||||
<value>Fehlergrenze niedrig [%]</value>
|
||||
</data>
|
||||
<data name="Error_pct" xml:space="preserve">
|
||||
<value>Fehler [%]</value>
|
||||
</data>
|
||||
<data name="ErrRef_pct" xml:space="preserve">
|
||||
<value>Referenzfehler [%]</value>
|
||||
</data>
|
||||
<data name="Err_aux_pct" xml:space="preserve">
|
||||
<value>Fehler Nebenz. [%]</value>
|
||||
</data>
|
||||
<data name="Err_main_pct" xml:space="preserve">
|
||||
<value>Fehler Hauptz. [%]</value>
|
||||
</data>
|
||||
<data name="Flow_m3ph" xml:space="preserve">
|
||||
<value>Durchfluss [m³/h]</value>
|
||||
</data>
|
||||
<data name="Format" xml:space="preserve">
|
||||
<value>Format</value>
|
||||
</data>
|
||||
<data name="H_amb_pct" xml:space="preserve">
|
||||
<value>H umgebung [%]</value>
|
||||
</data>
|
||||
<data name="Item" xml:space="preserve">
|
||||
<value>Posten</value>
|
||||
</data>
|
||||
<data name="MClass" xml:space="preserve">
|
||||
<value>Metr. Klasse</value>
|
||||
</data>
|
||||
<data name="OkBtnText" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name="PO" xml:space="preserve">
|
||||
<value>Bestellung</value>
|
||||
</data>
|
||||
<data name="Pos" xml:space="preserve">
|
||||
<value>Pos.</value>
|
||||
</data>
|
||||
<data name="Precision" xml:space="preserve">
|
||||
<value>Präzision</value>
|
||||
</data>
|
||||
<data name="Procedure" xml:space="preserve">
|
||||
<value>Prüfvorlage</value>
|
||||
</data>
|
||||
<data name="Protocol" xml:space="preserve">
|
||||
<value>Protokoll</value>
|
||||
</data>
|
||||
<data name="Pulses" xml:space="preserve">
|
||||
<value>Impulse</value>
|
||||
</data>
|
||||
<data name="PulsesLiter" xml:space="preserve">
|
||||
<value>Impulse/l</value>
|
||||
</data>
|
||||
<data name="P_amb_mbar" xml:space="preserve">
|
||||
<value>Dr umgebung [mbar]</value>
|
||||
</data>
|
||||
<data name="P_dn_end_kPa" xml:space="preserve">
|
||||
<value>Dr aus ende [kPa]</value>
|
||||
</data>
|
||||
<data name="P_dn_kPa" xml:space="preserve">
|
||||
<value>Dr aus [kPa]</value>
|
||||
</data>
|
||||
<data name="P_dn_start_kPa" xml:space="preserve">
|
||||
<value>Dr aus start [kPa]</value>
|
||||
</data>
|
||||
<data name="P_up_end_kPa" xml:space="preserve">
|
||||
<value>Dr ein ende [kPa]</value>
|
||||
</data>
|
||||
<data name="P_up_kPa" xml:space="preserve">
|
||||
<value>Dr ein [kPa]</value>
|
||||
</data>
|
||||
<data name="P_up_start_kPa" xml:space="preserve">
|
||||
<value>Dr ein start [kPa]</value>
|
||||
</data>
|
||||
<data name="Q1_m3ph" xml:space="preserve">
|
||||
<value>Q1 [m3/h]</value>
|
||||
</data>
|
||||
<data name="Q2_m3ph" xml:space="preserve">
|
||||
<value>Q2 [m3/h]</value>
|
||||
</data>
|
||||
<data name="Q3_m3ph" xml:space="preserve">
|
||||
<value>Q3 [m3/h]</value>
|
||||
</data>
|
||||
<data name="Q4_m3ph" xml:space="preserve">
|
||||
<value>Q4 [m3/h]</value>
|
||||
</data>
|
||||
<data name="Qmax_m3ph" xml:space="preserve">
|
||||
<value>Qmax [m3/h]</value>
|
||||
</data>
|
||||
<data name="Qmin_m3ph" xml:space="preserve">
|
||||
<value>Qmin [m3/h]</value>
|
||||
</data>
|
||||
<data name="Qn_m3ph" xml:space="preserve">
|
||||
<value>Qn [m3/h]</value>
|
||||
</data>
|
||||
<data name="Qt_m3ph" xml:space="preserve">
|
||||
<value>Qt [m3/h]</value>
|
||||
</data>
|
||||
<data name="Q_fall_m3ph" xml:space="preserve">
|
||||
<value>Q fall [m3/h]</value>
|
||||
</data>
|
||||
<data name="Q_from_m3ph" xml:space="preserve">
|
||||
<value>Q von [m3/h]</value>
|
||||
</data>
|
||||
<data name="Q_rise_m3ph" xml:space="preserve">
|
||||
<value>Q steig [m3/h]</value>
|
||||
</data>
|
||||
<data name="Q_to_m3ph" xml:space="preserve">
|
||||
<value>Q bis [m3/h]</value>
|
||||
</data>
|
||||
<data name="RefPulses" xml:space="preserve">
|
||||
<value>Ref. Impulse</value>
|
||||
</data>
|
||||
<data name="Remove" xml:space="preserve">
|
||||
<value>< Entfernen</value>
|
||||
</data>
|
||||
<data name="Remove_all" xml:space="preserve">
|
||||
<value>Alles entfernen</value>
|
||||
</data>
|
||||
<data name="Result" xml:space="preserve">
|
||||
<value>Ergebnis</value>
|
||||
</data>
|
||||
<data name="Selected_results" xml:space="preserve">
|
||||
<value>Ergebnisse ausgewählt</value>
|
||||
</data>
|
||||
<data name="sn" xml:space="preserve">
|
||||
<value>Seriennr.</value>
|
||||
</data>
|
||||
<data name="sn_aux" xml:space="preserve">
|
||||
<value>Seriennr. Nebenz.</value>
|
||||
</data>
|
||||
<data name="sn_main" xml:space="preserve">
|
||||
<value>Seriennr. Hauptz.</value>
|
||||
</data>
|
||||
<data name="Start" xml:space="preserve">
|
||||
<value>Startzeit</value>
|
||||
</data>
|
||||
<data name="Test" xml:space="preserve">
|
||||
<value>Prüfpunkt</value>
|
||||
</data>
|
||||
<data name="Test_ID" xml:space="preserve">
|
||||
<value>Prüfpunkt</value>
|
||||
</data>
|
||||
<data name="Test_method" xml:space="preserve">
|
||||
<value>Prüfart</value>
|
||||
</data>
|
||||
<data name="Test_vol_l" xml:space="preserve">
|
||||
<value>Prüfvolumen [l]</value>
|
||||
</data>
|
||||
<data name="T_amb_degC" xml:space="preserve">
|
||||
<value>T umgebung [°C]</value>
|
||||
</data>
|
||||
<data name="T_div_degC" xml:space="preserve">
|
||||
<value>T div [°C]</value>
|
||||
</data>
|
||||
<data name="T_end" xml:space="preserve">
|
||||
<value>Endzeit</value>
|
||||
</data>
|
||||
<data name="T_in_degC" xml:space="preserve">
|
||||
<value>T ein [°C]</value>
|
||||
</data>
|
||||
<data name="T_out_degC" xml:space="preserve">
|
||||
<value>T aus [°C]</value>
|
||||
</data>
|
||||
<data name="T_s" xml:space="preserve">
|
||||
<value>Dauer [s]</value>
|
||||
</data>
|
||||
<data name="T_start" xml:space="preserve">
|
||||
<value>Startzeit</value>
|
||||
</data>
|
||||
<data name="Uncertainty_pct" xml:space="preserve">
|
||||
<value>Unsicherheit [%]</value>
|
||||
</data>
|
||||
<data name="Units" xml:space="preserve">
|
||||
<value>Einheit</value>
|
||||
</data>
|
||||
<data name="UpBtnText" xml:space="preserve">
|
||||
<value>Aufwärts</value>
|
||||
</data>
|
||||
<data name="User" xml:space="preserve">
|
||||
<value>Benutzer</value>
|
||||
</data>
|
||||
<data name="User_nr" xml:space="preserve">
|
||||
<value>Benutzer Nr.</value>
|
||||
</data>
|
||||
<data name="Ver" xml:space="preserve">
|
||||
<value>Ver.</value>
|
||||
</data>
|
||||
<data name="VolRef_l" xml:space="preserve">
|
||||
<value>Ref. Volumen [l]</value>
|
||||
</data>
|
||||
<data name="Volume_l" xml:space="preserve">
|
||||
<value>Volumen [l]</value>
|
||||
</data>
|
||||
<data name="Width" xml:space="preserve">
|
||||
<value>Breite</value>
|
||||
</data>
|
||||
<data name="WMs" xml:space="preserve">
|
||||
<value>WZ</value>
|
||||
</data>
|
||||
<data name="WM_Type" xml:space="preserve">
|
||||
<value>WZ Typ</value>
|
||||
</data>
|
||||
<data name="Year" xml:space="preserve">
|
||||
<value>Eichjahr</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,378 @@
|
||||
<?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="Add" xml:space="preserve">
|
||||
<value>Add ></value>
|
||||
</data>
|
||||
<data name="Alignment" xml:space="preserve">
|
||||
<value>Alignment</value>
|
||||
</data>
|
||||
<data name="Approval" xml:space="preserve">
|
||||
<value>Approval</value>
|
||||
</data>
|
||||
<data name="Available_results" xml:space="preserve">
|
||||
<value>Available results</value>
|
||||
</data>
|
||||
<data name="Batch_nr" xml:space="preserve">
|
||||
<value>Batch nr.</value>
|
||||
</data>
|
||||
<data name="Bench" xml:space="preserve">
|
||||
<value>Bench</value>
|
||||
</data>
|
||||
<data name="CancelBtnText" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name="Caption" xml:space="preserve">
|
||||
<value>Caption</value>
|
||||
</data>
|
||||
<data name="Configuration" xml:space="preserve">
|
||||
<value>Configuration</value>
|
||||
</data>
|
||||
<data name="Density" xml:space="preserve">
|
||||
<value>Density</value>
|
||||
</data>
|
||||
<data name="DownBtnText" xml:space="preserve">
|
||||
<value>Down</value>
|
||||
</data>
|
||||
<data name="End" xml:space="preserve">
|
||||
<value>End</value>
|
||||
</data>
|
||||
<data name="EndState_aux" xml:space="preserve">
|
||||
<value>End state aux.</value>
|
||||
</data>
|
||||
<data name="EndState_main" xml:space="preserve">
|
||||
<value>End state main</value>
|
||||
</data>
|
||||
<data name="End_state" xml:space="preserve">
|
||||
<value>End state</value>
|
||||
</data>
|
||||
<data name="ErrLimHi_pct" xml:space="preserve">
|
||||
<value>Err.Lim.Hi [%]</value>
|
||||
</data>
|
||||
<data name="ErrLimLo_pct" xml:space="preserve">
|
||||
<value>Err.Lim.Lo [%]</value>
|
||||
</data>
|
||||
<data name="Error_pct" xml:space="preserve">
|
||||
<value>Error [%]</value>
|
||||
</data>
|
||||
<data name="ErrRef_pct" xml:space="preserve">
|
||||
<value>Err.ref. [%]</value>
|
||||
</data>
|
||||
<data name="Err_aux_pct" xml:space="preserve">
|
||||
<value>Err. aux. [%]</value>
|
||||
</data>
|
||||
<data name="Err_main_pct" xml:space="preserve">
|
||||
<value>Err. main [%]</value>
|
||||
</data>
|
||||
<data name="Flow_m3ph" xml:space="preserve">
|
||||
<value>Flow [m3/h]</value>
|
||||
</data>
|
||||
<data name="Format" xml:space="preserve">
|
||||
<value>Format</value>
|
||||
</data>
|
||||
<data name="H_amb_pct" xml:space="preserve">
|
||||
<value>H amb [%]</value>
|
||||
</data>
|
||||
<data name="Item" xml:space="preserve">
|
||||
<value>Item</value>
|
||||
</data>
|
||||
<data name="MClass" xml:space="preserve">
|
||||
<value>M.Class</value>
|
||||
</data>
|
||||
<data name="OkBtnText" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name="PO" xml:space="preserve">
|
||||
<value>PO</value>
|
||||
</data>
|
||||
<data name="Pos" xml:space="preserve">
|
||||
<value>Pos.</value>
|
||||
</data>
|
||||
<data name="Precision" xml:space="preserve">
|
||||
<value>Precision</value>
|
||||
</data>
|
||||
<data name="Procedure" xml:space="preserve">
|
||||
<value>Procedure</value>
|
||||
</data>
|
||||
<data name="Producer" xml:space="preserve">
|
||||
<value>Producer</value>
|
||||
</data>
|
||||
<data name="Protocol" xml:space="preserve">
|
||||
<value>Protocol</value>
|
||||
</data>
|
||||
<data name="Pulses" xml:space="preserve">
|
||||
<value>Pulses</value>
|
||||
</data>
|
||||
<data name="PulsesLiter" xml:space="preserve">
|
||||
<value>Pulses/l</value>
|
||||
</data>
|
||||
<data name="P_amb_mbar" xml:space="preserve">
|
||||
<value>P amb [mbar]</value>
|
||||
</data>
|
||||
<data name="P_dn_end_kPa" xml:space="preserve">
|
||||
<value>P down end [kPa]</value>
|
||||
</data>
|
||||
<data name="P_dn_kPa" xml:space="preserve">
|
||||
<value>P down [kPa]</value>
|
||||
</data>
|
||||
<data name="P_dn_start_kPa" xml:space="preserve">
|
||||
<value>P down start [kPa]</value>
|
||||
</data>
|
||||
<data name="P_up_end_kPa" xml:space="preserve">
|
||||
<value>P up end [kPa]</value>
|
||||
</data>
|
||||
<data name="P_up_kPa" xml:space="preserve">
|
||||
<value>P up [kPa]</value>
|
||||
</data>
|
||||
<data name="P_up_start_kPa" xml:space="preserve">
|
||||
<value>P up start [kPa]</value>
|
||||
</data>
|
||||
<data name="Q1_m3ph" xml:space="preserve">
|
||||
<value>Q1 [m3/h]</value>
|
||||
</data>
|
||||
<data name="Q2_m3ph" xml:space="preserve">
|
||||
<value>Q2 [m3/h]</value>
|
||||
</data>
|
||||
<data name="Q3_m3ph" xml:space="preserve">
|
||||
<value>Q3 [m3/h]</value>
|
||||
</data>
|
||||
<data name="Q4_m3ph" xml:space="preserve">
|
||||
<value>Q4 [m3/h]</value>
|
||||
</data>
|
||||
<data name="Qmax_m3ph" xml:space="preserve">
|
||||
<value>Qmax [m3/h]</value>
|
||||
</data>
|
||||
<data name="Qmin_m3ph" xml:space="preserve">
|
||||
<value>Qmin [m3/h]</value>
|
||||
</data>
|
||||
<data name="Qn_m3ph" xml:space="preserve">
|
||||
<value>Qn [m3/h]</value>
|
||||
</data>
|
||||
<data name="Qt_m3ph" xml:space="preserve">
|
||||
<value>Qt [m3/h]</value>
|
||||
</data>
|
||||
<data name="Q_fall_m3ph" xml:space="preserve">
|
||||
<value>Q fall [m3/h]</value>
|
||||
</data>
|
||||
<data name="Q_from_m3ph" xml:space="preserve">
|
||||
<value>Q from [m3/h]</value>
|
||||
</data>
|
||||
<data name="Q_rise_m3ph" xml:space="preserve">
|
||||
<value>Q rise [m3/h]</value>
|
||||
</data>
|
||||
<data name="Q_to_m3ph" xml:space="preserve">
|
||||
<value>Q to [m3/h]</value>
|
||||
</data>
|
||||
<data name="RefPulses" xml:space="preserve">
|
||||
<value>Ref.pulses</value>
|
||||
</data>
|
||||
<data name="Remove" xml:space="preserve">
|
||||
<value>< Remove</value>
|
||||
</data>
|
||||
<data name="Remove_all" xml:space="preserve">
|
||||
<value>Remove all</value>
|
||||
</data>
|
||||
<data name="Result" xml:space="preserve">
|
||||
<value>Result</value>
|
||||
</data>
|
||||
<data name="Selected_results" xml:space="preserve">
|
||||
<value>Selected results</value>
|
||||
</data>
|
||||
<data name="sn" xml:space="preserve">
|
||||
<value>s/n</value>
|
||||
</data>
|
||||
<data name="sn_aux" xml:space="preserve">
|
||||
<value>s/n aux.</value>
|
||||
</data>
|
||||
<data name="sn_main" xml:space="preserve">
|
||||
<value>s/n main</value>
|
||||
</data>
|
||||
<data name="Start" xml:space="preserve">
|
||||
<value>Start</value>
|
||||
</data>
|
||||
<data name="Test" xml:space="preserve">
|
||||
<value>Test</value>
|
||||
</data>
|
||||
<data name="Test_ID" xml:space="preserve">
|
||||
<value>Test ID</value>
|
||||
</data>
|
||||
<data name="Test_method" xml:space="preserve">
|
||||
<value>Test method</value>
|
||||
</data>
|
||||
<data name="Test_vol_l" xml:space="preserve">
|
||||
<value>Test vol. [l]</value>
|
||||
</data>
|
||||
<data name="T_amb_degC" xml:space="preserve">
|
||||
<value>T amb [°C]</value>
|
||||
</data>
|
||||
<data name="T_div_degC" xml:space="preserve">
|
||||
<value>T div [°C]</value>
|
||||
</data>
|
||||
<data name="T_end" xml:space="preserve">
|
||||
<value>T end</value>
|
||||
</data>
|
||||
<data name="T_in_degC" xml:space="preserve">
|
||||
<value>T in [°C]</value>
|
||||
</data>
|
||||
<data name="T_out_degC" xml:space="preserve">
|
||||
<value>T out [°C]</value>
|
||||
</data>
|
||||
<data name="T_s" xml:space="preserve">
|
||||
<value>T [s]</value>
|
||||
</data>
|
||||
<data name="T_start" xml:space="preserve">
|
||||
<value>T start</value>
|
||||
</data>
|
||||
<data name="Uncertainty_pct" xml:space="preserve">
|
||||
<value>Uncertainty [%]</value>
|
||||
</data>
|
||||
<data name="Units" xml:space="preserve">
|
||||
<value>Units</value>
|
||||
</data>
|
||||
<data name="UpBtnText" xml:space="preserve">
|
||||
<value>Up</value>
|
||||
</data>
|
||||
<data name="User" xml:space="preserve">
|
||||
<value>User</value>
|
||||
</data>
|
||||
<data name="User_nr" xml:space="preserve">
|
||||
<value>User nr.</value>
|
||||
</data>
|
||||
<data name="Ver" xml:space="preserve">
|
||||
<value>Ver.</value>
|
||||
</data>
|
||||
<data name="VolRef_l" xml:space="preserve">
|
||||
<value>Vol.ref. [l]</value>
|
||||
</data>
|
||||
<data name="Volume_l" xml:space="preserve">
|
||||
<value>Volume [l]</value>
|
||||
</data>
|
||||
<data name="Width" xml:space="preserve">
|
||||
<value>Width</value>
|
||||
</data>
|
||||
<data name="WMs" xml:space="preserve">
|
||||
<value>WMs</value>
|
||||
</data>
|
||||
<data name="WM_Type" xml:space="preserve">
|
||||
<value>WM Type</value>
|
||||
</data>
|
||||
<data name="Year" xml:space="preserve">
|
||||
<value>Year</value>
|
||||
</data>
|
||||
</root>
|
||||
+71
-5
@@ -18,7 +18,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;MUNICH</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;MUNICH</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>
|
||||
@@ -46,6 +49,8 @@
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
@@ -53,9 +58,48 @@
|
||||
<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="Forms\ListViewEx.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\ResultsConfigDlg.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\ResultsConfigDlg.designer.cs">
|
||||
<DependentUpon>ResultsConfigDlg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<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="Output\Printers\Munich\MunichPrintDocument.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ItemSpec.cs" />
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Resources\Strings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Strings.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Utils.cs" />
|
||||
<Compile Include="WMeterRsltItemSpec.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Config\Config.csproj">
|
||||
@@ -65,9 +109,31 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="FileWriters\" />
|
||||
<Folder Include="Mappings\" />
|
||||
<Folder Include="Output\FileWriters\Basic\" />
|
||||
<Folder Include="Output\FileWriters\Enhanced\" />
|
||||
<Folder Include="Printers\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Forms\ListViewEx.resx">
|
||||
<DependentUpon>ListViewEx.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\ResultsConfigDlg.resx">
|
||||
<DependentUpon>ResultsConfigDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\Strings.cs.resx" />
|
||||
<EmbeddedResource Include="Resources\Strings.de.resx" />
|
||||
<EmbeddedResource Include="Resources\Strings.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Headpic.png" />
|
||||
</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.
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Text;
|
||||
using Config.Entities;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
/// <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,294 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Config.Entities;
|
||||
using Results.Entities;
|
||||
using Results.Resources;
|
||||
|
||||
namespace Results
|
||||
{
|
||||
public class WMeterRsltItemSpec
|
||||
{
|
||||
///
|
||||
/// Public fields
|
||||
///
|
||||
public readonly int Uid;
|
||||
public readonly string OldUid;
|
||||
public readonly string Name; /// Name-s of all items must be unique
|
||||
public string Caption; /// Specifies item description to be printed as a caption (in the header, etc.)
|
||||
public string TestID; /// Specifies the test
|
||||
public Config.Unit Units; /// Specifies units for the output
|
||||
public string Format; /// Specifies format for the output
|
||||
public string Precision; /// Specifies precision for the output
|
||||
public int Width; /// Specifies the number of characters of the output, 0 = automatic
|
||||
public Config.Entities.Alignment Alignment; /// Specifies alignment for the output
|
||||
|
||||
public WMeterRsltItemSpec Clone()
|
||||
{
|
||||
WMeterRsltItemSpec item2 = new WMeterRsltItemSpec(Uid, OldUid, Name, printDlgt);
|
||||
item2.Caption = Caption;
|
||||
item2.TestID = TestID;
|
||||
item2.Units = Units;
|
||||
item2.Format = Format;
|
||||
item2.Precision = Precision;
|
||||
item2.Width = Width;
|
||||
item2.Alignment = Alignment;
|
||||
return item2;
|
||||
}
|
||||
|
||||
///
|
||||
/// Function to pick a MeterTestResult field and convert it into a string
|
||||
///
|
||||
public delegate string PrintDlgt(WaterMeter waterMeterResult, string testID, Config.Unit units, string format, string precision);
|
||||
|
||||
private readonly PrintDlgt printDlgt;
|
||||
|
||||
/// <summary> Safe wrapper which replaces null-s by empty strings </summary>
|
||||
public string Print(WaterMeter waterMeterResult)
|
||||
{
|
||||
string str = printDlgt(waterMeterResult, TestID, Units, Format, Precision);
|
||||
if (str == null) str = string.Empty;
|
||||
|
||||
if (!string.IsNullOrEmpty(Format))
|
||||
{
|
||||
str = string.Format(Format, str);
|
||||
}
|
||||
|
||||
int len = str.Length;
|
||||
if (Width == 0 || len >= Width)
|
||||
{
|
||||
return str;
|
||||
}
|
||||
else if (Alignment == Config.Entities.Alignment.Left)
|
||||
{
|
||||
return str + new string(' ', Width - len);
|
||||
}
|
||||
else if (Alignment == Config.Entities.Alignment.Right)
|
||||
{
|
||||
return new string(' ', Width - len) + str;
|
||||
}
|
||||
else // Alignment.Center or Alignment.Justified
|
||||
{
|
||||
int nrSpaces = Width - len;
|
||||
return new string(' ', nrSpaces / 2) + str + new string(' ', nrSpaces - (nrSpaces / 2));
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
/// Public constructor
|
||||
///
|
||||
public WMeterRsltItemSpec(int uid, string oldUid, string name, PrintDlgt printDlgt)
|
||||
{
|
||||
Uid = uid;
|
||||
OldUid = oldUid;
|
||||
Name = name;
|
||||
this.printDlgt = printDlgt;
|
||||
}
|
||||
|
||||
|
||||
/// Static list of all available items
|
||||
public static readonly IList<WMeterRsltItemSpec> AllItems;
|
||||
|
||||
/// Static constructor that initializes the list of all items
|
||||
static WMeterRsltItemSpec()
|
||||
{
|
||||
AllItems = new List<WMeterRsltItemSpec>();
|
||||
|
||||
AllItems.Add(new WMeterRsltItemSpec(0, null, "String", (w, t, u, f, p) => f));
|
||||
|
||||
/// Common
|
||||
AllItems.Add(new WMeterRsltItemSpec(1, "Test name", Strings.Test + "()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Name()));
|
||||
AllItems.Add(new WMeterRsltItemSpec(2, "Procedure name", Strings.Procedure, (w, t, u, f, p) => w.ProcedureName()));
|
||||
AllItems.Add(new WMeterRsltItemSpec(3, "Batch number", Strings.Batch_nr, (w, t, u, f, p) => w.BatchNr().ToString()));
|
||||
AllItems.Add(new WMeterRsltItemSpec(4, "Test method", Strings.Test_method + "()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Method()));
|
||||
AllItems.Add(new WMeterRsltItemSpec(5, "Density", Strings.Density + "()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).DensityOut.ToString(string.IsNullOrEmpty(p) ? "F1" : p))); /// [kg/m3]
|
||||
|
||||
/// Target values
|
||||
AllItems.Add(new WMeterRsltItemSpec(6, "Q from", Strings.Q_from_m3ph + "()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Qfrom().ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(7, "Q to", Strings.Q_to_m3ph + "()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Qto().ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(8, "Test volume", Strings.Test_vol_l + "()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TargetVolume()).ToString(string.IsNullOrEmpty(p) ? "F1" : p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(9, "Error limit Lo", Strings.ErrLimLo_pct + "()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).ErrLimLo()).ToString(string.IsNullOrEmpty(p) ? "F1" : p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(10, "Error limit Hi", Strings.ErrLimHi_pct + "()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).ErrLimHi()).ToString(string.IsNullOrEmpty(p) ? "F1" : p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(11, "Uncertainty", Strings.Uncertainty_pct + "()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Uncertainty().ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
|
||||
|
||||
/// Test results
|
||||
AllItems.Add(new WMeterRsltItemSpec(12, "Test start time", Strings.T_start + "()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : (string.IsNullOrEmpty(f) ? w.GetTestRslt(t).StartTime.ToString() : string.Format(f, w.GetTestRslt(t).StartTime))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(13, "Test end time", Strings.T_end + "()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : (string.IsNullOrEmpty(f) ? w.GetTestRslt(t).EndTime.ToString() : string.Format(f, w.GetTestRslt(t).EndTime))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(14, "Test time", Strings.T_s + "()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).TestTime.ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(15, "Flow", Strings.Flow_m3ph + "()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Utils.DoubleToStr(Config.Units.ConvertTo(u, w.GetTestRslt(t).FlowVolume), 4)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(16, "T in", Strings.T_in_degC + "()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempInAvrg).ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(17, "T out", Strings.T_out_degC + "()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempOutAvrg).ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(18, "T div", Strings.T_div_degC + "()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).TempDivAvrg).ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(19, "P up", Strings.P_up_kPa + "()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressUpAvrg).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(20, "P up start", Strings.P_up_start_kPa + "()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressUpStart).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(21, "P up end", Strings.P_up_end_kPa + "()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressUpEnd).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(22, "P down", Strings.P_dn_kPa + "()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDownAvrg).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(23, "P down start", Strings.P_dn_start_kPa + "()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDownStart).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(24, "P down end", Strings.P_dn_end_kPa + "()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).PressDownEnd).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(25, "Reference error", Strings.ErrRef_pct + "()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetTestRslt(t).ErrorMaster).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(26, "Ambient temperature", Strings.T_amb_degC + "()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? Config.Units.ConvertTo(u, w.Batch.AmbientTempAve()).ToString(string.IsNullOrEmpty(p) ? "F1" : p) : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbientTempAve).ToString(string.IsNullOrEmpty(p) ? "F1" : p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(27, "Ambient pressure", Strings.P_amb_mbar + "()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? Config.Units.ConvertTo(u, w.Batch.AmbientPressAve()).ToString(string.IsNullOrEmpty(p) ? "F0" : p) : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbientPressAve).ToString(string.IsNullOrEmpty(p) ? "F0" : p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(28, "Ambient humidity", Strings.H_amb_pct + "()", (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? Config.Units.ConvertTo(u, w.Batch.AmbientHumiAve()).ToString(string.IsNullOrEmpty(p) ? "F1" : p) : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbientHumiAve).ToString(string.IsNullOrEmpty(p) ? "F1" : p)));
|
||||
|
||||
/// Single and combined meter results
|
||||
AllItems.Add(new WMeterRsltItemSpec(29, "Volume", Strings.Volume_l + "()", (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeMeter).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(30, "Reference volume", Strings.VolRef_l + "()", (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).VolumeRef).ToString(string.IsNullOrEmpty(p) ? "F3" : p)));
|
||||
#if IPERLST || IPERLST_SPECIAL
|
||||
AllItems.Add(new WMeterRsltItemSpec(31, "Error", "Error()", (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "0" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).Error).ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
|
||||
#else
|
||||
AllItems.Add(new WMeterRsltItemSpec(31, "Error", Strings.Error_pct + "()", (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : Config.Units.ConvertTo(u, w.GetMeterTestRslt(t).Error).ToString(string.IsNullOrEmpty(p) ? "F2" : p)));
|
||||
#endif
|
||||
AllItems.Add(new WMeterRsltItemSpec(32, "Passed", Strings.Result + "()", (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : w.GetMeterTestRslt(t).PassedColorStr()));
|
||||
|
||||
/// Water meter info
|
||||
AllItems.Add(new WMeterRsltItemSpec(33, "Watermeter type", Strings.WM_Type, (w, t, u, f, p) => w.WaterMeterData.ProductName));
|
||||
AllItems.Add(new WMeterRsltItemSpec(34, "Producer", Strings.Producer, (w, t, u, f, p) => w.WaterMeterData.Producer));
|
||||
|
||||
AllItems.Add(new WMeterRsltItemSpec(35, null, "DN", (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.DN).ToString()
|
||||
: Config.Units.ConvertTo(u, w.WaterMeterData.DN).ToString(p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(36, null, "L", (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.L).ToString()
|
||||
: Config.Units.ConvertTo(u, w.WaterMeterData.L).ToString(p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(37, null, "Mounting", (w, t, u, f, p) => w.WaterMeterData.Mounting.ToDescription()));
|
||||
|
||||
AllItems.Add(new WMeterRsltItemSpec(38, "Q4", "Q4_Qmax", (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.Q4_Qmax).ToString()
|
||||
: Config.Units.ConvertTo(u, w.WaterMeterData.Q4_Qmax).ToString(p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(39, "Q3", "Q3_Qn", (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.Q3_Qn).ToString()
|
||||
: Config.Units.ConvertTo(u, w.WaterMeterData.Q3_Qn).ToString(p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(40, "Q2", "Q2_Qt", (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.Q2_Qt).ToString()
|
||||
: Config.Units.ConvertTo(u, w.WaterMeterData.Q2_Qt).ToString(p)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(41, "Q1", "Q1_Qmin", (w, t, u, f, p) => string.IsNullOrEmpty(p) ? Config.Units.ConvertTo(u, w.WaterMeterData.Q1_Qmin).ToString()
|
||||
: Config.Units.ConvertTo(u, w.WaterMeterData.Q1_Qmin).ToString(p)));
|
||||
|
||||
AllItems.Add(new WMeterRsltItemSpec(42, "Metrological class", Strings.MClass, (w, t, u, f, p) => w.WaterMeterData.MetrologicalClass));
|
||||
AllItems.Add(new WMeterRsltItemSpec(43, null, "Temperature class", (w, t, u, f, p) => w.WaterMeterData.TemperatureClass.ToDescription()));
|
||||
AllItems.Add(new WMeterRsltItemSpec(44, null, "Preasure loss class", (w, t, u, f, p) => w.WaterMeterData.PressureLossClass.ToDescription()));
|
||||
AllItems.Add(new WMeterRsltItemSpec(45, null, "Max. admissible pressure",(w, t, u, f, p) => w.WaterMeterData.MaxAdmissiblePressure.ToDescription()));
|
||||
AllItems.Add(new WMeterRsltItemSpec(46, null, "Flow profile sensitivity class",(w, t, u, f, p) => w.WaterMeterData.FlowProfileSensitivityClass.ToDescription()));
|
||||
|
||||
AllItems.Add(new WMeterRsltItemSpec(47, "Approval info", Strings.Approval, (w, t, u, f, p) => w.WaterMeterData.ApprovalInfo));
|
||||
AllItems.Add(new WMeterRsltItemSpec(48, null, "Certificate", (w, t, u, f, p) => w.WaterMeterData.Certificate));
|
||||
|
||||
AllItems.Add(new WMeterRsltItemSpec(49, null, Strings.PulsesLiter, (w, t, u, f, p) => string.IsNullOrEmpty(p) ? w.WaterMeterData.PulsesPerLtr.ToString()
|
||||
: w.WaterMeterData.PulsesPerLtr.ToString(p)));
|
||||
|
||||
AllItems.Add(new WMeterRsltItemSpec(50, null, "Text1", (w, t, u, f, p) => w.WaterMeterData.Text1));
|
||||
AllItems.Add(new WMeterRsltItemSpec(51, null, "Text2", (w, t, u, f, p) => w.WaterMeterData.Text2));
|
||||
AllItems.Add(new WMeterRsltItemSpec(52, null, "Text3", (w, t, u, f, p) => w.WaterMeterData.Text3));
|
||||
AllItems.Add(new WMeterRsltItemSpec(53, null, "Text4", (w, t, u, f, p) => w.WaterMeterData.Text4));
|
||||
AllItems.Add(new WMeterRsltItemSpec(54, null, "Text5", (w, t, u, f, p) => w.WaterMeterData.Text5));
|
||||
|
||||
/// Water meters results
|
||||
AllItems.Add(new WMeterRsltItemSpec(55, "Serial Nr", Strings.sn, (w, t, u, f, p) => w.SerialNr));
|
||||
AllItems.Add(new WMeterRsltItemSpec(56, "Purchase order", Strings.PO, (w, t, u, f, p) => w.PurchaseOrder));
|
||||
AllItems.Add(new WMeterRsltItemSpec(57, "Year of production", Strings.Year, (w, t, u, f, p) => w.YearOfProduction.ToString()));
|
||||
AllItems.Add(new WMeterRsltItemSpec(58, "WM Position", Strings.Pos, (w, t, u, f, p) => w.WMPosition.ToString()));
|
||||
|
||||
/// Water meters results (single)
|
||||
AllItems.Add(new WMeterRsltItemSpec(59, "End state", Strings.End_state, (w, t, u, f, p) => w.EndState));
|
||||
AllItems.Add(new WMeterRsltItemSpec(60, "Pulses", Strings.Pulses + "()", (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : w.GetMeterTestRslt(t).PulsesMeter.ToString()));
|
||||
AllItems.Add(new WMeterRsltItemSpec(61, "Pulses/liter", Strings.PulsesLiter + "()", (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : (string.IsNullOrEmpty(p) ? w.GetMeterTestRslt(t).PulsesPerLiter.ToString()
|
||||
: w.GetMeterTestRslt(t).PulsesPerLiter.ToString(p))));
|
||||
AllItems.Add(new WMeterRsltItemSpec(62, "Reference pulses", Strings.RefPulses + "()", (w, t, u, f, p) => (w.GetMeterTestRslt(t) == null) ? "" : w.GetMeterTestRslt(t).PulsesMaster.ToString()));
|
||||
|
||||
/// Water meters results (combined)
|
||||
//AllItems.Add(new ItemSpec("Q rise", "Q rise [m3/h]", null, (x, y, z) => (z.QRise() == 0) ? "-" : Utils.DoubleToStr(z.QRise(), 4)));
|
||||
//AllItems.Add(new ItemSpec("Q fall", "Q fall [m3/h]", null, (x, y, z) => (z.QFall() == 0) ? "-" : Utils.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()));
|
||||
|
||||
/// Batch info
|
||||
AllItems.Add(new WMeterRsltItemSpec(63, "Batch number", Strings.Batch_nr, (w, t, u, f, p) => w.Batch.BatchNr.ToString()));
|
||||
AllItems.Add(new WMeterRsltItemSpec(64, "Test bench ID", Strings.Bench, (w, t, u, f, p) => w.Batch.TestBenchId.ToString()));
|
||||
AllItems.Add(new WMeterRsltItemSpec(65, "Program version", Strings.Ver, (w, t, u, f, p) => w.Batch.ProgramVersion));
|
||||
AllItems.Add(new WMeterRsltItemSpec(66, "User name", Strings.User, (w, t, u, f, p) => w.Batch.UserName));
|
||||
AllItems.Add(new WMeterRsltItemSpec(67, "User nr.", Strings.User_nr, (w, t, u, f, p) => w.Batch.UserNumber.ToString()));
|
||||
AllItems.Add(new WMeterRsltItemSpec(68, "Procedure name", Strings.Procedure, (w, t, u, f, p) => w.Batch.ProcedureName));
|
||||
AllItems.Add(new WMeterRsltItemSpec(69, "Watermeters", Strings.WMs, (w, t, u, f, p) => w.Batch.WatermetersStr));
|
||||
AllItems.Add(new WMeterRsltItemSpec(70, "Protocol title", Strings.Protocol, (w, t, u, f, p) => w.Batch.ProtocolTitle));
|
||||
AllItems.Add(new WMeterRsltItemSpec(71, "Batch start time", Strings.Start, (w, t, u, f, p) => string.IsNullOrEmpty(f) ? w.Batch.StartTime.ToString() : string.Format(f, w.Batch.StartTime)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(72, "Batch end time", Strings.End, (w, t, u, f, p) => string.IsNullOrEmpty(f) ? w.Batch.EndTime.ToString() : string.Format(f, w.Batch.EndTime)));
|
||||
AllItems.Add(new WMeterRsltItemSpec(73, null, "1 / PlsPerLtr_Read", (w, t, u, f, p) => string.IsNullOrEmpty(p) ? ((w.WaterMeterData.PulsesPerLtr != 0) ? 1 / w.WaterMeterData.PulsesPerLtr : 0).ToString()
|
||||
: ((w.WaterMeterData.PulsesPerLtr != 0) ? 1 / w.WaterMeterData.PulsesPerLtr : 0).ToString(p)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts a list of 'Output item specifications' to a string array
|
||||
/// </summary>
|
||||
/// <param name="items"></param>
|
||||
/// <returns></returns>
|
||||
public static string[] ToStrArray(IList<WMeterRsltItemSpec> items)
|
||||
{
|
||||
int count = (items != null) ? items.Count : 0;
|
||||
string[] result = new string[count];
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
result[i] = string.Format("{0}~{1}~{2}~{3}~{4}~{5}~{6}~{7}",
|
||||
items[i].Uid,
|
||||
items[i].Caption,
|
||||
items[i].TestID,
|
||||
items[i].Units,
|
||||
items[i].Format,
|
||||
items[i].Precision,
|
||||
items[i].Width,
|
||||
items[i].Alignment);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts a string array to a list of 'Output item specifications'
|
||||
/// </summary>
|
||||
/// <param name="strArray"></param>
|
||||
/// <returns></returns>
|
||||
public static IList<WMeterRsltItemSpec> FromStrArray(string[] strArray)
|
||||
{
|
||||
IList<WMeterRsltItemSpec> result = new List<WMeterRsltItemSpec>();
|
||||
if (strArray != null)
|
||||
{
|
||||
for (int i = 0; i < strArray.Length; i++)
|
||||
{
|
||||
string[] field = strArray[i].Split(new char[] { '~' });
|
||||
try
|
||||
{
|
||||
WMeterRsltItemSpec item = GetItem(int.Parse(field[0]));
|
||||
|
||||
item.Caption = field[1];
|
||||
item.TestID = field[2];
|
||||
item.Units = 0;
|
||||
for (Config.Unit u = 0; u < Config.Unit.Count; u++) if (u.ToString().Equals(field[3])) { item.Units = u; break; }
|
||||
item.Format = field[4];
|
||||
item.Precision = field[5];
|
||||
item.Width = int.Parse(field[6]);
|
||||
item.Alignment = 0;
|
||||
for (Config.Entities.Alignment a = 0; a < Config.Entities.Alignment.Count; a++) if (a.ToString().Equals(field[7])) { item.Alignment = a; break; }
|
||||
|
||||
result.Add(item);
|
||||
}
|
||||
catch
|
||||
{
|
||||
WMeterRsltItemSpec item = GetItem(0);
|
||||
item.Format = string.Format("Parse error: {0}", strArray[i]);
|
||||
result.Add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private static WMeterRsltItemSpec GetItem(int uid)
|
||||
{
|
||||
foreach (var item in AllItems)
|
||||
{
|
||||
if (item.Uid == uid) return item.Clone();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
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>
|
||||
@@ -0,0 +1,72 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml.Serialization;
|
||||
using NHibernate;
|
||||
using Results.Entities;
|
||||
using ResultsBrowser.Resources;
|
||||
|
||||
namespace ResultsBrowser.Filters
|
||||
{
|
||||
public class DateFilter : IFilter
|
||||
{
|
||||
public static string GetFilterID() { return "Date"; }
|
||||
public static string GetFilterName() { return Strings.Date; }
|
||||
|
||||
///
|
||||
/// Obligatory wrappers
|
||||
///
|
||||
public string GetThisFilterID() { return GetFilterID(); }
|
||||
public void Save(StringBuilder sb) { (new XmlSerializer(this.GetType())).Serialize(new StringWriter(sb), this); }
|
||||
public void Data2UI() { userIface.Data2UI(); }
|
||||
public void UI2Data() { userIface.UI2Data(); }
|
||||
public UserControl GetFilterUI() { return userIface as UserControl; }
|
||||
|
||||
///
|
||||
/// Serialized filter data
|
||||
///
|
||||
public DateTime From;
|
||||
public DateTime To;
|
||||
|
||||
|
||||
private DateFilterUI userIface;
|
||||
|
||||
public DateFilter()
|
||||
{
|
||||
userIface = new DateFilterUI(this);
|
||||
}
|
||||
|
||||
public IList<WaterMeter> ExecuteQuery(ISession[] sessions, IList<WaterMeter> waterMeters)
|
||||
{
|
||||
IList<WaterMeter> filteredWaterMeters = new List<WaterMeter>();
|
||||
|
||||
if (waterMeters == null)
|
||||
{
|
||||
foreach (var se in sessions)
|
||||
{
|
||||
IList<Batch> batches = se.QueryOver<Batch>()
|
||||
.WhereRestrictionOn(x => x.EndTime)
|
||||
.IsBetween(From)
|
||||
.And(To)
|
||||
.List<Batch>();
|
||||
|
||||
foreach (var b in batches)
|
||||
{
|
||||
foreach (var wm in b.WaterMeters) filteredWaterMeters.Add(wm);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var wm in waterMeters)
|
||||
{
|
||||
if (wm.Batch.EndTime >= From && wm.Batch.EndTime <= To) filteredWaterMeters.Add(wm);
|
||||
}
|
||||
}
|
||||
|
||||
return filteredWaterMeters;
|
||||
}
|
||||
}
|
||||
}
|
||||
+106
@@ -0,0 +1,106 @@
|
||||
namespace ResultsBrowser.Filters
|
||||
{
|
||||
partial class DateFilterUI
|
||||
{
|
||||
/// <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 Component 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.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.toLabel = new System.Windows.Forms.Label();
|
||||
this.toDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
this.fromLabel = new System.Windows.Forms.Label();
|
||||
this.fromDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.toLabel);
|
||||
this.groupBox1.Controls.Add(this.toDateTimePicker);
|
||||
this.groupBox1.Controls.Add(this.fromLabel);
|
||||
this.groupBox1.Controls.Add(this.fromDateTimePicker);
|
||||
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.groupBox1.Location = new System.Drawing.Point(0, 0);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(835, 40);
|
||||
this.groupBox1.TabIndex = 0;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Date";
|
||||
//
|
||||
// toLabel
|
||||
//
|
||||
this.toLabel.AutoSize = true;
|
||||
this.toLabel.Location = new System.Drawing.Point(390, 16);
|
||||
this.toLabel.Name = "toLabel";
|
||||
this.toLabel.Size = new System.Drawing.Size(20, 13);
|
||||
this.toLabel.TabIndex = 6;
|
||||
this.toLabel.Text = "To";
|
||||
//
|
||||
// toDateTimePicker
|
||||
//
|
||||
this.toDateTimePicker.Location = new System.Drawing.Point(430, 13);
|
||||
this.toDateTimePicker.Name = "toDateTimePicker";
|
||||
this.toDateTimePicker.Size = new System.Drawing.Size(151, 20);
|
||||
this.toDateTimePicker.TabIndex = 5;
|
||||
//
|
||||
// fromLabel
|
||||
//
|
||||
this.fromLabel.AutoSize = true;
|
||||
this.fromLabel.Location = new System.Drawing.Point(128, 17);
|
||||
this.fromLabel.Name = "fromLabel";
|
||||
this.fromLabel.Size = new System.Drawing.Size(30, 13);
|
||||
this.fromLabel.TabIndex = 4;
|
||||
this.fromLabel.Text = "From";
|
||||
//
|
||||
// fromDateTimePicker
|
||||
//
|
||||
this.fromDateTimePicker.Location = new System.Drawing.Point(168, 13);
|
||||
this.fromDateTimePicker.Name = "fromDateTimePicker";
|
||||
this.fromDateTimePicker.Size = new System.Drawing.Size(151, 20);
|
||||
this.fromDateTimePicker.TabIndex = 3;
|
||||
//
|
||||
// DateFilter
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Name = "DateFilter";
|
||||
this.Size = new System.Drawing.Size(835, 40);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.Label fromLabel;
|
||||
private System.Windows.Forms.DateTimePicker fromDateTimePicker;
|
||||
private System.Windows.Forms.Label toLabel;
|
||||
private System.Windows.Forms.DateTimePicker toDateTimePicker;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
using System.Windows.Forms;
|
||||
using ResultsBrowser.Resources;
|
||||
|
||||
namespace ResultsBrowser.Filters
|
||||
{
|
||||
public partial class DateFilterUI : UserControl
|
||||
{
|
||||
DateFilter data;
|
||||
|
||||
/// <summary> Used only by Designer </summary>
|
||||
public DateFilterUI()
|
||||
{
|
||||
InitializeComponent();
|
||||
Localize();
|
||||
}
|
||||
|
||||
/// <summary> Used to create the control aby a filter </summary>
|
||||
public DateFilterUI(DateFilter data)
|
||||
{
|
||||
this.data = data;
|
||||
InitializeComponent();
|
||||
Localize();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
groupBox1.Text = DateFilter.GetFilterName();
|
||||
fromLabel.Text = Strings.From;
|
||||
toLabel.Text = Strings.To;
|
||||
}
|
||||
|
||||
public void Data2UI()
|
||||
{
|
||||
fromDateTimePicker.Value = data.From;
|
||||
toDateTimePicker.Value = data.To;
|
||||
}
|
||||
|
||||
public void UI2Data()
|
||||
{
|
||||
data.From = fromDateTimePicker.Value.Date;
|
||||
data.To = toDateTimePicker.Value.Date.AddDays(1).AddTicks(-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace ResultsBrowser.Filters
|
||||
{
|
||||
static class Factory
|
||||
{
|
||||
public static readonly string[] IDs;
|
||||
public static readonly string[] Names;
|
||||
public static readonly int Count;
|
||||
|
||||
|
||||
static Factory()
|
||||
{
|
||||
IDs = new string[]
|
||||
{
|
||||
DateFilter.GetFilterID(),
|
||||
ProcedureFilter.GetFilterID(),
|
||||
ProtocolFilter.GetFilterID(),
|
||||
QnFilter.GetFilterID(),
|
||||
SerialNrFilter.GetFilterID(),
|
||||
};
|
||||
|
||||
Names = new string[]
|
||||
{
|
||||
DateFilter.GetFilterName(),
|
||||
ProcedureFilter.GetFilterName(),
|
||||
ProtocolFilter.GetFilterName(),
|
||||
QnFilter.GetFilterName(),
|
||||
SerialNrFilter.GetFilterName(),
|
||||
};
|
||||
|
||||
Count = IDs.Length;
|
||||
}
|
||||
|
||||
|
||||
public static IFilter GetFilter(string filterID)
|
||||
{
|
||||
if (filterID == DateFilter.GetFilterID()) return new DateFilter();
|
||||
else if (filterID == ProcedureFilter.GetFilterID()) return new ProcedureFilter();
|
||||
else if (filterID == ProtocolFilter.GetFilterID()) return new ProtocolFilter();
|
||||
else if (filterID == QnFilter.GetFilterID()) return new QnFilter();
|
||||
else if (filterID == SerialNrFilter.GetFilterID()) return new SerialNrFilter();
|
||||
else return null;
|
||||
}
|
||||
|
||||
|
||||
public static IFilter LoadFilter(string filterID, string serializedText)
|
||||
{
|
||||
try
|
||||
{
|
||||
Type type;
|
||||
if (filterID == DateFilter.GetFilterID()) type = typeof(DateFilter);
|
||||
else if (filterID == ProcedureFilter.GetFilterID()) type = typeof(ProcedureFilter);
|
||||
else if (filterID == ProtocolFilter.GetFilterID()) type = typeof(ProtocolFilter);
|
||||
else if (filterID == QnFilter.GetFilterID()) type = typeof(QnFilter);
|
||||
else if (filterID == SerialNrFilter.GetFilterID()) type = typeof(SerialNrFilter);
|
||||
else return null;
|
||||
|
||||
IFilter filter = (new XmlSerializer(type)).Deserialize(new StringReader(serializedText)) as IFilter;
|
||||
filter.Data2UI();
|
||||
return filter;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
string msg = e.Message;
|
||||
MessageBox.Show(e.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using NHibernate;
|
||||
using Results.Entities;
|
||||
|
||||
namespace ResultsBrowser.Filters
|
||||
{
|
||||
public interface IFilter
|
||||
{
|
||||
string GetThisFilterID(); /// Returns string identifying filter type
|
||||
|
||||
void Save(StringBuilder sb); /// Saves filter parameters into a string
|
||||
|
||||
void Data2UI();
|
||||
|
||||
void UI2Data(); /// Throws an exception with appropriate message if UI data are invalid
|
||||
|
||||
UserControl GetFilterUI(); /// Returns filter's UI control to be added to the FlowLayoutPanel
|
||||
|
||||
IList<WaterMeter> ExecuteQuery(ISession[] sessions, IList<WaterMeter> waterMeters);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml.Serialization;
|
||||
using NHibernate;
|
||||
using Results.Entities;
|
||||
using ResultsBrowser.Resources;
|
||||
|
||||
namespace ResultsBrowser.Filters
|
||||
{
|
||||
public class ProcedureFilter : IFilter
|
||||
{
|
||||
public static string GetFilterID() { return "Procedure"; }
|
||||
public static string GetFilterName() { return Strings.Procedure; }
|
||||
|
||||
///
|
||||
/// Obligatory wrappers
|
||||
///
|
||||
public string GetThisFilterID() { return GetFilterID(); }
|
||||
public void Save(StringBuilder sb) { (new XmlSerializer(this.GetType())).Serialize(new StringWriter(sb), this); }
|
||||
public void Data2UI() { userIface.Data2UI(); }
|
||||
public void UI2Data() { userIface.UI2Data(); }
|
||||
public UserControl GetFilterUI() { return userIface as UserControl; }
|
||||
|
||||
///
|
||||
/// Serialized filter data
|
||||
///
|
||||
public string Procedure;
|
||||
|
||||
|
||||
private ProcedureFilterUI userIface;
|
||||
|
||||
public ProcedureFilter()
|
||||
{
|
||||
userIface = new ProcedureFilterUI(this);
|
||||
}
|
||||
|
||||
public IList<WaterMeter> ExecuteQuery(ISession[] sessions, IList<WaterMeter> waterMeters)
|
||||
{
|
||||
IList<WaterMeter> filteredWaterMeters = new List<WaterMeter>();
|
||||
|
||||
if (waterMeters == null)
|
||||
{
|
||||
foreach (var se in sessions)
|
||||
{
|
||||
IList<Batch> batches = se.QueryOver<Batch>()
|
||||
.Where(x => (x.ProcedureName == Procedure))
|
||||
.List<Batch>();
|
||||
|
||||
foreach (var b in batches)
|
||||
{
|
||||
foreach (var wm in b.WaterMeters) filteredWaterMeters.Add(wm);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var wm in waterMeters)
|
||||
{
|
||||
if (wm.Batch.ProcedureName == Procedure) filteredWaterMeters.Add(wm);
|
||||
}
|
||||
}
|
||||
|
||||
return filteredWaterMeters;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
namespace ResultsBrowser.Filters
|
||||
{
|
||||
partial class ProcedureFilterUI
|
||||
{
|
||||
/// <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 Component 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.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.procedureTextBox = new System.Windows.Forms.TextBox();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.procedureTextBox);
|
||||
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.groupBox1.Location = new System.Drawing.Point(0, 0);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(835, 40);
|
||||
this.groupBox1.TabIndex = 0;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Procedure";
|
||||
//
|
||||
// procedureTextBox
|
||||
//
|
||||
this.procedureTextBox.Location = new System.Drawing.Point(132, 13);
|
||||
this.procedureTextBox.Name = "procedureTextBox";
|
||||
this.procedureTextBox.Size = new System.Drawing.Size(138, 20);
|
||||
this.procedureTextBox.TabIndex = 0;
|
||||
//
|
||||
// ProcedureFilter
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Name = "ProcedureFilter";
|
||||
this.Size = new System.Drawing.Size(835, 40);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.TextBox procedureTextBox;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ResultsBrowser.Filters
|
||||
{
|
||||
public partial class ProcedureFilterUI : UserControl
|
||||
{
|
||||
ProcedureFilter data;
|
||||
|
||||
/// <summary> Used only by Designer </summary>
|
||||
public ProcedureFilterUI()
|
||||
{
|
||||
InitializeComponent();
|
||||
Localize();
|
||||
}
|
||||
|
||||
/// <summary> Used to create the control aby a filter </summary>
|
||||
public ProcedureFilterUI(ProcedureFilter data)
|
||||
{
|
||||
this.data = data;
|
||||
InitializeComponent();
|
||||
Localize();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
groupBox1.Text = ProcedureFilter.GetFilterName();
|
||||
}
|
||||
|
||||
public void Data2UI()
|
||||
{
|
||||
procedureTextBox.Text = (data.Procedure != null) ? data.Procedure : string.Empty;
|
||||
}
|
||||
|
||||
public void UI2Data()
|
||||
{
|
||||
data.Procedure = procedureTextBox.Text;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml.Serialization;
|
||||
using NHibernate;
|
||||
using Results.Entities;
|
||||
using ResultsBrowser.Resources;
|
||||
|
||||
namespace ResultsBrowser.Filters
|
||||
{
|
||||
public class ProtocolFilter : IFilter
|
||||
{
|
||||
public static string GetFilterID() { return "Protocol"; }
|
||||
public static string GetFilterName() { return Strings.Protocol; }
|
||||
|
||||
///
|
||||
/// Obligatory wrappers
|
||||
///
|
||||
public string GetThisFilterID() { return GetFilterID(); }
|
||||
public void Save(StringBuilder sb) { (new XmlSerializer(this.GetType())).Serialize(new StringWriter(sb), this); }
|
||||
public void Data2UI() { userIface.Data2UI(); }
|
||||
public void UI2Data() { userIface.UI2Data(); }
|
||||
public UserControl GetFilterUI() { return userIface as UserControl; }
|
||||
|
||||
///
|
||||
/// Serialized filter data
|
||||
///
|
||||
public string Protocol;
|
||||
|
||||
|
||||
private ProtocolFilterUI userIface;
|
||||
|
||||
public ProtocolFilter()
|
||||
{
|
||||
userIface = new ProtocolFilterUI(this);
|
||||
}
|
||||
|
||||
public IList<WaterMeter> ExecuteQuery(ISession[] sessions, IList<WaterMeter> waterMeters)
|
||||
{
|
||||
IList<WaterMeter> filteredWaterMeters = new List<WaterMeter>();
|
||||
|
||||
if (waterMeters == null)
|
||||
{
|
||||
foreach (var se in sessions)
|
||||
{
|
||||
IList<Batch> batches = se.QueryOver<Batch>()
|
||||
.Where(x => (x.ProtocolTitle == Protocol))
|
||||
.List<Batch>();
|
||||
|
||||
foreach (var b in batches)
|
||||
{
|
||||
foreach (var wm in b.WaterMeters) filteredWaterMeters.Add(wm);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var wm in waterMeters)
|
||||
{
|
||||
if (wm.Batch.ProtocolTitle == Protocol) filteredWaterMeters.Add(wm);
|
||||
}
|
||||
}
|
||||
|
||||
return filteredWaterMeters;
|
||||
}
|
||||
}
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
namespace ResultsBrowser.Filters
|
||||
{
|
||||
partial class ProtocolFilterUI
|
||||
{
|
||||
/// <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 Component 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.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.protocolTextBox = new System.Windows.Forms.TextBox();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.protocolTextBox);
|
||||
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.groupBox1.Location = new System.Drawing.Point(0, 0);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(835, 40);
|
||||
this.groupBox1.TabIndex = 0;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Procedure";
|
||||
//
|
||||
// procedureTextBox
|
||||
//
|
||||
this.protocolTextBox.Location = new System.Drawing.Point(132, 13);
|
||||
this.protocolTextBox.Name = "procedureTextBox";
|
||||
this.protocolTextBox.Size = new System.Drawing.Size(138, 20);
|
||||
this.protocolTextBox.TabIndex = 0;
|
||||
//
|
||||
// ProcedureFilter
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Name = "ProcedureFilter";
|
||||
this.Size = new System.Drawing.Size(835, 40);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.TextBox protocolTextBox;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ResultsBrowser.Filters
|
||||
{
|
||||
public partial class ProtocolFilterUI : UserControl
|
||||
{
|
||||
ProtocolFilter data;
|
||||
|
||||
/// <summary> Used only by Designer </summary>
|
||||
public ProtocolFilterUI()
|
||||
{
|
||||
InitializeComponent();
|
||||
Localize();
|
||||
}
|
||||
|
||||
/// <summary> Used to create the control aby a filter </summary>
|
||||
public ProtocolFilterUI(ProtocolFilter data)
|
||||
{
|
||||
this.data = data;
|
||||
InitializeComponent();
|
||||
Localize();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
groupBox1.Text = ProtocolFilter.GetFilterName();
|
||||
}
|
||||
|
||||
public void Data2UI()
|
||||
{
|
||||
protocolTextBox.Text = (data.Protocol != null) ? data.Protocol : string.Empty;
|
||||
}
|
||||
|
||||
public void UI2Data()
|
||||
{
|
||||
data.Protocol = protocolTextBox.Text;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?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>
|
||||
</root>
|
||||
@@ -0,0 +1,67 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml.Serialization;
|
||||
using NHibernate;
|
||||
using Results.Entities;
|
||||
using ResultsBrowser.Resources;
|
||||
|
||||
namespace ResultsBrowser.Filters
|
||||
{
|
||||
public class QnFilter : IFilter
|
||||
{
|
||||
public static string GetFilterID() { return "Qn"; }
|
||||
public static string GetFilterName() { return "Qn"; }
|
||||
|
||||
///
|
||||
/// Obligatory wrappers
|
||||
///
|
||||
public string GetThisFilterID() { return GetFilterID(); }
|
||||
public void Save(StringBuilder sb) { (new XmlSerializer(this.GetType())).Serialize(new StringWriter(sb), this); }
|
||||
public void Data2UI() { userIface.Data2UI(); }
|
||||
public void UI2Data() { userIface.UI2Data(); }
|
||||
public UserControl GetFilterUI() { return userIface as UserControl; }
|
||||
|
||||
///
|
||||
/// Serialized filter data
|
||||
///
|
||||
public double Qn;
|
||||
|
||||
|
||||
private QnFilterUI userIface;
|
||||
|
||||
public QnFilter()
|
||||
{
|
||||
userIface = new QnFilterUI(this);
|
||||
}
|
||||
|
||||
public IList<WaterMeter> ExecuteQuery(ISession[] sessions, IList<WaterMeter> waterMeters)
|
||||
{
|
||||
IList<WaterMeter> filteredWaterMeters = new List<WaterMeter>();
|
||||
|
||||
if (waterMeters == null)
|
||||
{
|
||||
foreach (var se in sessions)
|
||||
{
|
||||
IList<WaterMeter> wms = se.QueryOver<WaterMeter>().List<WaterMeter>();
|
||||
|
||||
foreach (var wm in wms)
|
||||
{
|
||||
if (wm.Q3_Qn() == Qn) filteredWaterMeters.Add(wm);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var wm in waterMeters)
|
||||
{
|
||||
if (wm.Q3_Qn() == Qn) filteredWaterMeters.Add(wm);
|
||||
}
|
||||
}
|
||||
|
||||
return filteredWaterMeters;
|
||||
}
|
||||
}
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
namespace ResultsBrowser.Filters
|
||||
{
|
||||
partial class QnFilterUI
|
||||
{
|
||||
/// <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 Component 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.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.procedureTextBox = new System.Windows.Forms.TextBox();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.procedureTextBox);
|
||||
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.groupBox1.Location = new System.Drawing.Point(0, 0);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(835, 40);
|
||||
this.groupBox1.TabIndex = 0;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Qn";
|
||||
//
|
||||
// procedureTextBox
|
||||
//
|
||||
this.procedureTextBox.Location = new System.Drawing.Point(132, 13);
|
||||
this.procedureTextBox.Name = "procedureTextBox";
|
||||
this.procedureTextBox.Size = new System.Drawing.Size(138, 20);
|
||||
this.procedureTextBox.TabIndex = 0;
|
||||
//
|
||||
// QnFilter
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Name = "QnFilter";
|
||||
this.Size = new System.Drawing.Size(835, 40);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.TextBox procedureTextBox;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ResultsBrowser.Filters
|
||||
{
|
||||
public partial class QnFilterUI : UserControl
|
||||
{
|
||||
QnFilter data;
|
||||
|
||||
/// <summary> Used only by Designer </summary>
|
||||
public QnFilterUI()
|
||||
{
|
||||
InitializeComponent();
|
||||
Localize();
|
||||
}
|
||||
|
||||
/// <summary> Used to create the control aby a filter </summary>
|
||||
public QnFilterUI(QnFilter data)
|
||||
{
|
||||
this.data = data;
|
||||
InitializeComponent();
|
||||
Localize();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
groupBox1.Text = QnFilter.GetFilterName();
|
||||
}
|
||||
|
||||
public void Data2UI()
|
||||
{
|
||||
procedureTextBox.Text = data.Qn.ToString();
|
||||
}
|
||||
|
||||
public void UI2Data()
|
||||
{
|
||||
data.Qn = double.Parse(procedureTextBox.Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?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>
|
||||
</root>
|
||||
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml.Serialization;
|
||||
using NHibernate;
|
||||
using Results.Entities;
|
||||
using ResultsBrowser.Resources;
|
||||
|
||||
namespace ResultsBrowser.Filters
|
||||
{
|
||||
public class SerialNrFilter : IFilter
|
||||
{
|
||||
public static string GetFilterID() { return "SerialNr"; }
|
||||
public static string GetFilterName() { return Strings.Serial_Number; }
|
||||
|
||||
///
|
||||
/// Obligatory wrappers
|
||||
///
|
||||
public string GetThisFilterID() { return GetFilterID(); }
|
||||
public void Save(StringBuilder sb) { (new XmlSerializer(this.GetType())).Serialize(new StringWriter(sb), this); }
|
||||
public void Data2UI() { userIface.Data2UI(); }
|
||||
public void UI2Data() { userIface.UI2Data(); }
|
||||
public UserControl GetFilterUI() { return userIface as UserControl; }
|
||||
|
||||
///
|
||||
/// Serialized filter data
|
||||
///
|
||||
public string SerialNr;
|
||||
|
||||
|
||||
private SerialNrFilterUI userIface;
|
||||
|
||||
public SerialNrFilter()
|
||||
{
|
||||
userIface = new SerialNrFilterUI(this);
|
||||
}
|
||||
|
||||
public IList<WaterMeter> ExecuteQuery(ISession[] sessions, IList<WaterMeter> waterMeters)
|
||||
{
|
||||
IList<WaterMeter> filteredWaterMeters = new List<WaterMeter>();
|
||||
|
||||
if (waterMeters == null)
|
||||
{
|
||||
foreach (var se in sessions)
|
||||
{
|
||||
IList<WaterMeter> wms = se.QueryOver<WaterMeter>()
|
||||
.Where(x => (x.SerialNr == SerialNr))
|
||||
.List<WaterMeter>();
|
||||
foreach (var wm in wms) filteredWaterMeters.Add(wm);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var wm in waterMeters)
|
||||
{
|
||||
if (wm.SerialNr == SerialNr) filteredWaterMeters.Add(wm);
|
||||
}
|
||||
}
|
||||
|
||||
return filteredWaterMeters;
|
||||
}
|
||||
}
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
namespace ResultsBrowser.Filters
|
||||
{
|
||||
partial class SerialNrFilterUI
|
||||
{
|
||||
/// <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 Component 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.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.serialNrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.serialNrTextBox);
|
||||
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.groupBox1.Location = new System.Drawing.Point(0, 0);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(835, 40);
|
||||
this.groupBox1.TabIndex = 0;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Serial number";
|
||||
//
|
||||
// serialNrTextBox
|
||||
//
|
||||
this.serialNrTextBox.Location = new System.Drawing.Point(132, 13);
|
||||
this.serialNrTextBox.Name = "serialNrTextBox";
|
||||
this.serialNrTextBox.Size = new System.Drawing.Size(138, 20);
|
||||
this.serialNrTextBox.TabIndex = 0;
|
||||
//
|
||||
// SerialNrFilter
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Name = "SerialNrFilter";
|
||||
this.Size = new System.Drawing.Size(835, 40);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.TextBox serialNrTextBox;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ResultsBrowser.Filters
|
||||
{
|
||||
public partial class SerialNrFilterUI : UserControl
|
||||
{
|
||||
SerialNrFilter data;
|
||||
|
||||
/// <summary> Used only by Designer </summary>
|
||||
public SerialNrFilterUI()
|
||||
{
|
||||
InitializeComponent();
|
||||
Localize();
|
||||
}
|
||||
|
||||
/// <summary> Used to create the control aby a filter </summary>
|
||||
public SerialNrFilterUI(SerialNrFilter data)
|
||||
{
|
||||
this.data = data;
|
||||
InitializeComponent();
|
||||
Localize();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
groupBox1.Text = SerialNrFilter.GetFilterName();
|
||||
}
|
||||
|
||||
public void Data2UI()
|
||||
{
|
||||
serialNrTextBox.Text = (data.SerialNr != null) ? data.SerialNr : string.Empty;
|
||||
}
|
||||
|
||||
public void UI2Data()
|
||||
{
|
||||
data.SerialNr = serialNrTextBox.Text;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?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>
|
||||
</root>
|
||||
@@ -0,0 +1,78 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace ResultsBrowser
|
||||
{
|
||||
/// <summary>
|
||||
/// Class to be serialized to an XML file...
|
||||
/// Public members are filters / parts of a query.
|
||||
/// </summary>
|
||||
[XmlRootAttribute("Query")]
|
||||
public class FiltersConfig
|
||||
{
|
||||
public string[] FilterID;
|
||||
public string[] FilterData;
|
||||
|
||||
[XmlIgnore]
|
||||
public int FiltersCount { get { return Math.Min((FilterID != null) ? FilterID.Length : 0,
|
||||
(FilterData != null) ? FilterData.Length : 0); } }
|
||||
|
||||
|
||||
public FiltersConfig()
|
||||
{
|
||||
}
|
||||
|
||||
public FiltersConfig(int count)
|
||||
{
|
||||
if (count > 0)
|
||||
{
|
||||
FilterID = new string[count];
|
||||
FilterData = new string[count];
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load public fields of this class from the XML file.
|
||||
/// </summary>
|
||||
public static FiltersConfig Load(string fileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (TextReader reader = new StreamReader(fileName))
|
||||
{
|
||||
FiltersConfig ls = (new XmlSerializer(typeof(FiltersConfig))).Deserialize(reader) as FiltersConfig;
|
||||
// Copy the settings just in case De-serialize() completes OK
|
||||
return ls;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
string msg = e.Message;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Save public fields of this class to the XML file.
|
||||
/// </summary>
|
||||
public void Save(string fileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (TextWriter writer = new StreamWriter(fileName))
|
||||
{
|
||||
(new XmlSerializer(typeof(FiltersConfig))).Serialize(writer, this);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
string msg = e.Message;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
namespace ResultsBrowser.Forms
|
||||
{
|
||||
partial class AddFilterDlg
|
||||
{
|
||||
/// <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.availFiltersListBox = new System.Windows.Forms.ListBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// availFiltersListBox
|
||||
//
|
||||
this.availFiltersListBox.FormattingEnabled = true;
|
||||
this.availFiltersListBox.Location = new System.Drawing.Point(12, 31);
|
||||
this.availFiltersListBox.Name = "availFiltersListBox";
|
||||
this.availFiltersListBox.Size = new System.Drawing.Size(288, 264);
|
||||
this.availFiltersListBox.TabIndex = 1;
|
||||
this.availFiltersListBox.DoubleClick += new System.EventHandler(this.availFiltersListBox_DoubleClick);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(12, 9);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(37, 13);
|
||||
this.label1.TabIndex = 2;
|
||||
this.label1.Text = "Filters:";
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.cancelButton.Location = new System.Drawing.Point(201, 310);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(99, 25);
|
||||
this.cancelButton.TabIndex = 10;
|
||||
this.cancelButton.Text = "&Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.okButton.Location = new System.Drawing.Point(96, 310);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(99, 25);
|
||||
this.okButton.TabIndex = 9;
|
||||
this.okButton.Text = "&OK";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// AddFilterDlg
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(314, 350);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.availFiltersListBox);
|
||||
this.Name = "AddFilterDlg";
|
||||
this.Text = "Select a filter";
|
||||
this.Load += new System.EventHandler(this.AddFilterDlg_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.ListBox availFiltersListBox;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
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;
|
||||
using ResultsBrowser.Resources;
|
||||
|
||||
namespace ResultsBrowser.Forms
|
||||
{
|
||||
public partial class AddFilterDlg : Form
|
||||
{
|
||||
public string SelectedFilterID;
|
||||
|
||||
private int selectedIndex = -1;
|
||||
|
||||
public AddFilterDlg()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
foreach (var fName in Filters.Factory.Names)
|
||||
{
|
||||
availFiltersListBox.Items.Add(fName);
|
||||
}
|
||||
}
|
||||
|
||||
private void AddFilterDlg_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Select_a_filter;
|
||||
label1.Text = Strings.Filters;
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
cancelButton.Text = Strings.CancelBtnText;
|
||||
}
|
||||
|
||||
private void availFiltersListBox_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
okButton_Click(sender, e);
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
int ix = availFiltersListBox.SelectedIndex;
|
||||
if (ix >= 0 && ix < Filters.Factory.Count)
|
||||
{
|
||||
selectedIndex = ix;
|
||||
SelectedFilterID = (string)Filters.Factory.IDs[ix];
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
SelectedFilterID = null;
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?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>
|
||||
</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();
|
||||
}
|
||||
}
|
||||
}
|
||||
+184
@@ -0,0 +1,184 @@
|
||||
namespace ResultsBrowser.Forms
|
||||
{
|
||||
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()
|
||||
{
|
||||
this.connectionStringTextBox1 = new System.Windows.Forms.TextBox();
|
||||
this.benchNameLabel = new System.Windows.Forms.Label();
|
||||
this.connectionStringLabel = new System.Windows.Forms.Label();
|
||||
this.connectionStringTextBox2 = new System.Windows.Forms.TextBox();
|
||||
this.connectionStringTextBox3 = new System.Windows.Forms.TextBox();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.benchNameTextBox1 = new System.Windows.Forms.TextBox();
|
||||
this.benchNameTextBox2 = new System.Windows.Forms.TextBox();
|
||||
this.benchNameTextBox3 = new System.Windows.Forms.TextBox();
|
||||
this.languageLabel = new System.Windows.Forms.Label();
|
||||
this.languageTextBox = new System.Windows.Forms.TextBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// connectionStringTextBox1
|
||||
//
|
||||
this.connectionStringTextBox1.Location = new System.Drawing.Point(157, 45);
|
||||
this.connectionStringTextBox1.Name = "connectionStringTextBox1";
|
||||
this.connectionStringTextBox1.Size = new System.Drawing.Size(555, 20);
|
||||
this.connectionStringTextBox1.TabIndex = 0;
|
||||
//
|
||||
// benchNameLabel
|
||||
//
|
||||
this.benchNameLabel.AutoSize = true;
|
||||
this.benchNameLabel.Location = new System.Drawing.Point(26, 20);
|
||||
this.benchNameLabel.Name = "benchNameLabel";
|
||||
this.benchNameLabel.Size = new System.Drawing.Size(67, 13);
|
||||
this.benchNameLabel.TabIndex = 1;
|
||||
this.benchNameLabel.Text = "Bench name";
|
||||
//
|
||||
// connectionStringLabel
|
||||
//
|
||||
this.connectionStringLabel.AutoSize = true;
|
||||
this.connectionStringLabel.Location = new System.Drawing.Point(154, 20);
|
||||
this.connectionStringLabel.Name = "connectionStringLabel";
|
||||
this.connectionStringLabel.Size = new System.Drawing.Size(89, 13);
|
||||
this.connectionStringLabel.TabIndex = 3;
|
||||
this.connectionStringLabel.Text = "Connection string";
|
||||
//
|
||||
// connectionStringTextBox2
|
||||
//
|
||||
this.connectionStringTextBox2.Location = new System.Drawing.Point(157, 71);
|
||||
this.connectionStringTextBox2.Name = "connectionStringTextBox2";
|
||||
this.connectionStringTextBox2.Size = new System.Drawing.Size(555, 20);
|
||||
this.connectionStringTextBox2.TabIndex = 2;
|
||||
//
|
||||
// connectionStringTextBox3
|
||||
//
|
||||
this.connectionStringTextBox3.Location = new System.Drawing.Point(157, 97);
|
||||
this.connectionStringTextBox3.Name = "connectionStringTextBox3";
|
||||
this.connectionStringTextBox3.Size = new System.Drawing.Size(555, 20);
|
||||
this.connectionStringTextBox3.TabIndex = 4;
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.Location = new System.Drawing.Point(506, 158);
|
||||
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(617, 158);
|
||||
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);
|
||||
//
|
||||
// benchNameTextBox1
|
||||
//
|
||||
this.benchNameTextBox1.Location = new System.Drawing.Point(29, 45);
|
||||
this.benchNameTextBox1.Name = "benchNameTextBox1";
|
||||
this.benchNameTextBox1.Size = new System.Drawing.Size(100, 20);
|
||||
this.benchNameTextBox1.TabIndex = 8;
|
||||
//
|
||||
// benchNameTextBox2
|
||||
//
|
||||
this.benchNameTextBox2.Location = new System.Drawing.Point(29, 71);
|
||||
this.benchNameTextBox2.Name = "benchNameTextBox2";
|
||||
this.benchNameTextBox2.Size = new System.Drawing.Size(100, 20);
|
||||
this.benchNameTextBox2.TabIndex = 9;
|
||||
//
|
||||
// benchNameTextBox3
|
||||
//
|
||||
this.benchNameTextBox3.Location = new System.Drawing.Point(29, 97);
|
||||
this.benchNameTextBox3.Name = "benchNameTextBox3";
|
||||
this.benchNameTextBox3.Size = new System.Drawing.Size(100, 20);
|
||||
this.benchNameTextBox3.TabIndex = 10;
|
||||
//
|
||||
// languageLabel
|
||||
//
|
||||
this.languageLabel.AutoSize = true;
|
||||
this.languageLabel.Location = new System.Drawing.Point(26, 147);
|
||||
this.languageLabel.Name = "languageLabel";
|
||||
this.languageLabel.Size = new System.Drawing.Size(55, 13);
|
||||
this.languageLabel.TabIndex = 11;
|
||||
this.languageLabel.Text = "Language";
|
||||
//
|
||||
// languageTextBox
|
||||
//
|
||||
this.languageTextBox.Location = new System.Drawing.Point(29, 171);
|
||||
this.languageTextBox.Name = "languageTextBox";
|
||||
this.languageTextBox.Size = new System.Drawing.Size(100, 20);
|
||||
this.languageTextBox.TabIndex = 12;
|
||||
//
|
||||
// DatabaseSettingsDlg
|
||||
//
|
||||
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(743, 232);
|
||||
this.Controls.Add(this.languageTextBox);
|
||||
this.Controls.Add(this.languageLabel);
|
||||
this.Controls.Add(this.benchNameTextBox3);
|
||||
this.Controls.Add(this.benchNameTextBox2);
|
||||
this.Controls.Add(this.benchNameTextBox1);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Controls.Add(this.connectionStringTextBox3);
|
||||
this.Controls.Add(this.connectionStringLabel);
|
||||
this.Controls.Add(this.connectionStringTextBox2);
|
||||
this.Controls.Add(this.benchNameLabel);
|
||||
this.Controls.Add(this.connectionStringTextBox1);
|
||||
this.Name = "DatabaseSettingsDlg";
|
||||
this.Text = "Database Settings";
|
||||
this.Load += new System.EventHandler(this.DatabaseSettings_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox connectionStringTextBox1;
|
||||
private System.Windows.Forms.Label benchNameLabel;
|
||||
private System.Windows.Forms.Label connectionStringLabel;
|
||||
private System.Windows.Forms.TextBox connectionStringTextBox2;
|
||||
private System.Windows.Forms.TextBox connectionStringTextBox3;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.TextBox benchNameTextBox1;
|
||||
private System.Windows.Forms.TextBox benchNameTextBox2;
|
||||
private System.Windows.Forms.TextBox benchNameTextBox3;
|
||||
private System.Windows.Forms.Label languageLabel;
|
||||
private System.Windows.Forms.TextBox languageTextBox;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
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;
|
||||
using ResultsBrowser.Resources;
|
||||
|
||||
namespace ResultsBrowser.Forms
|
||||
{
|
||||
public partial class DatabaseSettingsDlg : Form
|
||||
{
|
||||
public DatabaseSettingsDlg()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void DatabaseSettings_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
|
||||
benchNameTextBox1.Text = Program.LocalSettings.Bench1;
|
||||
benchNameTextBox2.Text = Program.LocalSettings.Bench2;
|
||||
benchNameTextBox3.Text = Program.LocalSettings.Bench3;
|
||||
|
||||
connectionStringTextBox1.Text = Program.LocalSettings.ConnectionString1;
|
||||
connectionStringTextBox2.Text = Program.LocalSettings.ConnectionString2;
|
||||
connectionStringTextBox3.Text = Program.LocalSettings.ConnectionString3;
|
||||
|
||||
languageTextBox.Text = Program.LocalSettings.Language;
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Settings;
|
||||
benchNameLabel.Text = Strings.Test_bench;
|
||||
connectionStringLabel.Text = Strings.Connection_string; /// TODO: Use resources
|
||||
languageLabel.Text = Strings.Language;
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
cancelButton.Text = Strings.CancelBtnText;
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
Program.LocalSettings.Bench1 = benchNameTextBox1.Text;
|
||||
Program.LocalSettings.Bench2 = benchNameTextBox2.Text;
|
||||
Program.LocalSettings.Bench3 = benchNameTextBox3.Text;
|
||||
|
||||
Program.LocalSettings.ConnectionString1 = connectionStringTextBox1.Text;
|
||||
Program.LocalSettings.ConnectionString2 = connectionStringTextBox2.Text;
|
||||
Program.LocalSettings.ConnectionString3 = connectionStringTextBox3.Text;
|
||||
|
||||
Program.LocalSettings.Language = languageTextBox.Text;
|
||||
|
||||
Program.LocalSettings.Save();
|
||||
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user