Compare commits

...
Author SHA1 Message Date
Milan Hanajik ff407fc484 Reconfigured for iPerl 2021-04-16 12:33:57 +02:00
Milan Hanajik cda8359623 ver. 2.26.1623 2021-04-16 12:32:57 +02:00
Milan Hanajik 508315a43f Output.SensusTestInfo : (1) S620_Kiwa, (2) CreateFromProcedure() fixed, ver. 2.26.1622 2021-04-16 12:12:24 +02:00
Milan Hanajik 9a8c9205d3 Izrael-50 component upgraded. 2021-04-15 12:06:19 +02:00
Milan Hanajik d7728d304a ver. 2.26.1617 2021-04-14 11:51:07 +02:00
Milan Hanajik fd0d7dcf7b A better bug fix in LeakTest, ver. 2.26.1616 2021-04-14 11:33:15 +02:00
Milan Hanajik 997e0d2a6b ver. 2.26.1609 2021-04-13 15:20:38 +02:00
Milan Hanajik 51e1e5721c Bug fix : Results.BatchResults.NewFromProcedure( ) uses GetTestInstances( ). 2021-04-13 14:40:38 +02:00
Milan Hanajik 34c3fa26c9 Trivial simulation mode for some test methods. 2021-04-13 13:57:28 +02:00
Milan Hanajik 5e3e70f43a Australia 169 MHz SensusTestInfo modified, first100 pieces with Q2ac, ver. 2.26.1608 2021-04-13 08:48:47 +02:00
Milan Hanajik 18880dc04d Assignment of drain valves to scales and tanks fixed. ver. 2.26.1607 2021-04-12 12:00:23 +02:00
Milan Hanajik 2673584113 MergeResultsDBs console application added to solution. 2021-04-12 05:59:37 +02:00
Milan Hanajik e90967b6ed Results.Entities bug fixes and copy constructors. 2021-04-12 05:19:47 +02:00
Milan Hanajik 46489224cf MainSeqUtils : Prevent crash when draining tanks at the end. 2021-04-08 13:52:05 +02:00
Milan Hanajik d8fc4a4c36 UI.Procedures.ProceduresCtrl can display procedure properties of Sensus-Oracle-DB component. 2021-04-08 12:03:25 +02:00
Milan Hanajik ae18e15fba Order of RunDeviceAfter( ), StopDevice( ) and StopDevice2( ) calls reversed, ver. 2.26.1599 2021-04-08 12:03:25 +02:00
Milan Hanajik 352ed581c2 Getting rid of warnings. 2021-04-08 12:03:25 +02:00
Milan Hanajik b5572c20e3 Factories are without ResetStaticProperties( ). 2021-04-08 12:03:25 +02:00
Milan Hanajik 1d50b7206d Components Initialize() rewritten, double StartChangeHandler() calls avoided, ToString() methods are equl, use ClassName. 2021-04-08 12:03:18 +02:00
Milan Hanajik 331803e51d MeterTestRslt.WriteBinary( ) hot fix. 2021-04-07 12:05:09 +02:00
Milan Hanajik ed25f1a360 Cosmetic changes in evaluation of tests. 2021-04-04 14:49:35 +02:00
Milan Hanajik 111fd8d96c ver. 2.26.1597 2021-03-31 11:10:56 +02:00
Milan Hanajik c86bafd779 UpgradeSelectionDlg/Custom, more logging in Output.DB.SensusOracle.ProcedureParams. 2021-03-31 09:21:43 +02:00
Milan Hanajik c472bfc99d iPerlCommmunication : New Q2 correction for Australia. 2021-03-30 11:36:01 +02:00
Milan Hanajik b8eaaeb64c ProcedureDlg bug fix : Copy button visible for all benches, ver. 2.26.1596 2021-03-30 11:35:40 +02:00
Milan Hanajik b09a057b02 ver. 2.26.1595 2021-03-30 00:08:47 +02:00
Milan Hanajik 9f19df7f3f Support for Statistics off-line mode: change LocalSettings.cs line 244. 2021-03-12 10:01:27 +01:00
Milan Hanajik db9506290a SerialStream simulation : Reads characters from a file instead of a serial port. 2021-03-08 18:01:48 +01:00
Milan Hanajik 4505759115 DataEntry.iPerl : No CycleEndForm, does not implement IHasCycleEndForm. 2021-03-08 13:12:40 +01:00
Milan Hanajik d15497f2b0 InfoFlagsStr in Results as an item in WMeterRsltItemSpec. 2021-02-19 11:18:11 +01:00
Milan Hanajik ec9edbf04c DataEntry.Standard24.CycleBeginningForm : Auto s/n feature. 2021-02-16 15:55:26 +01:00
Milan Hanajik 31b167cd62 MettlerToledo.Standard.BalanceDev/Old/NewDev clean-up, units (oz), 1st after draining, etc. 2021-02-16 11:34:46 +01:00
Milan Hanajik 1d33b9651b Milwaukee : Elde component upgraded, 09.02.2021 2021-02-11 08:51:13 +01:00
Milan Hanajik 3bf8b4fe54 DataEntry.S620 supports production tracing, S/Ns from OraDB + disp., flash and beep, ver. 2.26.1592 2021-02-10 13:58:54 +01:00
Milan Hanajik 2e75d91adc Bug fix in MetrologyDlgFlowMeterTab, etc. when ranges are enabled, ver. 2.26.1588 2021-02-08 10:12:12 +01:00
Milan Hanajik 55d9d58978 BenchControlPanel : Four main buttons are disabled on TBF start. 2021-02-04 15:04:19 +01:00
Milan Hanajik 241bb3aff1 TestTimeCorrection and MassOfEvapWater are stored in SummaryResults columns BK resp. BB 2021-01-29 10:46:45 +01:00
Milan Hanajik 0fa8057324 RealDensity, AtTemperature, Buoyancy are stored in Results DB in Batch table. 2021-01-28 13:55:27 +01:00
Milan Hanajik 4609abe6ea SensusOracle.Database SQL style changes, ver. 2.26.1586 2021-01-28 13:53:06 +01:00
Milan Hanajik cb6d9538c8 ver. 2.26.1585 2021-01-26 16:48:30 +01:00
Milan Hanajik 8ec062b165 DataEntry.S620 changes, ver. 2.26.1584 2021-01-26 14:54:51 +01:00
Milan Hanajik b2df02dd1b Changes in MainSeq, Procedure, BenchControlPanel, TestProgressControls, etc., ver. 2.26.1583 2021-01-25 13:01:59 +01:00
Milan Hanajik c403f9345f (1) FlyingStartMassCollProlonged fixed, more logging, (2) Password of day, ver. 2.26.1579 2021-01-25 13:01:16 +01:00
Milan Hanajik b97b795c93 ResultsBrowser supports 9 test benches, ver. 2.26.1577 2021-01-25 13:01:16 +01:00
Milan Hanajik 4a1c6ef031 Units : Ft3/h and US gal/min added. 2021-01-19 10:50:29 +01:00
Milan Hanajik 40f3aacd32 Milwaukee component updated (18.1.2021, imperial units) 2021-01-19 10:50:29 +01:00
Milan Hanajik 8e9344cc47 1. ResultsBrowserWnd custom query : GetListOfUsedProcedures, DEWA 2. SensusOracle.DB comments 2021-01-19 10:50:29 +01:00
Milan Hanajik b3160799c8 (1) PreviousResultsDlg with filters, (2) Procedure history can be inspected, ver. 2.26.1577 2021-01-19 10:50:10 +01:00
Milan Hanajik 66852682bf Elde.RegulValveMilwaukee, Modbus.Novus added, Elde component updated (18.12.2020), ver. 2.26.1571 2021-01-15 14:15:15 +01:00
Milan Hanajik 3399b07fc0 MainSeqUtils.CreateNewBatchResults( ) bug fix. 2021-01-08 09:16:20 +01:00
Milan Hanajik 844f5573dc Merge branch 'm2' into master-2.26, ver. 2.26.1569 2021-01-07 14:42:07 +01:00
Milan Hanajik e9cc77a2d5 Merge branch 'master-2.26' into m3 2021-01-07 10:09:18 +01:00
Milan Hanajik 2981ab2a5f Milwaukee : ADC-s for diverters can be calibrated, ver. 2.26.1568 2021-01-05 14:06:15 +01:00
Milan Hanajik a3227f356f DataEntry.WMStates restored - has been used in Fuzhou PT300 2021-01-05 09:45:43 +01:00
Milan Hanajik 0d8210614d EtPulsesK and DivSamples() fixed for all Fuzhou test benches, ver. 2.26.1567 2021-01-05 09:45:34 +01:00
Milan Hanajik 97df1250dc DataEntry.S620 added, Results.Entities.WaterMeter.AssignedSerialNr/Prefix/Suffix/CompleteSerialNr/WMTypeRevision mapped to DB. 2020-12-18 08:39:28 +01:00
Milan Hanajik 11eff5c962 EtPulsesK fixed for all Fuzhou test benches, ver. 2.26.1563 2020-12-18 08:39:28 +01:00
Milan Hanajik f95f961a5d Output.FileWriters.Enhanced with formatted WM subtitles 2020-12-18 08:38:16 +01:00
Milan Hanajik 4db2f475cd DataEntry.S620 added, Results.Entities.WaterMeter.AssignedSerialNr/Prefix/Suffix/CompleteSerialNr/WMTypeRevision mapped to DB. 2020-12-17 10:12:05 +01:00
Milan Hanajik 9dbbf03acd Output.FileWriters.Enhanced with formatted WM subtitles 2020-12-17 10:11:56 +01:00
Milan Hanajik d8ed144dee TracingDB synchronized with Production-Monitoring project, ver. 2.26.1562 2020-12-17 09:05:03 +01:00
Milan Hanajik 99cd84fb2a Changes for MILWAUKEE, component dated 16.12.2020, ver. 2.26.1561 2020-12-16 14:46:53 +01:00
Milan Hanajik de0b84076f UpgradeSelectionDlg : Cutom button with an action that is commented out, ver. 2.26.1555 2020-12-10 12:50:19 +01:00
Milan Hanajik 18506390fa Procedure.ProcedureParamsMixedCtrl added. 2020-12-10 12:50:07 +01:00
Milan Hanajik fd9a08406f IperlHead cleanup : No side effect on ProcessData.CompleteTestInfos 2020-12-10 11:20:56 +01:00
Milan Hanajik 6226fbedfc Merge branch 'Australia-169MHz' into master-2.26 2020-12-07 13:22:56 +01:00
Milan Hanajik 86fb107e73 WMPosition saved to SummaryResults, AllResults, column CQ ... 2020-12-07 13:06:46 +01:00
Milan Hanajik b32329cdf7 DiverterTest changes reverted back (Luxemburg: root cause of the isssue was in CB firmware), ver. 2.26.1554 2020-12-07 12:42:22 +01:00
Milan Hanajik 38c7d43a8a DiverterTest changes reverted back (Luxemburg: root cause of the isssue was in CB firmware). 2020-12-07 12:31:24 +01:00
Milan Hanajik c72fb29f36 Constructors of components : Logging level increased to WARN. 2020-12-04 11:59:26 +01:00
Milan Hanajik 0dd5c469f5 Spelling fixed, ver. 2.26.1553 2020-12-03 13:51:52 +01:00
Milan Hanajik df1b4527ba ValveCategory.All removed, cleanup, SequenceBase improvement. 2020-12-03 13:51:43 +01:00
Milan Hanajik 6da5bd92ec Positions of reg. valves are defined in output path 2020-12-02 15:45:59 +01:00
Milan Hanajik d4ac2453b8 Refactorization. 2020-12-02 13:44:59 +01:00
Milan Hanajik 59c1cb76f0 Gelsenwasser component updated (1.12.2020), ver. 2.26.1552 2020-12-02 13:44:42 +01:00
Milan Hanajik 89b47860a5 WARSAW_50 symbol, Warsaw-50 component. 2020-12-02 09:34:09 +01:00
Milan Hanajik 646cebe877 Q2 corr.: Correction inside range -0.5 .. 0.5 %, ver. 2.26.1549 2020-12-02 09:32:55 +01:00
Milan Hanajik f8b8c3bfec ver. 2.26.1551 2020-12-01 16:50:57 +01:00
Milan Hanajik 723c077c64 Q2 corr.: Correction inside range -0.5 .. 0.5 %, ver. 2.26.1550 2020-12-01 16:44:43 +01:00
Milan Hanajik 7e64c9299c WMPosition saved to SummaryResults, AllResults, column CQ ... 2020-11-30 13:32:29 +01:00
Milan Hanajik ea9c0615ee iPerlCommunicationForm bug fix, ver. 2.26.1542 2020-11-27 16:27:29 +01:00
Milan Hanajik 428d100f6c UI.Procedures.ProceduresCtrl : More column content is optional. 2020-11-27 16:27:14 +01:00
Milan Hanajik 8846f16546 ver. 2.26.1545 2020-11-20 11:24:38 +01:00
Milan Hanajik 37ec839807 ver. 2.26.1544 2020-11-18 14:58:52 +01:00
Milan Hanajik 5f44fd4bdb Saving events to Events DB : Fixed bugs when connection string was not defined, ver. 2.26.1543 2020-11-18 10:46:00 +01:00
Milan Hanajik 5f5063663c iPerlCommunicationForm bug fix, ver. 2.26.1542 2020-11-13 08:40:41 +01:00
Milan Hanajik 75f0cb2930 UI.Procedures.ProceduresCtrl : More column content is optional. 2020-11-09 09:18:51 +01:00
Milan Hanajik 1f581a72c1 Register readers cleanup, IRegReaderPulses added. 2020-11-06 14:33:32 +01:00
Milan Hanajik 705f4de0b0 DB.SensusOracle.Database : (1) Procedure params., (2) S620 support, (3) SensusTestInfo for 620. 2020-11-06 14:33:32 +01:00
Milan Hanajik 6ec3b7b287 UI.Procedures.ProcedureDlg 'Copy' a test feature added 2020-11-06 14:33:31 +01:00
Milan Hanajik 9758411519 Statistics : IP addresses updated, export in CSV format implemented. 2020-11-06 14:33:31 +01:00
Milan Hanajik e1a185efdf MettlerToledo.Standard (1) Always reads imm.mass when idle (2) Changes in logging 2020-11-06 14:33:31 +01:00
Milan Hanajik a2556bec35 TBF/CameraBinaryFiles2 folder with synchronization for SD v.2.x (!!! file upload NOK). 2020-11-06 14:33:31 +01:00
Milan Hanajik 483e2b4eb7 DataEntry.Camera (1) loads next image after 'Enter' key, (2) dealing with test parts fixed. 2020-11-06 14:33:31 +01:00
Milan Hanajik f1d46782d3 Luxemburg component, LUXEMBURG_40 symbol incl. StatusP, TestMethods.DiverterTest fixed. 2020-11-06 14:33:23 +01:00
Milan Hanajik d1adde9b63 Changes in FlyingStartMassCollProlong in v 2.26.1522 (Gelsenwasser) reverted back. 2020-11-06 14:31:36 +01:00
Milan Hanajik 95c7257d6f Defined symbols in expressions are sorted. 2020-10-22 10:26:27 +02:00
Milan Hanajik 91392f9452 Camera binary files are only synchronized for SD v.1.x, ver. 2.26.1528 2020-10-16 14:07:57 +02:00
Milan Hanajik b145c71ee3 Improved file name formatting for Output.FileWrites.Basic/Enhanced/Xml/XmlBatch components. 2020-10-14 14:12:00 +02:00
Milan Hanajik 1cf2eb8e06 TODO, ver. 2.26.1527 2020-10-14 14:09:22 +02:00
Milan Hanajik 037a5be3b3 SyncRoute( ) called in RunDeviceBefore( ), this should fix FixedStartMassCollection. 2020-10-09 09:41:03 +02:00
Milan Hanajik 0fc7d831b0 1. Login to camera v.2.x with user 'pi', 2. DeviceTest shutdown fix, ver. 2.26.1525 2020-10-08 12:55:38 +02:00
Milan Hanajik abf54f765f SummaryResults : try/catch and more logging, ver. 2.26.1524 2020-10-08 09:00:50 +02:00
Milan Hanajik 0e7ba933d8 ResultsBrowser : Custom query : Batch numbers and test bench 2020-09-28 13:56:21 +02:00
Milan Hanajik fa03c09f09 DataStreamInterface: (1) supports multiple meters, (2) Shutdown() added 2020-09-25 12:20:56 +02:00
Milan Hanajik 3ac90ee622 TURA_SPECIAL : MaxOptoDataCount = 250000 2020-09-23 11:04:56 +02:00
665 changed files with 38123 additions and 6656 deletions
+2
View File
@@ -26,6 +26,8 @@ GenCode128/bin
GenCode128/obj
GraphLib/bin
GraphLib/obj
MergeResultsDBs/bin
MergeResultsDBs/obj
TracingDB/bin
TracingDB/obj
ResetBatchNr/bin
+37
View File
@@ -0,0 +1,37 @@
///
/// Copyright (c) 2021 Sensus Slovensko a.s.
///
using System;
using System.Threading;
namespace Common
{
public class BackgroundBeep
{
static Thread beepThread;
static AutoResetEvent signalBeep;
static BackgroundBeep()
{
signalBeep = new AutoResetEvent(false);
beepThread = new Thread(() =>
{
while (true)
{
signalBeep.WaitOne(); /// waits for an event
Console.Beep(500, 400); /// frequency (Hz), duration (ms)
}
}, 1);
beepThread.IsBackground = true;
beepThread.Start();
}
/// <summary>
/// Invokes one beep in a separate thread (non-blocking function)
/// </summary>
public static void Beep()
{
signalBeep.Set();
}
}
}
+1
View File
@@ -41,6 +41,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="BackgroundBeep.cs" />
<Compile Include="SerializableDictionary.cs" />
<Compile Include="UIControls\CoolButtonCtrl.cs">
<SubType>UserControl</SubType>
+4 -1
View File
@@ -1,4 +1,7 @@
using System;
///
/// Copyright (c) 2021 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
+10 -1
View File
@@ -1,4 +1,7 @@
using System;
///
/// Copyright (c) 2021 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -8,5 +11,11 @@ namespace Common
{
public class Utils
{
public static string GetTestName(string name, int repeats, int repetitionNr)
{
if (name == null) return null;
if (repeats == 1) return name;
return string.Format("{0} ({1}/{2})", name, repetitionNr, repeats);
}
}
}
+7 -2
View File
@@ -19,7 +19,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
<DefineConstants>TRACE;DEBUG;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
@@ -30,7 +30,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;MUNICH</DefineConstants>
<DefineConstants>TRACE;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
@@ -91,6 +91,7 @@
<Compile Include="Entities\Profile.cs" />
<Compile Include="Entities\PTest.cs" />
<Compile Include="Entities\Test.cs" />
<Compile Include="Entities\TestInstance.cs" />
<Compile Include="Entities\TransitionSequence.cs" />
<Compile Include="Entities\TransitionStep.cs" />
<Compile Include="Entities\Uncertainty.cs" />
@@ -141,6 +142,10 @@
<EmbeddedResource Include="Resources\Strings.zh-CN.resx" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Common\Common.csproj">
<Project>{c8939821-ba5c-4988-a3d0-bf53b74865c7}</Project>
<Name>Common</Name>
</ProjectReference>
<ProjectReference Include="..\Users\Users.csproj">
<Project>{6E5CB0E9-E1B6-4E5D-AC6E-B1049E180F2B}</Project>
<Name>Users</Name>
+2 -2
View File
@@ -44,7 +44,7 @@ namespace Config
public const int CompoundWMsCount = 1;
public const int HeatMetersCount = 0;
public const int MaxPartNr = WMsCount / LineSize;
#elif DEWA_300 || FUZHOU_100 || ROMA_200
#elif DEWA_300 || FUZHOU_100 || ROMA_200 || LUXEMBURG_40
public const int WMsCount = 10;
public const int LineSize = 10;
public const int CompoundWMsCount = 1;
@@ -68,7 +68,7 @@ namespace Config
public const int CompoundWMsCount = 1;
public const int HeatMetersCount = 6;
public const int MaxPartNr = WMsCount / LineSize;
#elif ALZIR_25 || BAHRAIN_50 || CEVAK_40 || FEWA_50 || FILIPINY_50 || FUZHOU_50 || HONGKONG_50 || IZRAEL_25 || JUZNA_AFRIKA_50 || KEMPNO_50 || KRAKOW_50 || MURES_40 || PETERSBURG_50 || TORUN_50 || ZAMBIA || ZODINO
#elif ALZIR_25 || BAHRAIN_50 || CEVAK_40 || FEWA_50 || FILIPINY_50 || FUZHOU_50 || HONGKONG_50 || IZRAEL_25 || JUZNA_AFRIKA_50 || KEMPNO_50 || KRAKOW_50 || MILWAUKEE || MURES_40 || PETERSBURG_50 || TORUN_50 || WARSAW_50 || ZAMBIA || ZODINO
public const int WMsCount = 20;
public const int LineSize = 10;
public const int CompoundWMsCount = 1;
+3 -3
View File
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2013-2017 Sensus Metering Systems
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@@ -21,7 +21,7 @@ namespace Config.Entities
public virtual string Diverter { get; set; }
public virtual string TempDiv { get; set; }
public virtual string Scale { get; set; }
public virtual string EmptyTankValve { get; set; } /// Not used anywhere
public virtual string RegulValvesPct { get; set; } /// Positions of regulation valves in % separated by ';'
/// Valves
public virtual string ValvesOpen { get; set; }
@@ -56,7 +56,7 @@ namespace Config.Entities
result.Diverter = Diverter;
result.TempDiv = TempDiv;
result.Scale = Scale;
result.EmptyTankValve = EmptyTankValve;
result.RegulValvesPct = RegulValvesPct;
result.ValvesOpen = ValvesOpen;
result.ValvesClose = ValvesClose;
+70 -6
View File
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
/// Copyright (c) 2013-2021 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@@ -11,7 +11,7 @@ namespace Config.Entities
/// <summary>
/// Stores one test procedure, supports revisions and history log
/// </summary>
public class Procedure : IHasName, IHasItemNr
public class Procedure : IHasName, IHasItemNr
{
public virtual int Id { get; protected set; }
public virtual int ItemNr { get; set; }
@@ -53,14 +53,13 @@ namespace Config.Entities
public virtual IList<ComponentProcedure> MoreParams { get; set; }
public virtual IList<Test> Tests { get; set; }
TestInstance[] testInstances;
/// Wrapper
public virtual IList<Test> RegularTests()
{
IList<Test> rslt = new List<Test>();
foreach (var t in Tests)
{
if ((t.Name.Length > 0 && t.Name[0] != '[') || !t.Name.Contains("]")) rslt.Add(t);
}
foreach (var t in Tests) if (t.IsRegular()) rslt.Add(t);
return rslt;
}
@@ -70,6 +69,7 @@ namespace Config.Entities
{
MoreParams = new List<ComponentProcedure>();
Tests = new List<Test>();
testInstances = null;
///
/// Default values
@@ -96,6 +96,70 @@ namespace Config.Entities
ItemNr = itemNr;
}
public virtual TestInstance[] UpdateTestInstances(IList<string> loopStartNames, IList<string> loopEndNames, IList<string> autoTests = null)
{
List<TestInstance> instances = new List<TestInstance>();
if (Tests != null)
{
int i = 0;
while (i < Tests.Count)
{
if (!loopStartNames.Contains(Tests[i].Method) && !loopEndNames.Contains(Tests[i].Method)) /// Loop.End is ignored outside a loop
{
///
/// Outside a loop
///
for (int j = 1; j <= Tests[i].Repeats; j++)
if (Tests[i].BelongsTo(autoTests))
instances.Add(new TestInstance(Tests[i], j));
}
else if (loopStartNames.Contains(Tests[i].Method))
{
///
/// Entering a loop
///
int loopsCount = Tests[i].Repeats;
List<Test> testsInsideLoop = new List<Test>();
i++;
while (i < Tests.Count && !loopEndNames.Contains(Tests[i].Method))
{
///
/// Inside a loop
///
if (Tests[i].Repeats == loopsCount && !loopStartNames.Contains(Tests[i].Method)) /// Loop.Start is ignored inside a loop
{
if (Tests[i].BelongsTo(autoTests))
testsInsideLoop.Add(Tests[i]);
}
i++;
}
///
/// Append instances of tests inside the last loop to the list
///
for (int j = 1; j <= loopsCount; j++)
{
foreach (var t in testsInsideLoop)
instances.Add(new TestInstance(t, j));
}
}
i++;
}
}
testInstances = instances.ToArray();
return testInstances;
}
public virtual TestInstance[] GetTestInstances()
{
return testInstances;
}
public virtual Procedure Clone()
{
Procedure result = new Procedure();
+17 -1
View File
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2013-2019 Sensus Slovensko a.s.
/// Copyright (c) 2013-2021 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@@ -108,6 +108,22 @@ namespace Config.Entities
Procedure = procedure;
}
public virtual bool IsRegular()
{
/// Irregular / event triggered test names have form "[event] TestName"
return (Name.Length > 0 && Name[0] != '[') || !Name.Contains("]");
}
public virtual bool BelongsTo(IList<string> autoTests)
{
if (IsRegular()) return true;
if (autoTests == null) return false;
string action = Name.Substring(1, Name.IndexOf(']') - 1);
return autoTests.Contains(action);
}
// Makes a new copy of this object (not just a reference)
public virtual Test Clone()
{
+32
View File
@@ -0,0 +1,32 @@
///
/// Copyright (c) 2021 Sensus Slovensko a.s.
///
using System;
namespace Config.Entities
{
public class TestInstance
{
public Test Test;
public int Repetition;
public string Name
{
get
{
return (Test != null) ? Common.Utils.GetTestName(Test.Name, Test.Repeats, Repetition) : string.Empty;
}
}
public TestInstance(Test test, int repetition)
{
Test = test;
Repetition = repetition;
}
public override string ToString()
{
return Name;
}
}
}
+3 -2
View File
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2013-2015 Sensus Metering Systems
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
///
using FluentNHibernate.Mapping;
using Config.Entities;
@@ -23,7 +23,8 @@ namespace Config.Mappings
Map(x => x.TempDiv);
Map(x => x.Scale)
.Column("Balance");
Map(x => x.EmptyTankValve);
Map(x => x.RegulValvesPct)
.Column("EmptyTankValve");
Map(x => x.ValvesOpen)
.CustomType("StringClob")
.CustomSqlType("varchar(8000)");
+13 -1
View File
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2016-2020 Sensus Slovensko a.s.
/// Copyright (c) 2016-2021 Sensus Slovensko a.s.
///
using System;
using System.Reflection;
@@ -26,7 +26,9 @@ namespace Config
[Description("m3")] m3, /// 1 m3 = 1000 l
[Description("l/h")] lph, /// 1 l/h = 0.001 m3/h
[Description("cf/h")] cfph, /// 1 cf/h = 0.028316846592 m3/h
[Description("l/m")] lpm, /// 1 l/m = 60 l/h = 0.06 m3/h
[Description("US gal/m")] USgalpm, /// 1 US gallon per minute = 0.2271247068 m3/h
[Description("m3/h")] m3ph, /// * 1 m3/h
[Description("l/s")] lps, /// 1 liter/s = 3.6 m3/h
[Description("US gal/s")] USgalps, /// 1 US gallon per second = 13.627482408 m3/h
@@ -34,6 +36,7 @@ namespace Config
[Description("cf/s")] cfs, /// 1 cubic foot per second = 101.9406477312 m3/h
[Description("g")] g, /// 0.001 kg
[Description("oz")] oz, /// 0.0283495231 kg
[Description("lb")] lb, /// 0.45359237 kg
[Description("kg")] kg, /// * 1 kilogram
[Description("t")] t, /// 1000 kg
@@ -267,7 +270,9 @@ namespace Config
return Quantity.Volume;
case Unit.lph:
case Unit.cfph:
case Unit.lpm:
case Unit.USgalpm:
case Unit.m3ph:
case Unit.lps:
case Unit.USgalps:
@@ -276,6 +281,7 @@ namespace Config
return Quantity.Flow;
case Unit.g:
case Unit.oz:
case Unit.lb:
case Unit.kg:
case Unit.t:
@@ -383,7 +389,9 @@ namespace Config
/// Flow: internal representation in m3/h
case Unit.lph: return 1000 * v; /// 1 l/h
case Unit.cfph: return 35.3146667214886 * v;/// 1 cf/h
case Unit.lpm: return v / 0.06; /// 1 l/m
case Unit.USgalpm: return 4.40286754395493 * v;/// 1 US gallon per minute
case Unit.lps: return v / 3.6; /// 1 l/s
case Unit.USgalps: return 0.0733811257326 * v; /// 1 US gallon per second
case Unit.m3pm: return v / 60; /// 1 m3/m
@@ -391,6 +399,7 @@ namespace Config
/// Mass: internal representation in kg
case Unit.g: return 1000 * v; /// 1 g = 0.001 kg
case Unit.oz: return 35.273962 * v; /// 1 oz = 0.0283495231 kg
case Unit.lb: return 2.2046226 * v; /// 1 lb = 0.45359237 kg
case Unit.t: return 0.001 * v; /// 1 t = 1000 kg
@@ -460,7 +469,9 @@ namespace Config
/// Flow: internal representation in m3/h
case Unit.lph: return 0.001 * v; /// 1 l/h
case Unit.cfph: return 0.028316846592 * v; /// 1 cf/h
case Unit.lpm: return 0.06 * v; /// 1 l/m
case Unit.USgalpm: return 0.2271247068 * v; /// 1 US gallon per minute
case Unit.lps: return 3.6 * v; /// 1 l/s
case Unit.USgalps: return 13.627482408 * v; /// 1 US gallon per second
case Unit.m3pm: return 60 * v; /// 1 m3/m
@@ -468,6 +479,7 @@ namespace Config
/// Mass: internal representation in kg
case Unit.g: return 0.001 * v; /// 1 g = 0.001 kg
case Unit.oz: return 0.0283495231 * v; /// 1 oz = 0.0283495231 kg
case Unit.lb: return 0.45359237 * v; /// 1 lb = 0.45359237 kg
case Unit.t: return 1000 * v; /// 1 t = 1000 kg
+43 -13
View File
@@ -7,49 +7,77 @@ namespace DataStreamInterface
{
public interface IDataStreamMeter
{
/// <summary>
/// Returns count of water meters supported by the data stream component
/// </summary>
/// <returns>Water meters count</returns>
int GetMetersCount();
/// <summary>
/// Get state of the connected data stream meter
/// </summary>
/// <param name="meterIx">Index of the meter in range 0 .. (GetMetersCount() - 1)</param>
/// <param name="state">Current state of the meter</param>
/// <param name="parameter">Current extra parameter of the meter</param>
/// <returns>true when successful</returns>
bool GetState(out int state, out string parameter);
bool GetState(int meterIx, out int state, out string parameter);
/// <summary>
/// Set state of the connected data stream meter
/// </summary>
/// <param name="meterIx">Index of the meter in range 0 .. (GetMetersCount() - 1)</param>
/// <param name="state">Required state of the meter</param>
/// <param name="parameter">Required extra parameter of the meter</param>
/// <returns>true when successful</returns>
bool SetState(int state, string parameter);
bool SetState(int meterIx, int state, string parameter);
bool SetStateAll(int state, string parameter);
/// <summary>
/// Establish connection with a data stream meter
/// </summary>
/// <param name="meterIx">Index of the meter in range 0 .. (GetMetersCount() - 1)</param>
/// <param name="connectionParameters">Connection parameters</param>
/// <param name="meterId">Meter ID (e.g. serial number)</param>
/// <returns>true when successful</returns>
bool OpenConnection(string connectionParameters, out string meterId);
/// <summary>
/// Closes connection with the data stream meter
/// </summary>
/// <returns>true when successful</returns>
bool CloseConnection();
bool OpenConnection(int meterIx, string connectionParameters, out string meterId);
/// <summary>
/// Stars saving measurement results into internal data structures of the component.
/// Each data frame obtains a unique ID.
/// The very first data fraim obrains ID = 0.
/// </summary>
/// <param name="meterIx">Index of the meter in range 0 .. (GetMetersCount() - 1)</param>
/// <returns>true when successful</returns>
bool StartMeasurement();
bool StartMeasurement(int meterIx);
bool StartMeasurementAll();
/// <summary>
/// Stops saving measurement results into internal data structures of the component.
/// Updates ID of the last date frame received from the meter.
/// </summary>
/// <param name="meterIx">Index of the meter in range 0 .. (GetMetersCount() - 1)</param>
/// <param name="storedFramesCount">Number of stored date frames</param>
/// <returns>true when successful</returns>
bool StopMeasurement(out Int64 storedFramesCount);
bool StopMeasurement(int meterIx, out Int64 storedFramesCount);
bool StopMeasurementAll(out Int64[] storedFramesCounts);
/// <summary>
/// Closes connection with the data stream meter
/// </summary>
/// <param name="meterIx">Index of the meter in range 0 .. (GetMetersCount() - 1)</param>
/// <returns>true when successful</returns>
bool CloseConnection(int meterIx);
bool CloseConnectionAll();
/// <summary>
/// This function is called when TBF program is shutting down.
/// </summary>
/// <returns>true when successful</returns>
bool Shutdown();
///------------------------------------------------
/// Units of time, volume and optional quantities
@@ -94,17 +122,19 @@ namespace DataStreamInterface
/// <summary>
/// Retuns 'count' data frames starting with data frame with ID = 'id'
/// </summary>
/// <param name="meterIx">Index of the meter in range 0 .. (GetMetersCount() - 1)</param>
/// <param name="id">First frame ID</param>
/// <param name="count">Frames count</param>
/// <returns>Selected data frames</returns>
DataFrame[] GetFrames(Int64 id, int count);
DataFrame[] GetFrames(int meterIx, Int64 id, int count);
/// <summary>
/// Returns ID of the data frame where time equals or exceeds the specified time.
/// When time of the first frame (ID=0) is larger then specified time, function returns 0.
/// </summary>
/// <param name="meterIx">Index of the meter in range 0 .. (GetMetersCount() - 1)</param>
/// <param name="time">Time</param>
/// <returns>ID of the data frame at or after the pecified time</returns>
Int64 GetID(double time);
Int64 GetID(int meterIx, double time);
}
}
+12 -11
View File
@@ -49,8 +49,8 @@
this.logsTextBox = new System.Windows.Forms.TextBox();
this.dataTabControl = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.framesListView = new System.Windows.Forms.ListView();
this.tabPage2 = new System.Windows.Forms.TabPage();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -304,16 +304,6 @@
this.tabPage1.Text = "Transferred frames";
this.tabPage1.UseVisualStyleBackColor = true;
//
// tabPage2
//
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(664, 331);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "Graph";
this.tabPage2.UseVisualStyleBackColor = true;
//
// framesListView
//
this.framesListView.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -325,6 +315,16 @@
this.framesListView.UseCompatibleStateImageBehavior = false;
this.framesListView.View = System.Windows.Forms.View.Details;
//
// tabPage2
//
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(664, 331);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "Graph";
this.tabPage2.UseVisualStyleBackColor = true;
//
// DemoMainWnd
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -333,6 +333,7 @@
this.Controls.Add(this.splitContainer1);
this.Name = "DemoMainWnd";
this.Text = "Datastream interface test";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.DemoMainWnd_FormClosing);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel1.PerformLayout();
this.splitContainer1.Panel2.ResumeLayout(false);
+16 -8
View File
@@ -127,7 +127,7 @@ namespace DataStreamInterfaceTest
else
{
string meterId;
if (dataStreamMeter.OpenConnection("no connection parameters", out meterId))
if (dataStreamMeter.OpenConnection(0, "no connection parameters", out meterId))
{
activityLog.Print(string.Format("Connection established, meter ID is {0}", meterId));
}
@@ -144,7 +144,7 @@ namespace DataStreamInterfaceTest
ShowNoMeterInterfaceMessage();
else
{
if (dataStreamMeter.CloseConnection())
if (dataStreamMeter.CloseConnection(0))
{
framesListView.Items.Clear();
activityLog.Print("Connection closed");
@@ -156,6 +156,14 @@ namespace DataStreamInterfaceTest
}
}
private void DemoMainWnd_FormClosing(object sender, FormClosingEventArgs e)
{
if (dataStreamMeter == null)
{
dataStreamMeter.Shutdown();
}
}
private void getStateButton_Click(object sender, EventArgs e)
{
if (dataStreamMeter == null)
@@ -164,7 +172,7 @@ namespace DataStreamInterfaceTest
{
int state;
string parameter;
if (dataStreamMeter.GetState(out state, out parameter))
if (dataStreamMeter.GetState(0, out state, out parameter))
{
activityLog.Print(string.Format("Water meter state is {0} / {1}", state, parameter));
}
@@ -184,7 +192,7 @@ namespace DataStreamInterfaceTest
GetStateDlg dlg = new GetStateDlg();
if (dlg.ShowDialog() == DialogResult.OK)
{
if (dataStreamMeter.SetState(dlg.State, dlg.Parameter))
if (dataStreamMeter.SetState(0, dlg.State, dlg.Parameter))
{
activityLog.Print(string.Format("Water meter state set to {0} / {1}", dlg.State, dlg.Parameter));
}
@@ -202,7 +210,7 @@ namespace DataStreamInterfaceTest
ShowNoMeterInterfaceMessage();
else
{
if (dataStreamMeter.StartMeasurement())
if (dataStreamMeter.StartMeasurement(0))
{
framesListView.Items.Clear();
activityLog.Print(string.Format("Measurement started"));
@@ -220,7 +228,7 @@ namespace DataStreamInterfaceTest
ShowNoMeterInterfaceMessage();
else
{
if (dataStreamMeter.StopMeasurement(out storedFramesCount))
if (dataStreamMeter.StopMeasurement(0, out storedFramesCount))
{
framesListView.Items.Clear();
activityLog.Print(string.Format("Measurement sopped, {0} frames acquired", storedFramesCount));
@@ -240,7 +248,7 @@ namespace DataStreamInterfaceTest
{
GetFrameBoundariesDlg dlg = new GetFrameBoundariesDlg("Enter frames range boundaries", 0, storedFramesCount - 1);
if (dlg.ShowDialog() != DialogResult.OK) return;
DataFrame[] frames = dataStreamMeter.GetFrames(dlg.From, Convert.ToInt32(dlg.To - dlg.From + 1));
DataFrame[] frames = dataStreamMeter.GetFrames(0, dlg.From, Convert.ToInt32(dlg.To - dlg.From + 1));
{
foreach (var frame in frames)
{
@@ -259,7 +267,7 @@ namespace DataStreamInterfaceTest
GetDblValueDlg dlg = new GetDblValueDlg("Enter time in seconds");
if (dlg.ShowDialog() == DialogResult.OK)
{
Int64 id = dataStreamMeter.GetID(dlg.DblValue);
Int64 id = dataStreamMeter.GetID(0, dlg.DblValue);
activityLog.Print(string.Format("GetID({0}) returned {1}", dlg.DblValue, id));
}
}
+40 -8
View File
@@ -83,7 +83,13 @@ namespace DataStreamMeter
return Unit.None;
}
public bool OpenConnection(string connectionParameters, out string meterID)
public int GetMetersCount()
{
return 1;
}
public bool OpenConnection(int meterIx, string connectionParameters, out string meterID)
{
lock (stateChangeAndTimerTickLock)
{
@@ -107,7 +113,7 @@ namespace DataStreamMeter
return true;
}
public bool CloseConnection()
public bool CloseConnection(int meterIx)
{
bool closeModelessDlg = false;
@@ -129,20 +135,35 @@ namespace DataStreamMeter
return true;
}
public bool GetState(out int state, out string parameter)
public bool CloseConnectionAll()
{
return CloseConnection(0);
}
public bool Shutdown()
{
return true;
}
public bool GetState(int meterIx, out int state, out string parameter)
{
state = (int)this.State;
parameter = this.connectionParameters;
return true;
}
public bool SetState(int state, string parameter)
public bool SetState(int meterIx, int state, string parameter)
{
/// It's not allowed to change the satate in this demo
return false;
}
public bool StartMeasurement()
public bool SetStateAll(int state, string parameter)
{
return SetState(0, state, parameter);
}
public bool StartMeasurement(int meterIx = 0)
{
lock (stateChangeAndTimerTickLock)
{
@@ -161,7 +182,12 @@ namespace DataStreamMeter
}
}
public bool StopMeasurement(out Int64 storedFramesCount)
public bool StartMeasurementAll()
{
return StartMeasurement(0);
}
public bool StopMeasurement(int meterIx, out Int64 storedFramesCount)
{
lock (stateChangeAndTimerTickLock)
{
@@ -196,6 +222,12 @@ namespace DataStreamMeter
}
}
public bool StopMeasurementAll(out Int64[] storedFramesCount)
{
storedFramesCount = new Int64[1];
return StopMeasurement(0, out storedFramesCount[0]);
}
public void TimerTick(double flow_m3ph)
{
lock (stateChangeAndTimerTickLock)
@@ -259,7 +291,7 @@ namespace DataStreamMeter
/// <param name="id">First frame ID</param>
/// <param name="count">Frames count</param>
/// <returns>Selected data frames</returns>
public DataFrame[] GetFrames(Int64 startID, int count)
public DataFrame[] GetFrames(int meterIx, Int64 startID, int count)
{
DataFrame[] frames = new DataFrame[count];
@@ -284,7 +316,7 @@ namespace DataStreamMeter
/// </summary>
/// <param name="time">Time</param>
/// <returns>ID of the data frame at or after the pecified time</returns>
public Int64 GetID(double time)
public Int64 GetID(int meterIx, double time)
{
if (storedSamplesCount == 0) return -1;
+4 -2
View File
@@ -645,7 +645,8 @@ namespace DeviceTest
MessageBoxIcon.Exclamation);
foreach (var dev in tbfDevices) dev.StopDevice();
tbfDevices.Clear();
foreach (var dev in tbfDevices) dev.StopDevice2();
tbfDevices.Clear();
startButton.Enabled = true;
stopButton.Enabled = false;
@@ -856,7 +857,8 @@ namespace DeviceTest
}
foreach (var d in tbfDevices) d.StopDevice();
}
foreach (var d in tbfDevices) d.StopDevice2();
}
private void stopButton_Click(object sender, EventArgs e)
{
+2 -2
View File
@@ -147,7 +147,7 @@ namespace EventViewer
}
}
}
catch (Exception e)
catch (Exception)
{
//log.ErrorFormat("Failed to load from '{0}': {1}", fileName, e.Message);
return null;
@@ -203,7 +203,7 @@ namespace EventViewer
}
#endif
}
catch (Exception e)
catch (Exception)
{
//log.ErrorFormat("Failed to save to '{0}': {1}", Program.LocalSettingsFileName, e.Message);
}
+1 -1
View File
@@ -122,7 +122,7 @@ namespace EventViewer
/// Open the main application window
Application.Run(new EventViewerWnd());
}
catch (Exception e)
catch (Exception)
{
//LogException(log, "Exception in Application.Run(new ResultsBrowserWnd(args))", e);
}
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
+84
View File
@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{9786D0A8-BA9A-41F6-9E61-C7B2B76D4C08}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MergeResultsDBs</RootNamespace>
<AssemblyName>MergeResultsDBs</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="FluentNHibernate">
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
</Reference>
<Reference Include="Iesi.Collections">
<HintPath>..\packages\Iesi.Collections.4.0.0.4000\lib\net40\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">
<HintPath>..\packages\MySql.Data.6.6.5\lib\net40\MySql.Data.dll</HintPath>
</Reference>
<Reference Include="NHibernate">
<HintPath>..\packages\NHibernate.4.0.4.4000\lib\net40\NHibernate.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Config\Config.csproj">
<Project>{743df7db-c7b6-42eb-986d-0f485e5588e4}</Project>
<Name>Config</Name>
</ProjectReference>
<ProjectReference Include="..\Results\Results.csproj">
<Project>{9d0dcc88-dc81-47eb-9fdd-4c3907871bfb}</Project>
<Name>Results</Name>
</ProjectReference>
</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.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
+190
View File
@@ -0,0 +1,190 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using log4net;
using NHibernate;
using FluentNHibernate;
using Results;
using Results.Entities;
namespace MergeResultsDBs
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("A range of records from the 2nd database will be appended to the 1st database.");
Console.WriteLine("Enter the 1st (target) database name:");
string firstDB = Console.ReadLine();
Console.WriteLine("Enter the 2nd database name:");
string secondDB = Console.ReadLine();
Console.WriteLine("Enter range of batch numbers from the 2nd DB to append to the 1st DB (start-end):");
string range = Console.ReadLine();
ISession session1;
IList<Components> componentsList;
int componentsListInitialCount;
IList<TestData> testDataList;
int testDataListInitialCount;
IList<WaterMeterData> waterMeterDataList;
int waterMeterDataListInitialCount;
try
{
DB.ConnectionString = string.Format("SERVER=localhost; DATABASE={0}; UID=root; PASSWORD=kraken; CHARSET=utf8;", firstDB);
session1 = DB.CreateSession();
componentsList = session1.QueryOver<Components>().List();
componentsListInitialCount = componentsList.Count;
testDataList = session1.QueryOver<TestData>().List();
testDataListInitialCount = testDataList.Count();
waterMeterDataList = session1.QueryOver<WaterMeterData>().List();
waterMeterDataListInitialCount = waterMeterDataList.Count();
}
catch (Exception exc)
{
MessageBox.Show(string.Format("Cannot open the 1st database:\r\n{0}", exc.Message));
return;
}
ISession session2;
IList<Components> oriComponentsList;
IList<TestData> oriTestDataList;
IList<WaterMeterData> oriWMDataList;
try
{
DB.ConnectionString = string.Format("SERVER=localhost; DATABASE={0}; UID=root; PASSWORD=kraken; CHARSET=utf8;", secondDB);
session2 = DB.CreateSession();
oriComponentsList = session2.QueryOver<Components>().List();
oriTestDataList = session2.QueryOver<TestData>().List();
oriWMDataList = session2.QueryOver<WaterMeterData>().List();
}
catch (Exception exc)
{
MessageBox.Show(string.Format("Cannot open the 2nd database:\r\n{0}", exc.Message));
return;
}
int batchNrStart;
int batchNrEnd;
string[] fields = range.Split(new char[] { '-' });
if (fields.Length != 2 ||
!int.TryParse(fields[0], out batchNrStart) ||
!int.TryParse(fields[1], out batchNrEnd) ||
batchNrEnd < batchNrStart)
{
MessageBox.Show("Invalid range of batch numbers");
return;
}
Console.WriteLine(string.Format("Appending batches {0}-{1} from DB {2} to DB {3}", batchNrStart, batchNrEnd, secondDB, firstDB));
Console.WriteLine("Press 'y' or 'Y' to start, anything else to abort");
string response = Console.ReadLine();
if (response != "y" && response != "Y")
{
return;
}
Console.WriteLine("PROCESSING DATABASES ...");
for (int batchNr = batchNrStart; batchNr <= batchNrEnd; batchNr++)
{
Console.Write(string.Format("{0} ", batchNr));
/// Copy one batch from the 2nd to the 1st database
var oriBatches = session2.QueryOver<Batch>()
.Where(x => (x.BatchNr == batchNr))
.List();
if (oriBatches.Count != 1) continue;
///---------------------------------------------------------------
Batch oriBatch = oriBatches[0];
var transaction = session1.BeginTransaction();
try
{
Batch batch = new Batch(oriBatch);
oriBatch.TestRslts = session2.QueryOver<TestRslt>()
.Where(x => (x.Batch.Id == oriBatch.Id))
.List();
foreach (var oriTR in oriBatch.TestRslts)
{
/// Find appropriate Components
Components components = oriTR.Components == null
? null
: Components.UpdateList(componentsList, new Components(oriTR.Components));
if (components != null) session1.SaveOrUpdate(components);
/// Find appropriate TestData
TestData testData = TestData.UpdateList(testDataList, new TestData(oriTR.TestData));
session1.SaveOrUpdate(testData);
TestRslt tr = new TestRslt();
tr.CopyContentFrom(oriTR);
tr.Batch = batch;
tr.Components = components;
tr.TestData = testData;
batch.TestRslts.Add(tr);
session1.SaveOrUpdate(tr);
}
oriBatch.WaterMeters = session2.QueryOver<WaterMeter>()
.Where(x => (x.Batch.Id == oriBatch.Id))
.List();
foreach (var oriWM in oriBatch.WaterMeters)
{
/// Find appropriate WaterMeterData
WaterMeterData wmData = WaterMeterData.UpdateList(waterMeterDataList, new WaterMeterData(oriWM.WaterMeterData));
session1.SaveOrUpdate(wmData);
WaterMeter wm = new WaterMeter();
wm.CopyContentFrom(oriWM);
wm.Batch = batch;
wm.WaterMeterData = wmData;
foreach (var oriMTR in oriWM.MeterTestRslts)
{
MeterTestRslt mtr = new MeterTestRslt(oriMTR);
mtr.WaterMeter = wm;
mtr.TestRslt = batch.TestRslts.FirstOrDefault<TestRslt>(x => (x.Name() == oriMTR.TestRslt.Name() &&
x.Part == oriMTR.TestRslt.Part &&
x.RepetitionNr == oriMTR.TestRslt.RepetitionNr));
if (mtr.TestRslt == null)
{
throw new Exception("Something strange happened");
}
wm.MeterTestRslts.Add(mtr);
session1.SaveOrUpdate(mtr);
}
batch.WaterMeters.Add(wm);
session1.SaveOrUpdate(wm);
}
session1.SaveOrUpdate(batch);
transaction.Commit();
}
catch
{
transaction.Rollback();
throw new Exception("Commit failed - transaction reverted");
}
}
Console.WriteLine();
session1.Flush();
session1.Close();
session2.Close();
Console.WriteLine("Successfully completed");
Console.ReadLine();
}
}
}
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("MergeResultsDBs")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MergeResultsDBs")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("f7543f83-5414-4010-ac3f-3af4b6864812")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// 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("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
+43 -42
View File
@@ -1,4 +1,7 @@
using System;
///
/// Copyright (c) 2021 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
@@ -40,7 +43,7 @@ namespace Results
public static BatchResults NewFromProcedure(int batchNr, int benchId, string benchName, string a1, string a2, string a3, string a4, string a5,
string user, int userNr, string programVer, Config.Entities.Procedure procedure,
WaterMeterData[] waterMeterDatas, int[] waterMeterParts, double densityCorr)
WaterMeterData[] waterMeterDatas, int[] waterMeterParts, double realDensity, double atTemperature, double buoyancy)
{
BatchResults d = new BatchResults(waterMeterDatas.Length);
int year = DateTime.Now.Year;
@@ -65,8 +68,10 @@ namespace Results
ProcedureRevision = procedure.Revision,
ProtocolTitle = string.Empty,
StartTime = DateTime.Now,
DensityCorr = (float)densityCorr,
Compound = (procedure.MetersKind == Config.Entities.MetersKind.Combined),
RealDensity = realDensity,
AtTemperature = atTemperature,
Buoyancy = buoyancy,
Compound = (procedure.MetersKind == Config.Entities.MetersKind.Combined),
#if HEAT_METERS
HeatMeter = (procedure.MetersKind == Config.Entities.MetersKind.HeatMeter),
#endif
@@ -96,45 +101,41 @@ namespace Results
}
}
foreach (var t in procedure.Tests)
foreach (var ti in procedure.GetTestInstances())
{
TestData td = TestData.UpdateList(d.TestDataList, new TestData(t));
TestData td = TestData.UpdateList(d.TestDataList, new TestData(ti.Test));
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, ti.Test.Part, ti.Repetition);
d.Batch.TestRslts.Add(tr);
for (int i = 0; i < d.WMPositionsCount; i++)
{
/// 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.Batch.WaterMeters[i].Disabled && t.IsPartCompatible(waterMeterParts[i]))
if (!d.Batch.WaterMeters[i].Disabled && ti.Test.IsPartCompatible(waterMeterParts[i]))
{
///
/// Create empty watermeter test results and add them to the list and to dictionaries
///
IList<MeterTestRslt> wmtrs = d.Batch.WaterMeters[i].MeterTestRslts;
if (d.Batch.Compound)
{
///
/// Create empty watermeter test results and add them to the list and to dictionaries
///
IList<MeterTestRslt> wmtrs = d.Batch.WaterMeters[i].MeterTestRslts;
if (d.Batch.Compound)
{
/// Compound water meter
wmtrs.Add(new MeterTestRslt(d.Batch.WaterMeters[i], tr, Config.Entities.CompoundMeterId.CompoundMain));
wmtrs.Add(new MeterTestRslt(d.Batch.WaterMeters[i], tr, Config.Entities.CompoundMeterId.CompoundAux));
wmtrs.Add(new MeterTestRslt(d.Batch.WaterMeters[i], tr, Config.Entities.CompoundMeterId.Compound));
}
else if (d.Batch.HeatMeter)
{
/// Heat meter
wmtrs.Add(new MeterTestRslt(d.Batch.WaterMeters[i], tr, Config.Entities.CompoundMeterId.HeatMeterVolume));
wmtrs.Add(new MeterTestRslt(d.Batch.WaterMeters[i], tr, Config.Entities.CompoundMeterId.HeatMeterEnergy));
}
else
{
/// Water meter
wmtrs.Add(new MeterTestRslt(d.Batch.WaterMeters[i], tr, Config.Entities.CompoundMeterId.Single));
}
/// Compound water meter
wmtrs.Add(new MeterTestRslt(d.Batch.WaterMeters[i], tr, Config.Entities.CompoundMeterId.CompoundMain));
wmtrs.Add(new MeterTestRslt(d.Batch.WaterMeters[i], tr, Config.Entities.CompoundMeterId.CompoundAux));
wmtrs.Add(new MeterTestRslt(d.Batch.WaterMeters[i], tr, Config.Entities.CompoundMeterId.Compound));
}
}
else if (d.Batch.HeatMeter)
{
/// Heat meter
wmtrs.Add(new MeterTestRslt(d.Batch.WaterMeters[i], tr, Config.Entities.CompoundMeterId.HeatMeterVolume));
wmtrs.Add(new MeterTestRslt(d.Batch.WaterMeters[i], tr, Config.Entities.CompoundMeterId.HeatMeterEnergy));
}
else
{
/// Water meter
wmtrs.Add(new MeterTestRslt(d.Batch.WaterMeters[i], tr, Config.Entities.CompoundMeterId.Single));
}
}
}
}
@@ -156,10 +157,10 @@ namespace Results
if (batch.WaterMeters[wmNr0].WMPosition > wmNr0 + 1)
{
batch.WaterMeters.Insert(wmNr0, new WaterMeter() { Batch = batch,
WaterMeterData = null,
WMPosition = wmNr0 + 1,
YearOfProduction = 0,
Disabled = true, });
WaterMeterData = null,
WMPosition = wmNr0 + 1,
YearOfProduction = 0,
Disabled = true, });
}
}
+79 -51
View File
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2015-2020 Sensus Slovensko a.s.
/// Copyright (c) 2015-2021 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@@ -10,42 +10,42 @@ namespace Results.Entities
public class Batch
{
public virtual int Id { get; protected set; }
public virtual int BatchNr { get; set; }
public virtual int BatchNr { get; set; }
public virtual string ProgramVersion { get; set; }
public virtual int TestBenchId { get; set; }
public virtual string TestBenchName { get; set; } /// CEVAK, not mapped to DB
public virtual string Address1 { get; set; } /// CEVAK, not mapped to DB
public virtual string Address2 { get; set; } /// CEVAK, not mapped to DB
public virtual string Address3 { get; set; } /// CEVAK, not mapped to DB
public virtual string Address4 { get; set; } /// CEVAK, not mapped to DB
public virtual string Address5 { get; set; } /// CEVAK, not mapped to DB
public virtual string UserName { get; set; }
public virtual int UserNumber { get; set; }
public virtual string ProcedureName { get; set; }
public virtual string TestBenchName { get; set; } /// CEVAK, not mapped to DB
public virtual string Address1 { get; set; } /// CEVAK, not mapped to DB
public virtual string Address2 { get; set; } /// CEVAK, not mapped to DB
public virtual string Address3 { get; set; } /// CEVAK, not mapped to DB
public virtual string Address4 { get; set; } /// CEVAK, not mapped to DB
public virtual string Address5 { get; set; } /// CEVAK, not mapped to DB
public virtual string UserName { get; set; }
public virtual int UserNumber { get; set; }
public virtual string ProcedureName { get; set; }
public virtual bool IsRemoteProcedure { get; set; } /// Stara Tura, not mapped to DB
public virtual string ProcedureDescription { get; set; } /// CEVAK, not mapped to DB
public virtual int ProcedureRevision { get; set; }
public virtual string WatermetersStr { get; set; } /// CEVAK, not mapped to DB
public virtual string ProtocolTitle { get; set; }
public virtual string ProcedureDescription { get; set; } /// CEVAK, not mapped to DB
public virtual int ProcedureRevision { get; set; }
public virtual string WatermetersStr { get; set; } /// CEVAK, not mapped to DB
public virtual string ProtocolTitle { get; set; }
public virtual string Remark { get; set; }
public virtual float DensityCorr { get; set; } /// Density correction in [kg/m3]
public virtual float Custom2 { get; set; }
public virtual float Custom3 { get; set; }
public virtual double RealDensity { get; set; } /// Density correction in [kg/m3]
public virtual double AtTemperature { get; set; }
public virtual double Buoyancy { get; set; }
public virtual int Counter6 { get; set; }
public virtual int Counter7 { get; set; }
public virtual int Counter8 { get; set; }
public virtual int Counter9 { get; set; }
public virtual int Counter10 { get; set; }
public virtual DateTime StartTime { get; set; }
public virtual DateTime EndTime { get; set; }
public virtual DateTime EndTime { get; set; }
public virtual bool Dirty { 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 virtual bool HeatMeter { get; set; } /// Not mapped to DB now
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 virtual bool HeatMeter { get; set; } /// Not mapped to DB now
public virtual IList<TestData> RegularTests()
{
@@ -117,8 +117,54 @@ namespace Results.Entities
ProtocolTitle = string.Empty;
ProtocolTitle = string.Empty;
Remark = string.Empty;
RealDensity = Config.Data.RealDensity;
AtTemperature = Config.Data.AtTemperature;
Buoyancy = Config.Data.Buoyancy;
}
/// <summary>
/// Copy constructor, copies all except of Id.
/// Lists Tests, WaterMeters and TestRslts are empty. Have to be copied elwhere.
/// </summary>
public Batch(Batch oriBatch)
{
BatchNr = oriBatch.BatchNr;
ProgramVersion = oriBatch.ProgramVersion;
TestBenchId = oriBatch.TestBenchId;
TestBenchName = oriBatch.TestBenchName;
Address1 = oriBatch.Address1;
Address2 = oriBatch.Address2;
Address3 = oriBatch.Address3;
Address4 = oriBatch.Address4;
Address5 = oriBatch.Address5;
UserName = oriBatch.UserName;
UserNumber = oriBatch.UserNumber;
ProcedureName = oriBatch.ProcedureName;
IsRemoteProcedure = oriBatch.IsRemoteProcedure;
ProcedureDescription = oriBatch.ProcedureDescription;
ProcedureRevision = oriBatch.ProcedureRevision;
WatermetersStr = oriBatch.WatermetersStr;
ProtocolTitle = oriBatch.ProtocolTitle;
Remark = oriBatch.Remark;
RealDensity = oriBatch.RealDensity;
AtTemperature = oriBatch.AtTemperature;
Buoyancy = oriBatch.Buoyancy;
Counter6 = oriBatch.Counter6;
Counter7 = oriBatch.Counter7;
Counter8 = oriBatch.Counter8;
Counter9 = oriBatch.Counter9;
Counter10 = oriBatch.Counter10;
StartTime = oriBatch.StartTime;
EndTime = oriBatch.EndTime;
Dirty = oriBatch.Dirty;
RsltsSent = oriBatch.RsltsSent;
RsltsPrinted = oriBatch.RsltsPrinted;
Tests = new List<TestData>();
WaterMeters = new List<WaterMeter>();
TestRslts = new List<TestRslt>();
}
public virtual int PassedMetersCount()
{
int count = 0;
@@ -263,24 +309,6 @@ namespace Results.Entities
return 0;
}
public virtual double Buoyancy()
{
double timeSum = 0;
double sum = 0;
foreach (var tr in TestRslts)
{
if (tr.TestData.Evaluate && tr.TestDone)
{
double duration = (tr.EndTime - tr.StartTime).TotalSeconds;
timeSum += duration;
sum += (tr.Buoyancy * duration);
}
}
return (timeSum == 0) ? 0 : (sum / timeSum);
}
public virtual TestRslt GetTestRslt(string name, int part)
{
foreach (var tr in TestRslts)
@@ -297,10 +325,10 @@ namespace Results.Entities
public virtual string ToString(int i)
{
return string.Format("Batch: BatchNr={0} ProgramVersion={1} TestBenchId={2} UserName={3} UserNumber={4} ProcedureName={5}{6} ProcRev={7} ProtocolTitle={8} Remark={9} DensityCorr={10} Custom2={11} Custom3={12} StartTime={13} EndTime={14} Dirty={15} RsltsSent={16} RsltsPrinted={17}",
return string.Format("Batch: BatchNr={0} ProgramVersion={1} TestBenchId={2} UserName={3} UserNumber={4} ProcedureName={5}{6} ProcRev={7} ProtocolTitle={8} Remark={9} RealDensity={10} AtTemperature={11} Buoyancy={12} StartTime={13} EndTime={14} Dirty={15} RsltsSent={16} RsltsPrinted={17}",
BatchNr, ProgramVersion, TestBenchId, UserName, UserNumber,
ProcedureName, (IsRemoteProcedure ? "(R)" : ""), ProcedureRevision,
ProtocolTitle, Remark, DensityCorr, Custom2, Custom3,
ProtocolTitle, Remark, RealDensity, AtTemperature, Buoyancy,
StartTime, EndTime, Dirty, RsltsSent, RsltsPrinted);
}
@@ -325,9 +353,9 @@ namespace Results.Entities
writer.Write((WatermetersStr != null) ? WatermetersStr : string.Empty);
writer.Write((ProtocolTitle != null) ? ProtocolTitle : string.Empty);
writer.Write((Remark != null) ? Remark : string.Empty);
writer.Write(DensityCorr);
writer.Write(Custom2);
writer.Write(Custom3);
writer.Write(RealDensity);
writer.Write(AtTemperature);
writer.Write(Buoyancy);
writer.Write(Counter6);
writer.Write(Counter7);
writer.Write(Counter8);
@@ -392,9 +420,9 @@ namespace Results.Entities
WatermetersStr = reader.ReadString();
ProtocolTitle = reader.ReadString();
Remark = reader.ReadString();
DensityCorr = reader.ReadInt32();
Custom2 = reader.ReadInt32();
Custom3 = reader.ReadInt32();
RealDensity = reader.ReadDouble();
AtTemperature = reader.ReadDouble();
Buoyancy = reader.ReadDouble();
Counter6 = reader.ReadInt32();
Counter7 = reader.ReadInt32();
Counter8 = reader.ReadInt32();
+29 -9
View File
@@ -22,22 +22,25 @@ namespace Results.Entities
public virtual string Custom2 { get; set; }
public virtual string Custom3 { get; set; }
/// <summary>
/// Default constructor, safe values
/// </summary>
public 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;
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)
string scale, string regValve, string diverter)
{
TestBenchId = benchId;
TestBenchName = benchName;
@@ -51,6 +54,23 @@ namespace Results.Entities
Custom3 = string.Empty;
}
/// <summary>
/// Copy constructor, copies all except of Id
/// </summary>
public Components(Components oriComponents)
{
TestBenchId = oriComponents.TestBenchId;
TestBenchName = oriComponents.TestBenchName;
Pump = oriComponents.Pump;
RegValve = oriComponents.RegValve;
Flowmeter = oriComponents.Flowmeter;
Diverter = oriComponents.Diverter;
Scale = oriComponents.Scale;
Custom1 = oriComponents.Custom1;
Custom2 = oriComponents.Custom2;
Custom3 = oriComponents.Custom3;
}
/// <summary>
/// Method to compare the content of two entities
+63 -31
View File
@@ -10,27 +10,26 @@ 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, 4=heat meter volume, 5=heat meter energy
public virtual int RegReaderType { get; set; } /// Not mapped to the DB, does not depend on localization and customer
public virtual double PulsesMeter { get; set; } /// # of water meter or heat meter pulses
public virtual double PulsesMaster { get; set; } /// # of reference flowmeter pulses (gated by this water meter pulses)
public virtual byte CompoundMeterId { get; set; } /// 0=single, 1=compound/main, 2=compound/aux., 3=compound/overal, 4=heat meter volume, 5=heat meter energy
public virtual int RegReaderType { get; set; } /// Not mapped to the DB, does not depend on localization and customer
public virtual double PulsesMeter { get; set; } /// # of water meter or heat meter pulses
public virtual double PulsesMaster { get; set; } /// # of reference flowmeter pulses (gated by this water meter pulses)
public virtual double PulsesPerLiter { get; set; } /// [l ^ -1], in case of heat meters (CompoundMeterId==5) pulses per kWh in [kWh ^ -1]
public virtual double VolumeStart { get; set; } /// Volume or energy (CompoundMeterId==5) on test start in [l] or [J]
public virtual double VolumeEnd { get; set; } /// Volume or energy (CompoundMeterId==5) on test end in [l] or [J]
public virtual double VolumeMeter { get; set; } /// Measured volume or energy (CompoundMeterId==5) in [l] or [J]
public virtual double VolumeRef { get; set; } /// Reference volume or energy (CompoundMeterId==5) in [l] or [J]
public virtual double TimestampStart { get; set; } /// [s]
public virtual double TimestampEnd { get; set; } /// [s]
public virtual double TestTime { get; set; } /// [s]
public virtual double TimestampStart { get; set; } /// [s]
public virtual double TimestampEnd { get; set; } /// [s]
public virtual double TestTime { get; set; } /// [s]
/// Main result
public virtual double Error { get; set; } /// [%]
/// Main result
public virtual double Error { get; set; } /// [%]
public virtual long ErrorIndicators { get; set; } /// Not mapped to DB !!!, bit24=E25, bit25=E26, bit26=E27, bit27=E28 (error flags)
public virtual long InfoIndicators { get; set; } /// Not mapped to DB !!!, bit24=E25, bit25=E26, bit26=E27, bit27=E28 (info flags)
public virtual double KorrErrQ { get; set; } /// [%] not mapped to results DB, saved to Oracle DB
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 bool TestDone { get; set; } /// true = test was completed
public virtual bool Passed { get; set; } /// true = test passed, water meter is OK
#if ORACLE_DB
public virtual double LastError { get; set; } /// [%] Previous test error at this Q in case Pruefindex > 1
#endif
@@ -38,10 +37,12 @@ namespace Results.Entities
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 string Name() { return TestRslt.Name(); }
public virtual DateTime StartTime() { return TestRslt.StartTime; }
public virtual DateTime EndTime() { return TestRslt.EndTime; }
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]
@@ -114,29 +115,60 @@ namespace Results.Entities
CompoundMeterId = (byte)compoundMeterId;
}
/// <summary>
/// Copy constructor, copies all except of Id
/// TestRslt and WaterMeter references arenot set.
/// They have to be copied/ser manually.
/// </summary>
public MeterTestRslt(MeterTestRslt oriMTR)
{
CompoundMeterId = oriMTR.CompoundMeterId;
RegReaderType = oriMTR.RegReaderType;
PulsesMeter = oriMTR.PulsesMeter;
PulsesMaster = oriMTR.PulsesMaster;
PulsesPerLiter = oriMTR.PulsesPerLiter;
VolumeStart = oriMTR.VolumeStart;
VolumeEnd = oriMTR.VolumeEnd;
VolumeMeter = oriMTR.VolumeMeter;
VolumeRef = oriMTR.VolumeRef;
TimestampStart = oriMTR.TimestampStart;
TimestampEnd = oriMTR.TimestampEnd;
TestTime = oriMTR.TestTime;
Error = oriMTR.Error;
ErrorIndicators = oriMTR.ErrorIndicators;
InfoIndicators = oriMTR.InfoIndicators;
KorrErrQ = oriMTR.KorrErrQ;
TestDone = oriMTR.TestDone;
Passed = oriMTR.Passed;
#if ORACLE_DB
LastError = oriMTR.LastError;
#endif
}
public virtual void CopyContentFrom(MeterTestRslt src)
{
if (src == null) return;
CompoundMeterId = src.CompoundMeterId;
RegReaderType = src.RegReaderType;
PulsesMeter = src.PulsesMeter;
PulsesMaster = src.PulsesMaster;
PulsesPerLiter = src.PulsesPerLiter;
VolumeStart = src.VolumeStart;
VolumeEnd = src.VolumeEnd;
VolumeMeter = src.VolumeMeter;
VolumeRef = src.VolumeRef;
TimestampStart = src.TimestampStart;
TimestampEnd = src.TimestampEnd;
TestTime = src.TestTime;
Error = src.Error;
RegReaderType = src.RegReaderType;
PulsesMeter = src.PulsesMeter;
PulsesMaster = src.PulsesMaster;
PulsesPerLiter = src.PulsesPerLiter;
VolumeStart = src.VolumeStart;
VolumeEnd = src.VolumeEnd;
VolumeMeter = src.VolumeMeter;
VolumeRef = src.VolumeRef;
TimestampStart = src.TimestampStart;
TimestampEnd = src.TimestampEnd;
TestTime = src.TestTime;
Error = src.Error;
ErrorIndicators = src.ErrorIndicators;
KorrErrQ = src.KorrErrQ;
TestDone = src.TestDone;
Passed = src.Passed;
InfoIndicators = src.InfoIndicators;
KorrErrQ = src.KorrErrQ;
TestDone = src.TestDone;
Passed = src.Passed;
#if ORACLE_DB
LastError = src.LastError;
LastError = src.LastError;
#endif
}
@@ -170,7 +202,7 @@ namespace Results.Entities
writer.Write(LastError);
#endif
writer.Write((TestRslt != null && TestRslt.Name() != null) ? TestRslt.Name() : string.Empty);
writer.Write(TestRslt.Part);
writer.Write(TestRslt != null ? TestRslt.Part : 0);
}
public virtual void ReadBinary(BinaryReader reader, IList<TestRslt> testResults)
+45 -18
View File
@@ -5,6 +5,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using Config.Entities;
namespace Results.Entities
{
@@ -32,33 +33,59 @@ namespace Results.Entities
public virtual bool Evaluate { get; set; }
public TestData()
/// <summary>
/// Default constructor, safe values
/// </summary>
public TestData()
{
Name = string.Empty;
Method = string.Empty;
}
public TestData(Config.Entities.Test test)
public TestData(Test test)
: this()
{
Name = test.Name;
Repeats = test.Repeats;
Qtg = (double)test.Qtg;
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;
ErrLimMargin = (double)test.Uncertainty;
DoControlWaterTemp = test.DoControlWaterTemp;
TempLimLo = test.TempLimLo;
TempLimHi = test.TempLimHi;
Publish = test.Publish;
Evaluate = test.DoEvaluate;
Name = test.Name;
Repeats = test.Repeats;
Qtg = (double)test.Qtg;
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;
ErrLimMargin = (double)test.Uncertainty;
DoControlWaterTemp = test.DoControlWaterTemp;
TempLimLo = test.TempLimLo;
TempLimHi = test.TempLimHi;
Publish = test.Publish;
Evaluate = test.DoEvaluate;
}
/// <summary>
/// Copy constructor, copies all except of Id
/// </summary>
public TestData(TestData oriTestData)
{
Name = oriTestData.Name;
Repeats = oriTestData.Repeats;
Qtg = oriTestData.Qtg;
Qfrom = oriTestData.Qfrom;
Qto = oriTestData.Qto;
TargetVolume = oriTestData.TargetVolume;
TargetTime = oriTestData.TargetTime;
Method = oriTestData.Method;
ErrLimLo = oriTestData.ErrLimLo;
ErrLimHi = oriTestData.ErrLimHi;
ErrLimMargin = oriTestData.ErrLimMargin;
DoControlWaterTemp = oriTestData.DoControlWaterTemp;
TempLimLo = oriTestData.TempLimLo;
TempLimHi = oriTestData.TempLimHi;
Publish = oriTestData.Publish;
Evaluate = oriTestData.Evaluate;
}
/// <summary>
/// Method to compare the content of two entities
+186 -168
View File
@@ -11,138 +11,139 @@ 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...)
public virtual string MethodClass { get; set; } /// Not mapped to DB, does not depend on localization and customer
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...)
public virtual string MethodClass { get; set; } /// Not mapped to DB, does not depend on localization and customer
/// Main results
public virtual bool TestDone { get; set; }
public virtual string Remark { get; set; }
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] Flow set time in seconds
public virtual int TimeBtwnMassMsrmnts { get; set; } /// [s] Time between two mass measurements in seconds (if applicable)
public virtual double TestTime { get; set; } /// [s] Test time in seconds
public virtual double TestTimeCorrection { get; set; } /// [s] Correction of the test time due to diverter (0 for methods w/o diverter or when there is no correction table)
public virtual double PulsesMaster { get; set; } /// [pls] FlyingStartMassCollectionProlonged: MID pulses of the water to the tank
public virtual double TotalPulsesMstr { get; set; } /// [pls] FlyingStartMassCollectionProlonged: MID pulses of the complete test (not mapped to DB)
public virtual double ConstMasterRaw { get; set; } /// [l/pls] Liters per pulse of the master flow meter uncorrected.
public virtual double ConstMasterCorr { get; set; } /// [l/pls] Liters per pulse of the master flow meter corrected by a correction table.
public virtual double ConstMaster { get; set; } /// [l/pls] Liters per pulse of the master flow meter calculated from a mass measurement.
/// When mass measurement is not available, corrected by a correction table.
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 DensityLine { 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; } /// [%] Error of the master flow meter
public virtual bool TestDone { get; set; }
public virtual string Remark { get; set; }
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] Flow set time in seconds
public virtual int TimeBtwnMassMsrmnts { get; set; } /// [s] Time between two mass measurements in seconds (if applicable)
public virtual double TestTime { get; set; } /// [s] Test time in seconds
public virtual double TestTimeCorrection { get; set; } /// [s] Correction of the test time due to diverter (0 for methods w/o diverter or when there is no correction table)
public virtual double PulsesMaster { get; set; } /// [pls] FlyingStartMassCollectionProlonged: MID pulses of the water to the tank
public virtual double TotalPulsesMstr { get; set; } /// [pls] FlyingStartMassCollectionProlonged: MID pulses of the complete test (not mapped to DB)
public virtual double ConstMasterRaw { get; set; } /// [l/pls] Liters per pulse of the master flow meter uncorrected.
public virtual double ConstMasterCorr { get; set; } /// [l/pls] Liters per pulse of the master flow meter corrected by a correction table.
public virtual double ConstMaster { get; set; } /// [l/pls] Liters per pulse of the master flow meter calculated from a mass measurement.
/// When mass measurement is not available, corrected by a correction table.
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 DensityLine { get; set; } /// [kg/m3]
public virtual double DensityDiv { get; set; } /// [kg/m3]
public virtual double MassOfEvapWater { get; set; } /// [kg]
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; } /// [%] Error of the master flow meter
public virtual float DiverterStart { get; set; } /// [s] Diverter switch time when test starts
public virtual float DivStart10 { get; set; } /// [s] Diverter switch time when test starts at level 10 (e.g. 10%) (not mapped to DB)
public virtual float DivStart50 { get; set; } /// [s] Diverter switch time when test starts at level 50 (e.g. 50%) (not mapped to DB)
public virtual float DivStart90 { get; set; } /// [s] Diverter switch time when test starts at level 90 (e.g. 90%) (not mapped to DB)
public virtual float DiverterStart { get; set; } /// [s] Diverter switch time when test starts
public virtual float DivStart10 { get; set; } /// [s] Diverter switch time when test starts at level 10 (e.g. 10%) (not mapped to DB)
public virtual float DivStart50 { get; set; } /// [s] Diverter switch time when test starts at level 50 (e.g. 50%) (not mapped to DB)
public virtual float DivStart90 { get; set; } /// [s] Diverter switch time when test starts at level 90 (e.g. 90%) (not mapped to DB)
public virtual float DiverterEnd { get; set; } /// [s] Diverter switch time when test ends
public virtual float DivEnd90 { get; set; } /// [s] Diverter switch time when test starts at level 90 (e.g. 90%) (not mapped to DB)
public virtual float DivEnd50 { get; set; } /// [s] Diverter switch time when test starts at level 50 (e.g. 50%) (not mapped to DB)
public virtual float DivEnd10 { get; set; } /// [s] Diverter switch time when test starts at level 10 (e.g. 10%) (not mapped to DB)
public virtual float DiverterEnd { get; set; } /// [s] Diverter switch time when test ends
public virtual float DivEnd90 { get; set; } /// [s] Diverter switch time when test starts at level 90 (e.g. 90%) (not mapped to DB)
public virtual float DivEnd50 { get; set; } /// [s] Diverter switch time when test starts at level 50 (e.g. 50%) (not mapped to DB)
public virtual float DivEnd10 { get; set; } /// [s] Diverter switch time when test starts at level 10 (e.g. 10%) (not mapped to DB)
public virtual long ErrorFlags { get; set; } /// bitfield : bit0=E1, bit1=E2, bit2=E3, etc.
public virtual long InfoFlags { get; set; } /// bitfield : bit0=E1, bit1=E2, bit2=E3, etc.
public virtual long ErrorFlags { get; set; } /// bitfield : bit0=E1, bit1=E2, bit2=E3, etc.
public virtual long InfoFlags { get; set; } /// bitfield : bit0=E1, bit1=E2, bit2=E3, etc.
/// Main results of heat meters
public virtual double RefEnergy { get; set; } /// [J] Joul
public virtual double RefEnergy { get; set; } /// [J] Joul
/// Auxiliary results
public virtual float AmbTempMean { get; set; } /// [°C] Average ambient air temperature
public virtual float AmbTempStart { get; set; } /// [°C] Ambient air temperature on test start
public virtual float AmbTempEnd { get; set; } /// [°C] Ambient air temperature on test end
public virtual float AmbTempMin { get; set; } /// [°C] Minimum ambient air temperature
public virtual float AmbTempMax { get; set; } /// [°C] Maximum ambient air temperature
public virtual float AmbPressMean { get; set; } /// [bar] Average ambient air pressure
public virtual float AmbPressStart { get; set; } /// [bar] Ambient air pressure on test start
public virtual float AmbPressEnd { get; set; } /// [bar] Ambient air pressure on test end
public virtual float AmbPressMin { get; set; } /// [bar] Minimum ambient air pressure
public virtual float AmbPressMax { get; set; } /// [bar] Maximum ambient air pressure
public virtual float AmbHumiMean { get; set; } /// [%] Average ambient air relative humidity
public virtual float AmbHumiStart { get; set; } /// [%] Ambient air relative humidity on test start
public virtual float AmbHumiEnd { get; set; } /// [%] Ambient air relative humidity on test end
public virtual float AmbHumiMin { get; set; } /// [%] Minimum ambient air relative humidity
public virtual float AmbHumiMax { get; set; } /// [%] Maximum ambient air relative humidity
public virtual float PressUpMean { 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 PressDownMean { 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 PressDeltaMean { get; set; } /// [bar]
public virtual float PressDeltaStart { get; set; } /// [bar]
public virtual float PressDeltaEnd { get; set; } /// [bar]
public virtual float PressDeltaMin { get; set; } /// [bar]
public virtual float PressDeltaMax { get; set; } /// [bar]
public virtual float TempUpMean { get; set; } /// [°C]
public virtual float TempUpStart { get; set; } /// [°C]
public virtual float TempUpEnd { get; set; } /// [°C]
public virtual float TempUpMin { get; set; } /// [°C]
public virtual float TempUpMax { get; set; } /// [°C]
public virtual float TempDownMean { get; set; } /// [°C]
public virtual float TempDownStart { get; set; } /// [°C]
public virtual float TempDownEnd { get; set; } /// [°C]
public virtual float TempDownMin { get; set; } /// [°C]
public virtual float TempDownMax { get; set; } /// [°C]
public virtual float TempDivMean { get; set; } /// [°C]
public virtual float TempDivStart { get; set; } /// [°C]
public virtual float TempDivEnd { get; set; } /// [°C]
public virtual float TempDivMin { get; set; } /// [°C]
public virtual float TempDivMax { get; set; } /// [°C]
public virtual float FlowMean { get; set; } /// [m3/h] mean flow from the reference flowmeter
public virtual float FlowStart { get; set; } /// [m3/h] flow at the start of test from the reference flowmeter
public virtual float FlowEnd { get; set; } /// [m3/h] flow at the end of test from the reference flowmeter
public virtual float FlowMin { get; set; } /// [m3/h]
public virtual float FlowMax { get; set; } /// [m3/h]
public virtual float ConductMean { get; set; } /// [uS/cm]
public virtual float ConductStart { get; set; } /// [uS/cm]
public virtual float ConductEnd { get; set; } /// [uS/cm]
public virtual float ConductMin { get; set; } /// [uS/cm]
public virtual float ConductMax { get; set; } /// [uS/cm]
public virtual float AmbTempMean { get; set; } /// [°C] Average ambient air temperature
public virtual float AmbTempStart { get; set; } /// [°C] Ambient air temperature on test start
public virtual float AmbTempEnd { get; set; } /// [°C] Ambient air temperature on test end
public virtual float AmbTempMin { get; set; } /// [°C] Minimum ambient air temperature
public virtual float AmbTempMax { get; set; } /// [°C] Maximum ambient air temperature
public virtual float AmbPressMean { get; set; } /// [bar] Average ambient air pressure
public virtual float AmbPressStart { get; set; } /// [bar] Ambient air pressure on test start
public virtual float AmbPressEnd { get; set; } /// [bar] Ambient air pressure on test end
public virtual float AmbPressMin { get; set; } /// [bar] Minimum ambient air pressure
public virtual float AmbPressMax { get; set; } /// [bar] Maximum ambient air pressure
public virtual float AmbHumiMean { get; set; } /// [%] Average ambient air relative humidity
public virtual float AmbHumiStart { get; set; } /// [%] Ambient air relative humidity on test start
public virtual float AmbHumiEnd { get; set; } /// [%] Ambient air relative humidity on test end
public virtual float AmbHumiMin { get; set; } /// [%] Minimum ambient air relative humidity
public virtual float AmbHumiMax { get; set; } /// [%] Maximum ambient air relative humidity
public virtual float PressUpMean { 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 PressDownMean { 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 PressDeltaMean { get; set; } /// [bar]
public virtual float PressDeltaStart { get; set; } /// [bar]
public virtual float PressDeltaEnd { get; set; } /// [bar]
public virtual float PressDeltaMin { get; set; } /// [bar]
public virtual float PressDeltaMax { get; set; } /// [bar]
public virtual float TempUpMean { get; set; } /// [°C]
public virtual float TempUpStart { get; set; } /// [°C]
public virtual float TempUpEnd { get; set; } /// [°C]
public virtual float TempUpMin { get; set; } /// [°C]
public virtual float TempUpMax { get; set; } /// [°C]
public virtual float TempDownMean { get; set; } /// [°C]
public virtual float TempDownStart { get; set; } /// [°C]
public virtual float TempDownEnd { get; set; } /// [°C]
public virtual float TempDownMin { get; set; } /// [°C]
public virtual float TempDownMax { get; set; } /// [°C]
public virtual float TempDivMean { get; set; } /// [°C]
public virtual float TempDivStart { get; set; } /// [°C]
public virtual float TempDivEnd { get; set; } /// [°C]
public virtual float TempDivMin { get; set; } /// [°C]
public virtual float TempDivMax { get; set; } /// [°C]
public virtual float FlowMean { get; set; } /// [m3/h] mean flow from the reference flowmeter
public virtual float FlowStart { get; set; } /// [m3/h] flow at the start of test from the reference flowmeter
public virtual float FlowEnd { get; set; } /// [m3/h] flow at the end of test from the reference flowmeter
public virtual float FlowMin { get; set; } /// [m3/h]
public virtual float FlowMax { get; set; } /// [m3/h]
public virtual float ConductMean { get; set; } /// [uS/cm]
public virtual float ConductStart { get; set; } /// [uS/cm]
public virtual float ConductEnd { get; set; } /// [uS/cm]
public virtual float ConductMin { get; set; } /// [uS/cm]
public virtual float ConductMax { get; set; } /// [uS/cm]
public virtual float Uncertnt { get; set; } /// [%] Relative error uncertainty
public virtual float UncertntScale { get; set; } /// [%] Contribution to uncertainty from scale
public virtual float UncertntDensity { get; set; } /// [%] Contribution to uncertainty from density
public virtual float UncertntTemp { get; set; } /// [%] Contribution to uncertainty from temperature
public virtual float UncertntPressure { get; set; } /// [%] Contribution to uncertainty from pressure
public virtual float Uncertnt { get; set; } /// [%] Relative error uncertainty
public virtual float UncertntScale { get; set; } /// [%] Contribution to uncertainty from scale
public virtual float UncertntDensity { get; set; } /// [%] Contribution to uncertainty from density
public virtual float UncertntTemp { get; set; } /// [%] Contribution to uncertainty from temperature
public virtual float UncertntPressure { get; set; } /// [%] Contribution to uncertainty from pressure
public virtual float Custom1 { get; set; } /// [°C] T ref hi mean
public virtual float Custom2 { get; set; } /// [°C] T ref hi start
public virtual float Custom3 { get; set; } /// [°C] T ref hi end
public virtual float Custom4 { get; set; } /// [°C] T ref hi min
public virtual float Custom5 { get; set; } /// [°C] T ref hi max
public virtual float Custom6 { get; set; } /// [°C] T ref lo mean
public virtual float Custom7 { get; set; } /// [°C] T ref lo start
public virtual float Custom8 { get; set; } /// [°C] T ref lo end
public virtual float Custom9 { get; set; } /// [°C] T ref lo min
public virtual float Custom10 { get; set; } /// [°C] T ref lo max
public virtual float Custom1 { get; set; } /// [°C] T ref hi mean
public virtual float Custom2 { get; set; } /// [°C] T ref hi start
public virtual float Custom3 { get; set; } /// [°C] T ref hi end
public virtual float Custom4 { get; set; } /// [°C] T ref hi min
public virtual float Custom5 { get; set; } /// [°C] T ref hi max
public virtual float Custom6 { get; set; } /// [°C] T ref lo mean
public virtual float Custom7 { get; set; } /// [°C] T ref lo start
public virtual float Custom8 { get; set; } /// [°C] T ref lo end
public virtual float Custom9 { get; set; } /// [°C] T ref lo min
public virtual float Custom10 { get; set; } /// [°C] T ref lo max
public virtual int Counter1 { get; set; }
public virtual int Counter2 { get; set; }
public virtual int Counter3 { get; set; }
public virtual int Counter4 { get; set; }
public virtual int Counter5 { get; set; }
public virtual int Counter1 { get; set; }
public virtual int Counter2 { get; set; }
public virtual int Counter3 { get; set; }
public virtual int Counter4 { get; set; }
public virtual int Counter5 { get; set; }
/// Wrappers
public virtual string Name() { return Utils.GetTestName(TestData.Name, TestData.Repeats, RepetitionNr); }
@@ -246,46 +247,51 @@ namespace Results.Entities
{
if (src == null) return;
Components = src.Components; /// ???
Part = src.Part;
RepetitionNr = src.RepetitionNr;
MethodClass = src.MethodClass;
TestDone = src.TestDone;
Remark = src.Remark;
StartTime = src.StartTime;
EndTime = src.EndTime;
FlowSetTime = src.FlowSetTime;
Components = src.Components; /// ???
Part = src.Part;
RepetitionNr = src.RepetitionNr;
MethodClass = src.MethodClass;
TestDone = src.TestDone;
Remark = src.Remark;
StartTime = src.StartTime;
EndTime = src.EndTime;
FlowSetTime = src.FlowSetTime;
TimeBtwnMassMsrmnts = src.TimeBtwnMassMsrmnts;
TestTime = src.TestTime;
PulsesMaster = src.PulsesMaster;
TotalPulsesMstr = src.TotalPulsesMstr;
ConstMasterRaw = src.ConstMasterRaw;
ConstMasterCorr = src.ConstMasterCorr;
ConstMaster = src.ConstMaster;
MassStartRaw = src.MassStartRaw;
MassStart = src.MassStart;
MassEndRaw = src.MassEndRaw;
MassEnd = src.MassEnd;
DensityIn = src.DensityIn;
DensityLine = src.DensityLine;
DensityDiv = src.DensityDiv;
Buoyancy = src.Buoyancy;
FlowMass = src.FlowMass;
FlowVolume = src.FlowVolume;
VolumeCTV = src.VolumeCTV;
VolumeMaster = src.VolumeMaster;
ErrorMaster = src.ErrorMaster;
TestTime = src.TestTime;
TestTimeCorrection = src.TestTimeCorrection;
PulsesMaster = src.PulsesMaster;
TotalPulsesMstr = src.TotalPulsesMstr;
ConstMasterRaw = src.ConstMasterRaw;
ConstMasterCorr = src.ConstMasterCorr;
ConstMaster = src.ConstMaster;
MassStartRaw = src.MassStartRaw;
MassStart = src.MassStart;
MassEndRaw = src.MassEndRaw;
MassEnd = src.MassEnd;
DensityIn = src.DensityIn;
DensityLine = src.DensityLine;
DensityDiv = src.DensityDiv;
MassOfEvapWater = src.MassOfEvapWater;
FlowMass = src.FlowMass;
FlowVolume = src.FlowVolume;
VolumeCTV = src.VolumeCTV;
VolumeMaster = src.VolumeMaster;
ErrorMaster = src.ErrorMaster;
DiverterStart = src.DiverterStart;
DivStart10 = src.DivStart10;
DivStart50 = src.DivStart50;
DivStart90 = src.DivStart90;
DiverterEnd = src.DiverterEnd;
DivEnd10 = src.DivEnd10;
DivEnd50 = src.DivEnd50;
DivEnd90 = src.DivEnd90;
DivStart10 = src.DivStart10;
DivStart50 = src.DivStart50;
DivStart90 = src.DivStart90;
DiverterEnd = src.DiverterEnd;
DivEnd10 = src.DivEnd10;
DivEnd50 = src.DivEnd50;
DivEnd90 = src.DivEnd90;
ErrorFlags = src.ErrorFlags;
InfoFlags = src.InfoFlags;
RefEnergy = src.RefEnergy;
AmbTempMean = src.AmbTempMean;
AmbTempStart = src.AmbTempStart;
AmbTempEnd = src.AmbTempEnd;
@@ -342,15 +348,21 @@ namespace Results.Entities
ConductMin = src.ConductMin;
ConductMax = src.ConductMax;
Custom1 = src.Custom1;
Custom2 = src.Custom2;
Custom3 = src.Custom3;
Custom4 = src.Custom4;
Custom5 = src.Custom5;
Custom6 = src.Custom6;
Custom7 = src.Custom7;
Custom8 = src.Custom8;
Custom9 = src.Custom9;
Uncertnt = src.Uncertnt;
UncertntScale = src.UncertntScale;
UncertntDensity = src.UncertntDensity;
UncertntTemp = src.UncertntTemp;
UncertntPressure = src.UncertntPressure;
Custom1 = src.Custom1;
Custom2 = src.Custom2;
Custom3 = src.Custom3;
Custom4 = src.Custom4;
Custom5 = src.Custom5;
Custom6 = src.Custom6;
Custom7 = src.Custom7;
Custom8 = src.Custom8;
Custom9 = src.Custom9;
Custom10 = src.Custom10;
Counter1 = src.Counter1;
@@ -371,6 +383,12 @@ namespace Results.Entities
#endif
}
/// <summary> Wrapper </summary>
public virtual string InfoFlagsStr()
{
return Utils.ErrorFlagsStr(InfoFlags);
}
public virtual bool IsPartCompatible(int waterMeterPartNr)
{
if ((this.Part == 0) || (waterMeterPartNr == 0)) return true;
@@ -390,10 +408,10 @@ namespace Results.Entities
public virtual string ToString(int i)
{
return string.Format("TestRslt: Part={0} RepetitionNr={1} TestDone={2} Remark={3} StartTime={4} EndTime={5} FlowSetTime={6} TestTime={7} PulsesMaster={8} ConstMaster={9} MassStartRaw={10} MassStart={11} MassEndRaw={12} MassEnd={13} DensityIn={14} DensityOut={15} DensityDiv={16} Buoyancy={17} FlowMass={18} FlowVolume={19} VolumeCTV={20} VolumeMaster={21} ErrorMaster={22} DiverterStart={85} DiverterEnd={86} ErrorFlags={23} InfoFlags={24} AmbTempMean={25} AmbTempStart={26} AmbTempEnd={27} AmbTempMin={28} AmbTempMax={29} AmbPressMean={30} AmbPressStart={31} AmbPressEnd={32} AmbPressMin={33} AmbPressMax={34} AmbHumiMean={35} AmbHumiStart={36} AmbHumiEnd={37} AmbHumiMin={38} AmbHumiMax={39} PressUpMean={40} PressUpStart={41} PressUpEnd={42} PressUpMin={43} PressUpMax={44} PressDownMean={45} PressDownStart={46} PressDownEnd={47} PressDownMin={48} PressDownMax={49} PressDeltaMean={50} PressDeltaStart={51} PressDeltaEnd={52} PressDeltaMin={53} PressDeltaMax={54} TempUpMean={55} TempUpStart={56} TempUpEnd={57} TempUpMin={58} TempUpMax={59} TempDownMean={60} TempDownStart={61} TempDownEnd={62} TempDownMin={63} TempDownMax={64} TempDivMean={65} TempDivStart={66} TempDivEnd={67} TempDivMin={68} TempDivMax={69} FlowMean={70} FlowStart={71} FlowEnd={72} FlowMin={73} FlowMax={74} Custom1={75} Custom2={76} Custom3={77} Custom4={78} Custom5={79} Custom6={80} Custom7={81} Custom8={82} Custom9={83} Custom10={84}",
return string.Format("TestRslt: Part={0} RepetitionNr={1} TestDone={2} Remark={3} StartTime={4} EndTime={5} FlowSetTime={6} TestTime={7} PulsesMaster={8} ConstMaster={9} MassStartRaw={10} MassStart={11} MassEndRaw={12} MassEnd={13} DensityIn={14} DensityOut={15} DensityDiv={16} MassOfEvapWaater={17} FlowMass={18} FlowVolume={19} VolumeCTV={20} VolumeMaster={21} ErrorMaster={22} DiverterStart={85} DiverterEnd={86} ErrorFlags={23} InfoFlags={24} AmbTempMean={25} AmbTempStart={26} AmbTempEnd={27} AmbTempMin={28} AmbTempMax={29} AmbPressMean={30} AmbPressStart={31} AmbPressEnd={32} AmbPressMin={33} AmbPressMax={34} AmbHumiMean={35} AmbHumiStart={36} AmbHumiEnd={37} AmbHumiMin={38} AmbHumiMax={39} PressUpMean={40} PressUpStart={41} PressUpEnd={42} PressUpMin={43} PressUpMax={44} PressDownMean={45} PressDownStart={46} PressDownEnd={47} PressDownMin={48} PressDownMax={49} PressDeltaMean={50} PressDeltaStart={51} PressDeltaEnd={52} PressDeltaMin={53} PressDeltaMax={54} TempUpMean={55} TempUpStart={56} TempUpEnd={57} TempUpMin={58} TempUpMax={59} TempDownMean={60} TempDownStart={61} TempDownEnd={62} TempDownMin={63} TempDownMax={64} TempDivMean={65} TempDivStart={66} TempDivEnd={67} TempDivMin={68} TempDivMax={69} FlowMean={70} FlowStart={71} FlowEnd={72} FlowMin={73} FlowMax={74} Custom1={75} Custom2={76} Custom3={77} Custom4={78} Custom5={79} Custom6={80} Custom7={81} Custom8={82} Custom9={83} Custom10={84}",
Part, RepetitionNr, TestDone, Remark, StartTime, EndTime, FlowSetTime, TestTime,
PulsesMaster, ConstMaster, MassStartRaw, MassStart, MassEndRaw, MassEnd,
DensityIn, DensityLine, DensityDiv, Buoyancy, FlowMass, FlowVolume,
DensityIn, DensityLine, DensityDiv, MassOfEvapWater, FlowMass, FlowVolume,
VolumeCTV, VolumeMaster, ErrorMaster, ErrorFlags, InfoFlags,
AmbTempMean, AmbTempStart, AmbTempEnd, AmbTempMin, AmbTempMax,
AmbPressMean, AmbPressStart, AmbPressEnd, AmbPressMin, AmbPressMax,
@@ -461,7 +479,7 @@ namespace Results.Entities
writer.Write(DensityIn);
writer.Write(DensityLine);
writer.Write(DensityDiv);
writer.Write(Buoyancy);
writer.Write(MassOfEvapWater);
writer.Write(FlowMass);
writer.Write(FlowVolume);
writer.Write(VolumeCTV);
@@ -602,7 +620,7 @@ namespace Results.Entities
DensityIn = reader.ReadDouble();
DensityLine = reader.ReadDouble();
DensityDiv = reader.ReadDouble();
Buoyancy = reader.ReadDouble();
MassOfEvapWater = reader.ReadDouble();
FlowMass = reader.ReadDouble();
FlowVolume = reader.ReadDouble();
VolumeCTV = reader.ReadDouble();
+85 -49
View File
@@ -59,7 +59,7 @@ namespace Results.Entities
public virtual string Remark { get; set; }
#if IPERL
public virtual double OrigCalibFactor { get; set; } /// Original iPerl calibration factor used during the test
public virtual double OrigCalibFactor { get; set; } /// Original iPerl calibration factor used during the test
public virtual double CalibFactor { get; set; } /// iPerl calibration factor used during the test
public virtual double OrigCalibFactorLNA{ get; set; } /// Original iPerl LNA calibration factor used during the test
public virtual double CalibFactorLNA { get; set; } /// iPerl LNA calibration factor used during the test
@@ -76,8 +76,6 @@ namespace Results.Entities
/// <summary>
/// Data from a production test bench (in case of tests on iPerl special)
/// </summary>
public virtual int AssignedSerialNr { get; set; }
public virtual string CompleteSerialNr { get; set; }
public virtual string RadioAddress { get; set; }
public virtual int PaletteNr { get; set; }
public virtual int UmkartonNr { get; set; }
@@ -91,13 +89,17 @@ namespace Results.Entities
public virtual int ProdQ2CorrLR { get; set; } /// iPerl Q2 correction for the L-flow written to iPerl
#endif
#if ORACLE_DB
public virtual int Pruefindex { get; set; } /// >= 1 ... pruefindex
public virtual int AssignedSerialNr { get; set; }
public virtual string Prefix { get; set; }
public virtual string Suffix { get; set; }
public virtual string CompleteSerialNr { get; set; }
public virtual int WMTypeRevision { get; set; }
public virtual int Pruefindex { get; set; } /// >= 1 ... pruefindex
public virtual int HydrPruefung { get; set; }
public virtual int WMTypeRevision { get; set; } /// Not mapped to DB !!!
public virtual object RawTestInfos { get; set; } /// IList<SensusTestInfo> fetched from Oracle at the beginning of the cycle, not mapped to DB !!!
public virtual object CompleteTestInfos { get; set; } /// SensusTestInfo[] obtained as a best match at the beginning of the cycle, not mapped to DB !!!
#endif
public virtual int ProcessId { get; set; } /// Not mapped to DB !!! Tracing DB Process ID
public virtual int ProcessId { get; set; } /// Not mapped to DB !!! Tracing DB Process ID
public virtual int SessionId { get; set; } /// Not mapped to DB !!! 1 (regular tracing DB session) or 2 (alternative tracing DB session)
public virtual bool LastRecordIsNok { get; set; } /// Not mapped to DB !!! Previous record verification result
@@ -186,6 +188,30 @@ namespace Results.Entities
#endif
}
public virtual long InfoFlagsFromTests()
{
long infoFlags = 0;
foreach (var mtr in MeterTestRslts)
{
if (mtr.Evaluate() && mtr.TestDone) infoFlags |= mtr.TestRslt.InfoFlags;
}
return infoFlags;
}
public virtual long InfoFlagsFromTestsAndWM()
{
return InfoFlagsFromTests() | InfoFlags;
}
/// <summary>
/// Convert combined errorFlags of all tests to string
/// </summary>
/// <returns>ErrorFlags string</returns>
public virtual string InfoFlagsStr()
{
return Utils.ErrorFlagsStr(InfoFlagsFromTestsAndWM());
}
public virtual string PassedOrErrorFlagsStr()
{
string eFlags = Utils.ErrorFlagsStr(ErrorFlagsFromTestsAndWM());
@@ -395,9 +421,13 @@ namespace Results.Entities
{
MeterTestRslts = new List<MeterTestRslt>();
#if ORACLE_DB
AssignedSerialNr = 0;
Prefix = string.Empty;
Suffix = string.Empty;
CompleteSerialNr = string.Empty;
WMTypeRevision = 0;
Pruefindex = 1;
HydrPruefung = 0;
WMTypeRevision = 0;
RawTestInfos = null;
CompleteTestInfos = null;
#endif
@@ -415,7 +445,6 @@ namespace Results.Entities
ArchivePath = string.Empty;
Remark = string.Empty;
#if TURA_SPECIAL
CompleteSerialNr = string.Empty;
RadioAddress = string.Empty;
ProdUserName = string.Empty;
ProdPurchaseOrder = string.Empty;
@@ -430,37 +459,36 @@ namespace Results.Entities
{
if (src == null) return;
SerialNr = src.SerialNr;
SerialNrAux = src.SerialNrAux;
PurchaseOrder = src.PurchaseOrder;
YearOfProduction = src.YearOfProduction;
// WMPosition skipped
EndState = src.EndState;
EndStateAux = src.EndStateAux;
QRise = src.QRise;
QFall = src.QFall;
ErrorFlags = src.ErrorFlags;
Passed = src.Passed;
ResultCode = src.ResultCode;
ArchivePath = src.ArchivePath;
Remark = src.Remark;
SerialNr = src.SerialNr;
SerialNrAux = src.SerialNrAux;
PurchaseOrder = src.PurchaseOrder;
YearOfProduction = src.YearOfProduction;
WMPosition = src.WMPosition;
EndState = src.EndState;
EndStateAux = src.EndStateAux;
QRise = src.QRise;
QFall = src.QFall;
ErrorFlags = src.ErrorFlags;
InfoFlags = src.InfoFlags;
Passed = src.Passed;
ResultCode = src.ResultCode;
ArchivePath = src.ArchivePath;
Remark = src.Remark;
#if IPERL
OrigCalibFactor = src.OrigCalibFactor;
CalibFactor = src.CalibFactor;
OrigCalibFactor = src.OrigCalibFactor;
CalibFactor = src.CalibFactor;
OrigCalibFactorLNA = src.OrigCalibFactorLNA;
CalibFactorLNA = src.CalibFactorLNA;
Q2ErrWOCorrection = src.Q2ErrWOCorrection;
Q2CorrRL = src.Q2CorrRL;
Q2CorrLR = src.Q2CorrLR;
Q2CorrFlowRight = src.Q2CorrFlowRight;
Diff2Hz8Hz = src.Diff2Hz8Hz;
Hz2CorrectionDone = src.Hz2CorrectionDone;
Hz2Correction = src.Hz2Correction;
FWVersion = src.FWVersion;
CalibFactorLNA = src.CalibFactorLNA;
Q2ErrWOCorrection = src.Q2ErrWOCorrection;
Q2CorrRL = src.Q2CorrRL;
Q2CorrLR = src.Q2CorrLR;
Q2CorrFlowRight = src.Q2CorrFlowRight;
Diff2Hz8Hz = src.Diff2Hz8Hz;
Hz2CorrectionDone = src.Hz2CorrectionDone;
Hz2Correction = src.Hz2Correction;
FWVersion = src.FWVersion;
#endif
#if TURA_SPECIAL
AssignedSerialNr = src.AssignedSerialNr;
CompleteSerialNr = src.CompleteSerialNr;
RadioAddress = src.RadioAddress;
PaletteNr = src.PaletteNr;
UmkartonNr = src.UmkartonNr;
@@ -474,15 +502,19 @@ namespace Results.Entities
ProdQ2CorrLR = src.ProdQ2CorrLR;
#endif
#if ORACLE_DB
Pruefindex = src.Pruefindex;
HydrPruefung = src.HydrPruefung;
WMTypeRevision = src.WMTypeRevision;
RawTestInfos = src.RawTestInfos;
CompleteTestInfos = src.CompleteTestInfos;
AssignedSerialNr = src.AssignedSerialNr;
Prefix = src.Prefix;
Suffix = src.Suffix;
CompleteSerialNr = src.CompleteSerialNr;
WMTypeRevision = src.WMTypeRevision;
Pruefindex = src.Pruefindex;
HydrPruefung = src.HydrPruefung;
RawTestInfos = src.RawTestInfos; /// Not mapped to DB
CompleteTestInfos = src.CompleteTestInfos; /// Not mapped to DB
#endif
ProcessId = src.ProcessId;
SessionId = src.SessionId;
LastRecordIsNok = src.LastRecordIsNok;
ProcessId = src.ProcessId; /// Not mapped to DB
SessionId = src.SessionId; /// Not mapped to DB
LastRecordIsNok = src.LastRecordIsNok; /// Not mapped to DB
foreach (var mtr in MeterTestRslts)
{
@@ -638,8 +670,6 @@ namespace Results.Entities
writer.Write((FWVersion != null) ? FWVersion : string.Empty);
#endif
#if TURA_SPECIAL
writer.Write(AssignedSerialNr);
writer.Write((CompleteSerialNr != null) ? CompleteSerialNr : string.Empty);
writer.Write((RadioAddress != null) ? RadioAddress : string.Empty);
writer.Write(PaletteNr);
writer.Write(UmkartonNr);
@@ -653,9 +683,13 @@ namespace Results.Entities
writer.Write(ProdQ2CorrLR);
#endif
#if ORACLE_DB
writer.Write(AssignedSerialNr);
writer.Write((Prefix != null) ? Prefix : string.Empty);
writer.Write((Suffix != null) ? Suffix : string.Empty);
writer.Write((CompleteSerialNr != null) ? CompleteSerialNr : string.Empty);
writer.Write(WMTypeRevision);
writer.Write(Pruefindex);
writer.Write(HydrPruefung);
writer.Write(WMTypeRevision);
/// Write RawTestInfos
IList<Results.Output.SensusTestInfo> rawTestInfos = RawTestInfos as IList<Results.Output.SensusTestInfo>;
@@ -731,8 +765,6 @@ namespace Results.Entities
FWVersion = reader.ReadString();
#endif
#if TURA_SPECIAL
AssignedSerialNr = reader.ReadInt32();
CompleteSerialNr = reader.ReadString();
RadioAddress = reader.ReadString();
PaletteNr = reader.ReadInt32();
UmkartonNr = reader.ReadInt32();
@@ -746,9 +778,13 @@ namespace Results.Entities
ProdQ2CorrLR = reader.ReadInt32();
#endif
#if ORACLE_DB
AssignedSerialNr = reader.ReadInt32();
Prefix = reader.ReadString();
Suffix = reader.ReadString();
CompleteSerialNr = reader.ReadString();
WMTypeRevision = reader.ReadInt32();
Pruefindex = reader.ReadInt32();
HydrPruefung = reader.ReadInt32();
WMTypeRevision = reader.ReadInt32();
/// Read RawTestInfos
int rawTestInfosCount = reader.ReadInt32();
+76 -50
View File
@@ -5,61 +5,97 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using Config.Entities;
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 bool NewQnames { get; set; } /// Yes = Q3... No = Qn...
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; }
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 Mounting Mounting { get; set; } /// H / V / S / F
public virtual bool NewQnames { get; set; } /// Yes = Q3... No = Qn...
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 TemperatureClass TemperatureClass { get; set; }
public virtual PressureLossClass PressureLossClass { get; set; }
public virtual MaxAdmissiblePressure MaxAdmissiblePressure { get; set; }
public virtual 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 Config.Entities.Medium Medium { 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; }
public virtual bool HeatMeter { get; set; }
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 Medium Medium { 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; }
public virtual bool HeatMeter { get; set; }
#if ORACLE_DB
public virtual int WMTypeId { get; set; }
public virtual int WMTypeId { get; set; }
#endif
/// <summary>
/// Default constructor, safe values
/// </summary>
public WaterMeterData()
{
}
/// <summary>
/// Copy constructor, copies all except of Id
/// </summary>
public WaterMeterData(WaterMeterData oriWMData)
{
ProductName = oriWMData.ProductName;
Producer = oriWMData.Producer;
DN = oriWMData.DN;
L = oriWMData.L;
Mounting = oriWMData.Mounting;
NewQnames = oriWMData.NewQnames;
Q4_Qmax = oriWMData.Q4_Qmax;
Q3_Qn = oriWMData.Q3_Qn;
Q2_Qt = oriWMData.Q2_Qt;
Q1_Qmin = oriWMData.Q1_Qmin;
MetrologicalClass = oriWMData.MetrologicalClass;
TemperatureClass = oriWMData.TemperatureClass;
PressureLossClass = oriWMData.PressureLossClass;
MaxAdmissiblePressure = oriWMData.MaxAdmissiblePressure;
FlowProfileSensitivityClass = oriWMData.FlowProfileSensitivityClass;
ApprovalInfo = oriWMData.ApprovalInfo;
Certificate = oriWMData.Certificate;
PulsesPerLtr = oriWMData.PulsesPerLtr;
ProducerAux = oriWMData.ProducerAux;
Q3_Qn_Aux = oriWMData.Q3_Qn_Aux;
MetrologicalClassAux = oriWMData.MetrologicalClassAux;
ApprovalInfoAux = oriWMData.ApprovalInfoAux;
Medium = oriWMData.Medium;
Text1 = oriWMData.Text1;
Text2 = oriWMData.Text2;
Text3 = oriWMData.Text3;
Text4 = oriWMData.Text4;
Text5 = oriWMData.Text5;
Compound = oriWMData.Compound;
HeatMeter = oriWMData.HeatMeter;
#if ORACLE_DB
WMTypeId = oriWMData.WMTypeId;
#endif
}
/// <summary>
/// Method to compare the content of two entities
@@ -70,44 +106,34 @@ namespace Results.Entities
{
if (ProductName != wmd.ProductName) return false;
if (Producer != wmd.Producer) return false;
if (DN != wmd.DN) return false;
if (L != wmd.L) return false;
if (Mounting != wmd.Mounting) return false;
if (NewQnames != wmd.NewQnames) 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 != wmd.MetrologicalClass) return false;
if (TemperatureClass != wmd.TemperatureClass) return false;
if (PressureLossClass != wmd.PressureLossClass) return false;
if (MaxAdmissiblePressure != wmd.MaxAdmissiblePressure) return false;
if (FlowProfileSensitivityClass != wmd.FlowProfileSensitivityClass) return false;
if (ApprovalInfo != wmd.ApprovalInfo) return false;
if (Certificate != wmd.Certificate) return false;
if (PulsesPerLtr != wmd.PulsesPerLtr) return false;
if (ProducerAux != wmd.ProducerAux) return false;
if (Q3_Qn_Aux != wmd.Q3_Qn_Aux) return false;
if (MetrologicalClassAux != wmd.MetrologicalClassAux) return false;
if (ApprovalInfoAux != wmd.ApprovalInfoAux) return false;
if (Medium != wmd.Medium) 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 (HeatMeter != wmd.HeatMeter) return false;
#if ORACLE_DB
if (WMTypeId != wmd.WMTypeId) return false;
#endif
+2
View File
@@ -327,6 +327,8 @@ namespace Results
Conduct_min, /// 277
Conduct_max, /// 278
InfoFlags, /// 279
Count,
}
}
+5 -5
View File
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2019 Sensus Slovensko a.s.
/// Copyright (c) 2015-2021 Sensus Slovensko a.s.
///
using FluentNHibernate.Mapping;
using Results.Entities;
@@ -22,10 +22,10 @@ namespace Results.Mappings
Map(x => x.Remark)
.CustomType("StringClob")
.CustomSqlType("varchar(2000)");
Map(x => x.DensityCorr)
.Column("Custom1"); ;
Map(x => x.Custom2);
Map(x => x.Custom3);
Map(x => x.RealDensity).Column("Custom1");
Map(x => x.AtTemperature).Column("Custom2");
Map(x => x.Buoyancy).Column("Custom3");
Map(x => x.Counter6);
Map(x => x.Counter7);
+1 -1
View File
@@ -39,7 +39,7 @@ namespace Results.Mappings
Map(x => x.DensityIn);
Map(x => x.DensityLine).Column("DensityOut");
Map(x => x.DensityDiv);
Map(x => x.Buoyancy);
Map(x => x.MassOfEvapWater).Column("Buoyancy");
Map(x => x.FlowMass);
Map(x => x.FlowVolume);
Map(x => x.VolumeCTV);
+5 -2
View File
@@ -43,8 +43,6 @@ namespace Results.Mappings
Map(x => x.FWVersion);
#endif
#if TURA_SPECIAL
Map(x => x.AssignedSerialNr);
Map(x => x.CompleteSerialNr);
Map(x => x.RadioAddress);
Map(x => x.PaletteNr);
Map(x => x.UmkartonNr);
@@ -58,8 +56,13 @@ namespace Results.Mappings
Map(x => x.ProdQ2CorrLR);
#endif
#if ORACLE_DB
Map(x => x.AssignedSerialNr);
Map(x => x.Prefix);
Map(x => x.Suffix);
Map(x => x.CompleteSerialNr);
Map(x => x.Pruefindex);
Map(x => x.HydrPruefung);
Map(x => x.WMTypeRevision);
#endif
References(x => x.WaterMeterData);
References(x => x.Batch);
+58 -15
View File
@@ -9,20 +9,24 @@ namespace Results.Output
{
public enum LogType
{
Just_Q3Q2Q1, /// pNrs = 3,2,1
Just_Q3Q2Q1_Alt, /// pNrs = 5,2,1
Just_Q3Q2adjQ1, /// pNrs = 3,2,1
Just_Q3Q2adjQ1_Alt, /// pNrs = 5,2,1
DEWA, /// Q4, Q3, Q2adj, Q2, Q1
DEWA_wo_Q2, /// Q4, Q3, Q2adj, Q1
Suez, /// Two directions, with Q2 and Q2ac
Suez_smart, /// There is only Q2ac in both directions
Suez_Repeatability, /// 3xQ3, 3xQ2, 3xQ1
Suez_EMP_DN15, /// EMP: 12 flow rates
Suez_EMP_DN20, /// EMP: 12 flow rates
Suez_EMP_DN32, /// EMP: 12 flow rates
Suez_EMP_DN40, /// EMP: 12 flow rates
Greece, /// Q3, Q2adj, Q2, Q1
Just_Q3Q2Q1, /// pNrs = -1,3,2,1
Just_Q3Q2Q1_Alt, /// pNrs = -1,5,2,1
Just_Q3Q2adjQ1, /// pNrs = -1,3,2,1
Just_Q3Q2adjQ1_Alt, /// pNrs = -1,5,2,1
JustA0A4_Q3Q2adjQ1, /// pNrs = -2,-1,3,2,1 (Australia 169 MHz, raw data pNrs: -2,-1,4,3,2,1)
DEWA, /// Q4, Q3, Q2adj, Q2, Q1
DEWA_wo_Q2, /// Q4, Q3, Q2adj, Q1
Suez, /// Two directions, with Q2 and Q2ac
Suez_smart, /// There is only Q2ac in both directions
Suez_Repeatability, /// 3xQ3, 3xQ2, 3xQ1
Suez_EMP_DN15, /// EMP: 12 flow rates
Suez_EMP_DN20, /// EMP: 12 flow rates
Suez_EMP_DN32, /// EMP: 12 flow rates
Suez_EMP_DN40, /// EMP: 12 flow rates
Greece, /// Q3, Q2adj, Q2, Q1
S620, /// Q3, Q100, Q2, Q1
S620_Alt, /// Q3, Q100, Q2, Q1
S620_Kiwa,
Count,
None,
}
@@ -263,6 +267,18 @@ namespace Results.Output
new SensusTestInfo("Q1", 1, "Q1", 1, "01", 1, "Q1", Range.R100_110),
};
case LogType.JustA0A4_Q3Q2adjQ1: /// Australia 169 MHz
return new SensusTestInfo[]
{
/// TBF Oracle DB Opto RAW LU logfiles
new SensusTestInfo("Q2adj", 0, "", 3, "03", 3,"Q2adj", Range.R100_110),
new SensusTestInfo("Qjust_A0", -1, "Just", -1, "-1", -1, "Q-1", Range.R95_105),
new SensusTestInfo("Qjust_A4", -2, "Just", -2, "-2", -2, "Q-2", Range.R95_105),
new SensusTestInfo("Q3", 3, "Q3", 4, "04", 4, "Q3", Range.R90_100),
new SensusTestInfo("Q2", 2, "Q2", 2, "02", 2, "Q2", Range.R100_110),
new SensusTestInfo("Q1", 1, "Q1", 1, "01", 1, "Q1", Range.R100_110),
};
case LogType.DEWA: /// DEWA (with Q4 and Q2 after correction)
return new SensusTestInfo[]
{
@@ -414,6 +430,33 @@ namespace Results.Output
new SensusTestInfo("Q2", 2, "Q2", 2, "02", 2, "Q2", Range.R100_110),
new SensusTestInfo("Q1", 1, "Q1", 1, "01", 1, "Q1", Range.R100_110),
};
case LogType.S620:
return new SensusTestInfo[]
{
/// TBF Oracle DB Opto RAW LU logfiles
new SensusTestInfo("Q3", 3, "Q3", 3, "04", 3, "Q3", Range.R90_100),
new SensusTestInfo("Q2", 2, "Q2", 2, "02", 2, "Q2", Range.R100_110),
new SensusTestInfo("Q1", 1, "Q1", 1, "01", 1, "Q1", Range.R100_110),
};
case LogType.S620_Alt:
return new SensusTestInfo[]
{
/// TBF Oracle DB Opto RAW LU logfiles
new SensusTestInfo("Q3", 5, "Q3", 5, "04", 5, "Q3", Range.R90_100),
new SensusTestInfo("Q2", 2, "Q2", 2, "02", 2, "Q2", Range.R100_110),
new SensusTestInfo("Q1", 1, "Q1", 1, "01", 1, "Q1", Range.R100_110),
};
case LogType.S620_Kiwa:
return new SensusTestInfo[]
{
/// TBF Oracle DB Opto RAW LU logfiles
new SensusTestInfo("Q4", 5, "Q4", 5, "04", 5, "Q4", Range.R90_100),
new SensusTestInfo("Q2", 2, "Q2", 2, "02", 2, "Q2", Range.R100_110),
new SensusTestInfo("Q1", 1, "Q1", 1, "01", 1, "Q1", Range.R100_110),
};
}
}
@@ -472,7 +515,7 @@ namespace Results.Output
///
static bool TestShouldBeIncluded(Config.Entities.Test test)
{
return test.DoEvaluate && !test.Method.ToLower().Contains("iperlcommunication");
return test.DoEvaluate && test.IsRegular() && !test.Method.ToLower().Contains("iperlcommunication");
}
///
public static SensusTestInfo CreateFromTest(Config.Entities.Test test, int repetitionNr, int luID, string fullTestNameWoPart)
+2 -2
View File
@@ -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.26.1458.0")]
[assembly: AssemblyFileVersion("2.26.1458.0")]
[assembly: AssemblyVersion("2.26.1622.0")]
[assembly: AssemblyFileVersion("2.26.1622.0")]
+9
View File
@@ -510,6 +510,15 @@ namespace Results.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Info flags.
/// </summary>
internal static string Info_flags {
get {
return ResourceManager.GetString("Info_flags", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Invalid Q2 correction factors.
/// </summary>
+3
View File
@@ -828,4 +828,7 @@
<data name="VName_Conduct" xml:space="preserve">
<value>Conduct.</value>
</data>
<data name="Info_flags" xml:space="preserve">
<value>Info flags</value>
</data>
</root>
+6 -2
View File
@@ -19,7 +19,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
<DefineConstants>TRACE;DEBUG;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
@@ -29,7 +29,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;MUNICH</DefineConstants>
<DefineConstants>TRACE;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
@@ -195,6 +195,10 @@
<Compile Include="WMeterRsltItemSpec.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Common\Common.csproj">
<Project>{c8939821-ba5c-4988-a3d0-bf53b74865c7}</Project>
<Name>Common</Name>
</ProjectReference>
<ProjectReference Include="..\Config\Config.csproj">
<Project>{743DF7DB-C7B6-42EB-986D-0F485E5588E4}</Project>
<Name>Config</Name>
+2 -4
View File
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2016-2019 Sensus Slovensko a.s.
/// Copyright (c) 2016-2021 Sensus Slovensko a.s.
///
using System;
using System.Text;
@@ -11,9 +11,7 @@ namespace Results
{
public static string GetTestName(string name, int repeats, int repetitionNr)
{
if (name == null) return null;
if (repeats == 1) return name;
return string.Format("{0} ({1}/{2})", name, repetitionNr, repeats);
return Common.Utils.GetTestName(name, repeats, repetitionNr);
}
+11 -14
View File
@@ -43,13 +43,6 @@ namespace Results
return item2;
}
/// This is to show RealDensity and AtTemperatire in reports.
public static double RealDensity; /// true water density [kg/m3]
public static double AtTemperature; /// measured at temperature [°C]
public static double Buoyancy;
///
/// Function to pick a MeterTestResult field and convert it into a string
///
@@ -182,9 +175,9 @@ namespace Results
/// Density
///
AllItems.Add(new WMeterRsltItemSpec(ItemID.Density, Strings.Density + " ()", Quantity.Density, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetTestRslt(t).DensityLine)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Density_correction, Strings.Density_correction + " ()", Quantity.Density, ItemCategory.TestResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", (w.Batch.DensityCorr))));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Rho_Wa_calc, string.Format("{0} of sample", Strings.Density), Quantity.Density, ItemCategory.TestResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V4", RealDensity)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.RhoDistilledWtrAtMeLineTemp, string.Format("{0} of distilled water at T line", Strings.Density), Quantity.Density, ItemCategory.TestResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V4", (w.GetTestRslt(t) == null) ? 0 : Config.Formulas.DistilledWaterDensityFromTemp((w.GetTestRslt(t).TempUpMean + w.GetTestRslt(t).TempDownMean) / 2))));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Density_correction, Strings.Density_correction + " ()", Quantity.Density, ItemCategory.BenchData, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", Config.Formulas.DensityCorrection(w.Batch.RealDensity, w.Batch.AtTemperature))));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Rho_Wa_calc, string.Format("{0} of sample", Strings.Density), Quantity.Density, ItemCategory.TestResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V4", w.Batch.RealDensity)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.RhoDistilledWtrAtMeLineTemp, string.Format("{0} of distilled water at T line", Strings.Density), Quantity.Density, ItemCategory.BenchData, (w, t, u, f, p) => FormatDbl(u, f, p, "V4", (w.GetTestRslt(t) == null) ? 0 : Config.Formulas.DistilledWaterDensityFromTemp((w.GetTestRslt(t).TempUpMean + w.GetTestRslt(t).TempDownMean) / 2))));
///
/// Date and time
@@ -259,7 +252,7 @@ namespace Results
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_div_avg, string.Format("{0} DI avg ()", Strings.VName_Temp), Strings.Tooltip_T_di_avg, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", (w.GetTestRslt(t).TempDivStart + w.GetTestRslt(t).TempDivEnd) / 2)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_div_min, string.Format("{0} DI min ()", Strings.VName_Temp), Strings.Tooltip_T_di_min, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).TempDivMin)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_div_max, string.Format("{0} DI max ()", Strings.VName_Temp), Strings.Tooltip_T_di_max, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", w.GetTestRslt(t).TempDivMax)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_rho_0, string.Format("{0} RO0", Strings.VName_Temp), Strings.Tooltip_T_rho_0, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", AtTemperature)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_rho_0, string.Format("{0} RO0", Strings.VName_Temp), Strings.Tooltip_T_rho_0, Quantity.Temperature, ItemCategory.BenchData, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", w.Batch.AtTemperature)));
#if HEAT_METERS
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_Hi_mean, string.Format("{0} hi me", Strings.VName_Temp), Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "F3", w.GetTestRslt(t).Custom1)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.T_Hi_start, string.Format("{0} hi st", Strings.VName_Temp), Quantity.Temperature, ItemCategory.Other, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "F3", w.GetTestRslt(t).Custom2)));
@@ -316,7 +309,7 @@ namespace Results
AllItems.Add(new WMeterRsltItemSpec(ItemID.Amb_temp_start_end, string.Format("{0} Amb ST/EN", Strings.VName_Temp), Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V3", (w.GetTestRslt(t) == null) ? w.Batch.AmbTempStart() : w.GetTestRslt(t).AmbTempStart, (w.GetTestRslt(t) == null) ? w.Batch.AmbTempEnd() : w.GetTestRslt(t).AmbTempEnd)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Amb_press_start_end, string.Format("{0} Amb ST/EN", Strings.VName_Press), Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V4", (w.GetTestRslt(t) == null) ? w.Batch.AmbPressStart(): w.GetTestRslt(t).AmbPressStart, (w.GetTestRslt(t) == null) ? w.Batch.AmbPressEnd() : w.GetTestRslt(t).AmbPressEnd)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Amb_humi_start_end, string.Format("{0} Amb ST/EN", Strings.VName_Humi), Quantity.Humidity, ItemCategory.TestResult, (w, t, u, f, p) => FormatDbl(u, f, p, "V2", (w.GetTestRslt(t) == null) ? w.Batch.AmbHumiStart() : w.GetTestRslt(t).AmbHumiStart, (w.GetTestRslt(t) == null) ? w.Batch.AmbHumiEnd() : w.GetTestRslt(t).AmbHumiEnd)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Buoyancy, "Buoyancy ()", Quantity.Number, ItemCategory.TestResult, (w, t, u, f, p) => string.IsNullOrEmpty(t) ? FormatDbl(u, f, p, "V6", w.Batch.Buoyancy()) : ((w.GetTestRslt(t) != null) ? FormatDbl(u, f, p, "V6", (w.GetTestRslt(t).Buoyancy)) : "")));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Buoyancy, "Buoyancy", Quantity.Number, ItemCategory.BenchData, (w, t, u, f, p) => FormatDbl(u, f, p, "V6", w.Batch.Buoyancy)));
///
/// Error
@@ -451,9 +444,12 @@ namespace Results
#endif
#endif
#if ORACLE_DB
AllItems.Add(new WMeterRsltItemSpec(ItemID.Prod_AssignedSerialNr, "Assigned s/n", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.AssignedSerialNr)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Prod_CompleteSerialNr, "Complete s/n", Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.CompleteSerialNr)));
#endif
#if TURA_SPECIAL
AllItems.Add(new WMeterRsltItemSpec(ItemID.Prod_AssignedSerialNr, "iPerl assigned s/n", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.AssignedSerialNr)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Prod_CompleteSerialNr, "iPerl complete s/n", Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.CompleteSerialNr)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Prod_RadioAddress, "iPerl radio address", Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.RadioAddress)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Prod_PaletteNr, "iPerl palette nr.", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.PaletteNr)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Prod_UmkartonNr, "iPerl umkarton nr.", Quantity.Number, ItemCategory.MeterResult, (w, t, u, f, p) => FormatInt(f, w.UmkartonNr)));
@@ -471,6 +467,7 @@ namespace Results
AllItems.Add(new WMeterRsltItemSpec(ItemID.TestPassed, Strings.Test_passed + "()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => FormatBool(f, (w.GetMeterTestRslt(t) != null) && w.GetMeterTestRslt(t).Passed)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.ErrorFlags, Strings.Error_flags + "()", Quantity.String, ItemCategory.TestResult, (w, t, u, f, p) => FormatStr(f, (w.GetTestRslt(t) != null) ? w.GetTestRslt(t).ErrorFlagsStr() : w.ErrorFlagsStr())));
AllItems.Add(new WMeterRsltItemSpec(ItemID.ErrorFlagsEx, Strings.Error_flags + "Ex", Quantity.String, ItemCategory.MeterResult, (w, t, u, f, p) => FormatStr(f, w.ErrorFlagsStrEx())));
AllItems.Add(new WMeterRsltItemSpec(ItemID.InfoFlags, Strings.Info_flags + "()", Quantity.String, ItemCategory.TestResult, (w, t, u, f, p) => FormatStr(f, (w.GetTestRslt(t) != null) ? w.GetTestRslt(t).InfoFlagsStr() : w.InfoFlagsStr())));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E1, "E1 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & (int)ErrorFlagMask.E1) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E2, "E2 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & (int)ErrorFlagMask.E2) != 0) ? Strings.Yes : Strings.No));
AllItems.Add(new WMeterRsltItemSpec(ItemID.E3, "E3 ()", Quantity.Boolean, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) != null && (w.GetTestRslt(t).ErrorFlags & (int)ErrorFlagMask.E3) != 0) ? Strings.Yes : Strings.No));
+1
View File
@@ -15,6 +15,7 @@ namespace ResultsBrowser
WZTypeIdAndTimePeriod,
ProducedWithinTimePeriod,
BenchAndBatchNr,
GetListOfUsedProcedures,
Count,
}
@@ -181,7 +181,7 @@
//
// parameterValueTextBox
//
this.parameterValueTextBox.Location = new System.Drawing.Point(325, 14);
this.parameterValueTextBox.Location = new System.Drawing.Point(612, 13);
this.parameterValueTextBox.Name = "parameterValueTextBox";
this.parameterValueTextBox.Size = new System.Drawing.Size(68, 20);
this.parameterValueTextBox.TabIndex = 1;
@@ -189,7 +189,7 @@
// parameterNameLabel
//
this.parameterNameLabel.AutoSize = true;
this.parameterNameLabel.Location = new System.Drawing.Point(128, 17);
this.parameterNameLabel.Location = new System.Drawing.Point(121, 17);
this.parameterNameLabel.Name = "parameterNameLabel";
this.parameterNameLabel.Size = new System.Drawing.Size(0, 13);
this.parameterNameLabel.TabIndex = 0;
@@ -40,6 +40,7 @@ namespace ResultsBrowser.Forms
queryTypeComboBox.Items.Add(new CQSelectionItem(CQCriteria.WZTypeIdAndTimePeriod, "Všetky vodomery so zadaným WZTypeID vyrobené v zadanom časovom období"));
queryTypeComboBox.Items.Add(new CQSelectionItem(CQCriteria.ProducedWithinTimePeriod, "Všetky vodomery vyrobené v zadanom časovom období"));
queryTypeComboBox.Items.Add(new CQSelectionItem(CQCriteria.BenchAndBatchNr, "Stanica a číslo dávky"));
queryTypeComboBox.Items.Add(new CQSelectionItem(CQCriteria.GetListOfUsedProcedures, "Zoznam použitých procedúr"));
queryTypeComboBox.Text = "Všetky vodomery vyrobené v zadanom časovom období";
destinationFileTextBox.Text = string.Format("vysledky_hladania_{0:ddMMyyyy_HHmm}.csv", DateTime.Now);
@@ -73,7 +74,8 @@ namespace ResultsBrowser.Forms
(CQCriteria == CQCriteria.BenchAndBatchNr);
timePeriodGroupBox.Enabled = (CQCriteria == CQCriteria.WZTypeIdAndTimePeriod) ||
(CQCriteria == CQCriteria.ProducedWithinTimePeriod);
(CQCriteria == CQCriteria.ProducedWithinTimePeriod) ||
(CQCriteria == CQCriteria.GetListOfUsedProcedures);
if (CQCriteria == CQCriteria.WZTypeIdAndTimePeriod)
{
@@ -83,7 +85,7 @@ namespace ResultsBrowser.Forms
else if (CQCriteria == CQCriteria.BenchAndBatchNr)
{
parameterGroupBox.Enabled = true;
parameterNameLabel.Text = "Test bench number (e.g. 10 for WR10)";
parameterNameLabel.Text = "wr10=5, wr11=6, wr13=8, wr14=10, wr15=9, wr18=11, wr19=12, wr20=13, wr21=14";
}
else
{
+74 -14
View File
@@ -48,13 +48,19 @@
this.connectionStringTextBox4 = new System.Windows.Forms.TextBox();
this.benchNameTextBox6 = new System.Windows.Forms.TextBox();
this.connectionStringTextBox6 = new System.Windows.Forms.TextBox();
this.benchNameTextBox9 = new System.Windows.Forms.TextBox();
this.connectionStringTextBox9 = new System.Windows.Forms.TextBox();
this.benchNameTextBox8 = new System.Windows.Forms.TextBox();
this.benchNameTextBox7 = new System.Windows.Forms.TextBox();
this.connectionStringTextBox8 = new System.Windows.Forms.TextBox();
this.connectionStringTextBox7 = 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.Size = new System.Drawing.Size(713, 20);
this.connectionStringTextBox1.TabIndex = 3;
//
// benchNameLabel
@@ -79,20 +85,20 @@
//
this.connectionStringTextBox2.Location = new System.Drawing.Point(157, 69);
this.connectionStringTextBox2.Name = "connectionStringTextBox2";
this.connectionStringTextBox2.Size = new System.Drawing.Size(555, 20);
this.connectionStringTextBox2.Size = new System.Drawing.Size(713, 20);
this.connectionStringTextBox2.TabIndex = 5;
//
// connectionStringTextBox3
//
this.connectionStringTextBox3.Location = new System.Drawing.Point(157, 93);
this.connectionStringTextBox3.Name = "connectionStringTextBox3";
this.connectionStringTextBox3.Size = new System.Drawing.Size(555, 20);
this.connectionStringTextBox3.Size = new System.Drawing.Size(713, 20);
this.connectionStringTextBox3.TabIndex = 7;
//
// okButton
//
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.okButton.Location = new System.Drawing.Point(506, 250);
this.okButton.Location = new System.Drawing.Point(664, 326);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(95, 38);
this.okButton.TabIndex = 18;
@@ -104,7 +110,7 @@
//
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancelButton.Location = new System.Drawing.Point(617, 250);
this.cancelButton.Location = new System.Drawing.Point(775, 326);
this.cancelButton.Name = "cancelButton";
this.cancelButton.Size = new System.Drawing.Size(95, 38);
this.cancelButton.TabIndex = 19;
@@ -137,7 +143,7 @@
//
this.languageLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.languageLabel.AutoSize = true;
this.languageLabel.Location = new System.Drawing.Point(26, 245);
this.languageLabel.Location = new System.Drawing.Point(26, 317);
this.languageLabel.Name = "languageLabel";
this.languageLabel.Size = new System.Drawing.Size(55, 13);
this.languageLabel.TabIndex = 14;
@@ -146,7 +152,7 @@
// languageTextBox
//
this.languageTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.languageTextBox.Location = new System.Drawing.Point(29, 263);
this.languageTextBox.Location = new System.Drawing.Point(29, 335);
this.languageTextBox.Name = "languageTextBox";
this.languageTextBox.Size = new System.Drawing.Size(100, 20);
this.languageTextBox.TabIndex = 15;
@@ -155,7 +161,7 @@
//
this.formatLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.formatLabel.AutoSize = true;
this.formatLabel.Location = new System.Drawing.Point(26, 196);
this.formatLabel.Location = new System.Drawing.Point(26, 268);
this.formatLabel.Name = "formatLabel";
this.formatLabel.Size = new System.Drawing.Size(94, 13);
this.formatLabel.TabIndex = 12;
@@ -164,9 +170,9 @@
// timePeriodFormatTextBox
//
this.timePeriodFormatTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.timePeriodFormatTextBox.Location = new System.Drawing.Point(29, 215);
this.timePeriodFormatTextBox.Location = new System.Drawing.Point(29, 287);
this.timePeriodFormatTextBox.Name = "timePeriodFormatTextBox";
this.timePeriodFormatTextBox.Size = new System.Drawing.Size(683, 20);
this.timePeriodFormatTextBox.Size = new System.Drawing.Size(841, 20);
this.timePeriodFormatTextBox.TabIndex = 13;
//
// benchNameTextBox5
@@ -187,14 +193,14 @@
//
this.connectionStringTextBox5.Location = new System.Drawing.Point(157, 141);
this.connectionStringTextBox5.Name = "connectionStringTextBox5";
this.connectionStringTextBox5.Size = new System.Drawing.Size(555, 20);
this.connectionStringTextBox5.Size = new System.Drawing.Size(713, 20);
this.connectionStringTextBox5.TabIndex = 11;
//
// connectionStringTextBox4
//
this.connectionStringTextBox4.Location = new System.Drawing.Point(157, 117);
this.connectionStringTextBox4.Name = "connectionStringTextBox4";
this.connectionStringTextBox4.Size = new System.Drawing.Size(555, 20);
this.connectionStringTextBox4.Size = new System.Drawing.Size(713, 20);
this.connectionStringTextBox4.TabIndex = 9;
//
// benchNameTextBox6
@@ -208,16 +214,64 @@
//
this.connectionStringTextBox6.Location = new System.Drawing.Point(157, 165);
this.connectionStringTextBox6.Name = "connectionStringTextBox6";
this.connectionStringTextBox6.Size = new System.Drawing.Size(555, 20);
this.connectionStringTextBox6.Size = new System.Drawing.Size(713, 20);
this.connectionStringTextBox6.TabIndex = 21;
//
// benchNameTextBox9
//
this.benchNameTextBox9.Location = new System.Drawing.Point(29, 237);
this.benchNameTextBox9.Name = "benchNameTextBox9";
this.benchNameTextBox9.Size = new System.Drawing.Size(100, 20);
this.benchNameTextBox9.TabIndex = 26;
//
// connectionStringTextBox9
//
this.connectionStringTextBox9.Location = new System.Drawing.Point(157, 237);
this.connectionStringTextBox9.Name = "connectionStringTextBox9";
this.connectionStringTextBox9.Size = new System.Drawing.Size(713, 20);
this.connectionStringTextBox9.TabIndex = 27;
//
// benchNameTextBox8
//
this.benchNameTextBox8.Location = new System.Drawing.Point(29, 213);
this.benchNameTextBox8.Name = "benchNameTextBox8";
this.benchNameTextBox8.Size = new System.Drawing.Size(100, 20);
this.benchNameTextBox8.TabIndex = 24;
//
// benchNameTextBox7
//
this.benchNameTextBox7.Location = new System.Drawing.Point(29, 189);
this.benchNameTextBox7.Name = "benchNameTextBox7";
this.benchNameTextBox7.Size = new System.Drawing.Size(100, 20);
this.benchNameTextBox7.TabIndex = 22;
//
// connectionStringTextBox8
//
this.connectionStringTextBox8.Location = new System.Drawing.Point(157, 213);
this.connectionStringTextBox8.Name = "connectionStringTextBox8";
this.connectionStringTextBox8.Size = new System.Drawing.Size(713, 20);
this.connectionStringTextBox8.TabIndex = 25;
//
// connectionStringTextBox7
//
this.connectionStringTextBox7.Location = new System.Drawing.Point(157, 189);
this.connectionStringTextBox7.Name = "connectionStringTextBox7";
this.connectionStringTextBox7.Size = new System.Drawing.Size(713, 20);
this.connectionStringTextBox7.TabIndex = 23;
//
// 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, 310);
this.ClientSize = new System.Drawing.Size(901, 382);
this.Controls.Add(this.benchNameTextBox9);
this.Controls.Add(this.connectionStringTextBox9);
this.Controls.Add(this.benchNameTextBox8);
this.Controls.Add(this.benchNameTextBox7);
this.Controls.Add(this.connectionStringTextBox8);
this.Controls.Add(this.connectionStringTextBox7);
this.Controls.Add(this.benchNameTextBox6);
this.Controls.Add(this.connectionStringTextBox6);
this.Controls.Add(this.benchNameTextBox5);
@@ -269,5 +323,11 @@
private System.Windows.Forms.TextBox connectionStringTextBox4;
private System.Windows.Forms.TextBox benchNameTextBox6;
private System.Windows.Forms.TextBox connectionStringTextBox6;
private System.Windows.Forms.TextBox benchNameTextBox9;
private System.Windows.Forms.TextBox connectionStringTextBox9;
private System.Windows.Forms.TextBox benchNameTextBox8;
private System.Windows.Forms.TextBox benchNameTextBox7;
private System.Windows.Forms.TextBox connectionStringTextBox8;
private System.Windows.Forms.TextBox connectionStringTextBox7;
}
}
@@ -21,6 +21,9 @@ namespace ResultsBrowser.Forms
benchNameTextBox4.Text = Program.LocalSettings.Bench4;
benchNameTextBox5.Text = Program.LocalSettings.Bench5;
benchNameTextBox6.Text = Program.LocalSettings.Bench6;
benchNameTextBox7.Text = Program.LocalSettings.Bench7;
benchNameTextBox8.Text = Program.LocalSettings.Bench8;
benchNameTextBox9.Text = Program.LocalSettings.Bench9;
connectionStringTextBox1.Text = Program.LocalSettings.ConnectionString1;
connectionStringTextBox2.Text = Program.LocalSettings.ConnectionString2;
@@ -28,6 +31,9 @@ namespace ResultsBrowser.Forms
connectionStringTextBox4.Text = Program.LocalSettings.ConnectionString4;
connectionStringTextBox5.Text = Program.LocalSettings.ConnectionString5;
connectionStringTextBox6.Text = Program.LocalSettings.ConnectionString6;
connectionStringTextBox7.Text = Program.LocalSettings.ConnectionString7;
connectionStringTextBox8.Text = Program.LocalSettings.ConnectionString8;
connectionStringTextBox9.Text = Program.LocalSettings.ConnectionString9;
timePeriodFormatTextBox.Text = Program.LocalSettings.TimePeriodFormat;
@@ -53,6 +59,9 @@ namespace ResultsBrowser.Forms
Program.LocalSettings.Bench4 = benchNameTextBox4.Text;
Program.LocalSettings.Bench5 = benchNameTextBox5.Text;
Program.LocalSettings.Bench6 = benchNameTextBox6.Text;
Program.LocalSettings.Bench7 = benchNameTextBox7.Text;
Program.LocalSettings.Bench8 = benchNameTextBox8.Text;
Program.LocalSettings.Bench9 = benchNameTextBox9.Text;
Program.LocalSettings.ConnectionString1 = connectionStringTextBox1.Text;
Program.LocalSettings.ConnectionString2 = connectionStringTextBox2.Text;
@@ -60,6 +69,9 @@ namespace ResultsBrowser.Forms
Program.LocalSettings.ConnectionString4 = connectionStringTextBox4.Text;
Program.LocalSettings.ConnectionString5 = connectionStringTextBox5.Text;
Program.LocalSettings.ConnectionString6 = connectionStringTextBox6.Text;
Program.LocalSettings.ConnectionString7 = connectionStringTextBox7.Text;
Program.LocalSettings.ConnectionString8 = connectionStringTextBox8.Text;
Program.LocalSettings.ConnectionString9 = connectionStringTextBox9.Text;
Program.LocalSettings.TimePeriodFormat = timePeriodFormatTextBox.Text;
+22 -7
View File
@@ -30,6 +30,9 @@ namespace ResultsBrowser
public string Bench4;
public string Bench5;
public string Bench6;
public string Bench7;
public string Bench8;
public string Bench9;
/// Database settings of servers.
public string ConnectionString1;
@@ -38,6 +41,9 @@ namespace ResultsBrowser
public string ConnectionString4;
public string ConnectionString5;
public string ConnectionString6;
public string ConnectionString7;
public string ConnectionString8;
public string ConnectionString9;
public bool Bench1Selected;
public bool Bench2Selected;
@@ -45,6 +51,9 @@ namespace ResultsBrowser
public bool Bench4Selected;
public bool Bench5Selected;
public bool Bench6Selected;
public bool Bench7Selected;
public bool Bench8Selected;
public bool Bench9Selected;
public string TimePeriodFormat;
@@ -115,13 +124,19 @@ namespace ResultsBrowser
Bench3 = "WR13";
Bench4 = "WR14";
Bench5 = "WR15";
Bench6 = "PT7";
ConnectionString1 = "SERVER=10.42.130.69; DATABASE=st-wr10-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;";
ConnectionString2 = "SERVER=10.42.129.27; DATABASE=st-wr11-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;";
ConnectionString3 = "SERVER=10.42.128.61; DATABASE=st-wr13-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;";
ConnectionString4 = "SERVER=10.42.130.72; DATABASE=st-wr14-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;";
ConnectionString5 = "SERVER=10.42.130.71; DATABASE=st-wr15-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;";
ConnectionString6 = "SERVER=10.42.129.26; DATABASE=iperlspecial-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;";
Bench6 = "WR18";
Bench7 = "WR19";
Bench8 = "WR20";
Bench9 = "WR21";
ConnectionString1 = "SERVER=10.42.129.253; DATABASE=st-wr10-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;";
ConnectionString2 = "SERVER=10.42.129.27; DATABASE=st-wr11-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;";
ConnectionString3 = "SERVER=10.42.128.138; DATABASE=st-wr13-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;";
ConnectionString4 = "SERVER=10.42.128.146; DATABASE=st-wr14-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;";
ConnectionString5 = "SERVER=10.42.130.97; DATABASE=st-wr15-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;";
ConnectionString6 = "SERVER=10.42.130.165; DATABASE=st-wr18-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;";
ConnectionString7 = "SERVER=10.42.128.159; DATABASE=st-wr19-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;";
ConnectionString8 = "SERVER=10.42.130.76; DATABASE=st-wr20-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;";
ConnectionString9 = "SERVER=10.42.128.150; DATABASE=st-wr21-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;";
Language = "SK";
#endif
}
+2 -2
View File
@@ -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.26.1498.0")]
[assembly: AssemblyFileVersion("2.26.1498.0")]
[assembly: AssemblyVersion("2.26.1577.0")]
[assembly: AssemblyFileVersion("2.26.1577.0")]
+2 -2
View File
@@ -21,7 +21,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
<DefineConstants>TRACE;DEBUG;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
@@ -32,7 +32,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;MUNICH</DefineConstants>
<DefineConstants>TRACE;TURA_IPERL;IPERL;ORACLE_DB;LANG_SK</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
+140 -95
View File
@@ -51,12 +51,15 @@
this.executeQueryBtn = new System.Windows.Forms.Button();
this.addFilterBtn = new System.Windows.Forms.Button();
this.testBenchesGroupBox = new System.Windows.Forms.GroupBox();
this.checkBox6 = new System.Windows.Forms.RadioButton();
this.checkBox5 = new System.Windows.Forms.RadioButton();
this.checkBox4 = new System.Windows.Forms.RadioButton();
this.checkBox3 = new System.Windows.Forms.RadioButton();
this.checkBox2 = new System.Windows.Forms.RadioButton();
this.checkBox1 = new System.Windows.Forms.RadioButton();
this.radioButton9 = new System.Windows.Forms.RadioButton();
this.radioButton8 = new System.Windows.Forms.RadioButton();
this.radioButton7 = new System.Windows.Forms.RadioButton();
this.radioButton6 = new System.Windows.Forms.RadioButton();
this.radioButton5 = new System.Windows.Forms.RadioButton();
this.radioButton4 = new System.Windows.Forms.RadioButton();
this.radioButton3 = new System.Windows.Forms.RadioButton();
this.radioButton2 = new System.Windows.Forms.RadioButton();
this.radioButton1 = new System.Windows.Forms.RadioButton();
((System.ComponentModel.ISupportInitialize)(this.vSplitContainer)).BeginInit();
this.vSplitContainer.Panel1.SuspendLayout();
this.vSplitContainer.Panel2.SuspendLayout();
@@ -175,7 +178,7 @@
//
// customQueryButton
//
this.customQueryButton.Location = new System.Drawing.Point(31, 437);
this.customQueryButton.Location = new System.Drawing.Point(31, 443);
this.customQueryButton.Name = "customQueryButton";
this.customQueryButton.Size = new System.Drawing.Size(85, 23);
this.customQueryButton.TabIndex = 14;
@@ -247,9 +250,9 @@
//
// printerConfigBtn
//
this.printerConfigBtn.Location = new System.Drawing.Point(8, 316);
this.printerConfigBtn.Location = new System.Drawing.Point(8, 331);
this.printerConfigBtn.Name = "printerConfigBtn";
this.printerConfigBtn.Size = new System.Drawing.Size(125, 35);
this.printerConfigBtn.Size = new System.Drawing.Size(125, 32);
this.printerConfigBtn.TabIndex = 11;
this.printerConfigBtn.Text = "Configure printer";
this.printerConfigBtn.UseVisualStyleBackColor = true;
@@ -257,9 +260,9 @@
//
// formatOfResultsBtn
//
this.formatOfResultsBtn.Location = new System.Drawing.Point(8, 276);
this.formatOfResultsBtn.Location = new System.Drawing.Point(8, 294);
this.formatOfResultsBtn.Name = "formatOfResultsBtn";
this.formatOfResultsBtn.Size = new System.Drawing.Size(125, 35);
this.formatOfResultsBtn.Size = new System.Drawing.Size(125, 32);
this.formatOfResultsBtn.TabIndex = 7;
this.formatOfResultsBtn.Text = "Configure output";
this.formatOfResultsBtn.UseVisualStyleBackColor = true;
@@ -267,9 +270,9 @@
//
// clearFiltersBtn
//
this.clearFiltersBtn.Location = new System.Drawing.Point(8, 196);
this.clearFiltersBtn.Location = new System.Drawing.Point(8, 220);
this.clearFiltersBtn.Name = "clearFiltersBtn";
this.clearFiltersBtn.Size = new System.Drawing.Size(125, 35);
this.clearFiltersBtn.Size = new System.Drawing.Size(125, 32);
this.clearFiltersBtn.TabIndex = 2;
this.clearFiltersBtn.Text = "Clear filters";
this.clearFiltersBtn.UseVisualStyleBackColor = true;
@@ -287,9 +290,9 @@
//
// saveConfigBtn
//
this.saveConfigBtn.Location = new System.Drawing.Point(8, 356);
this.saveConfigBtn.Location = new System.Drawing.Point(8, 368);
this.saveConfigBtn.Name = "saveConfigBtn";
this.saveConfigBtn.Size = new System.Drawing.Size(125, 35);
this.saveConfigBtn.Size = new System.Drawing.Size(125, 32);
this.saveConfigBtn.TabIndex = 5;
this.saveConfigBtn.Text = "Save configuration";
this.saveConfigBtn.UseVisualStyleBackColor = true;
@@ -297,9 +300,9 @@
//
// loadConfigBtn
//
this.loadConfigBtn.Location = new System.Drawing.Point(8, 396);
this.loadConfigBtn.Location = new System.Drawing.Point(8, 405);
this.loadConfigBtn.Name = "loadConfigBtn";
this.loadConfigBtn.Size = new System.Drawing.Size(125, 35);
this.loadConfigBtn.Size = new System.Drawing.Size(125, 32);
this.loadConfigBtn.TabIndex = 4;
this.loadConfigBtn.Text = "Load configuration";
this.loadConfigBtn.UseVisualStyleBackColor = true;
@@ -307,9 +310,9 @@
//
// executeQueryBtn
//
this.executeQueryBtn.Location = new System.Drawing.Point(8, 468);
this.executeQueryBtn.Location = new System.Drawing.Point(8, 471);
this.executeQueryBtn.Name = "executeQueryBtn";
this.executeQueryBtn.Size = new System.Drawing.Size(125, 35);
this.executeQueryBtn.Size = new System.Drawing.Size(125, 32);
this.executeQueryBtn.TabIndex = 6;
this.executeQueryBtn.Text = "Execute query";
this.executeQueryBtn.UseVisualStyleBackColor = true;
@@ -317,9 +320,9 @@
//
// addFilterBtn
//
this.addFilterBtn.Location = new System.Drawing.Point(8, 236);
this.addFilterBtn.Location = new System.Drawing.Point(8, 257);
this.addFilterBtn.Name = "addFilterBtn";
this.addFilterBtn.Size = new System.Drawing.Size(125, 35);
this.addFilterBtn.Size = new System.Drawing.Size(125, 32);
this.addFilterBtn.TabIndex = 3;
this.addFilterBtn.Text = "Add filter";
this.addFilterBtn.UseVisualStyleBackColor = true;
@@ -327,90 +330,129 @@
//
// testBenchesGroupBox
//
this.testBenchesGroupBox.Controls.Add(this.checkBox6);
this.testBenchesGroupBox.Controls.Add(this.checkBox5);
this.testBenchesGroupBox.Controls.Add(this.checkBox4);
this.testBenchesGroupBox.Controls.Add(this.checkBox3);
this.testBenchesGroupBox.Controls.Add(this.checkBox2);
this.testBenchesGroupBox.Controls.Add(this.checkBox1);
this.testBenchesGroupBox.Location = new System.Drawing.Point(8, 54);
this.testBenchesGroupBox.Controls.Add(this.radioButton9);
this.testBenchesGroupBox.Controls.Add(this.radioButton8);
this.testBenchesGroupBox.Controls.Add(this.radioButton7);
this.testBenchesGroupBox.Controls.Add(this.radioButton6);
this.testBenchesGroupBox.Controls.Add(this.radioButton5);
this.testBenchesGroupBox.Controls.Add(this.radioButton4);
this.testBenchesGroupBox.Controls.Add(this.radioButton3);
this.testBenchesGroupBox.Controls.Add(this.radioButton2);
this.testBenchesGroupBox.Controls.Add(this.radioButton1);
this.testBenchesGroupBox.Location = new System.Drawing.Point(8, 51);
this.testBenchesGroupBox.Name = "testBenchesGroupBox";
this.testBenchesGroupBox.Size = new System.Drawing.Size(125, 135);
this.testBenchesGroupBox.Size = new System.Drawing.Size(125, 163);
this.testBenchesGroupBox.TabIndex = 1;
this.testBenchesGroupBox.TabStop = false;
this.testBenchesGroupBox.Text = "Test benches";
//
// checkBox6
// radioButton9
//
this.checkBox6.AutoSize = true;
this.checkBox6.Location = new System.Drawing.Point(23, 110);
this.checkBox6.Name = "checkBox6";
this.checkBox6.Size = new System.Drawing.Size(85, 17);
this.checkBox6.TabIndex = 5;
this.checkBox6.TabStop = true;
this.checkBox6.Text = "radioButton6";
this.checkBox6.UseVisualStyleBackColor = true;
this.checkBox6.CheckedChanged += new System.EventHandler(this.checkBox6_CheckedChanged);
this.radioButton9.AutoSize = true;
this.radioButton9.Location = new System.Drawing.Point(25, 143);
this.radioButton9.Name = "radioButton9";
this.radioButton9.Size = new System.Drawing.Size(85, 17);
this.radioButton9.TabIndex = 8;
this.radioButton9.TabStop = true;
this.radioButton9.Text = "radioButton9";
this.radioButton9.UseVisualStyleBackColor = true;
this.radioButton9.CheckedChanged += new System.EventHandler(this.radioButton9_CheckedChanged);
//
// checkBox5
// radioButton8
//
this.checkBox5.AutoSize = true;
this.checkBox5.Location = new System.Drawing.Point(23, 92);
this.checkBox5.Name = "checkBox5";
this.checkBox5.Size = new System.Drawing.Size(85, 17);
this.checkBox5.TabIndex = 4;
this.checkBox5.TabStop = true;
this.checkBox5.Text = "radioButton5";
this.checkBox5.UseVisualStyleBackColor = true;
this.checkBox5.CheckedChanged += new System.EventHandler(this.checkBox5_CheckedChanged);
this.radioButton8.AutoSize = true;
this.radioButton8.Location = new System.Drawing.Point(25, 127);
this.radioButton8.Name = "radioButton8";
this.radioButton8.Size = new System.Drawing.Size(85, 17);
this.radioButton8.TabIndex = 7;
this.radioButton8.TabStop = true;
this.radioButton8.Text = "radioButton8";
this.radioButton8.UseVisualStyleBackColor = true;
this.radioButton8.CheckedChanged += new System.EventHandler(this.radioButton8_CheckedChanged);
//
// checkBox4
// radioButton7
//
this.checkBox4.AutoSize = true;
this.checkBox4.Location = new System.Drawing.Point(23, 74);
this.checkBox4.Name = "checkBox4";
this.checkBox4.Size = new System.Drawing.Size(85, 17);
this.checkBox4.TabIndex = 3;
this.checkBox4.TabStop = true;
this.checkBox4.Text = "radioButton4";
this.checkBox4.UseVisualStyleBackColor = true;
this.checkBox4.CheckedChanged += new System.EventHandler(this.checkBox4_CheckedChanged);
this.radioButton7.AutoSize = true;
this.radioButton7.Location = new System.Drawing.Point(25, 111);
this.radioButton7.Name = "radioButton7";
this.radioButton7.Size = new System.Drawing.Size(85, 17);
this.radioButton7.TabIndex = 6;
this.radioButton7.TabStop = true;
this.radioButton7.Text = "radioButton7";
this.radioButton7.UseVisualStyleBackColor = true;
this.radioButton7.CheckedChanged += new System.EventHandler(this.radioButton7_CheckedChanged);
//
// checkBox3
// radioButton6
//
this.checkBox3.AutoSize = true;
this.checkBox3.Location = new System.Drawing.Point(23, 55);
this.checkBox3.Name = "checkBox3";
this.checkBox3.Size = new System.Drawing.Size(85, 17);
this.checkBox3.TabIndex = 2;
this.checkBox3.TabStop = true;
this.checkBox3.Text = "radioButton3";
this.checkBox3.UseVisualStyleBackColor = true;
this.checkBox3.CheckedChanged += new System.EventHandler(this.checkBox3_CheckedChanged);
this.radioButton6.AutoSize = true;
this.radioButton6.Location = new System.Drawing.Point(25, 95);
this.radioButton6.Name = "radioButton6";
this.radioButton6.Size = new System.Drawing.Size(85, 17);
this.radioButton6.TabIndex = 5;
this.radioButton6.TabStop = true;
this.radioButton6.Text = "radioButton6";
this.radioButton6.UseVisualStyleBackColor = true;
this.radioButton6.CheckedChanged += new System.EventHandler(this.radioButton6_CheckedChanged);
//
// checkBox2
// radioButton5
//
this.checkBox2.AutoSize = true;
this.checkBox2.Location = new System.Drawing.Point(23, 36);
this.checkBox2.Name = "checkBox2";
this.checkBox2.Size = new System.Drawing.Size(85, 17);
this.checkBox2.TabIndex = 1;
this.checkBox2.TabStop = true;
this.checkBox2.Text = "radioButton2";
this.checkBox2.UseVisualStyleBackColor = true;
this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);
this.radioButton5.AutoSize = true;
this.radioButton5.Location = new System.Drawing.Point(25, 79);
this.radioButton5.Name = "radioButton5";
this.radioButton5.Size = new System.Drawing.Size(85, 17);
this.radioButton5.TabIndex = 4;
this.radioButton5.TabStop = true;
this.radioButton5.Text = "radioButton5";
this.radioButton5.UseVisualStyleBackColor = true;
this.radioButton5.CheckedChanged += new System.EventHandler(this.radioButton5_CheckedChanged);
//
// checkBox1
// radioButton4
//
this.checkBox1.AutoSize = true;
this.checkBox1.Location = new System.Drawing.Point(23, 17);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(85, 17);
this.checkBox1.TabIndex = 0;
this.checkBox1.TabStop = true;
this.checkBox1.Text = "radioButton1";
this.checkBox1.UseVisualStyleBackColor = true;
this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
this.radioButton4.AutoSize = true;
this.radioButton4.Location = new System.Drawing.Point(25, 63);
this.radioButton4.Name = "radioButton4";
this.radioButton4.Size = new System.Drawing.Size(85, 17);
this.radioButton4.TabIndex = 3;
this.radioButton4.TabStop = true;
this.radioButton4.Text = "radioButton4";
this.radioButton4.UseVisualStyleBackColor = true;
this.radioButton4.CheckedChanged += new System.EventHandler(this.radioButton4_CheckedChanged);
//
// radioButton3
//
this.radioButton3.AutoSize = true;
this.radioButton3.Location = new System.Drawing.Point(25, 47);
this.radioButton3.Name = "radioButton3";
this.radioButton3.Size = new System.Drawing.Size(85, 17);
this.radioButton3.TabIndex = 2;
this.radioButton3.TabStop = true;
this.radioButton3.Text = "radioButton3";
this.radioButton3.UseVisualStyleBackColor = true;
this.radioButton3.CheckedChanged += new System.EventHandler(this.radioButton3_CheckedChanged);
//
// radioButton2
//
this.radioButton2.AutoSize = true;
this.radioButton2.Location = new System.Drawing.Point(25, 31);
this.radioButton2.Name = "radioButton2";
this.radioButton2.Size = new System.Drawing.Size(85, 17);
this.radioButton2.TabIndex = 1;
this.radioButton2.TabStop = true;
this.radioButton2.Text = "radioButton2";
this.radioButton2.UseVisualStyleBackColor = true;
this.radioButton2.CheckedChanged += new System.EventHandler(this.radioButton2_CheckedChanged);
//
// radioButton1
//
this.radioButton1.AutoSize = true;
this.radioButton1.Location = new System.Drawing.Point(25, 15);
this.radioButton1.Name = "radioButton1";
this.radioButton1.Size = new System.Drawing.Size(85, 17);
this.radioButton1.TabIndex = 0;
this.radioButton1.TabStop = true;
this.radioButton1.Text = "radioButton1";
this.radioButton1.UseVisualStyleBackColor = true;
this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
//
// ResultsBrowserWnd
//
@@ -453,23 +495,26 @@
private System.Windows.Forms.Button settingsBtn;
private System.Windows.Forms.GroupBox filtersGroupBox;
private System.Windows.Forms.GroupBox resultsGroupBox;
private System.Windows.Forms.RadioButton checkBox3;
private System.Windows.Forms.RadioButton checkBox2;
private System.Windows.Forms.RadioButton checkBox1;
private System.Windows.Forms.RadioButton radioButton3;
private System.Windows.Forms.RadioButton radioButton2;
private System.Windows.Forms.RadioButton radioButton1;
private System.Windows.Forms.Button clearFiltersBtn;
private System.Windows.Forms.Button exportQueryResultsBtn;
private System.Windows.Forms.Button formatOfResultsBtn;
private System.Windows.Forms.Button printQueryResultsBtn;
private System.Windows.Forms.Button statisticsBtn;
private System.Windows.Forms.ListView resultsListView;
private System.Windows.Forms.RadioButton checkBox5;
private System.Windows.Forms.RadioButton checkBox4;
private System.Windows.Forms.RadioButton radioButton5;
private System.Windows.Forms.RadioButton radioButton4;
private System.Windows.Forms.Button printerConfigBtn;
private System.Windows.Forms.RadioButton checkBox6;
private System.Windows.Forms.RadioButton radioButton6;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.GroupBox outputGroupBox;
private System.Windows.Forms.Button histogramBtn;
private System.Windows.Forms.Button customQueryButton;
private System.Windows.Forms.TextBox consoleTextBox;
private System.Windows.Forms.RadioButton radioButton7;
private System.Windows.Forms.RadioButton radioButton9;
private System.Windows.Forms.RadioButton radioButton8;
}
}
+168 -108
View File
@@ -64,12 +64,15 @@ namespace ResultsBrowser
RedrawTestBenches();
checkBox1.Checked = Program.LocalSettings.Bench1Selected;
checkBox2.Checked = Program.LocalSettings.Bench2Selected;
checkBox3.Checked = Program.LocalSettings.Bench3Selected;
checkBox4.Checked = Program.LocalSettings.Bench4Selected;
checkBox5.Checked = Program.LocalSettings.Bench5Selected;
checkBox6.Checked = Program.LocalSettings.Bench6Selected;
radioButton1.Checked = Program.LocalSettings.Bench1Selected;
radioButton2.Checked = Program.LocalSettings.Bench2Selected;
radioButton3.Checked = Program.LocalSettings.Bench3Selected;
radioButton4.Checked = Program.LocalSettings.Bench4Selected;
radioButton5.Checked = Program.LocalSettings.Bench5Selected;
radioButton6.Checked = Program.LocalSettings.Bench6Selected;
radioButton7.Checked = Program.LocalSettings.Bench7Selected;
radioButton8.Checked = Program.LocalSettings.Bench8Selected;
radioButton9.Checked = Program.LocalSettings.Bench9Selected;
if (args.Length == 1 && args[0].IndexOf(".qry") == args[0].Length - 4)
{
@@ -87,29 +90,38 @@ namespace ResultsBrowser
void RedrawTestBenches()
{
checkBox1.Text = Program.LocalSettings.Bench1;
checkBox2.Text = Program.LocalSettings.Bench2;
checkBox3.Text = Program.LocalSettings.Bench3;
checkBox4.Text = Program.LocalSettings.Bench4;
checkBox5.Text = Program.LocalSettings.Bench5;
checkBox6.Text = Program.LocalSettings.Bench6;
radioButton1.Text = Program.LocalSettings.Bench1;
radioButton2.Text = Program.LocalSettings.Bench2;
radioButton3.Text = Program.LocalSettings.Bench3;
radioButton4.Text = Program.LocalSettings.Bench4;
radioButton5.Text = Program.LocalSettings.Bench5;
radioButton6.Text = Program.LocalSettings.Bench6;
radioButton7.Text = Program.LocalSettings.Bench7;
radioButton8.Text = Program.LocalSettings.Bench8;
radioButton9.Text = Program.LocalSettings.Bench9;
checkBox1.Visible = !string.IsNullOrEmpty(checkBox1.Text);
checkBox2.Visible = !string.IsNullOrEmpty(checkBox2.Text);
checkBox3.Visible = !string.IsNullOrEmpty(checkBox3.Text);
checkBox4.Visible = !string.IsNullOrEmpty(checkBox4.Text);
checkBox5.Visible = !string.IsNullOrEmpty(checkBox5.Text);
checkBox6.Visible = !string.IsNullOrEmpty(checkBox6.Text);
radioButton1.Visible = !string.IsNullOrEmpty(radioButton1.Text);
radioButton2.Visible = !string.IsNullOrEmpty(radioButton2.Text);
radioButton3.Visible = !string.IsNullOrEmpty(radioButton3.Text);
radioButton4.Visible = !string.IsNullOrEmpty(radioButton4.Text);
radioButton5.Visible = !string.IsNullOrEmpty(radioButton5.Text);
radioButton6.Visible = !string.IsNullOrEmpty(radioButton6.Text);
radioButton7.Visible = !string.IsNullOrEmpty(radioButton7.Text);
radioButton8.Visible = !string.IsNullOrEmpty(radioButton8.Text);
radioButton9.Visible = !string.IsNullOrEmpty(radioButton9.Text);
}
string BenchName()
{
return checkBox1.Checked ? Program.LocalSettings.Bench1
: checkBox2.Checked ? Program.LocalSettings.Bench2
: checkBox3.Checked ? Program.LocalSettings.Bench3
: checkBox4.Checked ? Program.LocalSettings.Bench4
: checkBox5.Checked ? Program.LocalSettings.Bench5
: Program.LocalSettings.Bench6;
return radioButton1.Checked ? Program.LocalSettings.Bench1
: radioButton2.Checked ? Program.LocalSettings.Bench2
: radioButton3.Checked ? Program.LocalSettings.Bench3
: radioButton4.Checked ? Program.LocalSettings.Bench4
: radioButton5.Checked ? Program.LocalSettings.Bench5
: radioButton6.Checked ? Program.LocalSettings.Bench6
: radioButton7.Checked ? Program.LocalSettings.Bench7
: radioButton8.Checked ? Program.LocalSettings.Bench8
: Program.LocalSettings.Bench9;
}
void Localize()
@@ -141,21 +153,27 @@ namespace ResultsBrowser
}
}
private void checkBox1_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); }
private void checkBox2_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); }
private void checkBox3_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); }
private void checkBox4_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); }
private void checkBox5_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); }
private void checkBox6_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); }
private void radioButton1_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); }
private void radioButton2_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); }
private void radioButton3_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); }
private void radioButton4_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); }
private void radioButton5_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); }
private void radioButton6_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); }
private void radioButton7_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); }
private void radioButton8_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); }
private void radioButton9_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); }
void SaveCheckBoxes()
{
Program.LocalSettings.Bench1Selected = checkBox1.Checked;
Program.LocalSettings.Bench2Selected = checkBox2.Checked;
Program.LocalSettings.Bench3Selected = checkBox3.Checked;
Program.LocalSettings.Bench4Selected = checkBox4.Checked;
Program.LocalSettings.Bench5Selected = checkBox5.Checked;
Program.LocalSettings.Bench6Selected = checkBox6.Checked;
Program.LocalSettings.Bench1Selected = radioButton1.Checked;
Program.LocalSettings.Bench2Selected = radioButton2.Checked;
Program.LocalSettings.Bench3Selected = radioButton3.Checked;
Program.LocalSettings.Bench4Selected = radioButton4.Checked;
Program.LocalSettings.Bench5Selected = radioButton5.Checked;
Program.LocalSettings.Bench6Selected = radioButton6.Checked;
Program.LocalSettings.Bench7Selected = radioButton7.Checked;
Program.LocalSettings.Bench8Selected = radioButton8.Checked;
Program.LocalSettings.Bench9Selected = radioButton9.Checked;
Program.LocalSettings.Save();
}
@@ -279,13 +297,15 @@ namespace ResultsBrowser
waterMeters = null;
IList<WaterMeter> waterMeters2;
Results.DB.ConnectionString = checkBox1.Checked ? Program.LocalSettings.ConnectionString1 :
(checkBox2.Checked ? Program.LocalSettings.ConnectionString2 :
(checkBox3.Checked ? Program.LocalSettings.ConnectionString3 :
(checkBox4.Checked ? Program.LocalSettings.ConnectionString4 :
(checkBox5.Checked ? Program.LocalSettings.ConnectionString5 :
(checkBox6.Checked ? Program.LocalSettings.ConnectionString6 :
Program.LocalSettings.ConnectionString1)))));
Results.DB.ConnectionString = radioButton1.Checked ? Program.LocalSettings.ConnectionString1 :
(radioButton2.Checked ? Program.LocalSettings.ConnectionString2 :
(radioButton3.Checked ? Program.LocalSettings.ConnectionString3 :
(radioButton4.Checked ? Program.LocalSettings.ConnectionString4 :
(radioButton5.Checked ? Program.LocalSettings.ConnectionString5 :
(radioButton6.Checked ? Program.LocalSettings.ConnectionString6 :
(radioButton7.Checked ? Program.LocalSettings.ConnectionString7 :
(radioButton8.Checked ? Program.LocalSettings.ConnectionString8 :
Program.LocalSettings.ConnectionString9)))))));
ISession[] sessions = new ISession[] { Results.DB.CreateSession() };
@@ -739,32 +759,32 @@ namespace ResultsBrowser
double flow = dr.GetDouble(i++); /// Q_WZ
double error = dr.GetDouble(i++); /// Q_FEHLER
bool testPassed = (dr.GetInt32(i++) != 0);
#if true
#if false
/// SUEZ specific
switch (testId)
{
case -2: oraD.AdjErrA4 = error; break;
case -1: oraD.AdjErr = error; break;
case 1: oraD.Q1LrErr = error; break;
case 2: oraD.Q2acLrErr = error; break;
case 3: oraD.Q2LrErr = error; break;
case 5: oraD.Q3LrErr = error; break;
case 6: oraD.Q1RlErr = error; break;
case 7: oraD.Q2acRlErr = error; break;
case 8: oraD.Q2RlErr = error; break;
case 10: oraD.Q3RlErr = error; break;
case -2: oraD.AdjErrA4 = error; break;
case -1: oraD.AdjErr = error; break;
case 1: oraD.Q1LrErr = error; break;
case 2: oraD.Q2acLrErr = error; break;
case 3: oraD.Q2LrErr = error; break;
case 5: oraD.Q3LrErr = error; break;
case 6: oraD.Q1RlErr = error; break;
case 7: oraD.Q2acRlErr = error; break;
case 8: oraD.Q2RlErr = error; break;
case 10: oraD.Q3RlErr = error; break;
default: break;
}
#else /// DEWA specific
switch (testId)
{
case -1: oraD.AdjErr = error; break;
case 1: oraD.Q1Err = error; break;
case 2: oraD.Q2Err = error; break;
case 3: oraD.Q2AdjErr = error; break;
case 4: oraD.Q3Err = error; break;
case 5: oraD.Q4Err = error; break;
case -1: oraD.AdjErr = error; break;
case 1: oraD.Q1Err = error; break;
case 2: oraD.Q2Err = error; break;
case 3: oraD.Q2AdjErr = error; break;
case 4: oraD.Q3Err = error; break;
case 5: oraD.Q4Err = error; break;
default: break;
}
#endif
@@ -779,15 +799,27 @@ namespace ResultsBrowser
{
switch (dlg.IntParameter)
{
case 10: Results.DB.ConnectionString = "SERVER=10.42.130.69; DATABASE=st-wr10-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 11: Results.DB.ConnectionString = "SERVER=10.42.129.27; DATABASE=st-wr11-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 13: Results.DB.ConnectionString = "SERVER=10.42.130.52; DATABASE=st-wr13-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 15: Results.DB.ConnectionString = "SERVER=10.42.130.71; DATABASE=st-wr15-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 14: Results.DB.ConnectionString = "SERVER=10.42.130.72; DATABASE=st-wr14-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 18: Results.DB.ConnectionString = "SERVER=10.42.130.165; DATABASE=st-wr18-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 19: Results.DB.ConnectionString = "SERVER=10.42.128.159; DATABASE=st-wr19-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 20: Results.DB.ConnectionString = "SERVER=10.42.130.76; DATABASE=st-wr20-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 21: Results.DB.ConnectionString = "SERVER=10.42.128.201; DATABASE=st-wr21-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
#if LOCAL
case 5: Results.DB.ConnectionString = "SERVER=localhost; DATABASE=st-wr10-r; UID=root; PASSWORD=kraken; CharSet=utf8;"; break;
case 6: Results.DB.ConnectionString = "SERVER=localhost; DATABASE=st-wr11-r; UID=root; PASSWORD=kraken; CharSet=utf8;"; break;
case 8: Results.DB.ConnectionString = "SERVER=localhost; DATABASE=st-wr13-r; UID=root; PASSWORD=kraken; CharSet=utf8;"; break;
case 9: Results.DB.ConnectionString = "SERVER=localhost; DATABASE=st-wr15-r; UID=root; PASSWORD=kraken; CharSet=utf8;"; break;
case 10: Results.DB.ConnectionString = "SERVER=localhost; DATABASE=st-wr14-r; UID=root; PASSWORD=kraken; CharSet=utf8;"; break;
case 11: Results.DB.ConnectionString = "SERVER=localhost; DATABASE=st-wr18-r; UID=root; PASSWORD=kraken; CharSet=utf8;"; break;
case 12: Results.DB.ConnectionString = "SERVER=localhost; DATABASE=st-wr19-r; UID=root; PASSWORD=kraken; CharSet=utf8;"; break;
case 13: Results.DB.ConnectionString = "SERVER=localhost; DATABASE=st-wr20-r; UID=root; PASSWORD=kraken; CharSet=utf8;"; break;
case 14: Results.DB.ConnectionString = "SERVER=localhost; DATABASE=st-wr21-r; UID=root; PASSWORD=kraken; CharSet=utf8;"; break;
#else
case 5: Results.DB.ConnectionString = "SERVER=10.42.129.253; DATABASE=st-wr10-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 6: Results.DB.ConnectionString = "SERVER=10.42.129.27; DATABASE=st-wr11-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 8: Results.DB.ConnectionString = "SERVER=10.42.128.138; DATABASE=st-wr13-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 9: Results.DB.ConnectionString = "SERVER=10.42.130.97; DATABASE=st-wr15-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 10: Results.DB.ConnectionString = "SERVER=10.42.128.146; DATABASE=st-wr14-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 11: Results.DB.ConnectionString = "SERVER=10.42.130.165; DATABASE=st-wr18-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 12: Results.DB.ConnectionString = "SERVER=10.42.128.159; DATABASE=st-wr19-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 13: Results.DB.ConnectionString = "SERVER=10.42.130.76; DATABASE=st-wr20-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 14: Results.DB.ConnectionString = "SERVER=10.42.128.150; DATABASE=st-wr21-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
#endif
default: Results.DB.ConnectionString = string.Empty; break;
}
Results.DB.DbType = Users.Entities.DBType.MySql;
@@ -850,6 +882,11 @@ namespace ResultsBrowser
else if (dlg.CQCriteria == CQCriteria.WZTypeIdAndTimePeriod)
{
}
else if (dlg.CQCriteria == CQCriteria.GetListOfUsedProcedures)
{
testBenches.Add(5); testBenches.Add(6); testBenches.Add(8); testBenches.Add(9); testBenches.Add(10);
testBenches.Add(11); testBenches.Add(12); testBenches.Add(13); testBenches.Add(14);
}
else
{
MessageBox.Show("Query is not supported yet");
@@ -858,16 +895,17 @@ namespace ResultsBrowser
consoleTextBox.Text += "Reading additional data from MySQL\r\n";
counter = 0;
IList<string> usedProcedures = new List<string>();
foreach (var testBenchId in testBenches)
{
if (testBenchId == 4)
if (testBenchId == 4 || (dlg.CQCriteria == CQCriteria.BenchAndBatchNr && testBenchId != dlg.IntParameter))
{
/// Skip WR9
/// Skip WR9 or other test benches
continue;
}
consoleTextBox.Text += string.Format("{0}\r\n", GetBenchName(testBenchId));
#if false
#if LOCAL
/// Local database copies
switch (testBenchId)
{
@@ -886,15 +924,15 @@ namespace ResultsBrowser
/// Test bench databases
switch (testBenchId)
{
case 5: Results.DB.ConnectionString = "SERVER=10.42.130.69; DATABASE=st-wr10-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 6: Results.DB.ConnectionString = "SERVER=10.42.129.27; DATABASE=st-wr11-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 8: Results.DB.ConnectionString = "SERVER=10.42.130.52; DATABASE=st-wr13-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 9: Results.DB.ConnectionString = "SERVER=10.42.130.71; DATABASE=st-wr15-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 10: Results.DB.ConnectionString = "SERVER=10.42.130.72; DATABASE=st-wr14-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 5: Results.DB.ConnectionString = "SERVER=10.42.129.253; DATABASE=st-wr10-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 6: Results.DB.ConnectionString = "SERVER=10.42.129.27; DATABASE=st-wr11-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 8: Results.DB.ConnectionString = "SERVER=10.42.128.138; DATABASE=st-wr13-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 9: Results.DB.ConnectionString = "SERVER=10.42.130.97; DATABASE=st-wr15-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 10: Results.DB.ConnectionString = "SERVER=10.42.128.146; DATABASE=st-wr14-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 11: Results.DB.ConnectionString = "SERVER=10.42.130.165; DATABASE=st-wr18-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 12: Results.DB.ConnectionString = "SERVER=10.42.128.159; DATABASE=st-wr19-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 13: Results.DB.ConnectionString = "SERVER=10.42.130.76; DATABASE=st-wr20-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 14: Results.DB.ConnectionString = "SERVER=10.42.128.201; DATABASE=st-wr21-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
case 14: Results.DB.ConnectionString = "SERVER=10.42.128.150; DATABASE=st-wr21-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; break;
default: Results.DB.ConnectionString = string.Empty; break;
}
#endif
@@ -904,39 +942,59 @@ namespace ResultsBrowser
{
ISession session = null;
foreach (var oraD in oraDatas)
if (dlg.CQCriteria == CQCriteria.GetListOfUsedProcedures)
{
session = Results.DB.CreateSession();
IList<Batch> batches = session.QueryOver<Batch>()
.Where(x => x.StartTime >= dlg.From)
.And(x => x.StartTime <= dlg.To)
.List();
if (oraD.TestBenchId == testBenchId)
foreach (var b in batches)
{
if (session == null)
if (!usedProcedures.Contains(b.ProcedureName))
{
/// The first water meter produced on this test bench => create a database session
session = Results.DB.CreateSession();
usedProcedures.Add(b.ProcedureName);
consoleTextBox.Text += string.Format(" {0}{1}", b.ProcedureName, Environment.NewLine);
}
}
}
else
{
foreach (var oraD in oraDatas)
{
consoleTextBox.Text += string.Format("{0} ", ++counter);
if (counter % 25 == 0) consoleTextBox.Text += "\r\n";
IList<WaterMeter> wms = session.QueryOver<WaterMeter>()
.Where(x => x.SerialNr == oraD.PcbNr)
.And(x => x.Passed)
.List();
if (wms.Count == 1)
if (oraD.TestBenchId == testBenchId)
{
oraD.CalibFactor = (int)Math.Round(wms[0].CalibFactor);
oraD.CalibFactorLNA = (int)Math.Round(wms[0].CalibFactorLNA);
}
else
{
foreach (var wm in wms)
if (session == null)
{
if (wm.Batch.BatchNr == oraD.BatchNr)
/// The first water meter produced on this test bench => create a database session
session = Results.DB.CreateSession();
}
consoleTextBox.Text += string.Format("{0} ", ++counter);
if (counter % 25 == 0) consoleTextBox.Text += "\r\n";
IList<WaterMeter> wms = session.QueryOver<WaterMeter>()
.Where(x => x.SerialNr == oraD.PcbNr)
.And(x => x.Passed)
.List();
if (wms.Count == 1)
{
oraD.CalibFactor = (int)Math.Round(wms[0].CalibFactor);
oraD.CalibFactorLNA = (int)Math.Round(wms[0].CalibFactorLNA);
}
else
{
foreach (var wm in wms)
{
oraD.CalibFactor = (int)Math.Round(wm.CalibFactor);
oraD.CalibFactorLNA = (int)Math.Round(wm.CalibFactorLNA);
break;
if (wm.Batch.BatchNr == oraD.BatchNr)
{
oraD.CalibFactor = (int)Math.Round(wm.CalibFactor);
oraD.CalibFactorLNA = (int)Math.Round(wm.CalibFactorLNA);
break;
}
}
}
}
@@ -953,7 +1011,8 @@ namespace ResultsBrowser
consoleTextBox.Text += "CSV data begin\r\n";
using (TextWriter writer = new StreamWriter(dlg.DestinationFile))
{
#if true
#if false
/// SUEZ
writer.WriteLine(string.Format("PO; prefix; S/N; PcbNr; Bench; Batch; Start; Start; End; End; Pos; AdjA0; AdjA4; Q3RL; Q3LR; Q2RL; Q2LR; Q2acRL; Q2acLR; Q1RL; Q1LR; CalF; CAlF_LNA; HP; Q2cRL; Q2cLR"));
//Console.WriteLine(string.Format("s/n;PCB nr.;bench;batch;position;Err. at 640 l/h;Err. LNA at 640 l/h;Err. Q3 RL;Err. Q3 LR;Cal.f.;Cal.f.LNA;Q2 corr.f. RL;Q2 corr.f. LR"));
foreach (var oraD in oraDatas)
@@ -991,6 +1050,7 @@ namespace ResultsBrowser
/* 28 */ oraD.WMTypeRev));
}
#else
/// DEWA
writer.WriteLine(string.Format("PO; prefix; S/N; PcbNr; Bench; Batch; Start; Start; End; End; Pos; AdjA0; Q4; Q3; Q2Adj; Q2; Q1; CalF; HP; Q2cRL; Q2cLR"));
//Console.WriteLine(string.Format("s/n;PCB nr.;bench;batch;position;Err. at 640 l/h;Err. LNA at 640 l/h;Err. Q3 RL;Err. Q3 LR;Cal.f.;Cal.f.LNA;Q2 corr.f. RL;Q2 corr.f. LR"));
foreach (var oraD in oraDatas)
@@ -1041,11 +1101,11 @@ namespace ResultsBrowser
{
switch (testBenchId)
{
case 4: return "WR9";
case 5: return "WR10";
case 6: return "WR11";
case 8: return "WR13";
case 9: return "WR15";
case 4: return "WR9";
case 5: return "WR10";
case 6: return "WR11";
case 8: return "WR13";
case 9: return "WR15";
case 10: return "WR14";
case 11: return "WR18";
case 12: return "WR19";
+26 -11
View File
@@ -232,36 +232,51 @@ namespace Statistics
{
#if GENESIS
Language = "DE";
BenchNames = new string[] { "Genesis" };
MidNames = new string[] { string.Empty, "I11", "I12", "I2", "I3", "I4", "I5" }; /// Index is MID-id
ConnectionStrings = new string[]
{
"SERVER=localhost; DATABASE=genesis-r; UID=root; PASSWORD=; CHARSET=utf8;",
};
MidNames = new string[] { string.Empty, "I11", "I12", "I2", "I3", "I4", "I5" }; /// Index is MID-id
#else
BenchNames = new string[] { "WR10", "WR11", "WR13", "WR14", "WR15", "WR18", "WR19", "WR20", "WR21", "PT7" };
MidNames = new string[] { string.Empty, "I1", "I2", "I3", "I4" }; /// Index is MID-id
#if true
/// Production Stara Tura
Language = "SK";
BenchNames = new string[] { "WR10", "WR11", "WR13", "WR14", "WR15", "WR18", "WR19", "WR20", "WR21", "PT7" };
ConnectionStrings = new string[]
ConnectionStrings = new string[]
{
"SERVER=10.42.130.69; DATABASE=st-wr10-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;",
"SERVER=10.42.129.27; DATABASE=st-wr11-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;",
"SERVER=10.42.128.61; DATABASE=st-wr13-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;",
"SERVER=10.42.130.72; DATABASE=st-wr14-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;",
"SERVER=10.42.130.52; DATABASE=st-wr13-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;",
"SERVER=10.42.128.61; DATABASE=st-wr14-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;",
"SERVER=10.42.130.71; DATABASE=st-wr15-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;",
"SERVER=10.42.130.165; DATABASE=st-wr18-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;",
"SERVER=10.42.128.159; DATABASE=st-wr19-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;",
"SERVER=10.42.130.76; DATABASE=st-wr20-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;",
"SERVER=10.42.128.201; DATABASE=st-wr21-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;",
"SERVER=10.42.130.156; DATABASE=st-wr21-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;",
"SERVER=10.42.130.131; DATABASE=iperlspecial-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;",
};
#else
/// Off-line demo
Language = "EN";
MidNames = new string[] { string.Empty, "I1", "I2", "I3", "I4" }; /// Index is MID-id
ConnectionStrings = new string[]
{
"SERVER=localhost; DATABASE=st-wr10-r; UID=root; PASSWORD=kraken; CHARSET=utf8;",
"SERVER=localhost; DATABASE=st-wr11-r; UID=root; PASSWORD=kraken; CHARSET=utf8;",
"SERVER=localhost; DATABASE=st-wr13-r; UID=root; PASSWORD=kraken; CHARSET=utf8;",
"SERVER=localhost; DATABASE=st-wr14-r; UID=root; PASSWORD=kraken; CHARSET=utf8;",
"SERVER=localhost; DATABASE=st-wr15-r; UID=root; PASSWORD=kraken; CHARSET=utf8;",
"SERVER=localhost; DATABASE=st-wr18-r; UID=root; PASSWORD=kraken; CHARSET=utf8;",
"SERVER=localhost; DATABASE=st-wr19-r; UID=root; PASSWORD=kraken; CHARSET=utf8;",
"SERVER=localhost; DATABASE=st-wr20-r; UID=root; PASSWORD=kraken; CHARSET=utf8;",
"SERVER=localhost; DATABASE=st-wr21-r; UID=root; PASSWORD=kraken; CHARSET=utf8;",
};
#endif
#endif
FlowEnabledI1 = new bool[FlowsCount];
FlowEnabledI2 = new bool[FlowsCount];
FlowEnabledI3 = new bool[FlowsCount];
+1 -1
View File
@@ -35,7 +35,7 @@ namespace Statistics
/// Local program configuration directory including the trailing backslash
ExecutableDirectory = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
#if false
#if true
/// Config directory is a sibling directory of the executable directory
ConfigDirectory = Path.Combine(ExecutableDirectory, "..", string.Format("Cfg{0}", (args.Length >= 1) ? args[0] : string.Empty));
#else
+5 -3
View File
@@ -88,19 +88,21 @@ namespace Statistics
for (int i = 0; i < Program.LocalSettings.ConnectionStrings.Length; i++)
{
if (!string.IsNullOrEmpty(Program.LocalSettings.GetConnectionString(i)))
string connStr = Program.LocalSettings.GetConnectionString(i);
if (!string.IsNullOrEmpty(connStr))
{
sessionFactories[i] = null;
try
{
sessionFactories[i] = Fluently.Configure()
.Database(MySQLConfiguration.Standard.ConnectionString(Program.LocalSettings.GetConnectionString(i)))
.Database(MySQLConfiguration.Standard.ConnectionString(connStr))
.Mappings(m => m.FluentMappings.AddFromAssemblyOf<Results.Entities.Batch>())
.ExposeConfiguration(BuildSchema)
.BuildSessionFactory();
}
catch (Exception)
{
sessionFactories[i] = null;
MessageBox.Show(string.Format("Cannot open one of database of {0}", Program.LocalSettings.GetBenchName(i)), "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
}
+35 -1
View File
@@ -1,8 +1,10 @@
///
/// Copyright (c) 2018 Sensus Slovensko a.s.
/// Copyright (c) 2018-2020 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Windows.Forms;
using System.Windows.Forms.DataVisualization.Charting;
using Results.Entities;
@@ -10,10 +12,24 @@ using Statistics.Resources;
namespace Statistics.UserControls
{
class DataPoint
{
public DateTime StartTime;
public double RefError;
public DataPoint(DateTime startTime, double refError)
{
StartTime = startTime;
RefError = refError;
}
}
public partial class StatisticsCtrl : UserControl
{
public int Id; /// Index of the tab page
public MidOrWaterMetersCtrl MidCtrl; /// Reference to the parent control
IList<DataPoint> currentData;
public StatisticsCtrl()
{
@@ -21,6 +37,7 @@ namespace Statistics.UserControls
chart1.ChartAreas[0].AxisX.LabelStyle.Format = "dd.MM.yy";
chart1.ChartAreas[0].AxisX.Interval = 1;
chart1.ChartAreas[0].AxisX.IntervalType = DateTimeIntervalType.Days;
currentData = new List<DataPoint>();
}
private void updateButton_Click(object sender, EventArgs e)
@@ -36,6 +53,8 @@ namespace Statistics.UserControls
if (results != null)
{
currentData.Clear();
foreach (var r in results)
{
if (r.ErrorMaster != 0)
@@ -45,6 +64,7 @@ namespace Statistics.UserControls
if (MidCtrl.IsFlowEnabled(i) && (MidCtrl.FlowFrom(i) <= r.FlowMean) && (r.FlowMean <= MidCtrl.FlowTo(i)))
{
chart1.Series[string.Format("Flow {0}", i)].Points.AddXY(r.StartTime, r.ErrorMaster);
currentData.Add(new DataPoint(r.StartTime, r.ErrorMaster));
}
}
}
@@ -56,7 +76,21 @@ namespace Statistics.UserControls
private void exportButton_Click(object sender, EventArgs e)
{
SaveFileDialog dlg = new SaveFileDialog();
dlg.Filter = "CSV files (*.csv)|*.csv|All files (*.*)|*.*";
if (dlg.ShowDialog() == DialogResult.OK)
{
using (TextWriter writer = new StreamWriter(dlg.FileName))
{
foreach (var d in currentData)
{
writer.WriteLine("{0:dd.MM.yyyy HH:mm}; {1}", d.StartTime, d.RefError);
}
}
MessageBox.Show(string.Format("Data written to file {0}", dlg.FileName));
}
}
}
}
+12
View File
@@ -79,6 +79,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataStreamInterfaceTest", "
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataStreamMeter", "DataStreamMeter\DataStreamMeter.csproj", "{E6925701-57A6-4167-B5C4-BF670F1DE310}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MergeResultsDBs", "MergeResultsDBs\MergeResultsDBs.csproj", "{9786D0A8-BA9A-41F6-9E61-C7B2B76D4C08}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -343,6 +345,16 @@ Global
{E6925701-57A6-4167-B5C4-BF670F1DE310}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{E6925701-57A6-4167-B5C4-BF670F1DE310}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{E6925701-57A6-4167-B5C4-BF670F1DE310}.Release|x86.ActiveCfg = Release|Any CPU
{9786D0A8-BA9A-41F6-9E61-C7B2B76D4C08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9786D0A8-BA9A-41F6-9E61-C7B2B76D4C08}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9786D0A8-BA9A-41F6-9E61-C7B2B76D4C08}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{9786D0A8-BA9A-41F6-9E61-C7B2B76D4C08}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{9786D0A8-BA9A-41F6-9E61-C7B2B76D4C08}.Debug|x86.ActiveCfg = Debug|Any CPU
{9786D0A8-BA9A-41F6-9E61-C7B2B76D4C08}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9786D0A8-BA9A-41F6-9E61-C7B2B76D4C08}.Release|Any CPU.Build.0 = Release|Any CPU
{9786D0A8-BA9A-41F6-9E61-C7B2B76D4C08}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{9786D0A8-BA9A-41F6-9E61-C7B2B76D4C08}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{9786D0A8-BA9A-41F6-9E61-C7B2B76D4C08}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
+26 -41
View File
@@ -18,68 +18,54 @@ namespace TBF.BenchControl.Ambient.Comet
public class Ambient : ComponentBase, IDevice, IOperation, GenericDevices.IAmbient
{
private static readonly ILog log = LogManager.GetLogger(typeof(Ambient));
public override string ToString() { return string.Format("Ambient({0})", Cfg.ToString(1)); }
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
private readonly AmbientCfg ambientCfg;
/// Private fields
SerialPort serialPort;
/// <summary>The state of the measurement</summary>
MsrmntState msrmntState;
int msrmntTimeStamp;
/// Measured values when MsrmntState == MsrmntState.Valid
float temperature; /// [°C]
float pressure; /// [bar]
float humidity; /// [R%]
/// <summary>Last valid measurement time stamp</summary>
int msrmntTimeStamp;
public Ambient()
{
}
/// <summary>
/// Ambient temperature / humidity / pressure meter 'Greco' connected via serial interface (RS232)
/// </summary>
public Ambient(AmbientCfg cfg, IList<Generic.IComponent> components)
: this(cfg)
{
}
public Ambient() { }
public Ambient(Generic.IComponentCfg cfg)
/// <summary>
/// Ambient temperature / humidity / pressure meter 'Comet' connected via serial interface (RS232)
/// </summary>
public Ambient(Generic.IComponentCfg cfg)
: base(cfg)
{
ambientCfg = cfg as AmbientCfg;
log.Debug(this.ToString());
}
public void Initialize()
public override void Initialize()
{
if (ambientCfg.DebugLevel == DebugMode.Simulate)
{
temperature = 20.0f;
humidity = 40.0f;
pressure = 1.0f;
msrmntTimeStamp = StateMachine.Time;
msrmntState = MsrmntState.Valid;
return;
}
string comPortName = "COM" + ambientCfg.ComPortNr.ToString();
serialPort = new SerialPort(comPortName, ambientCfg.BaudRate, ambientCfg.Parity, ambientCfg.DataBits, ambientCfg.StopBits);
serialPort.Handshake = ambientCfg.Handshake;
serialPort.Open();
if (ambientCfg.SetDtrToOne)
{
serialPort.DtrEnable = true;
}
temperature = 20.0f;
humidity = 40.0f;
pressure = 1.0f;
msrmntTimeStamp = 0;
msrmntState = MsrmntState.Busy;
log.FatalFormat("Successfully initialized device {0}", ToString());
if (ambientCfg.DebugLevel == DebugMode.Normal)
{
string comPortName = "COM" + ambientCfg.ComPortNr.ToString();
serialPort = new SerialPort(comPortName, ambientCfg.BaudRate, ambientCfg.Parity, ambientCfg.DataBits, ambientCfg.StopBits);
serialPort.Handshake = ambientCfg.Handshake;
serialPort.Open();
if (ambientCfg.SetDtrToOne) serialPort.DtrEnable = true;
log.FatalFormat("{0} initialized: {1}", Name, this);
}
else
{
serialPort = null;
log.FatalFormat("{0} simulated: {1}", Name, this);
}
}
/// <summary>Run this device</summary>
@@ -112,7 +98,6 @@ namespace TBF.BenchControl.Ambient.Comet
pressure = (float)value / 10000.0f;
msrmntTimeStamp = StateMachine.Time;
msrmntState = MsrmntState.Valid;
UpdateProcessData(temperature, pressure, humidity);
@@ -10,8 +10,6 @@ namespace TBF.BenchControl.Ambient.Comet
{
public string ClassName { get { return "Comet-Ambient"; } }
public void ResetStaticProperties() { Ambient.ResetStaticProperties(); }
public IComponent DummyComponent() { return new Ambient(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Ambient(cfg); }
+23 -33
View File
@@ -20,7 +20,7 @@ namespace TBF.BenchControl.Ambient.Greco
public class Ambient : ComponentBase, IDevice, IOperation, GenericDevices.IAmbient
{
private static readonly ILog log = LogManager.GetLogger(typeof(Ambient));
public override string ToString() { return string.Format("Ambient({0})", Cfg.ToString(1)); }
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
private readonly AmbientCfg ambientCfg;
@@ -28,9 +28,6 @@ namespace TBF.BenchControl.Ambient.Greco
SerialPort serialPort;
StringBuilder measurementBuilder;
/// <summary>The state of the measurement</summary>
MsrmntState msrmntState;
///
/// Measured values when MsrmntState == MsrmntState.Valid
///
@@ -38,49 +35,43 @@ namespace TBF.BenchControl.Ambient.Greco
float pressure; /// [bar]
float humidity; /// [R%]
/// <summary>Measurement time stamp when MsrmntState == MsrmntState.Valid</summary>
/// <summary>Last valid measurement time stamp</summary>
int msrmntTimeStamp;
public Ambient()
{
}
public Ambient() { }
/// <summary>
/// Ambient temperature / humidity / pressure meter 'Greco' connected via serial interface (RS232)
/// Connection settings: 19200 Bd 8-bits No-parity 1-stop-bit Flow control: none or hardware.
/// </summary>
public Ambient(AmbientCfg cfg, IList<Generic.IComponent> components)
: this(cfg)
{
}
public Ambient(Generic.IComponentCfg cfg)
: base(cfg)
{
ambientCfg = cfg as AmbientCfg;
log.Debug(this.ToString());
}
public void Initialize()
public override void Initialize()
{
if (ambientCfg.DebugLevel == DebugMode.Simulate)
temperature = 20.0f;
humidity = 40.0f;
pressure = 1.0f;
msrmntTimeStamp = 0;
if (ambientCfg.DebugLevel == DebugMode.Normal)
{
string comPortName = "COM" + ambientCfg.ComPortNr.ToString();
serialPort = new SerialPort(comPortName, ambientCfg.BaudRate, ambientCfg.Parity, ambientCfg.DataBits, ambientCfg.StopBits);
serialPort.Handshake = ambientCfg.Handshake;
serialPort.Open();
measurementBuilder = new StringBuilder(40);
log.FatalFormat("{0} initialized: {1}", Name, this);
}
else
{
temperature = 20.0f;
humidity = 40.0f;
pressure = 1.0f;
msrmntTimeStamp = StateMachine.Time;
msrmntState = MsrmntState.Valid;
return;
}
string comPortName = "COM" + ambientCfg.ComPortNr.ToString();
serialPort = new SerialPort(comPortName, ambientCfg.BaudRate, ambientCfg.Parity, ambientCfg.DataBits, ambientCfg.StopBits);
serialPort.Handshake = ambientCfg.Handshake;
serialPort.Open();
measurementBuilder = new StringBuilder(40);
msrmntState = MsrmntState.Busy;
log.FatalFormat("Successfully initialized device {0}", ToString());
serialPort = null;
log.FatalFormat("{0} simulated: {1}", Name, this);
}
}
/// <summary>Run this device</summary>
@@ -136,7 +127,6 @@ namespace TBF.BenchControl.Ambient.Greco
UpdateProcessData(temperature, pressure, humidity);
msrmntTimeStamp = StateMachine.Time;
msrmntState = MsrmntState.Valid;
log.InfoFormat("Ambient: temperature = {0:F1} C, humidity = {1:F1} %, pressure = {2:F0} mbar", temperature, humidity, 1000 * pressure);
}
else
@@ -10,8 +10,6 @@ namespace TBF.BenchControl.Ambient.Greco
{
public string ClassName { get { return "Greco Ambient"; } }
public void ResetStaticProperties() { Ambient.ResetStaticProperties(); }
public IComponent DummyComponent() { return new Ambient(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Ambient(cfg); }
+9 -10
View File
@@ -8,18 +8,18 @@ using TBF.BenchControl.Generic;
namespace TBF.BenchControl
{
public class ComponentBase : IComponent
public abstract class ComponentBase : IComponent
{
readonly Generic.IComponentCfg cfg;
public Generic.IComponentCfg Cfg { get { return cfg; } }
public string Name { get { return cfg.Name; } }
public string ClassName { get { return cfg.Factory.ClassName; } }
public string ParentName { get { return cfg.ParentName; } }
public Generic.IComponentFactory Factory { get { return cfg.Factory; } }
public int ItemNr { get { return cfg.ItemNr; } }
public DebugMode DebugLevel { get { return cfg.DebugLevel; } set { cfg.DebugLevel = value; } }
public LogLevel LogLevel { get { return cfg.LogLevel; } }
public string Name { get { return cfg.Name; } }
public string ClassName { get { return cfg.Factory.ClassName; } }
public string ParentName { get { return cfg.ParentName; } }
public IComponentFactory Factory { get { return cfg.Factory; } }
public int ItemNr { get { return cfg.ItemNr; } }
public DebugMode DebugLevel { get { return cfg.DebugLevel; } set { cfg.DebugLevel = value; } }
public LogLevel LogLevel { get { return cfg.LogLevel; } }
public IList<MeasurementCorrection> Corrections
{
@@ -49,8 +49,7 @@ namespace TBF.BenchControl
this.cfg = cfg;
}
/// <summary> Empty implementation, might be overriden in derived classes </summary>
public static void ResetStaticProperties() { }
public abstract void Initialize();
/// <summary> Empty implementation, might be overriden in derived classes </summary>
public virtual void StartChangeHandler() { }
+27 -33
View File
@@ -71,7 +71,7 @@ namespace TBF.BenchControl.Danfoss.VLT2800
public class Pump : ComponentBase, IDevice, IOperation, GenericDevices.IPumpFM, GenericDevices.IValve
{
private static readonly ILog log = LogManager.GetLogger(typeof(Pump));
public override string ToString() { return string.Format("Pump-Danfoss-VLT2800({0})", Cfg.ToString(1)); }
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
private readonly PumpCfg pumpCfg;
@@ -86,21 +86,15 @@ namespace TBF.BenchControl.Danfoss.VLT2800
/// Pump power in [%] in range 0 .. 100.0f
/// </summary>
private float power;
public float Power
{
get { return power; }
}
public float Power { get { return power; } }
readonly Elde.ControlBoardDev controlBoard;
readonly int bitPosition; /// 0 .. 63
public readonly UInt128 Mask; /// derived from bitPosition in the constructor
int bitNr; /// 0 .. 127
public UInt128 Mask; /// derived from bitPosition in the constructor
public bool State
{
get { return (controlBoard.Route & Mask) != 0; }
}
public bool State { get { return (controlBoard.Route & Mask) != 0; } }
/// Private fields
SerialPort serialPort;
@@ -109,9 +103,7 @@ namespace TBF.BenchControl.Danfoss.VLT2800
StringBuilder responseBuilder;
public Pump()
{
}
public Pump() { }
/// <summary>
/// Ambient temperature / humidity / pressure meter 'Greco' connected via serial interface (RS232)
@@ -124,29 +116,31 @@ namespace TBF.BenchControl.Danfoss.VLT2800
controlBoard = (Elde.ControlBoardDev)TbfComponents.FindComponent("CB", components); /// TODO: replace "CB"
if (controlBoard == null) throw new Exception("Cannot find " + Name + " parent");
bitPosition = pumpCfg.BitPosition;
Mask = (((UInt128)1) << bitPosition);
Mask |= (((UInt128)1) << (bitPosition + 1));
log.Debug(this.ToString());
}
public void Initialize()
public override void Initialize()
{
if (pumpCfg.DebugLevel == DebugMode.Simulate)
{
return;
}
bitNr = pumpCfg.BitPosition;
Mask = (((UInt128)1) << bitNr);
#if MUNICH
Mask |= (((UInt128)1) << (bitNr + 1));
#endif
string comPortName = "COM" + pumpCfg.ComPortNr.ToString();
serialPort = new SerialPort(comPortName, pumpCfg.BaudRate, pumpCfg.Parity, pumpCfg.DataBits, pumpCfg.StopBits);
serialPort.Handshake = Handshake.None;
serialPort.Open();
responseBuilder = new StringBuilder(40);
log.FatalFormat("Successfully initialized device {0}", ToString());
}
if (pumpCfg.DebugLevel == DebugMode.Normal)
{
string comPortName = "COM" + pumpCfg.ComPortNr.ToString();
serialPort = new SerialPort(comPortName, pumpCfg.BaudRate, pumpCfg.Parity, pumpCfg.DataBits, pumpCfg.StopBits);
serialPort.Handshake = Handshake.None;
serialPort.Open();
responseBuilder = new StringBuilder(40);
log.FatalFormat("{0} initialized: {1}", Name, this);
}
else
{
serialPort = null;
log.FatalFormat("{0} simulated: {1}", Name, this);
}
}
/// <summary>Run this device</summary>
public void RunDeviceBefore()
@@ -10,8 +10,6 @@ namespace TBF.BenchControl.Danfoss.VLT2800
{
public string ClassName { get { return "Pump-Danfoss-VLT2800"; } }
public void ResetStaticProperties() { Pump.ResetStaticProperties(); }
public IComponent DummyComponent() { return new Pump(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Pump(cfg, components); }
@@ -12,26 +12,26 @@ namespace TBF.BenchControl.DataContainers.BackupAndSecurityOptions
public class Component : ComponentBase
{
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
public override string ToString() { return string.Format("{0}({1})", this.GetType().Namespace.Substring(32), Cfg.ToString(1)); }
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
readonly ComponentCfg myCfg;
public int MinPasswdLength { get { return myCfg.MinPasswdLength; } }
public int PasswdExpirationPeriodDays { get { return myCfg.PasswdExpirationPeriodDays; } }
public Component()
{
}
public Component() { }
public Component(Generic.IComponentCfg cfg)
: base(cfg)
{
myCfg = cfg as ComponentCfg;
}
public override void Initialize()
{
Users.GlobalData.MinPasswdLength = myCfg.MinPasswdLength;
Users.GlobalData.PasswdExpirationPeriodDays = myCfg.PasswdExpirationPeriodDays;
log.Debug(this.ToString());
log.FatalFormat("{0} initialized: {1}", Name, this);
}
}
}
}
@@ -10,8 +10,6 @@ namespace TBF.BenchControl.DataContainers.BackupAndSecurityOptions
{
public string ClassName { get { return this.GetType().Namespace.Substring(17); } }
public void ResetStaticProperties() { Component.ResetStaticProperties(); }
public IComponent DummyComponent() { return new Component(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Component(cfg); }
@@ -17,7 +17,7 @@ namespace TBF.BenchControl.DataContainers.BenchInfo.Extended
public class Component : ComponentBase, GenericDevices.IBenchInfo
{
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
public override string ToString() { return string.Format("BenchInfoEx({0})", Cfg.ToString(1)); }
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
readonly ComponentCfg myCfg;
@@ -30,16 +30,19 @@ namespace TBF.BenchControl.DataContainers.BenchInfo.Extended
public string Address5 { get { return myCfg.Address5; } }
public RemoteDBUse RemoteDBUse { get { return myCfg.RemoteDBUse; } }
public Component()
{
}
public Component() { }
public Component(Generic.IComponentCfg cfg)
: base(cfg)
{
myCfg = cfg as ComponentCfg;
Events.DB.SetBenchName(myCfg.TestBenchName);
log.Debug(this.ToString());
}
}
public override void Initialize()
{
Events.DB.SetBenchName(myCfg.TestBenchName);
log.FatalFormat("{0} initialized: {1}", Name, this);
}
}
}
@@ -10,8 +10,6 @@ namespace TBF.BenchControl.DataContainers.BenchInfo.Extended
{
public string ClassName { get { return "BenchInfoEx"; } }
public void ResetStaticProperties() { Component.ResetStaticProperties(); }
public IComponent DummyComponent() { return new Component(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Component(cfg); }
@@ -18,7 +18,7 @@ namespace TBF.BenchControl.DataContainers.BenchInfo.iPerl
public class Component : ComponentBase, GenericDevices.IBenchInfo, GenericDevices.IHasCalendarEvents
{
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
public override string ToString() { return string.Format("BenchInfo.iPerl({0})", Cfg.ToString(1)); }
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
readonly ComponentCfg myCfg;
@@ -33,16 +33,19 @@ namespace TBF.BenchControl.DataContainers.BenchInfo.iPerl
public Side Side { get { return myCfg.Side; } }
public int MaxTestIndex { get { return myCfg.MaxTestIndex; } } /// (MaxPruefindex % 100) value when to reject water meters completely if they are NOK
public Component()
{
}
public Component() { }
public Component(Generic.IComponentCfg cfg)
: base(cfg)
{
myCfg = cfg as ComponentCfg;
}
public override void Initialize()
{
Events.DB.SetBenchName(myCfg.TestBenchName);
log.Debug(this.ToString());
log.FatalFormat("{0} initialized: {1}", Name, this);
}
@@ -10,8 +10,6 @@ namespace TBF.BenchControl.DataContainers.BenchInfo.iPerl
{
public string ClassName { get { return "BenchInfo.iPerl"; } }
public void ResetStaticProperties() { Component.ResetStaticProperties(); }
public IComponent DummyComponent() { return new Component(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Component(cfg); }
@@ -14,30 +14,28 @@ namespace TBF.BenchControl.DataContainers.Buoyancy
public class Component : ComponentBase, GenericDevices.IHasCalendarEvents
{
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
public override string ToString() { return string.Format("{0}({1})", this.GetType().Namespace.Substring(32), Cfg.ToString(1)); }
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
readonly ComponentCfg myCfg;
public double Buoyancy { get { return myCfg.Buoyancy; } }
public Component()
{
}
public Component() { }
public Component(Generic.IComponentCfg cfg)
: base(cfg)
{
myCfg = cfg as ComponentCfg;
/// This is to use data in formulas
Config.Data.Buoyancy = Buoyancy;
/// This is to have data in reports
Results.WMeterRsltItemSpec.Buoyancy = Buoyancy;
log.Debug(this.ToString());
}
public override void Initialize()
{
Config.Data.Buoyancy = Buoyancy; /// This is to use Buoyancy from this component in formulas
log.FatalFormat("{0} initialized: {1}", Name, this);
}
public IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents()
{
DateTime calibrationDue = myCfg.CalibValidDate;
@@ -10,8 +10,6 @@ namespace TBF.BenchControl.DataContainers.Buoyancy
{
public string ClassName { get { return this.GetType().Namespace.Substring(17); } }
public void ResetStaticProperties() { Component.ResetStaticProperties(); }
public IComponent DummyComponent() { return new Component(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Component(cfg); }
@@ -14,33 +14,31 @@ namespace TBF.BenchControl.DataContainers.Density
public class Component : ComponentBase, GenericDevices.IHasCalendarEvents
{
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
public override string ToString() { return string.Format("{0}({1})", this.GetType().Namespace.Substring(32), Cfg.ToString(1)); }
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
readonly ComponentCfg myCfg;
public double RealDensity { get { return myCfg.RealDensity; } }
public double AtTemperature { get { return myCfg.AtTemperature; } }
public Component()
{
}
public Component() { }
public Component(Generic.IComponentCfg cfg)
: base(cfg)
{
myCfg = cfg as ComponentCfg;
}
/// This is to use data in formulas
public override void Initialize()
{
/// This is to use sample density and temp. from this component in formulas
Config.Data.RealDensity = RealDensity;
Config.Data.AtTemperature = AtTemperature;
/// This is to have data in reports
Results.WMeterRsltItemSpec.RealDensity = RealDensity;
Results.WMeterRsltItemSpec.AtTemperature = AtTemperature;
log.Debug(this.ToString());
log.FatalFormat("{0} initialized: {1}", Name, this);
}
public IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents()
{
DateTime calibrationDue = myCfg.CalibValidDate;
@@ -10,8 +10,6 @@ namespace TBF.BenchControl.DataContainers.Density
{
public string ClassName { get { return this.GetType().Namespace.Substring(17); } }
public void ResetStaticProperties() { Component.ResetStaticProperties(); }
public IComponent DummyComponent() { return new Component(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Component(cfg); }
@@ -13,14 +13,10 @@ namespace TBF.BenchControl.DataContainers.Evaporation
public class Component : ComponentBase, IEvaporation, GenericDevices.IHasCalendarEvents
{
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
public override string ToString()
{
return string.Format("{0}({1})", this.GetType().Namespace.Substring(17), Cfg.ToString(1));
}
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
readonly EvaporationCfg myCfg;
/// <summary>
/// For a given temperature in [°C] returns an evaporation rate in [kg/s]
/// </summary>
@@ -30,17 +26,20 @@ namespace TBF.BenchControl.DataContainers.Evaporation
}
public Component()
{
}
public Component() { }
public Component(Generic.IComponentCfg cfg)
: base(cfg)
{
myCfg = cfg as EvaporationCfg;
log.Debug(this.ToString());
}
public override void Initialize()
{
log.FatalFormat("{0} initialized: {1}", Name, this);
}
public IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents()
{
DateTime calibrationDue = myCfg.CalibValidDate;
@@ -13,12 +13,12 @@ namespace TBF.BenchControl.DataEntry.Combined
public class EntryForm : ComponentBase, IOperation, IDataEntry, IHasCycleBeginForm, IHasCycleEndForm, IHasWMStatesForm
{
private static readonly ILog log = LogManager.GetLogger(typeof(EntryForm));
public override string ToString() { return string.Format("DataEntry.Combined({0})", Cfg.ToString(1)); }
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
public bool UsesCameras() { return false; }
readonly EntryFormCfg entryFormCfg;
IRegisterReader[] regReaders;
IRegReader[] regReaders;
/// <summary>
/// Properties set by the Begin and the End form
@@ -60,25 +60,26 @@ namespace TBF.BenchControl.DataEntry.Combined
CurrentOp currentOp;
public EntryForm()
{
}
public EntryForm() { }
public EntryForm(Generic.IComponentCfg cfg)
: base(cfg)
{
entryFormCfg = cfg as EntryFormCfg;
disabled = new bool[Config.Data.CompoundWMsCount];
wmStartState = new double[Config.Data.CompoundWMsCount * 2];
wmStartStateStr = new string[Config.Data.CompoundWMsCount * 2];
wmEndState = new double[Config.Data.CompoundWMsCount * 2];
wmCycleEndState = new string[Config.Data.CompoundWMsCount * 2];
currentOp = CurrentOp.None;
log.Debug(this.ToString());
}
public override void Initialize()
{
disabled = new bool[Config.Data.CompoundWMsCount];
wmStartState = new double[Config.Data.CompoundWMsCount * 2];
wmStartStateStr = new string[Config.Data.CompoundWMsCount * 2];
wmEndState = new double[Config.Data.CompoundWMsCount * 2];
wmCycleEndState = new string[Config.Data.CompoundWMsCount * 2];
currentOp = CurrentOp.None;
log.FatalFormat("{0} initialized: {1}", Name, this);
}
/// <returns>Reference to the operation</returns>
public IOperation ShowCycleBeginFormOp()
{
@@ -98,7 +99,7 @@ namespace TBF.BenchControl.DataEntry.Combined
}
/// <returns>Reference to the operation</returns>
public IOperation ShowTestStartFormOp(IRegisterReader[] regReaders)
public IOperation ShowTestStartFormOp(IRegReader[] regReaders)
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.EnterTestStartStates;
@@ -107,7 +108,7 @@ namespace TBF.BenchControl.DataEntry.Combined
}
/// <returns>Reference to the operation</returns>
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
public IOperation ShowTestEndFormOp(IRegReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.EnterTestEndStates;
@@ -10,8 +10,6 @@ namespace TBF.BenchControl.DataEntry.Combined
{
public string ClassName { get { return "DataEntry-Combined"; } }
public void ResetStaticProperties() { EntryForm.ResetStaticProperties(); }
public IComponent DummyComponent() { return new EntryForm(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryForm(cfg); }
@@ -20,7 +20,7 @@ namespace TBF.BenchControl.DataEntry.Combined
/// <summary> Number of water meters </summary>
public readonly int WaterMetersCount; /// Main + Aux water meter count as one (combined) water meter
readonly IRegisterReader[] regReaders;
readonly IRegReader[] regReaders;
readonly bool[] disabled;
// To be retrieved after the form closes
@@ -78,7 +78,7 @@ namespace TBF.BenchControl.DataEntry.Combined
/// </summary>
/// <param name="waterMetersCount">Number of water meters</param>
/// <param name="disabled">Information from CycleBeginningForm about availability of water meters</param>
public TestStartEndForm(int waterMetersCount, IRegisterReader[] regReaders, bool[] disabled)
public TestStartEndForm(int waterMetersCount, IRegReader[] regReaders, bool[] disabled)
: this()
{
endStates = false;
@@ -105,7 +105,7 @@ namespace TBF.BenchControl.DataEntry.Combined
/// <param name="refVolume">Reference volume, it is used to verify the end state, show/hide exclamation if necessary</param>
/// <param name="errLimLo">Error limit low, it is used to verify the end state, show/hide exclamation if necessary</param>
/// <param name="errLimHi">Error limit high, it is used to verify the end state, show/hide exclamation if necessary</param>
public TestStartEndForm(int waterMetersCount, IRegisterReader[] regReaders, string[] mainStartStateStr, string[] auxStartStateStr,
public TestStartEndForm(int waterMetersCount, IRegReader[] regReaders, string[] mainStartStateStr, string[] auxStartStateStr,
bool[] disabled, double refVolume, double errLimLo, double errLimHi)
: this()
{
@@ -13,12 +13,12 @@ namespace TBF.BenchControl.DataEntry.Fewa
public class EntryFormNoStartEnd : ComponentBase, IOperation, IDataEntry, IHasCycleBeginForm, IHasCycleEndForm
{
private static readonly ILog log = LogManager.GetLogger(typeof(EntryFormNoStartEnd));
public override string ToString() { return string.Format("DataEntry.Standard24({0})", Cfg.ToString(1)); }
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
public bool UsesCameras() { return false; }
readonly EntryFormCfg entryFormCfg;
IRegisterReader[] regReaders;
IRegReader[] regReaders;
/// <summary>
/// Properties set by the Begin, End and WMStates form
@@ -60,25 +60,26 @@ namespace TBF.BenchControl.DataEntry.Fewa
CurrentOp currentOp;
public EntryFormNoStartEnd()
{
}
public EntryFormNoStartEnd() { }
public EntryFormNoStartEnd(Generic.IComponentCfg cfg)
: base(cfg)
{
entryFormCfg = cfg as EntryFormCfg;
disabled = new bool[Config.Data.WMsCount];
wmStartState = new double[Config.Data.WMsCount];
wmStartStateStr = new string[Config.Data.WMsCount];
wmEndState = new double[Config.Data.WMsCount];
wmCycleEndState = new string[Config.Data.WMsCount];
currentOp = CurrentOp.None;
log.Debug(this.ToString());
}
public override void Initialize()
{
disabled = new bool[Config.Data.WMsCount];
wmStartState = new double[Config.Data.WMsCount];
wmStartStateStr = new string[Config.Data.WMsCount];
wmEndState = new double[Config.Data.WMsCount];
wmCycleEndState = new string[Config.Data.WMsCount];
currentOp = CurrentOp.None;
log.FatalFormat("{0} initialized: {1}", Name, this);
}
/// <returns>Reference to the operation</returns>
public IOperation ShowCycleBeginFormOp()
{
@@ -98,7 +99,7 @@ namespace TBF.BenchControl.DataEntry.Fewa
}
/// <returns>Reference to the operation</returns>
public IOperation ShowTestStartFormOp(IRegisterReader[] regReaders)
public IOperation ShowTestStartFormOp(IRegReader[] regReaders)
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.EnterTestStartStates;
@@ -107,7 +108,7 @@ namespace TBF.BenchControl.DataEntry.Fewa
}
/// <returns>Reference to the operation</returns>
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
public IOperation ShowTestEndFormOp(IRegReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.EnterTestEndStates;
@@ -10,8 +10,6 @@ namespace TBF.BenchControl.DataEntry.Fewa
{
public string ClassName { get { return "DataEntry.Fewa"; } }
public void ResetStaticProperties() { EntryFormNoStartEnd.ResetStaticProperties(); }
public IComponent DummyComponent() { return new EntryFormNoStartEnd(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryForm(cfg); }
@@ -10,8 +10,6 @@ namespace TBF.BenchControl.DataEntry.Fewa
{
public string ClassName { get { return "DataEntry.Fewa.NoStartEnd"; } }
public void ResetStaticProperties() { EntryFormNoStartEnd.ResetStaticProperties(); }
public IComponent DummyComponent() { return new EntryFormNoStartEnd(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryFormNoStartEnd(cfg); }
@@ -20,7 +20,7 @@ namespace TBF.BenchControl.DataEntry.Fewa
/// <summary> Number of text boxes for serial numbers </summary>
public readonly int WMsCount;
readonly IRegisterReader[] regReaders;
readonly IRegReader[] regReaders;
readonly bool[] disabled;
// To be retrieved after the form closes
@@ -98,7 +98,7 @@ namespace TBF.BenchControl.DataEntry.Fewa
/// </summary>
/// <param name="waterMetersCount">Number of water meters</param>
/// <param name="disabled">Information from CycleBeginningForm about availability of water meters</param>
public TestStartEndForm(int waterMetersCount, IRegisterReader[] regReaders, bool[] disabled)
public TestStartEndForm(int waterMetersCount, IRegReader[] regReaders, bool[] disabled)
: this()
{
endStates = false;
@@ -122,7 +122,7 @@ namespace TBF.BenchControl.DataEntry.Fewa
/// <param name="refVolume">Reference volume, it is used to verify the end state, show/hide exclamation if necessary</param>
/// <param name="errLimLo">Error limit low, it is used to verify the end state, show/hide exclamation if necessary</param>
/// <param name="errLimHi">Error limit high, it is used to verify the end state, show/hide exclamation if necessary</param>
public TestStartEndForm(int waterMetersCount, IRegisterReader[] regReaders, string[] wmStartStateStr, bool[] disabled,
public TestStartEndForm(int waterMetersCount, IRegReader[] regReaders, string[] wmStartStateStr, bool[] disabled,
double refVolume, double errLimLo, double errLimHi)
: this()
{
@@ -13,15 +13,12 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
public class EntryForm : ComponentBase, IOperation, IDataEntry, IHasCycleBeginForm, IHasCycleEndForm, IHasHeatMtrStatesForm
{
private static readonly ILog log = LogManager.GetLogger(typeof(EntryForm));
public override string ToString()
{
return string.Format("{0}({1})", this.GetType().Namespace.Substring(17), Cfg.ToString(1));
}
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
public bool UsesCameras() { return false; }
readonly EntryFormCfg entryFormCfg;
IRegisterReader[] regReaders;
IRegReader[] regReaders;
/// <summary>
/// Properties set by the Begin, End and WMStates form
@@ -75,28 +72,29 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
CurrentOp currentOp;
public EntryForm()
{
}
public EntryForm() { }
public EntryForm(Generic.IComponentCfg cfg)
: base(cfg)
{
entryFormCfg = cfg as EntryFormCfg;
}
public override void Initialize()
{
disabled = new bool[Config.Data.HeatMetersCount];
wmStartState = new double[Config.Data.HeatMetersCount];
wmStartState = new double[Config.Data.HeatMetersCount];
wmStartStateStr = new string[Config.Data.HeatMetersCount];
wmEndState = new double[Config.Data.HeatMetersCount];
wmEndState = new double[Config.Data.HeatMetersCount];
energyStartState = new double[Config.Data.HeatMetersCount];
energyStartStateStr = new string[Config.Data.HeatMetersCount];
energyEndState = new double[Config.Data.HeatMetersCount];
wmCycleEndState = new string[Config.Data.HeatMetersCount];
currentOp = CurrentOp.None;
log.Debug(this.ToString());
currentOp = CurrentOp.None;
log.FatalFormat("{0} initialized: {1}", Name, this);
}
/// <returns>Reference to the operation</returns>
public IOperation ShowCycleBeginFormOp()
{
@@ -116,7 +114,7 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
}
/// <returns>Reference to the operation</returns>
public IOperation ShowTestStartFormOp(IRegisterReader[] regReaders)
public IOperation ShowTestStartFormOp(IRegReader[] regReaders)
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.EnterTestStartStates;
@@ -125,7 +123,7 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
}
/// <returns>Reference to the operation</returns>
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
public IOperation ShowTestEndFormOp(IRegReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.EnterTestEndStates;
@@ -140,7 +138,7 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
}
/// <returns>Reference to the operation</returns>
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi,
public IOperation ShowTestEndFormOp(IRegReader[] regReaders, double refVolume, double errLimLo, double errLimHi,
double refEnergy, double energyErrLimLo, double energyErrLimHi)
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
@@ -10,8 +10,6 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
{
public string ClassName { get { return this.GetType().Namespace.Substring("TBF.BenchControl.".Length); } }
public void ResetStaticProperties() { EntryForm.ResetStaticProperties(); }
public IComponent DummyComponent() { return new EntryForm(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryForm(cfg); }
@@ -22,7 +22,7 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
/// <summary> Number of text boxes for serial numbers </summary>
public readonly int WaterMetersCount;
readonly IRegisterReader[] regReaders;
readonly IRegReader[] regReaders;
readonly bool[] disabled;
// To be retrieved after the form closes
@@ -106,7 +106,7 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
/// </summary>
/// <param name="waterMetersCount">Number of water meters</param>
/// <param name="disabled">Information from CycleBeginningForm about availability of water meters</param>
public TestStartEndForm(EntryFormCfg cfg, int waterMetersCount, IRegisterReader[] regReaders, bool[] disabled)
public TestStartEndForm(EntryFormCfg cfg, int waterMetersCount, IRegReader[] regReaders, bool[] disabled)
: this()
{
endStates = false;
@@ -135,7 +135,7 @@ namespace TBF.BenchControl.DataEntry.HeatMeters12
/// <param name="refVolume">Reference volume, it is used to verify the end state, show/hide exclamation if necessary</param>
/// <param name="errLimLo">Error limit low, it is used to verify the end state, show/hide exclamation if necessary</param>
/// <param name="errLimHi">Error limit high, it is used to verify the end state, show/hide exclamation if necessary</param>
public TestStartEndForm(EntryFormCfg cfg, int waterMetersCount, IRegisterReader[] regReaders, string[] wmStartStateStr, string[] energyStartStateStr,
public TestStartEndForm(EntryFormCfg cfg, int waterMetersCount, IRegReader[] regReaders, string[] wmStartStateStr, string[] energyStartStateStr,
bool[] disabled, double refVolume, double errLimLo, double errLimHi,
double refEnergy, double energyErrLimLo, double energyErrLimHi)
: this()
@@ -13,15 +13,12 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
public class EntryForm : ComponentBase, IOperation, IDataEntry, IHasCycleBeginForm, IHasCycleEndForm, IHasHeatMtrStatesForm
{
private static readonly ILog log = LogManager.GetLogger(typeof(EntryForm));
public override string ToString()
{
return string.Format("{0}({1})", this.GetType().Namespace.Substring(17), Cfg.ToString(1));
}
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
public bool UsesCameras() { return false; }
readonly EntryFormCfg entryFormCfg;
IRegisterReader[] regReaders;
IRegReader[] regReaders;
/// <summary>
/// Properties set by the Begin, End and WMStates form
@@ -75,26 +72,26 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
CurrentOp currentOp;
public EntryForm()
{
}
public EntryForm() { }
public EntryForm(Generic.IComponentCfg cfg)
: base(cfg)
{
entryFormCfg = cfg as EntryFormCfg;
}
public override void Initialize()
{
disabled = new bool[Config.Data.HeatMetersCount];
wmStartState = new double[Config.Data.HeatMetersCount];
wmStartState = new double[Config.Data.HeatMetersCount];
wmStartStateStr = new string[Config.Data.HeatMetersCount];
wmEndState = new double[Config.Data.HeatMetersCount];
wmEndState = new double[Config.Data.HeatMetersCount];
energyStartState = new double[Config.Data.HeatMetersCount];
energyStartStateStr = new string[Config.Data.HeatMetersCount];
energyEndState = new double[Config.Data.HeatMetersCount];
wmCycleEndState = new string[Config.Data.HeatMetersCount];
currentOp = CurrentOp.None;
log.Debug(this.ToString());
log.FatalFormat("{0} initialized: {1}", Name, this);
}
/// <returns>Reference to the operation</returns>
@@ -116,7 +113,7 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
}
/// <returns>Reference to the operation</returns>
public IOperation ShowTestStartFormOp(IRegisterReader[] regReaders)
public IOperation ShowTestStartFormOp(IRegReader[] regReaders)
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.EnterTestStartStates;
@@ -125,7 +122,7 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
}
/// <returns>Reference to the operation</returns>
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
public IOperation ShowTestEndFormOp(IRegReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.EnterTestEndStates;
@@ -140,7 +137,7 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
}
/// <returns>Reference to the operation</returns>
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi,
public IOperation ShowTestEndFormOp(IRegReader[] regReaders, double refVolume, double errLimLo, double errLimHi,
double refEnergy, double energyErrLimLo, double energyErrLimHi)
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
@@ -8,18 +8,13 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
{
public class Factory : IComponentFactory
{
public string ClassName { get { return this.GetType().Namespace.Substring("TBF.BenchControl.".Length); } }
public string ClassName { get { return GetType().Namespace.Substring("TBF.BenchControl.".Length); } }
public void ResetStaticProperties() { EntryForm.ResetStaticProperties(); }
public IComponent DummyComponent() { return new EntryForm(); }
public IComponent DummyComponent() { return new EntryForm(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryForm(cfg); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryForm(cfg); }
public IComponentCfg DefaultConfig()
{
return new EntryFormCfg(this.GetType().Namespace.Substring("TBF.BenchControl.DataEntry.".Length), this);
}
public IComponentCfg DefaultConfig() { return new EntryFormCfg("HeatMeters6", this); }
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
{
@@ -22,7 +22,7 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
/// <summary> Number of text boxes for serial numbers </summary>
public readonly int WaterMetersCount;
readonly IRegisterReader[] regReaders;
readonly IRegReader[] regReaders;
readonly bool[] disabled;
// To be retrieved after the form closes
@@ -98,7 +98,7 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
/// </summary>
/// <param name="waterMetersCount">Number of water meters</param>
/// <param name="disabled">Information from CycleBeginningForm about availability of water meters</param>
public TestStartEndForm(EntryFormCfg cfg, int waterMetersCount, IRegisterReader[] regReaders, bool[] disabled)
public TestStartEndForm(EntryFormCfg cfg, int waterMetersCount, IRegReader[] regReaders, bool[] disabled)
: this()
{
endStates = false;
@@ -127,7 +127,7 @@ namespace TBF.BenchControl.DataEntry.HeatMeters6
/// <param name="refVolume">Reference volume, it is used to verify the end state, show/hide exclamation if necessary</param>
/// <param name="errLimLo">Error limit low, it is used to verify the end state, show/hide exclamation if necessary</param>
/// <param name="errLimHi">Error limit high, it is used to verify the end state, show/hide exclamation if necessary</param>
public TestStartEndForm(EntryFormCfg cfg, int waterMetersCount, IRegisterReader[] regReaders, string[] wmStartStateStr, string[] energyStartStateStr,
public TestStartEndForm(EntryFormCfg cfg, int waterMetersCount, IRegReader[] regReaders, string[] wmStartStateStr, string[] energyStartStateStr,
bool[] disabled, double refVolume, double errLimLo, double errLimHi,
double refEnergy, double energyErrLimLo, double energyErrLimHi)
: this()
+11 -10
View File
@@ -13,7 +13,7 @@ namespace TBF.BenchControl.DataEntry.Munich
public class EntryForm : ComponentBase, IOperation, IDataEntry, IHasCycleBeginForm, IHasCycleEndForm
{
private static readonly ILog log = LogManager.GetLogger(typeof(EntryForm));
public override string ToString() { return string.Format("DataEntry.Munich({0})", Cfg.ToString(1)); }
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
public bool UsesCameras() { return false; }
@@ -55,22 +55,23 @@ namespace TBF.BenchControl.DataEntry.Munich
CurrentOp currentOp;
public EntryForm()
{
}
public EntryForm() { }
public EntryForm(Generic.IComponentCfg cfg)
: base(cfg)
{
entryFormCfg = cfg as EntryFormCfg;
serialNr = new string[Config.Data.CompoundWMsCount];
wmEndState = new string[Config.Data.CompoundWMsCount];
currentOp = CurrentOp.None;
log.Debug(this.ToString());
}
public override void Initialize()
{
serialNr = new string[Config.Data.CompoundWMsCount];
wmEndState = new string[Config.Data.CompoundWMsCount];
currentOp = CurrentOp.None;
log.FatalFormat("{0} initialized: {1}", Name, this);
}
/// <returns>Reference to the operation</returns>
public IOperation ShowCycleBeginFormOp()
{
@@ -10,8 +10,6 @@ namespace TBF.BenchControl.DataEntry.Munich
{
public string ClassName { get { return "DataEntryForm-Munich"; } }
public void ResetStaticProperties() { EntryForm.ResetStaticProperties(); }
public IComponent DummyComponent() { return new EntryForm(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryForm(cfg); }
+18 -17
View File
@@ -13,12 +13,12 @@ namespace TBF.BenchControl.DataEntry.Munich3
public class EntryForm : ComponentBase, IOperation, IDataEntry, IHasCycleBeginForm, IHasCycleEndForm, IHasWMStatesForm
{
private static readonly ILog log = LogManager.GetLogger(typeof(EntryForm));
public override string ToString() { return string.Format("DataEntry.Munich3({0})", Cfg.ToString(1)); }
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
public bool UsesCameras() { return false; }
readonly EntryFormCfg entryFormCfg;
IRegisterReader[] regReaders;
IRegReader[] regReaders;
/// <summary>
/// Properties set by the Begin and the End form
@@ -64,26 +64,27 @@ namespace TBF.BenchControl.DataEntry.Munich3
CurrentOp currentOp;
public EntryForm()
{
}
public EntryForm() { }
public EntryForm(Generic.IComponentCfg cfg)
: base(cfg)
{
entryFormCfg = cfg as EntryFormCfg;
serialNr = new string[Config.Data.WMsCount];
disabled = new bool[Config.Data.WMsCount];
wmStartState = new double[Config.Data.WMsCount];
wmStartStateStr = new string[Config.Data.WMsCount];
wmEndState = new double[Config.Data.WMsCount];
wmCycleEndState = new string[Config.Data.WMsCount];
currentOp = CurrentOp.None;
log.Debug(this.ToString());
}
public override void Initialize()
{
serialNr = new string[Config.Data.WMsCount];
disabled = new bool[Config.Data.WMsCount];
wmStartState = new double[Config.Data.WMsCount];
wmStartStateStr = new string[Config.Data.WMsCount];
wmEndState = new double[Config.Data.WMsCount];
wmCycleEndState = new string[Config.Data.WMsCount];
currentOp = CurrentOp.None;
log.FatalFormat("{0} initialized: {1}", Name, this);
}
/// <returns>Reference to the operation</returns>
public IOperation ShowCycleBeginFormOp()
{
@@ -103,7 +104,7 @@ namespace TBF.BenchControl.DataEntry.Munich3
}
/// <returns>Reference to the operation</returns>
public IOperation ShowTestStartFormOp(IRegisterReader[] regReaders)
public IOperation ShowTestStartFormOp(IRegReader[] regReaders)
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.EnterTestStartStates;
@@ -112,7 +113,7 @@ namespace TBF.BenchControl.DataEntry.Munich3
}
/// <returns>Reference to the operation</returns>
public IOperation ShowTestEndFormOp(IRegisterReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
public IOperation ShowTestEndFormOp(IRegReader[] regReaders, double refVolume, double errLimLo, double errLimHi)
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
currentOp = CurrentOp.EnterTestEndStates;
@@ -10,8 +10,6 @@ namespace TBF.BenchControl.DataEntry.Munich3
{
public string ClassName { get { return "DataEntryForm-3"; } }
public void ResetStaticProperties() { EntryForm.ResetStaticProperties(); }
public IComponent DummyComponent() { return new EntryForm(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryForm(cfg); }
@@ -19,7 +19,7 @@ namespace TBF.BenchControl.DataEntry.Munich3
/// <summary> Number of water meters </summary>
public readonly int WaterMetersCount;
readonly IRegisterReader[] regReaders;
readonly IRegReader[] regReaders;
readonly bool[] disabled;
// To be retrieved after the form closes
@@ -62,7 +62,7 @@ namespace TBF.BenchControl.DataEntry.Munich3
/// Constructor to fill in start states
/// </summary>
/// <param name="waterMetersCount">Number of text boxes for serial numbers</param>
public TestStartEndForm(int waterMetersCount, IRegisterReader[] regReaders, bool[] disabled)
public TestStartEndForm(int waterMetersCount, IRegReader[] regReaders, bool[] disabled)
: this()
{
endStates = false;
@@ -81,7 +81,7 @@ namespace TBF.BenchControl.DataEntry.Munich3
/// Constructor to fill in end states
/// </summary>
/// <param name="waterMetersCount">Number of text boxes for serial numbers</param>
public TestStartEndForm(int waterMetersCount, IRegisterReader[] regReaders, string[] wmStartStateStr, bool[] disabled,
public TestStartEndForm(int waterMetersCount, IRegReader[] regReaders, string[] wmStartStateStr, bool[] disabled,
double refVolume, double errLimLo, double errLimHi)
: this()
{
@@ -0,0 +1,50 @@
///
/// Copyright (c) 2020 Sensus Slovensko a.s.
///
using System;
using TracingDB;
namespace TBF.BenchControl.DataEntry.S620
{
public class BarcodeReceivedEventArgs : EventArgs
{
public string Barcode;
/// <summary>
/// ID of a part in this workstep:
/// 0 undefined
/// 1 reference part
/// 2..99 parts with unique codes
/// 100.. parts with batch numbers
/// </summary>
public int IxPolozky;
public CodeLocation CodeLocation;
public PartError Error;
public BarcodeReceivedEventArgs(string barcode, int ixPolozky, CodeLocation codeLocation)
{
this.Barcode = barcode;
this.IxPolozky = ixPolozky;
this.CodeLocation = codeLocation;
}
public BarcodeReceivedEventArgs(string barcode, int ixPolozky, CodeLocation codeLocation, PartError error)
: this(barcode, ixPolozky, codeLocation)
{
this.Error = error;
}
}
public enum PartError
{
None,
WrongPart, /// S/N or P/N of a part is wrong
FieldEmpty, /// A required field in UI is empty
PrviousRecordMissing, /// Previous record in the tracing DB is missing
BlacklistedPart, /// S/N of a part is on a black list
ValueOutOfRange, /// Measured value is out of range
UnspecifiedError, /// Other unspecified error
Count
}
}
@@ -0,0 +1,26 @@
///
/// Copyright (c) 2020 Sensus Slovensko a.s.
///
using System;
namespace TBF.BenchControl.DataEntry.S620
{
public class BodySerNrResult
{
public string BodyNr;
public int SerialNr;
public int Result;
public BodySerNrResult(string bodyNr, int serialNr, int result)
{
BodyNr = bodyNr;
SerialNr = serialNr;
Result = result;
}
public override string ToString()
{
return string.Format("{0}-{1}-{2}", BodyNr, SerialNr, Result);
}
}
}
@@ -0,0 +1,127 @@
namespace TBF.BenchControl.DataEntry.S620.CheckItems
{
partial class Barcode
{
/// <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.kodMaterialuLabel = new System.Windows.Forms.Label();
this.scannedCodeTextBox = new System.Windows.Forms.TextBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.setFocusButton = new System.Windows.Forms.Button();
this.descriptionMaterialuLabel = new System.Windows.Forms.Label();
this.blackListLabel = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// kodMaterialuLabel
//
this.kodMaterialuLabel.AutoSize = true;
this.kodMaterialuLabel.Location = new System.Drawing.Point(42, -5);
this.kodMaterialuLabel.Name = "kodMaterialuLabel";
this.kodMaterialuLabel.Size = new System.Drawing.Size(122, 24);
this.kodMaterialuLabel.TabIndex = 1;
this.kodMaterialuLabel.Text = "kod materialu";
//
// scannedCodeTextBox
//
this.scannedCodeTextBox.Location = new System.Drawing.Point(239, 3);
this.scannedCodeTextBox.Name = "scannedCodeTextBox";
this.scannedCodeTextBox.Size = new System.Drawing.Size(240, 29);
this.scannedCodeTextBox.TabIndex = 3;
this.scannedCodeTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.scannedCodeTextBox_KeyPress);
//
// pictureBox1
//
this.pictureBox1.Image = TBF.Properties.Resources.Barcode;
this.pictureBox1.InitialImage = null;
this.pictureBox1.Location = new System.Drawing.Point(499, 1);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(32, 32);
this.pictureBox1.TabIndex = 2;
this.pictureBox1.TabStop = false;
//
// setFocusButton
//
this.setFocusButton.Location = new System.Drawing.Point(2, 1);
this.setFocusButton.Name = "setFocusButton";
this.setFocusButton.Size = new System.Drawing.Size(32, 32);
this.setFocusButton.TabIndex = 0;
this.setFocusButton.UseVisualStyleBackColor = true;
this.setFocusButton.Click += new System.EventHandler(this.setFocusButton_Click);
//
// descriptionMaterialuLabel
//
this.descriptionMaterialuLabel.AutoSize = true;
this.descriptionMaterialuLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.descriptionMaterialuLabel.Location = new System.Drawing.Point(43, 25);
this.descriptionMaterialuLabel.Name = "descriptionMaterialuLabel";
this.descriptionMaterialuLabel.Size = new System.Drawing.Size(71, 13);
this.descriptionMaterialuLabel.TabIndex = 2;
this.descriptionMaterialuLabel.Text = "opis materialu";
//
// blackListLabel
//
this.blackListLabel.AutoSize = true;
this.blackListLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.blackListLabel.ForeColor = System.Drawing.Color.Red;
this.blackListLabel.Location = new System.Drawing.Point(480, 5);
this.blackListLabel.Name = "blackListLabel";
this.blackListLabel.Size = new System.Drawing.Size(19, 25);
this.blackListLabel.TabIndex = 4;
this.blackListLabel.Text = "!";
this.blackListLabel.Visible = false;
//
// Polozka
//
this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 24F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.blackListLabel);
this.Controls.Add(this.descriptionMaterialuLabel);
this.Controls.Add(this.setFocusButton);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.scannedCodeTextBox);
this.Controls.Add(this.kodMaterialuLabel);
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.Margin = new System.Windows.Forms.Padding(6);
this.Name = "Polozka";
this.Size = new System.Drawing.Size(547, 36);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label kodMaterialuLabel;
private System.Windows.Forms.TextBox scannedCodeTextBox;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Button setFocusButton;
private System.Windows.Forms.Label descriptionMaterialuLabel;
private System.Windows.Forms.Label blackListLabel;
}
}
@@ -0,0 +1,141 @@
///
/// Copyright (c) 2020 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Windows.Forms;
using TracingDB;
using TracingDB.Entities;
namespace TBF.BenchControl.DataEntry.S620.CheckItems
{
public partial class Barcode : UserControl, ICheckItem
{
public override string ToString()
{
return string.Format(": {0} {1}({2})", IxPolozky, Part.Name, string.IsNullOrEmpty(Part.OraDBType) ? string.Empty : Part.OraDBType);
}
FormForMechanicalMetersWithTracing parent;
public Part Part { get { return part; } }
Part part;
public int IxPolozky
{
get { return ixPolozky; }
set { ixPolozky = value; }
}
int ixPolozky;
public string ScannedCode
{
get { return scannedCodeTextBox.Text; }
set { scannedCodeTextBox.Text = value; }
}
Barcode()
{
InitializeComponent();
}
public Barcode(FormForMechanicalMetersWithTracing parent, Part part)
: this()
{
this.parent = parent;
this.part = part;
scannedCodeTextBox.Text = (part.DefaultCode != null) ? part.DefaultCode : string.Empty;
kodMaterialuLabel.Text = part.Name;
descriptionMaterialuLabel.Text = part.Description;
if (part.CodeForm == CodeForm.Barcode)
{
try
{
Stream imageStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Pracovisko.Barcode.png");
pictureBox1.Image = new Bitmap(imageStream);
}
catch {}
}
}
public void ClearCode()
{
if (part.CodeType != CodeType.Silicon)
{
scannedCodeTextBox.Text = (part.DefaultCode != null) ? part.DefaultCode : string.Empty;
}
}
public void SubmitCode(string code)
{
scannedCodeTextBox.Text = code;
scannedCodeTextBox_KeyPress(null, new KeyPressEventArgs('\r'));
}
public void ResetFocus()
{
setFocusButton.Text = "";
}
public void SetFocus()
{
ClearCode();
setFocusButton.Text = ">";
scannedCodeTextBox.Focus();
}
private void setFocusButton_Click(object sender, EventArgs e)
{
setFocusButton.Text = ">";
parent.OnFocusPressed(this, new FocusPressedEventArgs(IxPolozky, Part.CodeLocation));
}
private void scannedCodeTextBox_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar != '\r') return;
PartError error = PartError.None;
if (string.IsNullOrEmpty(scannedCodeTextBox.Text))
{
error = PartError.FieldEmpty;
}
else
{
switch (part.CodeType)
{
case CodeType.FlowtubeNr:
if ((scannedCodeTextBox.Text.Length < 3) || !scannedCodeTextBox.Text.Substring(0, 3).Equals(part.Name.Substring(part.Name.Length - 3)))
{
error = PartError.WrongPart;
}
break;
case CodeType.FlowtubeNrLU:
if ((scannedCodeTextBox.Text.Length < part.Name.Length ||
!scannedCodeTextBox.Text.Substring(0, part.Name.Length).Equals(part.Name)))
{
error = PartError.WrongPart;
}
break;
case CodeType.BatchNrContainingPartName:
if (!scannedCodeTextBox.Text.Contains(part.Name))
{
error = PartError.WrongPart;
}
break;
case CodeType.DateMMYY:
break;
}
}
parent.OnBarcodeReceived(this, new BarcodeReceivedEventArgs(scannedCodeTextBox.Text, IxPolozky, Part.CodeLocation, error));
}
}
}
@@ -0,0 +1,128 @@
namespace TBF.BenchControl.DataEntry.S620.CheckItems
{
partial class Keyboard
{
/// <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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Keyboard));
this.kodMaterialuLabel = new System.Windows.Forms.Label();
this.scannedCodeTextBox = new System.Windows.Forms.TextBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.setFocusButton = new System.Windows.Forms.Button();
this.descriptionMaterialuLabel = new System.Windows.Forms.Label();
this.blackListLabel = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// kodMaterialuLabel
//
this.kodMaterialuLabel.AutoSize = true;
this.kodMaterialuLabel.Location = new System.Drawing.Point(42, -5);
this.kodMaterialuLabel.Name = "kodMaterialuLabel";
this.kodMaterialuLabel.Size = new System.Drawing.Size(122, 24);
this.kodMaterialuLabel.TabIndex = 1;
this.kodMaterialuLabel.Text = "kod materialu";
//
// scannedCodeTextBox
//
this.scannedCodeTextBox.Location = new System.Drawing.Point(239, 3);
this.scannedCodeTextBox.Name = "scannedCodeTextBox";
this.scannedCodeTextBox.Size = new System.Drawing.Size(228, 29);
this.scannedCodeTextBox.TabIndex = 3;
this.scannedCodeTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.scannedCodeTextBox_KeyPress);
//
// pictureBox1
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.InitialImage = null;
this.pictureBox1.Location = new System.Drawing.Point(493, -9);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(48, 48);
this.pictureBox1.TabIndex = 2;
this.pictureBox1.TabStop = false;
//
// setFocusButton
//
this.setFocusButton.Location = new System.Drawing.Point(2, 1);
this.setFocusButton.Name = "setFocusButton";
this.setFocusButton.Size = new System.Drawing.Size(32, 32);
this.setFocusButton.TabIndex = 0;
this.setFocusButton.UseVisualStyleBackColor = true;
this.setFocusButton.Click += new System.EventHandler(this.setFocusButton_Click);
//
// descriptionMaterialuLabel
//
this.descriptionMaterialuLabel.AutoSize = true;
this.descriptionMaterialuLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.descriptionMaterialuLabel.Location = new System.Drawing.Point(43, 25);
this.descriptionMaterialuLabel.Name = "descriptionMaterialuLabel";
this.descriptionMaterialuLabel.Size = new System.Drawing.Size(71, 13);
this.descriptionMaterialuLabel.TabIndex = 2;
this.descriptionMaterialuLabel.Text = "opis materialu";
//
// blackListLabel
//
this.blackListLabel.AutoSize = true;
this.blackListLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.blackListLabel.ForeColor = System.Drawing.Color.Red;
this.blackListLabel.Location = new System.Drawing.Point(470, 5);
this.blackListLabel.Name = "blackListLabel";
this.blackListLabel.Size = new System.Drawing.Size(19, 25);
this.blackListLabel.TabIndex = 5;
this.blackListLabel.Text = "!";
this.blackListLabel.Visible = false;
//
// PolozkaKbd
//
this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 24F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.blackListLabel);
this.Controls.Add(this.descriptionMaterialuLabel);
this.Controls.Add(this.setFocusButton);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.scannedCodeTextBox);
this.Controls.Add(this.kodMaterialuLabel);
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.Margin = new System.Windows.Forms.Padding(6);
this.Name = "PolozkaKbd";
this.Size = new System.Drawing.Size(547, 36);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label kodMaterialuLabel;
private System.Windows.Forms.TextBox scannedCodeTextBox;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Button setFocusButton;
private System.Windows.Forms.Label descriptionMaterialuLabel;
private System.Windows.Forms.Label blackListLabel;
}
}

Some files were not shown because too many files have changed in this diff Show More