Compare commits

...
Author SHA1 Message Date
michal 4fa462661c Merge remote-tracking branch 'remotes/private-origin/develop/SLM-PT50' into develop/Goeteborg 2026-03-16 13:11:34 +01:00
michal 2b30d0cf34 packages add/clean up 2026-03-13 13:51:42 +01:00
michal df2c56e6c4 FIX NaN - devide by zero
Add simulation logic to `StandingStartStopTestOp` and handle zero `TestTime` edge cases in `FlyingStartMassCollectionSeq`
2026-03-12 16:25:26 +01:00
michal a997c3d7be iPerl ASIC - implementation 2026-03-12 14:50:47 +01:00
marekf 3c964f2aab BugFix - repair test RegisterReader deserialize - FSMC method as in SSMC 2026-03-09 14:37:51 +01:00
marekf c445b3e098 BugFix - after applying the transition valve 40% in procedure-purge begin, the RegValve was not regulating correctly after starting the test 2026-03-09 14:20:37 +01:00
marekf 2ea2a2592e Merge branch 'feature/task_6-add-new-admins' into develop/SLM-PT50 2026-03-04 19:14:22 +01:00
marekf 27072598cd Merge branch 'feature/task_5-new-app-icon' into develop/SLM-PT50 2026-03-04 19:14:02 +01:00
marekf 4a2d4772d7 Add new icon to forms of application 2026-03-04 18:48:46 +01:00
marekf 2bf00606d3 Merge branch 'feature/task_4-ListView-ListBox-navigation' into develop/SLM-PT50 2026-03-04 18:42:25 +01:00
marekf 3773e1d96c Merge branch 'feature/task_3-new-pump-grundfoss' into develop/SLM-PT50 2026-03-04 18:42:15 +01:00
marekf 19ddc753c7 Merge branch 'feature/task_2-dripping-on-the-scale-meassure-mass' into develop/SLM-PT50 2026-03-04 18:33:20 +01:00
marekf 4bfd5c8e11 Update output printer OnePerMeter - 1. printer configuration in PrintResultsSelectionDlg, 2. document preview, 3. edit document name, 4. enable more save destinations 2026-03-04 13:21:45 +01:00
marekf f0fb70e38b Add new type of pump - Grundfoss 2026-03-04 11:54:39 +01:00
marekf 6e5bcafec0 Update dripping on the scale and measuring the start mass 2026-03-04 10:37:35 +01:00
marekf d5cb18c910 Fixed incorrect loading of RegisterReader in the StandingStartMassCollection method, when the RR Units and RR Quantity variables in results were filled with only string.empty 2026-03-04 09:44:42 +01:00
marekf 3a2069b255 Refactor variable naming in results in response to mass meter pulse processing 2026-03-04 09:42:55 +01:00
marekf 80c651dbfd Add search and navigation as UI>shared for ListBox-es and ListView-s to components listview, components listbox, procedure listview 2026-02-25 13:22:56 +01:00
marekf 5a3b9b57c4 Add new admins marek and michal 2026-02-25 10:02:09 +01:00
marekf ead350eef3 Add initial MassMeter implementation 2026-02-19 19:22:02 +01:00
marekf b43657a4db Initial import from local copy 2026-02-19 12:02:07 +01:00
michal 8fffb9e366 Update clean.bat to remove build artifacts for AppDiagnostic, NfcC7_DLL, NfcC7_DLL.Tests, and TBFTests 2026-01-23 11:04:23 +01:00
michal 0fdd229141 Refactor IPerlImplHeadTestCtrl to use descriptive enums for operations, update command mappings, introduce IPerlASICCorrections, and improve test configuration checks and NFC handling. 2026-01-23 10:51:47 +01:00
michal 2f1ada3f5b Add DiagnosticLedState classes for States #4-#7, enums for PipeStatus and SpikeDetectionStatus, and implement TouchReadProtocol commands, frames, and builders. 2026-01-19 08:10:36 +01:00
michal 988a8c6642 Update NuGetToolVersion to 7.0.0 in SharedComponents project configuration 2025-12-07 11:27:17 +01:00
michal 42ee9eaee3 Poseidon - Flying - Opto communication
Enhance `FlyingStartMassCollectionSeq` with Poseidon reader support, detailed error handling, and improved test data processing.
2025-12-07 11:27:00 +01:00
michal 3f28051d79 Update .gitignore to exclude NfcC7_DLL.Tests build artifacts 2025-12-07 10:59:19 +01:00
michal 65f13cc868 Add UNIHeadTestCtrl interface and implement IperlHeadTestCtrl with command handling logic. 2025-12-06 12:51:51 +01:00
michal cd8ba3cda3 Add System.Threading 4.3.0 package with support for multiple frameworks and localized XML documentation. 2025-12-06 12:49:58 +01:00
michal a5936c8f19 Fix standing start Store Data
Refactor to use `ICommonRegReader` in `StandingStartSeq` and update parameter handling in `SmartCommunicationSeq`.
2025-12-06 12:48:42 +01:00
michal 2842425673 Add simulation logic for test operations and water metrology, enhance UI initialization, and implement optohead flow rate handling.
- Introduced simulation timers in `FlyingStartStopTestOp`.
- Added `Simulate` methods in `WaterMetrologyData`, `WaterMetrologyDataC7`, and `WaterMetrologyDataC2`.
- Enhanced `SmartCommunicationForm` with textbox resizing logic and initialization code.
- Implemented flow rate and volume calculation from optohead telemetry in `SmartReader`.
- Added unit tests for Poseidon correction parsing.
2025-12-06 12:46:12 +01:00
michal 06a401a1ff bugFix - Morrisville - SerialNr, WMBegginValue
Add support for `ICommonRegReader` interface, enhance `ISmartReader` functionality, and update water meter state handling logic across multiple classes.
2025-11-21 14:14:23 +01:00
michal 3a2fc50fec PurchaseOrderDialog logger Improvement - WRCSwindon
Add detailed logging for purchase order workflows in `CycleBeginningForm`

- Introduced `log_selected` for enhanced debugging of selected orders, items, and serial numbers.
- Added exception handling and logging for serial number loading.
- Improved visibility into runtime behavior with contextual debug and error logs.
2025-11-21 14:12:12 +01:00
michal 38a58ed8b7 Scale rainnig solution, see:
Inplementing mass collection update.
Update AssemblyVersion to 3.9.2149.4, refactor mass collection sequence in StandingStartMassCollection, extend PoseidonCmd with enhanced configuration and dialog options, and improve task handling and UI automation.
2025-11-19 16:44:21 +01:00
michal c7cba20de0 Add ReadStableMassOp unit test and enhance MettlerToledo Scale support
- Introduced `ReadStableMassOpTest` to validate mass reading operations.
- Refactored `Scale` to support `ISerialPort` for improved testability.
- Added `SerialPortDevice` and `SerialPortDeviceFake` implementations, with `GetComponent` overload in `Factory`.
- Enhanced `StateMachine` with `InitializeBoardEtc_Fake` for custom setups.
- Updated project files to include new classes.
2025-11-19 16:28:23 +01:00
michal 6311df49c3 Inplementing mass collection update.
Update AssemblyVersion to 3.9.2149.4, refactor mass collection sequence in StandingStartMassCollection, extend PoseidonCmd with enhanced configuration and dialog options, and improve task handling and UI automation.
2025-11-18 10:59:21 +01:00
michal f1d32a39ba ver 3.9.2149.2 ReadPulses added in Run()
Update AssemblyVersion to 3.9.2149.2 and enhance PoseidonReader with new timing and task-tracking functionality.
2025-11-13 15:58:09 +01:00
michal 224b53f774 Ver 3.9.2149.1 - Update AssemblyVersion and AssemblyFileVersion 2025-11-13 14:39:07 +01:00
michal 1e2777c5e7 Enable ShowDialog for PoseidonCmd, add UI improvements in TestStartEndForm, and introduce new methods for handling reader data and controls. 2025-11-13 14:21:23 +01:00
michal c3c21649fb new Test method Poseidon => StandingStartMassCollectionPoseidon
Add support for `StandingStartMassCollectionPoseidon` test methods.

- Introduced `Compound`, `HeatMeters`, and `Single` components for `StandingStartMassCollectionPoseidon`.
- Included factories, configuration classes, and test parameters for new test methods.
- Updated `TBF.csproj` to include new files and resources.
2025-11-12 13:42:19 +01:00
michal 99ccabc142 Smart meters support MainWnd dialog (must be finished - mouse right click), test supports Poseidon RegisterReader
Refactor `ISmartReader` and related classes to support `SmartHeadsUni`. Remove redundant `IperlHeadsUni` references and introduce `SmartMeterFlyingStartMassCollection` functionality. Enhance regex-based head position extraction.
2025-11-12 12:34:29 +01:00
michal f1e6e94450 work backup
- Register Reader Poseidon works
- Smart Form - wrong functionality
- refactoring
2025-11-06 14:11:13 +01:00
michal 320cddb177 compatible version to TBF
Refactor `NfcHanler` namespace to `NfcHandler` and enhance code consistency.
2025-10-29 16:05:21 +01:00
michal 42002e3fa4 iPerl Fixes 2025-10-27 11:49:42 +01:00
michal 77cabfd712 bugfix Parallel CLI Runner 2025-10-27 11:48:22 +01:00
michal c933e2d759 test disabled 2025-10-27 11:47:38 +01:00
michal f3f0a46627 improvemnet, Sensus Developer super user added 2025-10-27 11:46:56 +01:00
michal b5fb4c2947 improvemnet, Sensus Developer super user added 2025-10-27 11:46:34 +01:00
michal f6cce9df3c bugfix Parallel CLI Runner
Additional needed classes
2025-10-27 11:42:12 +01:00
michal c0385c0782 bugfix Parallel CLI Runner
Add parallel execution tests and improve cancellation handling in `CliRunner`

- Introduced new tests (`RunMultipleTimesTestProgram_CheckParalelWork` and `RunMultipleTimesTestProgram_CheckParalelWorkCumulative`) to verify parallel execution behavior.
- Enhanced `SendAsync` and `RunAndCaptureJsonAsync` methods in `CliRunner` with `CancellationToken` support for better task cancellation.
- Refactored process output handling for improved clarity and robustness.
- Added error handling during CLI logger initialization.
2025-10-27 11:38:43 +01:00
michal db43bdb652 FlowMeter improvement
Add `FromDescription` check in `ParseFlowUnit` for better unit parsing
2025-10-27 11:29:58 +01:00
michal 6bdc10f4a7 Merge branch 'master-3' into feature/SmartMeters 2025-10-22 14:37:04 +02:00
michal 9692dc7f4f HeatMeter - columns exchange
Update `ProcedureDlg` to fix `MetersPath` ordering and version bump to 3.9.2149.0
2025-10-22 12:18:01 +02:00
michal 6795793858 Update iPerlReaderUNI configuration handling and validation
- Replace `PoseidonReader.IPerlCfgCtrl` with `RegisterReaders.iPerlReaderUNI.IPerlUniCfgCtrl` for proper configuration control.
- Add null-check and error handling in `ComponentsManagerDlg` to ensure valid default configurations.
- Mark `ITestParams` as `[XmlIgnore]` in `IPerl` configurations to avoid serialization issues.
- Minor import adjustments and functionality improvements for TestMethod classes.
2025-10-21 10:06:29 +02:00
michal a2c564d789 polishing - work now 2025-10-18 09:59:07 +02:00
michal 3bc9e731e8 Move iPerlReaderUNI.communication components to CommonRR.IPerl.communication and rename associated classes for clarity and consistency. 2025-10-14 14:20:26 +02:00
michal 95c5f09238 Working NfcC7_DLL, tests, clean up
"Remove unused NfcHanler classes and utilities"

This commit deletes several obsolete and unused files from the NfcHanler directory, including utility classes, enums, and a large command handling class. This cleanup improves code maintainability by eliminating unnecessary dependencies and clutter.
2025-10-14 13:15:31 +02:00
michal 0a45d66c0b Add SerialFirmwareDownloadTask to NfcC7_DLL for firmware upgrade handling 2025-10-09 11:01:08 +02:00
michal 96408eaef3 Merge branch 'master-3' into feature/SmartMeters
# Conflicts:
#	NfcC7_DLL/Properties/AssemblyInfo.cs
2025-10-06 11:16:36 +02:00
michal cae3ca7cdf HEAT_METERS enabled 2025-10-03 09:59:44 +02:00
michal c8adc093e0 NfcC7_DLL bug fix 2025-10-02 13:34:29 +02:00
michal 4395516216 test project 2025-10-02 13:30:59 +02:00
michal 9281b52464 Poseidon DLL - Comunication Implementation - not finall 2025-10-02 13:28:37 +02:00
michal 6571de7c32 Add NfcC7_DLL project with initial implementation and solution integration 2025-09-29 09:58:09 +02:00
michal a75d66e028 Merge branch 'refs/heads/master-3' into feature/SmartMeters
# Conflicts:
#	TBF.sln.DotSettings.user
2025-09-27 10:27:40 +02:00
michal 97eed27458 Update .DotSettings.user to include Nullable<T>.cs in force-included files. 2025-09-26 14:18:19 +02:00
michal fe08550dc3 iPerlReaderUNI.Factory => TBF components 2025-09-25 16:24:10 +02:00
michal 8a0ae8080f refactor - completisation Smart Meter <= iPerl 2025-09-24 11:57:47 +02:00
michal ab4025e55f Add ISmartTestMethod interface and initial designer file for iPerlCommunicationForm in SharedDialogs 2025-09-23 11:14:04 +02:00
michal 22fffe602c iPerl Reader - NOT FINISHED
Add initial implementation for `iPerlReaderUNI` with `Factory`, `ProcParams`, and `IPerlReader` classes.
2025-09-23 11:10:55 +02:00
739 changed files with 174783 additions and 174086 deletions
+4
View File
@@ -32,6 +32,10 @@ LabelPrinting/bin/
LabelPrinting/obj/ LabelPrinting/obj/
MergeResultsDBs/bin/ MergeResultsDBs/bin/
MergeResultsDBs/obj/ MergeResultsDBs/obj/
NfcC7_Dll/bin/
NfcC7_Dll/obj/
NfcC7_DLL.Tests/bin/
NfcC7_DLL.Tests/obj/
OrderManagement/bin/ OrderManagement/bin/
OrderManagement/obj/ OrderManagement/obj/
ProductionTracing/bin/ ProductionTracing/bin/
+4
View File
@@ -76,6 +76,7 @@
<Compile Include="Properties\Resources.Designer.cs"> <Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon> <DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile> </Compile>
<None Include="packages.config" /> <None Include="packages.config" />
<None Include="Properties\Settings.settings"> <None Include="Properties\Settings.settings">
@@ -97,5 +98,8 @@
<Name>SharedComponents</Name> <Name>SharedComponents</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="Resources\TBF_icon.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>
+2
View File
@@ -29,6 +29,8 @@ namespace AppDiagnostic
public MainForm() public MainForm()
{ {
this.Icon = Properties.Resources.TBF_icon;
InitializeComponent(); InitializeComponent();
// Inicializujeme LogAdapter a priradíme ho k memoListView // Inicializujeme LogAdapter a priradíme ho k memoListView
+21 -19
View File
@@ -8,8 +8,8 @@
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace AppDiagnostic.Properties namespace AppDiagnostic.Properties {
{ using System;
/// <summary> /// <summary>
@@ -19,31 +19,26 @@ namespace AppDiagnostic.Properties
// class via a tool like ResGen or Visual Studio. // class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen // To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project. // with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources internal class Resources {
{
private static global::System.Resources.ResourceManager resourceMan; private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture; private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() internal Resources() {
{
} }
/// <summary> /// <summary>
/// Returns the cached ResourceManager instance used by this class. /// Returns the cached ResourceManager instance used by this class.
/// </summary> /// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager internal static global::System.Resources.ResourceManager ResourceManager {
{ get {
get if (object.ReferenceEquals(resourceMan, null)) {
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AppDiagnostic.Properties.Resources", typeof(Resources).Assembly); global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AppDiagnostic.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp; resourceMan = temp;
} }
@@ -56,16 +51,23 @@ namespace AppDiagnostic.Properties
/// resource lookups using this strongly typed resource class. /// resource lookups using this strongly typed resource class.
/// </summary> /// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture internal static global::System.Globalization.CultureInfo Culture {
{ get {
get
{
return resourceCulture; return resourceCulture;
} }
set set {
{
resourceCulture = value; resourceCulture = value;
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
internal static System.Drawing.Icon TBF_icon {
get {
object obj = ResourceManager.GetObject("TBF_icon", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
} }
} }
+12 -5
View File
@@ -46,7 +46,7 @@
mimetype: application/x-microsoft.net.object.binary.base64 mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64 mimetype: application/x-microsoft.net.object.soap.base64
@@ -60,6 +60,7 @@
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
--> -->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true"> <xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType> <xsd:complexType>
<xsd:choice maxOccurs="unbounded"> <xsd:choice maxOccurs="unbounded">
@@ -68,9 +69,10 @@
<xsd:sequence> <xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" /> <xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="name" type="xsd:string" /> <xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" /> <xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" /> <xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
<xsd:element name="assembly"> <xsd:element name="assembly">
@@ -85,9 +87,10 @@
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
<xsd:element name="resheader"> <xsd:element name="resheader">
@@ -109,9 +112,13 @@
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="TBF_icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\TBF_icon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root> </root>
Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

+21 -2
View File
@@ -4,6 +4,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection; using System.Reflection;
using System.Runtime.InteropServices;
namespace Common namespace Common
{ {
@@ -289,11 +290,20 @@ namespace Common
CompoundAux, CompoundAux,
Compound, Compound,
HeatMeterVolume, HeatMeterVolume,
HeatMeterEnergy, HeatMeterMass,//...MF
HeatMeterEnergy,
SingleOrCompound, /// Only used when querying results SingleOrCompound, /// Only used when querying results
} }
public enum Medium public enum PulsesTypeByQuantity : short
{
[Description("dm3")] Volume_dm3,
[Description("kg")] Mass_kg,
Count
}
public enum Medium
{ {
[Description("")] NotSpecified, [Description("")] NotSpecified,
#if LANG_PL #if LANG_PL
@@ -829,6 +839,15 @@ namespace Common
E63 = (1L << 62), E63 = (1L << 62),
} }
//...MF
public enum FlowType : int
{
none,
volume,
mass,
Count,
}
#region iPERL enums #region iPERL enums
public enum Side public enum Side
+67 -2
View File
@@ -33,6 +33,20 @@ namespace Common
[Description("m3/m")] m3pm, /// 1 m3/m = 60 m3/h [Description("m3/m")] m3pm, /// 1 m3/m = 60 m3/h
[Description("cf/s")] cfs, /// 1 cubic foot per second = 101.9406477312 m3/h [Description("cf/s")] cfs, /// 1 cubic foot per second = 101.9406477312 m3/h
[Description("g/s")] gps, /// 1 g/s = 0.0036 t/h
[Description("g/min")] gpm, /// 1 g/min = 0.00006 t/h
[Description("g/h")] gph, /// 1 g/h = 0.000001 t/h
[Description("kg/s")] kgps, /// 1 kg/s = 3.6 t/h
[Description("kg/min")] kgpm, /// 1 kg/min = 0.06 t/h
[Description("kg/h")] kgph, /// 1 kg/h = 0.001 t/h
[Description("t/s")] tps, /// 1 t/s = 3600 t/h
[Description("t/min")] tpm, /// 1 t/min = 60 t/h
[Description("t/h")] tph, /// 1 t/h = 1 t/h
[Description("lb/s")] lbps, /// 1 lb/s ≈ 1.633 t/h
[Description("lb/min")] lbpm, /// 1 lb/min ≈ 0.027216 t/h
[Description("lb/h")] lbph, /// 1 lb/h ≈ 0.0004536 t/h
[Description("g")] g, /// 0.001 kg [Description("g")] g, /// 0.001 kg
[Description("oz")] oz, /// 0.0283495231 kg [Description("oz")] oz, /// 0.0283495231 kg
[Description("lb")] lb, /// 0.45359237 kg [Description("lb")] lb, /// 0.45359237 kg
@@ -221,9 +235,13 @@ namespace Common
[Description("Corrente")] Current, [Description("Corrente")] Current,
[Description("Voltaggio")] Voltage, [Description("Voltaggio")] Voltage,
#else #else
[Description("RegisterReader")] RegisterReader,
[Description("MultiFunctionalVariables")] MultiFunctionalVariables,
[Description("VolumeFlow")] VolumeFlow,
[Description("Volume")] Volume, [Description("Volume")] Volume,
[Description("Flow")] Flow, [Description("Flow")] Flow,
[Description("Mass")] Mass, [Description("MassFlow")] MassFlow,
[Description("Mass")] Mass,
[Description("Time")] Time, [Description("Time")] Time,
[Description("Temperature")] Temperature, [Description("Temperature")] Temperature,
[Description("Pressure")] Pressure, [Description("Pressure")] Pressure,
@@ -234,6 +252,8 @@ namespace Common
[Description("Energy")] Energy, [Description("Energy")] Energy,
[Description("Pulses")] Pulses, [Description("Pulses")] Pulses,
[Description("Pulses/liter")] PulsePerLtr, [Description("Pulses/liter")] PulsePerLtr,
[Description("Pulses/kg")] PulsePerKilogram, //...MF
[Description("Pulses/Unit")] PulsePerUnit,//...MF
[Description("Pulses/kWh")] PulsePerKWh, [Description("Pulses/kWh")] PulsePerKWh,
[Description("Conductivity")] Conductivity, [Description("Conductivity")] Conductivity,
@@ -278,29 +298,72 @@ namespace Common
return Quantity.Pulses; return Quantity.Pulses;
case Unit.ml: case Unit.ml:
return Quantity.Volume;
case Unit.l: case Unit.l:
return Quantity.Volume;
case Unit.dm3: case Unit.dm3:
return Quantity.Volume;
case Unit.USgal: case Unit.USgal:
return Quantity.Volume;
case Unit.UKgal: case Unit.UKgal:
return Quantity.Volume;
case Unit.cf: case Unit.cf:
return Quantity.Volume;
case Unit.m3: case Unit.m3:
return Quantity.Volume; return Quantity.Volume;
case Unit.lph: case Unit.lph:
return Quantity.Flow;
case Unit.cfph: case Unit.cfph:
return Quantity.Flow;
case Unit.lpm: case Unit.lpm:
return Quantity.Flow;
case Unit.USgalpm: case Unit.USgalpm:
return Quantity.Flow;
case Unit.m3ph: case Unit.m3ph:
return Quantity.Flow;
case Unit.lps: case Unit.lps:
return Quantity.Flow;
case Unit.USgalps: case Unit.USgalps:
return Quantity.Flow;
case Unit.m3pm: case Unit.m3pm:
return Quantity.Flow;
case Unit.cfs: case Unit.cfs:
return Quantity.Flow; return Quantity.Flow;
case Unit.gps:
return Quantity.MassFlow;
case Unit.gpm:
return Quantity.MassFlow;
case Unit.gph:
return Quantity.MassFlow;
case Unit.kgps:
return Quantity.MassFlow;
case Unit.kgpm:
return Quantity.MassFlow;
case Unit.kgph:
return Quantity.MassFlow;
case Unit.tps:
return Quantity.MassFlow;
case Unit.tpm:
return Quantity.MassFlow;
case Unit.tph:
return Quantity.MassFlow;
case Unit.lbps:
return Quantity.MassFlow;
case Unit.lbpm:
return Quantity.MassFlow;
case Unit.lbph:
return Quantity.MassFlow;
case Unit.g: case Unit.g:
return Quantity.Mass;
case Unit.oz: case Unit.oz:
return Quantity.Mass;
case Unit.lb: case Unit.lb:
return Quantity.Mass;
case Unit.kg: case Unit.kg:
return Quantity.Mass;
case Unit.t: case Unit.t:
return Quantity.Mass; return Quantity.Mass;
@@ -384,8 +447,10 @@ namespace Common
} }
} }
public static bool IsVolume(Unit unit) { return IsQuantity(unit, Quantity.Volume); } public static bool IsVolumeFlow(Unit unit) { return IsQuantity(unit, Quantity.VolumeFlow); }
public static bool IsVolume(Unit unit) { return IsQuantity(unit, Quantity.Volume); }
public static bool IsFlow(Unit unit) { return IsQuantity(unit, Quantity.Flow); } public static bool IsFlow(Unit unit) { return IsQuantity(unit, Quantity.Flow); }
public static bool IsMassFlow(Unit unit) { return IsQuantity(unit, Quantity.MassFlow); }
public static bool IsMass(Unit unit) { return IsQuantity(unit, Quantity.Mass); } public static bool IsMass(Unit unit) { return IsQuantity(unit, Quantity.Mass); }
public static bool IsTime(Unit unit) { return IsQuantity(unit, Quantity.Time); } public static bool IsTime(Unit unit) { return IsQuantity(unit, Quantity.Time); }
public static bool IsTemperature(Unit unit) { return IsQuantity(unit, Quantity.Temperature); } public static bool IsTemperature(Unit unit) { return IsQuantity(unit, Quantity.Temperature); }
+6 -1
View File
@@ -302,7 +302,7 @@ namespace Common
string passwordOfDay = Convert.ToString(number, 8); string passwordOfDay = Convert.ToString(number, 8);
return (userName.Equals("milan") && password.Equals("kraken")) || return (userName.Equals("milan") && password.Equals("kraken")) ||
(userName.Equals("BuMi") && password.Equals("70630")) || (userName.Equals("bumi") && password.Equals("70630")) ||
(userName.Equals("igor") && password.Equals("mojronko8")) || (userName.Equals("igor") && password.Equals("mojronko8")) ||
(userName.Equals("lubo1212") && password.Equals("Tatry52")) || (userName.Equals("lubo1212") && password.Equals("Tatry52")) ||
(userName.Equals("Michal") && password.Equals("Plok789456123")) || (userName.Equals("Michal") && password.Equals("Plok789456123")) ||
@@ -311,6 +311,11 @@ namespace Common
(userName.Equals("jan") && password.Equals("jaugust")) || (userName.Equals("jan") && password.Equals("jaugust")) ||
(userName.Equals("JCermak") && password.Equals("Zt6911")) || (userName.Equals("JCermak") && password.Equals("Zt6911")) ||
(userName.Equals("gilles") && password.Equals("alibaba")) || (userName.Equals("gilles") && password.Equals("alibaba")) ||
(userName.Equals("michal") && password.Equals("mojnelson8")) ||
(userName.Equals("marek") && password.Equals("mareciino")) ||
#if DEBUG
(userName.Equals("Sensus Developers") && password.Equals("5fbg12gf5hn8nhy1fr")) ||
#endif
(userName.Equals(passwordOfDay) && password.Equals(passwordOfDay)); (userName.Equals(passwordOfDay) && password.Equals(passwordOfDay));
} }
+20
View File
@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="MSTest.TestAdapter" Version="3.10.4" />
<PackageReference Include="MSTest.TestFramework" Version="3.10.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NfcC7_DLL\NfcC7_DLL.csproj" />
</ItemGroup>
</Project>
@@ -0,0 +1,102 @@
using System;
using JetBrains.Annotations;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NfcC7_DLL.NfcHandler;
using NfcC7_DLL.NfcHandler.Protocols;
using NfcC7_DLL.NfcHandler.Utils;
using NfcC7_DLL.NfcHandler;
namespace NfcC7_DLL.Tests.NfcHanler;
[TestClass]
[TestSubject(typeof(NfcHeadService))]
public class NfcHeadServiceTest
{
[TestMethod]
public void SetTestingMode_Optohead_C7_ON_LiveMeterTest()
{
SerialPortData serialPortData = new SerialPortData(
"COM5",
"HatCliDemo.exe",
74);
NfcHeadService service = new NfcHeadService(serialPortData);
OptoHeadStatus status = service.SetTestingMode(OptoHeadStatus.OptoHeadC7);
Assert.AreEqual(OptoHeadStatus.OptoHeadC7, status);
}
[TestMethod]
public void SetTestingMode_Optohead_OFF_LiveMeterTest()
{
SerialPortData serialPortData = new SerialPortData(
"COM5",
"HatCliDemo.exe",
74);
NfcHeadService service = new NfcHeadService(serialPortData);
OptoHeadStatus status = service.SetTestingMode(OptoHeadStatus.OptoHeadDisabled);
Assert.AreEqual(OptoHeadStatus.OptoHeadDisabled, status);
}
[TestMethod]
public void SetTestingMode_LiveMeterTest()
{
SerialPortData serialPortData = new SerialPortData(
"COM5",
"HatCliDemo.exe",
74);
NfcHeadService service = new NfcHeadService(serialPortData);
OptoHeadStatus status = service.SetTestingMode(OptoHeadStatus.OptoHeadC2);
Assert.AreEqual(OptoHeadStatus.OptoHeadC2, status);
status = service.SetTestingMode(OptoHeadStatus.OptoHeadC7);
Assert.AreEqual(OptoHeadStatus.OptoHeadC7, status);
status = service.SetTestingMode(OptoHeadStatus.OptoHeadDisabled);
Assert.AreEqual(OptoHeadStatus.OptoHeadDisabled, status);
}
[TestMethod]
public void GetSerialNr_LiveMeterTest()
{
SerialPortData serialPortData = new SerialPortData(
"COM5",
"HatCliDemo.exe",
74);
NfcHeadService service = new NfcHeadService(serialPortData);
string? serialNr = service.GetSerialNr();
Assert.IsFalse(string.IsNullOrEmpty(serialNr));
Console.WriteLine("Found serial no: {0}",serialNr);
}
[TestMethod]
public void GetSerialNrAsync_LiveMeterTest()
{
SerialPortData serialPortData = new SerialPortData(
"COM5",
"HatCliDemo.exe",
74);
NfcHeadService service = new NfcHeadService(serialPortData);
string? serialNr = service.GetSerialNrAsync().GetAwaiter().GetResult();
Assert.IsFalse(string.IsNullOrEmpty(serialNr));
Console.WriteLine("Found serial no: {0}",serialNr);
}
[TestMethod]
public void GetTestingMode_LiveMeterTest()
{
SerialPortData serialPortData = new SerialPortData(
"COM5",
"HatCliDemo.exe",
74);
NfcHeadService service = new NfcHeadService(serialPortData);
OptoHeadStatus status = service.GetTestingMode();
Assert.IsFalse(OptoHeadStatus.Unknown == status);
}
}
@@ -0,0 +1,70 @@
using JetBrains.Annotations;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NfcC7_DLL.NfcHandler;
using NfcC7_DLL.NfcHandler.Protocols;
using NfcC7_DLL.NfcHandler.Utils;
namespace NfcC7_DLL.Tests.NfcHanler;
[TestClass]
[TestSubject(typeof(OptoHeadService))]
public class OptoHeadServiceTest
{
[TestMethod]
public void RunLoop_Test()
{
//Switch meter to Optohead C7 testing mode
SerialPortData serialPortData = new SerialPortData(
"COM5",
"HatCliDemo.exe",
74);
NfcHeadService service = new NfcHeadService(serialPortData);
OptoHeadStatus status = service.SetTestingMode(OptoHeadStatus.OptoHeadC7);
Assert.AreEqual(OptoHeadStatus.OptoHeadC7, status);
//Open serial connection to Optohead
OptoHeadService.Con con = new OptoHeadService.Con();
con.com = "COM6";
OptoHeadService optoHeadService = new OptoHeadService(con);
Assert.IsTrue(optoHeadService.CreateSerialConnection());
//start loop to receive data
optoHeadService.RunLoop();
WaterMetrologyData lastData = null;
int iCycles = 0, iCyclesMax = 10;
for (int i = 0; i < iCyclesMax; i++)
{
bool finished = false;
while (!finished)
{
//optoHeadService.Run();
if (optoHeadService.WaterMetrologyData != null
&& lastData != optoHeadService.WaterMetrologyData
&& optoHeadService.WaterMetrologyData.OptoHeadStatus != OptoHeadStatus.Unknown)
{
lastData = optoHeadService.WaterMetrologyData;
finished = true;
iCycles++;
if (lastData.OptoHeadStatus.HasFlag(OptoHeadStatus.OptoHeadC7))
{
Assert.IsNotNull(lastData.C7Data);
}
else
{
Assert.IsNotNull(lastData.C2Data);
}
System.Console.WriteLine("Cycle: {0} lastData: {1}", iCycles, lastData);
}
}
}
optoHeadService.CloseSerialConnection();
Assert.IsTrue(iCycles > 0);
Assert.IsTrue(iCycles == iCyclesMax);
//Close Optohead
status = service.SetTestingMode(OptoHeadStatus.OptoHeadDisabled);
Assert.AreEqual(OptoHeadStatus.OptoHeadDisabled, status);
}
}
@@ -0,0 +1,224 @@
using System;
using System.IO.Ports;
using JetBrains.Annotations;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NfcC7_DLL.NfcHandler.Utils;
namespace NfcC7_DLL.Tests.NfcHanler.Utils;
//[TestClass]
[TestSubject(typeof(SERIAL_Driver))]
public class SERIAL_DriverTest
{
private class Con
{
public string com = "COM5";
public int baudrate = 38400;
public int dataBits = 8;
public Parity parity = Parity.None;
public StopBits stopbits = StopBits.Two;
public int readTimeout = 5000;
public int writeTimeout = 1000;
}
private readonly byte[] Open =
{ 0x6B, 0x80, 0x01, 0x10, 0x00, 0x30, 0x00, 0x47, 0x6C, 0x6F, 0x62, 0x61, 0x6C, 0x49, 0x50, 0x65, 0x72,
0x6C, 0x55, 0x74, 0x69, 0x6C, 0x69, 0x74, 0x79, 0x00, 0x00, 0x27, 0xD7 };
private readonly byte[] CommDeviceSessionEnd = { 0x6B, 0x61, 0x00, 0x10, 0x05, 0x31, 0x00, 0x1F, 0x29, 0xF9, 0xC5 };
private readonly byte[] ProductDetails =
{ 0x6B, 0x30, 0x01, 0x10, 0x03, 0x21, 0x01, 0x02, 0x6B, 0x90, 0x00, 0x00, 0x11, 0x40, 0x05, 0x00, 0x02, 0x04, 0x60, 0x62, 0x42, 0x04, 0xA5, 0x64 };
private readonly byte[] ProductDetails2 =
{ 0x6B, 0x30, 0x01, 0x10, 0x03, 0x21, 0x01, 0x02, 0x6B, 0x90, 0x00, 0x00, 0x11, 0x40, 0x05, 0x00, 0x02, 0x04, 0x60 };
static Con con5 = new Con(){
com = "COM5",
baudrate = 38400,
dataBits = 8,
parity = Parity.None,
stopbits = StopBits.Two,
readTimeout = 5000,
writeTimeout = 1000
};
static Con con6 = new Con()
{
com = "COM6",
baudrate = 38400,
dataBits = 8,
parity = Parity.None,
stopbits = StopBits.Two,
readTimeout = 5000,
writeTimeout = 1000
};
//[TestMethod]
public void SendMessage_Test()
{
Con con = con5;
byte[] message = Open;
byte[] bytesReceived;
SERIAL_Driver driver = new SERIAL_Driver();
bool isopen = driver.OpenConnection(
con.com,
con.baudrate,
con.dataBits,
con.parity,
con.stopbits,
con.readTimeout,
con.writeTimeout);
Assert.IsTrue(isopen);
driver.SendMessage(message, message.Length);
//Assert.IsTrue(driver.GetRawData().Length == 0);
bytesReceived = driver.GetRawData();
//Assert.IsTrue(bytesReceived.Length > 0);
Console.WriteLine("IsOpened: {0}", driver.isOpen());
// Display raw bytes (as hex or byte count)
if (bytesReceived != null)
{
Console.WriteLine(string.Format("Bytes received: {0}", bytesReceived.Length));
Console.WriteLine(string.Format("Bytes (hex): {0}", BitConverter.ToString(bytesReceived)));
string response = System.Text.Encoding.UTF8.GetString(bytesReceived);
Console.WriteLine("Bytes string: {0}", response);
}
// --- Get Serial No ---
message = ProductDetails;
// Send Open message
bool sendSuccess = driver.SendMessage(message, message.Length);
Assert.IsTrue(sendSuccess, "Failed to send Open message");
Console.WriteLine("Sent message for product details: {0}", message.ToString());
bytesReceived = driver.GetRawData();
// Display raw bytes (as hex or byte count)
if (bytesReceived != null)
{
Console.WriteLine(string.Format("Bytes received: {0}", bytesReceived.Length));
Console.WriteLine(string.Format("Bytes (hex): {0}", BitConverter.ToString(bytesReceived)));
string response = System.Text.Encoding.UTF8.GetString(bytesReceived);
Console.WriteLine("Bytes string: {0}", response);
}
else
{
Console.WriteLine("Response not received!");
}
message = CommDeviceSessionEnd;
driver.SendMessage(message, message.Length);
driver.Close();
}
//[TestMethod]
public void SendMessage_TestLoop()
{
Con con = con6;
byte[] message = {0x00};
byte[] bytesReceived;
SERIAL_Driver driver = new SERIAL_Driver();
bool isopen = driver.OpenConnection(
con.com,
con.baudrate,
con.dataBits,
con.parity,
con.stopbits,
con.readTimeout,
con.writeTimeout);
Assert.IsTrue(isopen);
for (int iStep = 0; iStep < 100; iStep++)
{
driver.SendMessage(message, message.Length);
//Assert.IsTrue(driver.GetRawData().Length == 0);
bytesReceived = driver.GetRawData();
Assert.IsTrue(bytesReceived.Length > 0);
Console.WriteLine("IsOpened: {0}", driver.isOpen());
// Display raw bytes (as hex or byte count)
Console.WriteLine(string.Format("Bytes received: {0}", bytesReceived.Length));
Console.WriteLine(string.Format("Bytes (hex): {0}", BitConverter.ToString(bytesReceived)));
string response = System.Text.Encoding.UTF8.GetString(bytesReceived);
Console.WriteLine("Bytes string: {0}", response);
}
//message = CommDeviceSessionEnd;
//driver.SendMessage(message, message.Length);
driver.CloseConnection();
}
//[TestMethod]
public void SendMessage_TestGetSerialNo()
{
Con con = con6;
byte[] message = Open;
byte[] bytesReceived;
SERIAL_Driver driver = new SERIAL_Driver();
bool isopen = driver.OpenConnection(
con.com,
con.baudrate,
con.dataBits,
con.parity,
con.stopbits,
con.readTimeout,
con.writeTimeout);
Assert.IsTrue(isopen);
driver.SendMessage(message, message.Length,con.readTimeout);
//Assert.IsTrue(driver.GetRawData().Length == 0);
bytesReceived = driver.GetRawData();
Assert.IsTrue(bytesReceived.Length > 0);
if (bytesReceived[0] == 0xFF)
Console.WriteLine("Error message: {0}", driver.ErrorMessage);
// Display raw bytes (as hex or byte count)
Console.WriteLine("IsOpened: {0}", driver.isOpen());
Console.WriteLine(string.Format("Bytes received: {0}", bytesReceived.Length));
Console.WriteLine(string.Format("Bytes (hex): {0}", BitConverter.ToString(bytesReceived)));
string response = System.Text.Encoding.UTF8.GetString(bytesReceived);
Console.WriteLine("Bytes string: {0}",response);
// --- Get Serial No ---
message = ProductDetails;
driver.SendMessage(message, message.Length,con.readTimeout);
bytesReceived = driver.GetRawData();
Assert.IsTrue(bytesReceived.Length > 0);
if (bytesReceived[0] == 0xFF)
Console.WriteLine("Error message: {0}", driver.ErrorMessage);
// Display raw bytes (as hex or byte count)
Console.WriteLine("IsOpened: {0}", driver.isOpen());
Console.WriteLine(string.Format("Bytes received: {0}", bytesReceived.Length));
Console.WriteLine(string.Format("Bytes (hex): {0}", BitConverter.ToString(bytesReceived)));
response = System.Text.Encoding.UTF8.GetString(bytesReceived);
Console.WriteLine("Bytes string: {0}",response);
// --- Get Serial No ---
message = ProductDetails2;
driver.SendMessage(message, message.Length,con.readTimeout);
bytesReceived = driver.GetRawData();
Assert.IsTrue(bytesReceived.Length > 0);
if (bytesReceived[0] == 0xFF)
Console.WriteLine("Error message: {0}", driver.ErrorMessage);
// Display raw bytes (as hex or byte count)
Console.WriteLine("IsOpened: {0}", driver.isOpen());
Console.WriteLine(string.Format("Bytes received: {0}", bytesReceived.Length));
Console.WriteLine(string.Format("Bytes (hex): {0}", BitConverter.ToString(bytesReceived)));
response = System.Text.Encoding.UTF8.GetString(bytesReceived);
Console.WriteLine("Bytes string: {0}",response);
message = CommDeviceSessionEnd;
driver.SendMessage(message, message.Length);
driver.Close();
}
}
+57
View File
@@ -0,0 +1,57 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ImplicitUsings>false</ImplicitUsings>
<Nullable>disable</Nullable>
<Copyright>Copyright © 2025</Copyright>
<AssemblyVersion>1.1.0.0</AssemblyVersion>
<FileVersion>1.1.0.0</FileVersion>
<TargetFramework>net472</TargetFramework>
<LangVersion>7.3</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DefineConstants>TRACE;IPERL;</DefineConstants>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
<DebugType>full</DebugType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>TRACE;IPERL;</DefineConstants>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
<DebugType>pdbonly</DebugType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
<PackageReference Include="System.IO.Ports" Version="10.0.0-rc.1.25451.107" />
<PackageReference Include="System.Security.Cryptography.Cng" Version="5.0.0" />
<PackageReference Include="System.Threading" Version="4.3.0" />
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.Build.Utilities.v4.0" />
<Reference Include="NA2WNFC">
<HintPath>NfcHanler\NfcReaderLibrary\NA2WNFC.dll</HintPath>
</Reference>
<Reference Include="OBIDISC4NET">
<HintPath>NfcHanler\NfcReaderLibrary\OBIDISC4NET.dll</HintPath>
</Reference>
<Reference Include="OBIDISC4NETnative">
<HintPath>NfcHanler\NfcReaderLibrary\OBIDISC4NETnative.dll</HintPath>
</Reference>
<Reference Include="OBIDISC4NET_API">
<HintPath>NfcHanler\NfcReaderLibrary\OBIDISC4NET_API.dll</HintPath>
</Reference>
<Reference Include="PresentationCore">
<HintPath>..\..\..\..\..\Windows\Microsoft.NET\assembly\GAC_32\PresentationCore\v4.0_4.0.0.0__31bf3856ad364e35\PresentationCore.dll</HintPath>
</Reference>
<Reference Include="PresentationFramework">
<HintPath>..\..\..\..\..\Windows\Microsoft.NET\assembly\GAC_MSIL\PresentationFramework\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.dll</HintPath>
</Reference>
<Reference Include="Sensus">
<HintPath>NfcHanler\FieldLogicLibrary\Sensus.dll</HintPath>
</Reference>
</ItemGroup>
</Project>
+11
View File
@@ -0,0 +1,11 @@
using NfcC7_DLL.NfcHandler.Protocols;
namespace NfcC7_DLL.NfcHandler
{
public class HeadInfo
{
string SerialNr { get; set; }
OptoHeadStatus OptoHeadStatus { get; set; }
}
}
@@ -0,0 +1,22 @@
namespace NfcC7_DLL.NfcHandler
{
public class JsonDataFromPoseidon
{
public bool? NfcTagDetected { get; set; }
public int? ProductType { get; set; }
public string ProductTypeVersion { get; set; }
public string DeviceId { get; set; }
public string Reading { get; set; }
public string Reading_Totalizer { get; set; }
public string Reading_Digits { get; set; }
public string Reading_Shift { get; set; }
public string Reading_Resolution { get; set; }
public string Reading_Units { get; set; }
public string Reading_FlowDirection { get; set; }
public string Reading_FlowRate { get; set; }
public string CalibrationFactor { get; set; }
public bool? ReadingComplete { get; set; }
}
}
+247
View File
@@ -0,0 +1,247 @@
using System;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using NfcC7_DLL.NfcHandler.Protocols;
using NfcC7_DLL.NfcHandler.Utils;
namespace NfcC7_DLL.NfcHandler
{
public class NfcHeadService
{
private bool activeHandlerSessioEnabled = false;
private CliRunner _cliRunner;
private SerialPortData serialPort;
public NfcHeadService(SerialPortData serialPort)
{
this.serialPort = serialPort;
this._cliRunner = null;
ValidateCliFileExistence(true);
}
private CliRunner CliRunner
{
get { return (_cliRunner != null ? _cliRunner : (_cliRunner = new CliRunner(CliLogging))); }
}
private bool CliLogging
{
get { return false; }
}
private static readonly Regex OpticalDataModeRegex = new Regex(
@"(?im)(?:" +
@"^\s*OpticalDataMode\s*Id\s*:\s*([^\r\n]+)\s*$" + // old format
@"|" +
@"""OpticalDataMode""\s*:\s*""?(0x[0-9A-Fa-f]+|\d+)""?" + // JSON format (handles hex and decimal)
@")",
RegexOptions.Compiled);
public bool TryGetOpticalDataMode(string result, out string s)
{
s = null;
if (string.IsNullOrEmpty(result))
return false;
var m = OpticalDataModeRegex.Match(result);
if (!m.Success)
return false;
// one of the groups will be filled
s = !string.IsNullOrEmpty(m.Groups[1].Value)
? m.Groups[1].Value.Trim()
: m.Groups[2].Value.Trim();
return true;
}
private static readonly Regex DeviceIdRegex = new Regex(
@"(?im)(?:" +
@"^\s*Device\s*Id\s*:\s*([^\r\n]+)\s*$" + // old format
@"|" +
@"""DeviceId""\s*:\s*""?([0-9]+)""?" + // JSON format
@")",
RegexOptions.Compiled);
public bool TryGetDeviceId(string result, out string s)
{
s = null;
if (string.IsNullOrEmpty(result))
return false;
var m = DeviceIdRegex.Match(result);
if (!m.Success)
return false;
// one of the groups will be filled
s = !string.IsNullOrEmpty(m.Groups[1].Value)
? m.Groups[1].Value.Trim()
: m.Groups[2].Value.Trim();
return true;
}
private void ValidateCliFileExistence(bool showErrorIfMissing)
{
if (serialPort != null)
{
if (!serialPort.CliExists)
{
throw new Exception("CLI file " + serialPort.SerialPortCmdClientPath +
" does not exist! Current path: " + Environment.CurrentDirectory);
}
}
}
/// <summary>
/// ////////////
/// </summary>
public string GetSerialNr()
{
if (serialPort == null)
throw new Exception("Serial port not initialized");
Task optoheadDeviceIdTask = CliRunner.AddSendAsync(serialPort, SerialPortData.EMeterArg.DeviceId);
var timeOut = CliRunner.AddTimeOut(5000);
var doneTask = CliRunner.WaitAnyFinished(optoheadDeviceIdTask, timeOut);
if (timeOut == doneTask)
{
throw new Exception("Timeout");
}
else
{
if (optoheadDeviceIdTask is Task<string>)
{
string serialNr;
if (optoheadDeviceIdTask.Status == TaskStatus.Faulted)
throw new Exception("Error TaskStatus.Faulted");
string result = (optoheadDeviceIdTask as Task<string>).Result;
if (TryGetDeviceId(result, out serialNr))
{
return serialNr;
}
}
}
return null;
}
public async Task<string> GetSerialNrAsync()
{
if (serialPort == null)
throw new Exception("Serial port not initialized");
var cts = new CancellationTokenSource(); // we own the token
var sendTask = CliRunner.AddSendAsync(serialPort, SerialPortData.EMeterArg.DeviceId, cts.Token);
string output;
try
{
output = await CliRunner.WithTimeout(sendTask, TimeSpan.FromSeconds(15), cts);
}
catch (TimeoutException)
{
throw new Exception("Timeout");
}
if (TryGetDeviceId(output, out var serialNr))
return serialNr;
throw new Exception("Failed to parse DeviceId from output.");
}
public OptoHeadStatus SetTestingMode(OptoHeadStatus status)
{
if (serialPort == null)
throw new Exception("Serial port not initialized");
Task optoheadMode =
CliRunner.AddSendAsync(serialPort, SerialPortData.EMeterArg.Optohead, $"0x{((byte)status):X2}");
var timeOut = CliRunner.AddTimeOut(5000);
var doneTask = CliRunner.WhenAny();
if (timeOut == doneTask)
{
throw new Exception("Timeout");
}
else
{
if (optoheadMode is Task<string>)
{
string strOpticalDataMode;
if (optoheadMode.Status == TaskStatus.Faulted)
throw new Exception("Error TaskStatus.Faulted");
string result = (optoheadMode as Task<string>).Result;
if (TryGetOpticalDataMode(result, out strOpticalDataMode))
{
byte value;
if (strOpticalDataMode.StartsWith("0x", StringComparison.OrdinalIgnoreCase))
value = Convert.ToByte(strOpticalDataMode, 16); // interpret as hex
else
value = Convert.ToByte(strOpticalDataMode); // interpret as decimal
OptoHeadStatus optoheadStatus = (OptoHeadStatus)value;
return optoheadStatus;
}
}
}
return OptoHeadStatus.Unknown;
}
public OptoHeadStatus GetTestingMode()
{
if (serialPort == null)
throw new Exception("Serial port not initialized");
Task optoheadMode = CliRunner.AddSendAsync(serialPort, SerialPortData.EMeterArg.Optohead);
var timeOut = CliRunner.AddTimeOut(5000);
var doneTask = CliRunner.WhenAny();
if (timeOut == doneTask)
{
throw new Exception("Timeout");
}
else
{
if (optoheadMode is Task<string>)
{
string strOpticalDataMode;
if (optoheadMode.Status == TaskStatus.Faulted)
throw new Exception("Error TaskStatus.Faulted");
string result = (optoheadMode as Task<string>).Result;
if (TryGetOpticalDataMode(result, out strOpticalDataMode))
{
byte value;
if (strOpticalDataMode.StartsWith("0x", StringComparison.OrdinalIgnoreCase))
value = Convert.ToByte(strOpticalDataMode, 16); // interpret as hex
else
value = Convert.ToByte(strOpticalDataMode); // interpret as decimal
OptoHeadStatus optoheadStatus = (OptoHeadStatus)value;
return optoheadStatus;
}
}
}
return OptoHeadStatus.Unknown;
}
private void SendCommand()
{
}
private string RawDataAnswer()
{
return "";
}
}
}
+111
View File
@@ -0,0 +1,111 @@
using System;
using System.IO.Ports;
using System.Threading.Tasks;
using NfcC7_DLL.NfcHandler.Protocols;
using NfcC7_DLL.NfcHandler.Utils;
namespace NfcC7_DLL.NfcHandler
{
public class OptoHeadService
{
public class Con
{
public string com = "COM5";
public int baudrate = 38400;
public int dataBits = 8;
public Parity parity = Parity.None;
public StopBits stopbits = StopBits.Two;
public int readTimeout = 5000;
public int writeTimeout = 1000;
}
private Con Connection { get; set; }
private SERIAL_Driver driver;
/// <summary>
/// Filed After Run() is called.
/// </summary>
public WaterMetrologyData WaterMetrologyData { get; private set; }
public OptoHeadService(Con con)
{
Connection = con;
driver = new SERIAL_Driver();
}
public bool CreateSerialConnection()
{
bool isopen = false;
Con con = Connection;
byte[] message = {0x00};
byte[] bytesReceived;
if (!driver.isOpen())
{
isopen = driver.OpenConnection(
con.com,
con.baudrate,
con.dataBits,
con.parity,
con.stopbits,
con.readTimeout,
con.writeTimeout);
}
return isopen;
}
public void CloseSerialConnection()
{
dissableRunLoop = true;
driver.Close();
}
public void RunLoop()
{
Task.Run(() => Run());
}
private bool dissableRunLoop = false;
/// <summary>
/// Run the service. Catch one communication to WaterMetrologyData field.
/// </summary>
public void Run()
{
while (!dissableRunLoop)
{
WaterMetrologyData = ParseData(RunReading());
}
}
byte[] RunReading()
{
if (driver.isOpen())
{
driver.SendMessage(new byte[] {0x00}, 1);
return driver.GetRawData();
}
else
{
dissableRunLoop = true;
}
return new byte[] {0xFF};
}
public WaterMetrologyData ParseData(byte[] data)
{
try
{
return WaterMetrologyData.Parse(data, DateTime.Now, "");
}catch(Exception e)
{
return null;
}
}
}
}
@@ -0,0 +1,10 @@
namespace NfcC7_DLL.NfcHandler.Protocols
{
public enum OptoHeadStatus : byte
{
Unknown = 0xFF,
OptoHeadDisabled = 0x00,
OptoHeadC2 = 0xC2,
OptoHeadC7 = 0xC7,
}
}
@@ -0,0 +1,44 @@
using System;
namespace NfcC7_DLL.NfcHandler.Protocols
{
public class WaterMetrologyData
{
private OptoHeadStatus _optoHeadStatus;
private WaterMetrologyDataC7 c7Data;
private WaterMetrologyDataC2 c2Data;
public WaterMetrologyDataC7 C7Data { get => c7Data; }
public WaterMetrologyDataC2 C2Data { get => c2Data; }
public OptoHeadStatus OptoHeadStatus { get => _optoHeadStatus; }
public static WaterMetrologyData Parse(byte[] data, DateTime dt, string dutinfo)
{
if (data.Length < 24)
{
throw new ArgumentException("Invalid data length for WaterMetrologyData C2.");
}
WaterMetrologyData waterMetrologyData = new WaterMetrologyData();
waterMetrologyData._optoHeadStatus = OptoHeadStatus.Unknown;
// Probably C2
if(data.Length > 24 && data.Length < 48)
{
waterMetrologyData.c2Data = WaterMetrologyDataC2.Parse(data, dt, dutinfo);
waterMetrologyData._optoHeadStatus = OptoHeadStatus.OptoHeadC2;
}
// Probably C7
else if(data.Length >= 48)
{
waterMetrologyData.c7Data = WaterMetrologyDataC7.Parse(data, dt, dutinfo);
waterMetrologyData._optoHeadStatus = OptoHeadStatus.OptoHeadC7;
}
return waterMetrologyData;
}
public override string ToString()
{
return $"Status: {_optoHeadStatus}, C7Data: {c7Data}, C2Data: {c2Data}";
}
}
}
@@ -0,0 +1,94 @@
using System;
namespace NfcC7_DLL.NfcHandler.Protocols
{
public class WaterMetrologyDataC2
{
public string DutInfo { get; set; }
public DateTime Dt { get; set; }
public int AdcSample { get; set; }
public short LastField { get; set; }
public short FlowRate { get; set; }
public uint Accumulator { get; set; }
public ushort FlipPeriod { get; set; }
public ushort VinfStart { get; set; }
public ushort VinfEnd { get; set; }
public short ElectrodeDelta { get; set; }
public ushort Impedance { get; set; }
public byte FieldDriveTime { get; set; }
public bool IsInLowFlow { get; set; }
public bool IsInEmptyPipe { get; set; }
public bool FastHPFC { get; set; }
public bool FieldPolarity { get; set; }
public bool ImpedancePolarity { get; set; }
public double CalcFlowmLps
{
get { return FlowRate / 4.0; } // FlowRate is in 1/4 mL/s
}
public double CalcFlowGPM
{
get { return CalcFlowmLps * 0.015850323141489; } // mL/s to gal/min conversion
}
public double CalcAccGal
{
get { return (Accumulator / 4.0) * 0.000264172; } // Accumulator is in 1/4 mL, convert to gallons
}
public static WaterMetrologyDataC2 Parse(string base64Data, DateTime dt, string dutinfo)
{
byte[] data = Convert.FromBase64String(base64Data);
return Parse(data, dt, dutinfo);
}
public static WaterMetrologyDataC2 Parse(byte[] data, DateTime dt, string dutinfo)
{
if (data.Length < 24)
{
throw new ArgumentException("Invalid data length for WaterMetrologyData C2.");
}
WaterMetrologyDataC2 result = new WaterMetrologyDataC2();
result.DutInfo = dutinfo;
result.Dt = dt;
result.AdcSample = BitConverter.ToInt32(data, 0);
result.LastField = BitConverter.ToInt16(data, 4);
result.FlowRate = BitConverter.ToInt16(data, 6);
result.Accumulator = BitConverter.ToUInt32(data, 8);
result.FlipPeriod = BitConverter.ToUInt16(data, 12);
result.VinfStart = BitConverter.ToUInt16(data, 14);
result.VinfEnd = BitConverter.ToUInt16(data, 16);
result.ElectrodeDelta = BitConverter.ToInt16(data, 18);
result.Impedance = BitConverter.ToUInt16(data, 20);
result.FieldDriveTime = data[22];
byte flags = data[23];
result.IsInLowFlow = (flags & 0x01) != 0;
result.IsInEmptyPipe = (flags & 0x02) != 0;
result.FastHPFC = (flags & 0x04) != 0; // Fast High Pass Filter Constant in bit 2
result.FieldPolarity = (flags & 0x08) != 0; // Field Polarity in bit 3
result.ImpedancePolarity = (flags & 0x10) != 0; // Impedance Polarity in bit 4
return result;
}
//public override string ToString()
//{
// return $"ADC Sample: {AdcSample}, Last Field: {LastField}, Flow Rate: {FlowRate}, Accumulator: {Accumulator}, " +
// $"Flip Period Ticks: {FlipPeriodTicks}, Vinf Start: {VinfStart}, Vinf End: {VinfEnd}, Electrode Delta: {ElectrodeDelta}, " +
// $"Impedance: {Impedance}, Field Drive Time: {FieldDriveTime}, Is Low Flow: {IsInLowFlow}, Is Empty Pipe: {IsInEmptyPipe}, " +
// $"Fast High Pass Filter: {FastHighPassFilterConstant}, Field Polarity: {FieldPolarity}, Impedance Polarity: {ImpedancePolarity}";
//}
public override string ToString()
{
return $"DutInfo: {DutInfo}, Dt: {Dt}, ADC Sample: {AdcSample}, Last Field: {LastField}, Flow Rate: {FlowRate}, Accumulator: {Accumulator}, " +
$"Flip Period: {FlipPeriod}, Vinf Start: {VinfStart}, Vinf End: {VinfEnd}, Electrode Delta: {ElectrodeDelta}, " +
$"Impedance: {Impedance}, Field Drive Time: {FieldDriveTime}, Is Low Flow: {IsInLowFlow}, Is Empty Pipe: {IsInEmptyPipe}, " +
$"Fast HPFC: {FastHPFC}, Field Polarity: {FieldPolarity}, Impedance Polarity: {ImpedancePolarity}, " +
$"Calc Flow mL/s: {CalcFlowmLps:F2}, Calc Flow GPM: {CalcFlowGPM:F2}, Calc Acc Gal: {CalcAccGal:F2}";
}
}
}
@@ -0,0 +1,94 @@
using System;
namespace NfcC7_DLL.NfcHandler.Protocols
{
public class WaterMetrologyDataC7 : WaterMetrologyDataC2
{
// New fields for C7
public int LastFieldmilliGauss { get; set; }
public int ImpedanceI { get; set; } // In-phase impedance
public int ImpedanceQ { get; set; } // Out-of-phase impedance
public int NoiseMetric { get; set; }
public short LearningLockout { get; set; }
public short ReverseBuffer { get; set; }
public int ConditionedAdc { get; set; }
public uint Totalalizer { get; set; }
//public bool IsInLowFlow { get; set; }
//public bool IsInEmptyPipe { get; set; }
//public bool FastHPFC { get; set; }
//public bool FieldPolarity { get; set; }
//public bool ImpedancePolarity { get; set; }
public bool MagTamperState { get; set; }
public bool IsLearningActive { get; set; }
public bool AdcShiftsUpdated { get; set; }
public static WaterMetrologyDataC7 Parse(string base64Data, DateTime dt, string dutinfo)
{
byte[] data = Convert.FromBase64String(base64Data);
return Parse(data, dt, dutinfo);
}
public static WaterMetrologyDataC7 Parse(byte[] data, DateTime dt, string dutinfo)
{
// You may want to check for the minimum length required for C7
if (data.Length < 48) /* minimum required length for C7 */
{
throw new ArgumentException("Invalid data length for WaterMetrologyData C7.");
}
var result = new WaterMetrologyDataC7();
// Parse base C2 fields
var c2 = WaterMetrologyDataC2.Parse(data, dt, dutinfo);
//Copy base fields
result.DutInfo = c2.DutInfo;
result.Dt = c2.Dt;
result.AdcSample = c2.AdcSample;
result.LastField = c2.LastField;
result.FlowRate = c2.FlowRate;
result.Accumulator = c2.Accumulator;
result.FlipPeriod = c2.FlipPeriod;
result.VinfStart = c2.VinfStart;
result.VinfEnd = c2.VinfEnd;
result.ElectrodeDelta = c2.ElectrodeDelta;
result.Impedance = c2.Impedance;
result.FieldDriveTime = c2.FieldDriveTime;
result.IsInLowFlow = c2.IsInLowFlow;
result.IsInEmptyPipe = c2.IsInEmptyPipe;
result.FieldPolarity = c2.FieldPolarity;
result.ImpedancePolarity = c2.ImpedancePolarity;
// Parse new C7 fields (replace ENUM_OptPack0xC7.FIELD_MILLI_GAUSS etc. with actual offsets)
byte flags = data[23];
result.MagTamperState = (flags & 0x60) != 0; // bits 5 and 6 represent MagTamperState
result.IsLearningActive = (flags & 0x80) != 0; // bit 7 represents IsLearningActive
byte flagTwo = data[24];
result.AdcShiftsUpdated = (flagTwo & 0x01) != 0; // bit 0 represents AdcShiftsUpdated
result.LastFieldmilliGauss = BitConverter.ToInt32(data, 25);
result.ImpedanceI = BitConverter.ToInt32(data, 29); // in phase
result.ImpedanceQ = BitConverter.ToInt32(data, 33); // out of phase
result.NoiseMetric = BitConverter.ToInt32(data, 37); //
result.LearningLockout = BitConverter.ToInt16(data, 41);
result.ReverseBuffer = BitConverter.ToInt16(data, 43);
result.ConditionedAdc = BitConverter.ToInt32(data, 45);
result.Totalalizer = BitConverter.ToUInt32(data, 49);
return result;
}
public override string ToString()
{
return $"C7: LastFieldmilliGauss={LastFieldmilliGauss}, ImpedanceI={ImpedanceI}, ImpedanceQ={ImpedanceQ}, NoiseMetric={NoiseMetric}, LearningLockout={LearningLockout}, ReverseBuffer={ReverseBuffer}, ConditionedAdc={ConditionedAdc}, Totalalizer={Totalalizer}, MagTamperState={MagTamperState}, IsLearningActive={IsLearningActive}, AdcShiftsUpdated={AdcShiftsUpdated}" + base.ToString();
}
}
}
+1
View File
@@ -0,0 +1 @@
# Protocol Description
+341
View File
@@ -0,0 +1,341 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace NfcC7_DLL.NfcHandler.Utils
{
public class CliRunner
{
//static readonly Logger log = LogManager.GetLogger(typeof(CliRunner));
//private readonly ILog log;
private List<Task> taskPool = new List<Task>();
private long startTime;
public List<Task> TaskPool { get { return taskPool; } }
public void AddTask(Task task) { taskPool.Add(task); }
public void WaitAll() { Task.WaitAll(taskPool.ToArray()); }
/// <summary>
/// continue with WhenAny() to commpare results if time out is reached
/// </summary>
/// <param name="timeout"></param>
/// <returns></returns>
public Task AddTimeOut(int timeout)
{
Task timeOut = Task.Delay(timeout);
taskPool.Add(timeOut);
return timeOut;
}
/// <summary>
/// mainly used for time out additional task to compare results
/// </summary>
/// <returns></returns>
[Obsolete("Use async/await instead - WaitAnyFinished()")]
public async Task<Task> WhenAny() { return await Task.WhenAny(taskPool.ToArray()); }
public Task WaitAnyFinished(Task task, Task timeOut)
{
Task.WhenAny(task, timeOut);
while (true)
{
if (task.IsCompleted) break;
if (task.IsFaulted) break;
if (task.IsCanceled) break;
if(timeOut.IsCompleted) break;
if(timeOut.IsFaulted) break;
if(timeOut.IsCanceled) break;
Thread.Sleep(100);
}
var waitAny = Task.WaitAny(task, timeOut);
return waitAny == 0 ? task : timeOut;
}
public static async Task<T> WithTimeout<T>(Task<T> task, TimeSpan timeout, CancellationTokenSource externalCts = null)
{
var localCts = externalCts == null ? externalCts : new CancellationTokenSource();
var timeoutCts = new CancellationTokenSource(timeout);
var linked = CancellationTokenSource.CreateLinkedTokenSource(localCts.Token, timeoutCts.Token);
var completion = new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously);
// Observe the task
_ = task.ContinueWith(_ => completion.TrySetResult(true), TaskScheduler.Default);
// Observe the timeout
_ = Task.Delay(Timeout.InfiniteTimeSpan, timeoutCts.Token)
.ContinueWith(_ => completion.TrySetResult(true), TaskScheduler.Default);
await completion.Task.ConfigureAwait(false);
if (timeoutCts.IsCancellationRequested == false && task.IsCompleted) // task finished first
return await task.ConfigureAwait(false);
// timeout won → cancel & throw TimeoutException
localCts.Cancel(); // triggers your SendAsync to kill process
throw new TimeoutException();
}
public Task<string> AddSendAsync(SerialPortData data, SerialPortData.EMeterArg eMeterArg, CancellationToken ct = default)
{
var task = SendAsync(data.SerialPortCmdClientPath, data.DefaultArgSettingsRead(eMeterArg), ct);
taskPool.Add(task); // List<Task> is okay because Task<string> : Task
return task;
}
public Task WaitAnyFinished()
{
int xTask = Task.WaitAny(taskPool.ToArray());
return taskPool[xTask];
}
public void Clear() { taskPool.Clear(); }
public void CancelAll() { Task.WhenAll(taskPool).ContinueWith(t => { }); }
public void StartAll()
{
taskPool.ForEach(t => t.Start());
}
public bool AreTasksDone()
{
return taskPool.All(task => task.IsCompleted);
}
public long StartTime
{
get => startTime;
}
public bool TimeOutReceived(long timeout)
{
return (DateTime.Now.Ticks - startTime) > timeout;
}
public CliRunner(bool isCliLogging)
{
startTime = DateTime.Now.Ticks;
if (isCliLogging)
{
try
{
/*log = new ScopedLoggerFactory().CreateLogger<CliRunner>(
@"C:\TBF\Logs\CliRunner.txt",
10, // maxFileSizeMB
7, // maxBackups
log4net.Core.Level.Debug,
true, // zipRolledFiles
true, // singleZipPerDay
TimeSpan.FromMinutes(2) // zipScanInterval
);*/
}
catch (Exception ex)
{
// Fallback to console or handle gracefully
Console.WriteLine($"Failed to initialize logger: {ex.Message}");
}
}
}
/// <summary>
///
/// </summary>
/// <param name="fileName"></param>
/// <param name="args"></param>
/// <typeparam name="T"></typeparam>
public Task AddSendAsync(SerialPortData data, SerialPortData.EMeterArg eMeterArg)
{
var task = SendAsync(data.SerialPortCmdClientPath, data.DefaultArgSettingsRead(eMeterArg));
taskPool.Add(task);
return task;
}
public Task AddSendAsync(SerialPortData data, SerialPortData.EMeterArg eMeterArg, string arg)
{
var task = SendAsync(data.SerialPortCmdClientPath, data.DefaultArgSettingsWrite(eMeterArg, arg));
taskPool.Add(task);
return task;
}
public void AddSendAsync(string fileName, string args)
{
var task = SendAsync(fileName, args);
taskPool.Add(task);
}
public async Task<string> SendAsync(string fileName, string args, CancellationToken ct = default)
{
var psi = new ProcessStartInfo
{
FileName = fileName,
Arguments = args,
RedirectStandardOutput = true,
RedirectStandardError = true,
UseShellExecute = false,
CreateNoWindow = true
};
var process = new Process { StartInfo = psi, EnableRaisingEvents = true };
try
{
process.Start();
Task<string> stdOutTask = process.StandardOutput.ReadToEndAsync();
Task<string> stdErrTask = process.StandardError.ReadToEndAsync();
try
{
await Task.WhenAll(stdOutTask, stdErrTask, process.WaitForExitAsync(ct));
}
catch (OperationCanceledException)
{
if (!process.HasExited)
{
process.Kill();
}
throw;
}
string allOutput = (stdOutTask.Result ?? "") + (stdErrTask.Result ?? "");
//log?.Debug(allOutput);
return allOutput;
}
finally
{
process?.Dispose();
}
}
public Task<T> AddRunAndCaptureJsonAsync<T>(SerialPortData data, SerialPortData.EMeterArg eMeterArg) where T : new()
{
var task = RunAndCaptureJsonAsync<T>(data.SerialPortCmdClientPath, data.DefaultArgSettingsRead(eMeterArg));
taskPool.Add(task);
return task;
}
public async Task<T> RunAndCaptureJsonAsync<T>(string fileName, string args, CancellationToken ct = default) where T : new()
{
var psi = new ProcessStartInfo
{
FileName = fileName,
Arguments = args,
RedirectStandardOutput = true,
RedirectStandardError = true,
UseShellExecute = false,
CreateNoWindow = true
};
var process = new Process { StartInfo = psi, EnableRaisingEvents = true };
try
{
process.Start();
var stdoutTask = process.StandardOutput.ReadToEndAsync();
var stderrTask = process.StandardError.ReadToEndAsync();
await Task.WhenAll(stdoutTask, stderrTask, process.WaitForExitAsync(ct));
string allOutput = (stdoutTask.Result ?? "") + (stderrTask.Result ?? "");
//log?.Debug(allOutput);
string json = ExtractJson(allOutput);
if (TryJsonStringDeserialize(json, out T result)) return result;
return default;
}
finally
{
process?.Dispose();
}
}
public bool TryJsonStringDeserialize<T>(string json, out T runAndCaptureJsonAsync) where T : new()
{
if (json != null)
{
try
{
runAndCaptureJsonAsync = JsonConvert.DeserializeObject<T>(json);
return true;
}
catch (Exception ex)
{
// log.Debug(ex.Message);
runAndCaptureJsonAsync = TryConvert<T>(json);
return true;
}
}
runAndCaptureJsonAsync = default;
return false;
}
private static T TryConvert<T>(string json) where T : new()
{
T obj = new T();
try
{
JObject jObject = JObject.Parse(json);
foreach (PropertyInfo prop in typeof(T).GetProperties(BindingFlags.Public | BindingFlags.Instance))
{
if (!prop.CanWrite) continue;
JToken token;
if (jObject.TryGetValue(prop.Name, StringComparison.OrdinalIgnoreCase, out token))
{
try
{
object value = token.ToObject(prop.PropertyType);
prop.SetValue(obj, value);
}
catch
{
// leave default if conversion fails
}
}
// else → keep default value
}
}
catch (Exception ex)
{
Console.WriteLine($"TryConvert failed: {ex.Message}");
}
return obj;
}
public string ExtractJson(string text)
{
int start = text.IndexOf('{');
int end = text.LastIndexOf('}');
if (start >= 0 && end > start)
{
return text.Substring(start, end - start + 1);
}
return null;
}
}
}
@@ -0,0 +1,39 @@
using System;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
namespace NfcC7_DLL.NfcHandler.Utils
{
public static class ProcessExtensions
{
public static Task<object> WaitForExitAsync(this Process process, CancellationToken cancellationToken = default)
{
if (process == null) throw new ArgumentNullException(nameof(process));
if (process.HasExited) return Task.FromResult<object>(null);
var tcs = new TaskCompletionSource<object>(TaskCreationOptions.RunContinuationsAsynchronously);
EventHandler handler = null;
handler = (s, e) =>
{
try { tcs.TrySetResult(null); }
finally { process.Exited -= handler; }
};
process.EnableRaisingEvents = true;
process.Exited += handler;
if (cancellationToken.CanBeCanceled)
{
cancellationToken.Register(() =>
{
tcs.TrySetCanceled(cancellationToken);
process.Exited -= handler;
});
}
return tcs.Task;
}
}
}
+171
View File
@@ -0,0 +1,171 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.IO.Ports;
using System.Linq;
using System.Threading;
//*****************************************************************************
// Copyright 2020 Sensus GmbH Ludwigshafen. All rights reserved.
// Author: Venkat, Rajeshwar
//*****************************************************************************
namespace NfcC7_DLL.NfcHandler.Utils
{
public class SERIAL_Driver
{
public string ErrorMessage { get; private set; }
public Collection<byte> SerialPortReadBuffer = new Collection<byte>();
private SerialPort _serialPort;
private List<byte[]> _binMessages = new List<byte[]>();
private bool _isReading;
private Parity Parity { get; set; }
private StopBits StopBits { get; set; }
public SERIAL_Driver()
{
_serialPort = new SerialPort();
}
public bool OpenConnection(string comPort, int baudrate, int dataBits, Parity parity, StopBits stopbits, int readTimeout=1000, int writeTimeout = 1000)
{
lock (this)
{
if ((_serialPort != null) && (_serialPort.IsOpen))
{
_serialPort.DataReceived -= DataReceivedHandler;
_serialPort.Close();
_serialPort.Dispose();
_serialPort = null;
}
try
{
ErrorMessage = "";
//_serialPort = new SerialPort(comPort, 57600, Parity.None, 8, StopBits.Two);
_serialPort = new SerialPort(comPort, baudrate, parity, dataBits, stopbits);
_serialPort.ReadTimeout = readTimeout;
_serialPort.WriteTimeout = writeTimeout;
_serialPort.DataReceived += new SerialDataReceivedEventHandler(DataReceivedHandler);
_serialPort.Open();
}
catch (Exception ex)
{
ErrorMessage = String.Format("COM error: Open failed {0}.{1}", comPort, ex.Message);
return false;
}
if (!_serialPort.IsOpen)
{
ErrorMessage = String.Format("COM error: Can't Open {0}.", comPort);
return false;
}
}//End Lock
return true;
}
public bool SendMessage(byte[] sendDataBytes, int length, int readTimeout = 1000, int writeTimeout=1000)
{
if (!isOpen()) return false;
if (sendDataBytes.Length == 0) return true; // nothing to send - no error
try
{
PrepareReading(); //clear read buffer etc.
_serialPort.WriteTimeout = writeTimeout;
_serialPort.ReadTimeout = readTimeout;
_serialPort.Write(sendDataBytes, 0, length);
_isReading = true;
Thread.Sleep(100);
var stopWatch = Stopwatch.StartNew(); //start stop watch for data recevie timeout
while (_isReading) //wait until reading finishes or timeout occur
{
if (stopWatch.ElapsedMilliseconds > readTimeout)
{
stopWatch.Stop();
ErrorMessage = "COM error: Receive timeout";
return false;
}
}
}
catch (Exception ex)
{
ErrorMessage = String.Format("COM error: Transmit timeout {0}.{1}", _serialPort.PortName, ex.Message);
return false; // Exception in send function
}
return true;
}
private void PrepareReading()
{
_serialPort.DiscardInBuffer();
if(_binMessages != null) _binMessages.Clear();
_isReading = true;
}
public byte[] GetRawData()
{
try
{
if (_binMessages.Count > 0)
return _binMessages[0].ToArray();
else
{
return null;
}
}
catch(Exception)
{
byte[] err = { 0xFF };
return err;
}
}
private void DataReceivedHandler(object sender, SerialDataReceivedEventArgs e)
{
if (!_serialPort.IsOpen) return;
lock (this)
{
Thread.Sleep(100);
if (!_serialPort.IsOpen) return;
SerialPortReadBuffer = new Collection<byte>();
while (_serialPort.BytesToRead > 0)
{
SerialPortReadBuffer.Add((byte)_serialPort.ReadByte());
}
_binMessages.Add(SerialPortReadBuffer.ToArray());
_isReading = false;
}
}
public void CloseConnection()
{
if ((_serialPort != null) && (_serialPort.IsOpen))
{
_serialPort.DataReceived -= DataReceivedHandler;
_serialPort.Close();
_serialPort.Dispose();
_serialPort = null;
}
}
public void Close()
{
if (isOpen())
{
_serialPort.Close();
}
}
public void Dispose()
{
if (_serialPort != null)
{
_serialPort.Dispose();
}
}
public bool isOpen()
{
if(_serialPort != null)
return _serialPort.IsOpen;
return false;
}
}
}
@@ -0,0 +1,88 @@
using System;
using System.IO;
namespace NfcC7_DLL.NfcHandler.Utils
{
public class SerialPortData
{
private Boolean? _cliExists;
public bool CliExists { get {
if (_cliExists == null || !_cliExists.HasValue)
{
_cliExists = File.Exists(SerialPortCmdClientPath);
}
return _cliExists.Value;
} }
public string SerialPortCmdClientPath {
get {
#if DEBUG
return Path.Combine("C:\\","TBF","Cli", CmdClientName);
#else
return Path.Combine("..","Cli", CmdClientName);
#endif
}
}
public string CmdClientName { get; set; } = "HalCli.exe";
public string PortName { get; set; }
public int MeterType { get; set; }
public string MeterTypeStr { get; set; }
public enum EMeterArg {
Calibration = 0,
AllParams = 2,
DeviceId = 3,
Optohead = 4,
}
EMeterArg _eMeterArg = EMeterArg.AllParams;
public string DefaultArgSettingsRead(EMeterArg eMeterArg)
{
string meterTypeInsert = !string.IsNullOrEmpty(MeterTypeStr) ? MeterTypeStr : MeterType.ToString();
switch (eMeterArg)
{
case EMeterArg.AllParams:
return $"-p {PortName} -m {meterTypeInsert} --operation readall";
case EMeterArg.DeviceId:
return $"-p {PortName} -m {meterTypeInsert} --operation read --parameter DeviceId";
case EMeterArg.Optohead:
return $"-p {PortName} -m {meterTypeInsert} --operation read --parameter \"OpticalDataMode\"";
default:
throw new Exception("Not implemented correct command!");
}
}
public string DefaultArgSettingsWrite(EMeterArg eMeterArg, string arg)
{
string meterTypeInsert = !string.IsNullOrEmpty(MeterTypeStr) ? MeterTypeStr : MeterType.ToString();
switch (eMeterArg)
{
case EMeterArg.Calibration:
return $"-p {PortName} -m {meterTypeInsert} --operation write --parameter Calibration --value {arg}";
case EMeterArg.Optohead:
return $"-p {PortName} -m {meterTypeInsert} --operation write --parameter \"OpticalDataMode\" --value {arg}";
default:
throw new Exception("Not implemented correct command!");
}
}
public SerialPortData(
string portName,
string cmdClientName,
int meterType)
{
PortName = portName;
CmdClientName = cmdClientName;
MeterType = meterType;
}
public SerialPortData(
string portName,
string cmdClientName,
string meterType)
{
PortName = portName;
CmdClientName = cmdClientName;
MeterTypeStr = meterType;
}
}
}
+158
View File
@@ -0,0 +1,158 @@
using System;
using System.Collections.Generic;
using System.Text;
//*****************************************************************************
// Copyright 2020 Sensus GmbH Ludwigshafen. All rights reserved.
// Author: Venkat, Rajeshwar
//*****************************************************************************
namespace NfcC7_DLL.NfcHandler.Utils
{
public static class Tools
{
public static bool ByteArrayCompare(byte[] a1, byte[] a2)
{
// thanks to https://stackoverflow.com/questions/43289/comparing-two-byte-arrays-in-net
if (a1.Length != a2.Length)
return false;
for (int i = 0; i < a1.Length; i++)
if (a1[i] != a2[i])
return false;
return true;
}
public static string SwapHex(string sHex)
{
string sResult = "";
int iPos = sHex.Length - 2;
while (iPos >= 0)
{
sResult += sHex.Substring(iPos, 2);
sHex = sHex.Remove(iPos, 2);
iPos = sHex.Length - 2;
}
return sResult;
}
public static string DecimalToHexString(string value, int size = 1)
{
try
{
long Lval = long.Parse(value);
if (size == 1) return Lval.ToString("X2");
if (size == 2) return Lval.ToString("X4");
if (size == 4) return Lval.ToString("X8");
}
catch (Exception)
{
if (size == 1) return "00";
if (size == 2) return "0000";
if (size == 4) return "00000000";
}
return "00";
}
public static string ByteToHexString(byte data)
{
List<byte> val = new List<byte>();
val.Add(data);
byte[] arr = val.ToArray();
return BytesToHex(arr);
}
public static string BytesToHex(byte[] data)
{
StringBuilder sb = new StringBuilder();
foreach (byte b in data)
sb.Append(b.ToString("X2"));
return sb.ToString();
}
public static byte[] HexStringToByteArray(String hexString)
{
int numberChars = hexString.Length;
byte[] bytes = new byte[numberChars / 2];
for (int i = 0; i < numberChars; i += 2)
{
bytes[i / 2] = Convert.ToByte(hexString.Substring(i, 2), 16);
}
return bytes;
}
public enum InitialCrcValue
{
Zeros,
NonZero1 = 0xffff,
NonZero2 = 0x1D0F
}
public class Crc16Ccitt
{
private const ushort poly = 0x1021;
ushort[] table = new ushort[256];
ushort initialValue = 0;
public ushort ComputeChecksum(byte[] bytes)
{
ushort crc = this.initialValue;
for (int i = 0; i < bytes.Length; ++i)
{
crc = (ushort)((crc << 8) ^ table[((crc >> 8) ^ (0xff & bytes[i]))]);
}
return crc;
}
public byte[] ComputeChecksumBytes(byte[] bytes)
{
ushort crc = ComputeChecksum(bytes);
return BitConverter.GetBytes(crc);
}
public Crc16Ccitt(InitialCrcValue initialValue)
{
this.initialValue = (ushort) initialValue;
ushort temp, a;
for (int i = 0; i < table.Length; ++i)
{
temp = 0;
a = (ushort) (i << 8);
for (int j = 0; j < 8; ++j)
{
if (((temp ^ a) & 0x8000) != 0)
{
temp = (ushort) ((temp << 1) ^ poly);
}
else
{
temp <<= 1;
}
a <<= 1;
}
table[i] = temp;
}
}
public byte[] calcCRCfromMessage(byte[] message)
{
// CRC calculation goes from MessageID to Password
// For Read this means MsgID (1) + Offset (2) + PayloadLength (1) + Password (2) = 6
// for write the length of the payload comes on top.
// STX(1), length(1), CRC(2) and ETX(1) are excluded, in total 5 bytes.
//
// the method works both for sending messages (where the CRC and ETX are not in message)
// and for receiving messages (where the CRC and ETX are included at the end)
byte[] crc_msg = new byte[message[1]]; // message length is 2nd byte
Array.Copy(message, 2, crc_msg, 0, crc_msg.Length);
return ComputeChecksumBytes(crc_msg);
}
public string commentCRC(byte[] crc_meter, byte[] crc_computed)
{
bool crc_do_match = Tools.ByteArrayCompare(crc_meter, crc_computed);
string crcComment = crc_do_match ? "ok." : "CRC DOESN'T MATCH!!";
return "CRC Meter: " + Tools.BytesToHex(crc_meter) + (crc_do_match ? " == " : " != ")
+ "CRC Computed: " + Tools.BytesToHex(crc_computed) + ". " + crcComment;
}
public bool crc_do_match(byte[] a, byte[] b)
{
return ByteArrayCompare(a, b);
}
}
}
}
+37 -4
View File
@@ -16,20 +16,26 @@ namespace Results.Entities
public virtual double PulsesMeter { get; set; } /// # of water meter or heat meter pulses 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 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 PulsesPerLiter { get; set; } /// [l ^ -1], in case of heat meters (CompoundMeterId==5) pulses per kWh in [kWh ^ -1]
public virtual double PulsesPerKilogram { get; set; } /// [kg ^ -1]
public virtual double VolumeStart { get; set; } /// Volume or energy (CompoundMeterId==5) on test start in [l] or [J] 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 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 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 MassMeter { get; set; } /// Measured mass or energy (CompoundMeterId==5) in [kg] or [J]
public virtual double VolumeRef { get; set; } /// Reference volume or energy (CompoundMeterId==5) in [l] or [J]
public virtual double MassRef { get; set; } /// Reference mass or energy (CompoundMeterId==5) in [kg] or [J]
public virtual double TimestampStart { get; set; } /// [s] public virtual double TimestampStart { get; set; } /// [s]
public virtual double TimestampEnd { get; set; } /// [s] public virtual double TimestampEnd { get; set; } /// [s]
public virtual double TestTime { get; set; } /// [s] public virtual double TestTime { get; set; } /// [s]
/// Main result /// Main result
public virtual double Error { get; set; } /// [%] public virtual double Error { get; set; } /// [%] for volume register reader
public virtual double ErrorMass { get; set; } /// [%] for mass register reader
public virtual long ErrorIndicators { get; set; } /// Not mapped to DB !!!, bit24=E25, bit25=E26, bit26=E27, bit27=E28 (error flags) 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 long InfoIndicators { get; set; } /// Not mapped to DB !!!, bit24=E25, bit25=E26, bit26=E27, bit27=E28 (info flags)
public virtual bool TestDone { get; set; } /// true = test was completed 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 Passed { get; set; } /// true = test passed, water meter is OK for Volume RegisterReader
public virtual bool PassedMass { get; set; } /// true = test passed, water meter is OK for Mass RegisterReader
public virtual string QuantityUnits { get; set; } /// dm3, kg, etc. - this value defined the quantity of meter, its decisive for distinction of pulse types
#if IPERL #if IPERL
public virtual int CalibFactor { get; set; } public virtual int CalibFactor { get; set; }
public virtual int CalibFactorLNA { get; set; } public virtual int CalibFactorLNA { get; set; }
@@ -123,6 +129,33 @@ namespace Results.Entities
return Passed ? yesNo[0] : ((yesNo.Length >= 2) ? yesNo[1] : Results.Resources.Strings.No); return Passed ? yesNo[0] : ((yesNo.Length >= 2) ? yesNo[1] : Results.Resources.Strings.No);
} }
} }
public virtual string PassedMassColorStr(string yesNoFormatOrEmpty)
{
if (string.IsNullOrEmpty(yesNoFormatOrEmpty))
{
return Utils.PassedColorStr(PassedMass, Evaluate());
}
else
{
string[] yesNo = yesNoFormatOrEmpty.Split(new char[] { '~' });
return PassedMass ? yesNo[0] : ((yesNo.Length >= 2) ? yesNo[1] : Results.Resources.Strings.No);
}
}
public virtual string GetQuantityFromUnits()
{
if (QuantityUnits == "kg")
{
return "Mass";
}
else if (QuantityUnits == "dm3")
{
return "Volume";
}
return "Volume";
}
public MeterTestRslt() public MeterTestRslt()
{ {
+7 -1
View File
@@ -36,6 +36,8 @@ namespace Results.Entities
public virtual double ConstMasterCorr { get; set; } /// [l/pls] Liters per pulse of the master flow meter corrected by a correction table. 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. 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. /// When mass measurement is not available, corrected by a correction table.
public virtual double MassConstMaster { get; set; } /// [kg/pls] kilograms 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 MassStartRaw { get; set; } /// [kg]
public virtual double MassStart { get; set; } /// [kg] public virtual double MassStart { get; set; } /// [kg]
public virtual double MassEndRaw { get; set; } /// [kg] public virtual double MassEndRaw { get; set; } /// [kg]
@@ -48,7 +50,11 @@ namespace Results.Entities
public virtual double Flow { get; set; } /// [m3/h] calculated from conventional true value public virtual double Flow { get; set; } /// [m3/h] calculated from conventional true value
public virtual double VolumeCTV { get; set; } /// [l] Volume conventional true value 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 VolumeMaster { get; set; } /// [l] Volume from the master flow meter
public virtual double ErrorMaster { get; set; } /// [%] Error of the master flow meter public virtual double ErrorMaster { get; set; } /// [%] Error of the master flow meter
public virtual double MassFlow { get; set; } /// [t/h] calculated from conventional true value
public virtual double MassCTV { get; set; } /// [kg] Volume conventional true value
public virtual double MassMaster { get; set; } /// [kg] Volume from the master flow meter
public virtual double MassErrorMaster { get; set; } /// [%] Error of the master flow meter
public virtual float DiverterStart { get; set; } /// [s] Diverter switch time or a start/stop valve open time when the test starts public virtual float DiverterStart { get; set; } /// [s] Diverter switch time or a start/stop valve open time when the 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 DivStart10 { get; set; } /// [s] Diverter switch time when test starts at level 10 (e.g. 10%) (not mapped to DB)
+5
View File
@@ -33,6 +33,7 @@ namespace Results.Entities
public virtual string ApprovalInfo { get; set; } public virtual string ApprovalInfo { get; set; }
public virtual string Certificate { get; set; } public virtual string Certificate { get; set; }
public virtual double PulsesPerLtr { get; set; } public virtual double PulsesPerLtr { get; set; }
public virtual double PulsesPerKilogram { get; set; }
/// Concerns compound water meters /// Concerns compound water meters
public virtual string ProducerAux { get; set; } public virtual string ProducerAux { get; set; }
@@ -85,6 +86,7 @@ namespace Results.Entities
ApprovalInfo = oriWMData.ApprovalInfo; ApprovalInfo = oriWMData.ApprovalInfo;
Certificate = oriWMData.Certificate; Certificate = oriWMData.Certificate;
PulsesPerLtr = oriWMData.PulsesPerLtr; PulsesPerLtr = oriWMData.PulsesPerLtr;
PulsesPerKilogram = oriWMData.PulsesPerKilogram;
ProducerAux = oriWMData.ProducerAux; ProducerAux = oriWMData.ProducerAux;
Q3_Qn_Aux = oriWMData.Q3_Qn_Aux; Q3_Qn_Aux = oriWMData.Q3_Qn_Aux;
MetrologicalClassAux = oriWMData.MetrologicalClassAux; MetrologicalClassAux = oriWMData.MetrologicalClassAux;
@@ -129,6 +131,7 @@ namespace Results.Entities
if (ApprovalInfo != wmd.ApprovalInfo) return false; if (ApprovalInfo != wmd.ApprovalInfo) return false;
if (Certificate != wmd.Certificate) return false; if (Certificate != wmd.Certificate) return false;
if (PulsesPerLtr != wmd.PulsesPerLtr) return false; if (PulsesPerLtr != wmd.PulsesPerLtr) return false;
if (PulsesPerKilogram != wmd.PulsesPerKilogram) return false;
if (ProducerAux != wmd.ProducerAux) return false; if (ProducerAux != wmd.ProducerAux) return false;
if (Q3_Qn_Aux != wmd.Q3_Qn_Aux) return false; if (Q3_Qn_Aux != wmd.Q3_Qn_Aux) return false;
if (MetrologicalClassAux != wmd.MetrologicalClassAux) return false; if (MetrologicalClassAux != wmd.MetrologicalClassAux) return false;
@@ -188,6 +191,7 @@ namespace Results.Entities
writer.Write((ApprovalInfo != null) ? ApprovalInfo : string.Empty); writer.Write((ApprovalInfo != null) ? ApprovalInfo : string.Empty);
writer.Write((Certificate != null) ? Certificate : string.Empty); writer.Write((Certificate != null) ? Certificate : string.Empty);
writer.Write(PulsesPerLtr); writer.Write(PulsesPerLtr);
writer.Write(PulsesPerKilogram);
writer.Write((ProducerAux != null) ? ProducerAux : string.Empty); writer.Write((ProducerAux != null) ? ProducerAux : string.Empty);
writer.Write(Q3_Qn_Aux); writer.Write(Q3_Qn_Aux);
writer.Write((MetrologicalClassAux != null) ? MetrologicalClassAux : string.Empty); writer.Write((MetrologicalClassAux != null) ? MetrologicalClassAux : string.Empty);
@@ -227,6 +231,7 @@ namespace Results.Entities
ApprovalInfo = reader.ReadString(); ApprovalInfo = reader.ReadString();
Certificate = reader.ReadString(); Certificate = reader.ReadString();
PulsesPerLtr = reader.ReadDouble(); PulsesPerLtr = reader.ReadDouble();
PulsesPerKilogram = reader.ReadDouble();
ProducerAux = reader.ReadString(); ProducerAux = reader.ReadString();
Q3_Qn_Aux = reader.ReadDouble(); Q3_Qn_Aux = reader.ReadDouble();
MetrologicalClassAux = reader.ReadString(); MetrologicalClassAux = reader.ReadString();
+2
View File
@@ -49,6 +49,8 @@ namespace Results.Forms
{ {
InitializeComponent(); InitializeComponent();
this.Icon = Properties.Resources.TBF_icon;
firstEnabledControl = null; firstEnabledControl = null;
lastSizeChange = DateTime.Now; lastSizeChange = DateTime.Now;
nrGroups = 1; nrGroups = 1;
+4 -1
View File
@@ -24,7 +24,10 @@ namespace Results.Forms
public ManualEntryConfigDlg() public ManualEntryConfigDlg()
{ {
InitializeComponent(); InitializeComponent();
manualEntryConfigCtrl.Unlocked = true;
this.Icon = Properties.Resources.TBF_icon;
manualEntryConfigCtrl.Unlocked = true;
} }
+2
View File
@@ -25,6 +25,8 @@ namespace Results.Forms
{ {
InitializeComponent(); InitializeComponent();
this.Icon = Properties.Resources.TBF_icon;
Localize(); Localize();
ShowAllResults(wm); ShowAllResults(wm);
+4 -1
View File
@@ -35,7 +35,10 @@ namespace Results.Forms
public ResultsConfigDlg() public ResultsConfigDlg()
{ {
InitializeComponent(); InitializeComponent();
resultsConfigCtrl.Unlocked = true;
this.Icon = Properties.Resources.TBF_icon;
resultsConfigCtrl.Unlocked = true;
} }
+10
View File
@@ -351,6 +351,16 @@ namespace Results
Failed_meters_countE15, /// 297 Failed_meters_countE15, /// 297
Quantity, /// 298
Reference_quantity, /// 299
Start_quantity, /// 300
End_quantity, /// 301
RR_Quantity, /// 302
RR_Units, /// 303
MassCTV, /// 304
Unit_per_pulse_Read, /// 305
Pulses_per_unit, /// 306
Count, Count,
} }
} }
+8 -2
View File
@@ -16,16 +16,22 @@ namespace Results.Mappings
Map(x => x.PulsesMeter); Map(x => x.PulsesMeter);
Map(x => x.PulsesMaster); Map(x => x.PulsesMaster);
Map(x => x.PulsesPerLiter); Map(x => x.PulsesPerLiter);
Map(x => x.VolumeStart); Map(x => x.PulsesPerKilogram);
Map(x => x.VolumeStart);
Map(x => x.VolumeEnd); Map(x => x.VolumeEnd);
Map(x => x.VolumeMeter); Map(x => x.VolumeMeter);
Map(x => x.VolumeRef); Map(x => x.VolumeRef);
Map(x => x.TimestampStart); Map(x => x.MassMeter);
Map(x => x.MassRef);
Map(x => x.TimestampStart);
Map(x => x.TimestampEnd); Map(x => x.TimestampEnd);
Map(x => x.TestTime); Map(x => x.TestTime);
Map(x => x.Error); Map(x => x.Error);
Map(x => x.ErrorMass);
Map(x => x.TestDone); Map(x => x.TestDone);
Map(x => x.Passed); Map(x => x.Passed);
Map(x => x.PassedMass);
Map(x => x.QuantityUnits);
#if IPERL #if IPERL
Map(x => x.ExtraDataPath); Map(x => x.ExtraDataPath);
Map(x => x.X1); Map(x => x.X1);
+4
View File
@@ -45,6 +45,10 @@ namespace Results.Mappings
Map(x => x.VolumeCTV); Map(x => x.VolumeCTV);
Map(x => x.VolumeMaster); Map(x => x.VolumeMaster);
Map(x => x.ErrorMaster); Map(x => x.ErrorMaster);
Map(x => x.MassFlow).Column("MassFlow");
Map(x => x.MassCTV);
Map(x => x.MassMaster);
Map(x => x.MassErrorMaster);
Map(x => x.DiverterStart); Map(x => x.DiverterStart);
Map(x => x.DiverterEnd); Map(x => x.DiverterEnd);
Map(x => x.ErrorFlags); Map(x => x.ErrorFlags);
+11 -1
View File
@@ -19,7 +19,7 @@ namespace Results.Properties {
// class via a tool like ResGen or Visual Studio. // class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen // To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project. // with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources { internal class Resources {
@@ -69,5 +69,15 @@ namespace Results.Properties {
return ((System.Drawing.Bitmap)(obj)); return ((System.Drawing.Bitmap)(obj));
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
internal static System.Drawing.Icon TBF_icon {
get {
object obj = ResourceManager.GetObject("TBF_icon", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
} }
} }
+3
View File
@@ -121,4 +121,7 @@
<data name="Headpic" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="Headpic" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Headpic.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\Headpic.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="TBF_icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\TBF_icon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root> </root>
+36
View File
@@ -294,6 +294,15 @@ namespace Results.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to End quantity.
/// </summary>
internal static string End_quantity {
get {
return ResourceManager.GetString("End_quantity", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to End state. /// Looks up a localized string similar to End state.
/// </summary> /// </summary>
@@ -897,6 +906,15 @@ namespace Results.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Pulses/Unit.
/// </summary>
internal static string PulsesUnit {
get {
return ResourceManager.GetString("PulsesUnit", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Q fall. /// Looks up a localized string similar to Q fall.
/// </summary> /// </summary>
@@ -1131,6 +1149,15 @@ namespace Results.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Start quantity.
/// </summary>
internal static string Start_quantity {
get {
return ResourceManager.GetString("Start_quantity", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Start volume. /// Looks up a localized string similar to Start volume.
/// </summary> /// </summary>
@@ -2103,6 +2130,15 @@ namespace Results.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Quant..
/// </summary>
internal static string VName_Quantity {
get {
return ResourceManager.GetString("VName_Quantity", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Temp.. /// Looks up a localized string similar to Temp..
/// </summary> /// </summary>
+57 -45
View File
@@ -123,9 +123,18 @@
<data name="Alignment" xml:space="preserve"> <data name="Alignment" xml:space="preserve">
<value>Zarovnání</value> <value>Zarovnání</value>
</data> </data>
<data name="Approval" xml:space="preserve">
<value>Schválení</value>
</data>
<data name="Available_results" xml:space="preserve"> <data name="Available_results" xml:space="preserve">
<value>Dostupné výsledky</value> <value>Dostupné výsledky</value>
</data> </data>
<data name="Batch_nr" xml:space="preserve">
<value>Číslo dávky</value>
</data>
<data name="Bench" xml:space="preserve">
<value>Stanice</value>
</data>
<data name="CancelBtnText" xml:space="preserve"> <data name="CancelBtnText" xml:space="preserve">
<value>Zrušit</value> <value>Zrušit</value>
</data> </data>
@@ -135,9 +144,21 @@
<data name="Configuration" xml:space="preserve"> <data name="Configuration" xml:space="preserve">
<value>Konfigurace</value> <value>Konfigurace</value>
</data> </data>
<data name="Density" xml:space="preserve">
<value>Hustota</value>
</data>
<data name="DownBtnText" xml:space="preserve"> <data name="DownBtnText" xml:space="preserve">
<value>Dolů</value> <value>Dolů</value>
</data> </data>
<data name="End" xml:space="preserve">
<value>Konec</value>
</data>
<data name="Error" xml:space="preserve">
<value>Chyba</value>
</data>
<data name="Flow" xml:space="preserve">
<value>Průtok</value>
</data>
<data name="Format" xml:space="preserve"> <data name="Format" xml:space="preserve">
<value>Formát</value> <value>Formát</value>
</data> </data>
@@ -150,8 +171,8 @@
<data name="Precision" xml:space="preserve"> <data name="Precision" xml:space="preserve">
<value>Přesnost</value> <value>Přesnost</value>
</data> </data>
<data name="Remark" xml:space="preserve"> <data name="Procedure" xml:space="preserve">
<value>Poznámka</value> <value>Procedura</value>
</data> </data>
<data name="Remove" xml:space="preserve"> <data name="Remove" xml:space="preserve">
<value>&lt; Odebrat</value> <value>&lt; Odebrat</value>
@@ -162,15 +183,15 @@
<data name="Result" xml:space="preserve"> <data name="Result" xml:space="preserve">
<value>Výsledek</value> <value>Výsledek</value>
</data> </data>
<data name="Results" xml:space="preserve">
<value>Výsledky</value>
</data>
<data name="Result_code" xml:space="preserve">
<value>Kód výsledku</value>
</data>
<data name="Selected_results" xml:space="preserve"> <data name="Selected_results" xml:space="preserve">
<value>Vybrané výsledky</value> <value>Vybrané výsledky</value>
</data> </data>
<data name="sn" xml:space="preserve">
<value>sériové číslo</value>
</data>
<data name="Start" xml:space="preserve">
<value>Začátek</value>
</data>
<data name="Test_ID" xml:space="preserve"> <data name="Test_ID" xml:space="preserve">
<value>Test</value> <value>Test</value>
</data> </data>
@@ -180,9 +201,21 @@
<data name="UpBtnText" xml:space="preserve"> <data name="UpBtnText" xml:space="preserve">
<value>Nahoru</value> <value>Nahoru</value>
</data> </data>
<data name="User" xml:space="preserve">
<value>Uživatel</value>
</data>
<data name="Width" xml:space="preserve"> <data name="Width" xml:space="preserve">
<value>Šířka</value> <value>Šířka</value>
</data> </data>
<data name="Results" xml:space="preserve">
<value>Výsledky</value>
</data>
<data name="Remark" xml:space="preserve">
<value>Poznámka</value>
</data>
<data name="Result_code" xml:space="preserve">
<value>Kód výsledku</value>
</data>
<data name="Mounting" xml:space="preserve"> <data name="Mounting" xml:space="preserve">
<value>Montáž</value> <value>Montáž</value>
</data> </data>
@@ -195,54 +228,27 @@
<data name="Quantity" xml:space="preserve"> <data name="Quantity" xml:space="preserve">
<value>Veličina</value> <value>Veličina</value>
</data> </data>
<data name="sn" xml:space="preserve">
<value>sériové číslo</value>
</data>
<data name="Water_Meter" xml:space="preserve"> <data name="Water_Meter" xml:space="preserve">
<value>Vodoměr</value> <value>Vodoměr</value>
</data> </data>
<data name="Batch_nr" xml:space="preserve">
<value>Číslo dávky</value>
</data>
<data name="from" xml:space="preserve"> <data name="from" xml:space="preserve">
<value>od</value> <value>od</value>
</data> </data>
<data name="to" xml:space="preserve"> <data name="to" xml:space="preserve">
<value>do</value> <value>do</value>
</data> </data>
<data name="Unit" xml:space="preserve">
<value>Jednotka</value>
</data>
<data name="Approval" xml:space="preserve">
<value>Schválení</value>
</data>
<data name="Bench" xml:space="preserve">
<value>Stanice</value>
</data>
<data name="Density" xml:space="preserve">
<value>Hustota</value>
</data>
<data name="Density_correction" xml:space="preserve"> <data name="Density_correction" xml:space="preserve">
<value>Korekce hustoty</value> <value>Korekce hustoty</value>
</data> </data>
<data name="End" xml:space="preserve"> <data name="User_description" xml:space="preserve">
<value>Konec</value> <value>Popis uživatele</value>
</data> </data>
<data name="Procedure" xml:space="preserve"> <data name="Unit" xml:space="preserve">
<value>Procedura</value> <value>Jednotka</value>
</data> </data>
<data name="Procedure_description" xml:space="preserve"> <data name="Procedure_description" xml:space="preserve">
<value>Popis procedury</value> <value>Popis procedury</value>
</data> </data>
<data name="Start" xml:space="preserve">
<value>Začátek</value>
</data>
<data name="User" xml:space="preserve">
<value>Uživatel</value>
</data>
<data name="User_description" xml:space="preserve">
<value>Popis uživatele</value>
</data>
<data name="Bench_ID" xml:space="preserve"> <data name="Bench_ID" xml:space="preserve">
<value>ID stanice</value> <value>ID stanice</value>
</data> </data>
@@ -315,9 +321,6 @@
<data name="Serial_number_is_missing" xml:space="preserve"> <data name="Serial_number_is_missing" xml:space="preserve">
<value>Chybí sériové číslo</value> <value>Chybí sériové číslo</value>
</data> </data>
<data name="Error" xml:space="preserve">
<value>Chyba</value>
</data>
<data name="Lower_limit" xml:space="preserve"> <data name="Lower_limit" xml:space="preserve">
<value>Dolní hranice</value> <value>Dolní hranice</value>
</data> </data>
@@ -330,9 +333,6 @@
<data name="Relative_error" xml:space="preserve"> <data name="Relative_error" xml:space="preserve">
<value>Relativní chyba</value> <value>Relativní chyba</value>
</data> </data>
<data name="Flow" xml:space="preserve">
<value>Průtok</value>
</data>
<data name="This_position_is_disabled" xml:space="preserve"> <data name="This_position_is_disabled" xml:space="preserve">
<value>Taro pozice je vypnuta</value> <value>Taro pozice je vypnuta</value>
</data> </data>
@@ -351,4 +351,16 @@
<data name="Merge" xml:space="preserve"> <data name="Merge" xml:space="preserve">
<value>Spojit</value> <value>Spojit</value>
</data> </data>
<data name="PulsesUnit" xml:space="preserve">
<value />
</data>
<data name="VName_Quantity" xml:space="preserve">
<value />
</data>
<data name="Start_quantity" xml:space="preserve">
<value />
</data>
<data name="End_quantity" xml:space="preserve">
<value />
</data>
</root> </root>
+63 -51
View File
@@ -210,6 +210,9 @@
<data name="Procedure" xml:space="preserve"> <data name="Procedure" xml:space="preserve">
<value>Prüfvorlage</value> <value>Prüfvorlage</value>
</data> </data>
<data name="Producer" xml:space="preserve">
<value>Hersteller</value>
</data>
<data name="Protocol" xml:space="preserve"> <data name="Protocol" xml:space="preserve">
<value>Protokoll</value> <value>Protokoll</value>
</data> </data>
@@ -360,57 +363,6 @@
<data name="Mounting" xml:space="preserve"> <data name="Mounting" xml:space="preserve">
<value>Montage</value> <value>Montage</value>
</data> </data>
<data name="Producer" xml:space="preserve">
<value>Hersteller</value>
</data>
<data name="Meter_type" xml:space="preserve">
<value>WZ-Typ</value>
</data>
<data name="Compound" xml:space="preserve">
<value>Verbundzähler</value>
</data>
<data name="Heat_meter" xml:space="preserve">
<value>Wärmezähler</value>
</data>
<data name="Single" xml:space="preserve">
<value>Einzel</value>
</data>
<data name="Category" xml:space="preserve">
<value>Kategorie</value>
</data>
<data name="Quantity" xml:space="preserve">
<value>Größe</value>
</data>
<data name="Page" xml:space="preserve">
<value>Seite</value>
</data>
<data name="Water_Meter" xml:space="preserve">
<value>Wasserzähler</value>
</data>
<data name="aux" xml:space="preserve">
<value>Nebenzähler</value>
</data>
<data name="main" xml:space="preserve">
<value>Hauptzähler</value>
</data>
<data name="fall" xml:space="preserve">
<value>fall</value>
</data>
<data name="from" xml:space="preserve">
<value>von</value>
</data>
<data name="rise" xml:space="preserve">
<value>steig</value>
</data>
<data name="to" xml:space="preserve">
<value>bis</value>
</data>
<data name="VName_Mass" xml:space="preserve">
<value>Masse</value>
</data>
<data name="Density_correction" xml:space="preserve">
<value>Dichtekorrektur</value>
</data>
<data name="Energy" xml:space="preserve"> <data name="Energy" xml:space="preserve">
<value>Energie</value> <value>Energie</value>
</data> </data>
@@ -429,6 +381,21 @@
<data name="P_delta_start" xml:space="preserve"> <data name="P_delta_start" xml:space="preserve">
<value>Druckdifferenz Beginn Prüfung</value> <value>Druckdifferenz Beginn Prüfung</value>
</data> </data>
<data name="Meter_type" xml:space="preserve">
<value>WZ-Typ</value>
</data>
<data name="Compound" xml:space="preserve">
<value>Verbundzähler</value>
</data>
<data name="Heat_meter" xml:space="preserve">
<value>Wärmezähler</value>
</data>
<data name="Single" xml:space="preserve">
<value>Einzel</value>
</data>
<data name="Page" xml:space="preserve">
<value>Seite</value>
</data>
<data name="End_volume" xml:space="preserve"> <data name="End_volume" xml:space="preserve">
<value>Ende Volumen</value> <value>Ende Volumen</value>
</data> </data>
@@ -459,6 +426,15 @@
<data name="Start_mass" xml:space="preserve"> <data name="Start_mass" xml:space="preserve">
<value>Start Prüfung</value> <value>Start Prüfung</value>
</data> </data>
<data name="Category" xml:space="preserve">
<value>Kategorie</value>
</data>
<data name="Quantity" xml:space="preserve">
<value>Größe</value>
</data>
<data name="Water_Meter" xml:space="preserve">
<value>Wasserzähler</value>
</data>
<data name="VName_Flow" xml:space="preserve"> <data name="VName_Flow" xml:space="preserve">
<value>Q</value> <value>Q</value>
</data> </data>
@@ -474,6 +450,9 @@
<data name="VName_Humi" xml:space="preserve"> <data name="VName_Humi" xml:space="preserve">
<value>Hu</value> <value>Hu</value>
</data> </data>
<data name="VName_Mass" xml:space="preserve">
<value>Masse</value>
</data>
<data name="VName_TstTime" xml:space="preserve"> <data name="VName_TstTime" xml:space="preserve">
<value>Tau</value> <value>Tau</value>
</data> </data>
@@ -582,6 +561,12 @@
<data name="Tooltip_T_up_st" xml:space="preserve"> <data name="Tooltip_T_up_st" xml:space="preserve">
<value>Temperatur Prüstreckeneingang am Prüfungsbeginn (4 Messungen nach Beginn)</value> <value>Temperatur Prüstreckeneingang am Prüfungsbeginn (4 Messungen nach Beginn)</value>
</data> </data>
<data name="aux" xml:space="preserve">
<value>Nebenzähler</value>
</data>
<data name="main" xml:space="preserve">
<value>Hauptzähler</value>
</data>
<data name="Tooltip_E_rel" xml:space="preserve"> <data name="Tooltip_E_rel" xml:space="preserve">
<value>Relative Messabweichung eines WZ</value> <value>Relative Messabweichung eines WZ</value>
</data> </data>
@@ -606,6 +591,18 @@
<data name="VName_Error" xml:space="preserve"> <data name="VName_Error" xml:space="preserve">
<value>E</value> <value>E</value>
</data> </data>
<data name="fall" xml:space="preserve">
<value>fall</value>
</data>
<data name="from" xml:space="preserve">
<value>von</value>
</data>
<data name="rise" xml:space="preserve">
<value>steig</value>
</data>
<data name="to" xml:space="preserve">
<value>bis</value>
</data>
<data name="Tooltip_Hu_Amb_M" xml:space="preserve"> <data name="Tooltip_Hu_Amb_M" xml:space="preserve">
<value>Umgebungs-Luftfeuchtigkeit während der Prüfung</value> <value>Umgebungs-Luftfeuchtigkeit während der Prüfung</value>
</data> </data>
@@ -627,6 +624,9 @@
<data name="Yes" xml:space="preserve"> <data name="Yes" xml:space="preserve">
<value>Ja</value> <value>Ja</value>
</data> </data>
<data name="Density_correction" xml:space="preserve">
<value>Dichtekorrektur</value>
</data>
<data name="Error_flags" xml:space="preserve"> <data name="Error_flags" xml:space="preserve">
<value>Fehlerflags</value> <value>Fehlerflags</value>
</data> </data>
@@ -825,4 +825,16 @@
<data name="Selected_items" xml:space="preserve"> <data name="Selected_items" xml:space="preserve">
<value>Ausgewählte Objekte</value> <value>Ausgewählte Objekte</value>
</data> </data>
<data name="PulsesUnit" xml:space="preserve">
<value />
</data>
<data name="VName_Quantity" xml:space="preserve">
<value />
</data>
<data name="Start_quantity" xml:space="preserve">
<value />
</data>
<data name="End_quantity" xml:space="preserve">
<value />
</data>
</root> </root>
+12
View File
@@ -804,4 +804,16 @@
<data name="Serial_number_is_missing" xml:space="preserve"> <data name="Serial_number_is_missing" xml:space="preserve">
<value>Numérotation en série</value> <value>Numérotation en série</value>
</data> </data>
<data name="PulsesUnit" xml:space="preserve">
<value />
</data>
<data name="VName_Quantity" xml:space="preserve">
<value />
</data>
<data name="Start_quantity" xml:space="preserve">
<value />
</data>
<data name="End_quantity" xml:space="preserve">
<value />
</data>
</root> </root>
+12
View File
@@ -537,4 +537,16 @@
<data name="Yes" xml:space="preserve"> <data name="Yes" xml:space="preserve">
<value>Sì</value> <value>Sì</value>
</data> </data>
<data name="PulsesUnit" xml:space="preserve">
<value />
</data>
<data name="VName_Quantity" xml:space="preserve">
<value />
</data>
<data name="Start_quantity" xml:space="preserve">
<value />
</data>
<data name="End_quantity" xml:space="preserve">
<value />
</data>
</root> </root>
+12
View File
@@ -441,4 +441,16 @@
<data name="Unit" xml:space="preserve"> <data name="Unit" xml:space="preserve">
<value>Jednostka</value> <value>Jednostka</value>
</data> </data>
<data name="PulsesUnit" xml:space="preserve">
<value />
</data>
<data name="VName_Quantity" xml:space="preserve">
<value />
</data>
<data name="Start_quantity" xml:space="preserve">
<value />
</data>
<data name="End_quantity" xml:space="preserve">
<value />
</data>
</root> </root>
+12
View File
@@ -852,4 +852,16 @@
<data name="Merge" xml:space="preserve"> <data name="Merge" xml:space="preserve">
<value>Merge</value> <value>Merge</value>
</data> </data>
<data name="PulsesUnit" xml:space="preserve">
<value>Pulses/Unit</value>
</data>
<data name="VName_Quantity" xml:space="preserve">
<value>Quant.</value>
</data>
<data name="Start_quantity" xml:space="preserve">
<value>Start quantity</value>
</data>
<data name="End_quantity" xml:space="preserve">
<value>End quantity</value>
</data>
</root> </root>
+17 -5
View File
@@ -420,22 +420,34 @@
<data name="Volume_main" xml:space="preserve"> <data name="Volume_main" xml:space="preserve">
<value>Объем главн.</value> <value>Объем главн.</value>
</data> </data>
<data name="Water_Meter" xml:space="preserve">
<value>Счетчик воды</value>
</data>
<data name="VName_Vol" xml:space="preserve">
<value>Объем</value>
</data>
<data name="aux" xml:space="preserve"> <data name="aux" xml:space="preserve">
<value>доп.</value> <value>доп.</value>
</data> </data>
<data name="main" xml:space="preserve"> <data name="main" xml:space="preserve">
<value>главн.</value> <value>главн.</value>
</data> </data>
<data name="VName_Vol" xml:space="preserve">
<value>Объем</value>
</data>
<data name="No" xml:space="preserve"> <data name="No" xml:space="preserve">
<value>Нет</value> <value>Нет</value>
</data> </data>
<data name="Yes" xml:space="preserve"> <data name="Yes" xml:space="preserve">
<value>Да</value> <value>Да</value>
</data> </data>
<data name="Water_Meter" xml:space="preserve"> <data name="PulsesUnit" xml:space="preserve">
<value>Счетчик воды</value> <value />
</data>
<data name="VName_Quantity" xml:space="preserve">
<value />
</data>
<data name="Start_quantity" xml:space="preserve">
<value />
</data>
<data name="End_quantity" xml:space="preserve">
<value />
</data> </data>
</root> </root>
Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

+1
View File
@@ -256,6 +256,7 @@
<ItemGroup> <ItemGroup>
<Content Include="Entities\PurchaseEntities\createPurchaseTables.sql" /> <Content Include="Entities\PurchaseEntities\createPurchaseTables.sql" />
<Content Include="Entities\PurchaseEntities\ImportPurchaseOrderTestData.sql" /> <Content Include="Entities\PurchaseEntities\ImportPurchaseOrderTestData.sql" />
<None Include="Resources\TBF_icon.ico" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+21 -13
View File
@@ -131,6 +131,12 @@ namespace Results
AllItems.Add(new WMeterRsltItemSpec(ItemID.String, "String", "", Quantity.String, ItemCategory.Other, (w,t,u,f,p) => f)); AllItems.Add(new WMeterRsltItemSpec(ItemID.String, "String", "", Quantity.String, ItemCategory.Other, (w,t,u,f,p) => f));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Separator, "Separator", "", Quantity.String, ItemCategory.Other, (w,t,u,f,p) => string.Empty)); AllItems.Add(new WMeterRsltItemSpec(ItemID.Separator, "Separator", "", Quantity.String, ItemCategory.Other, (w,t,u,f,p) => string.Empty));
///
/// Register reader
///
AllItems.Add(new WMeterRsltItemSpec(ItemID.RR_Quantity, "RR Quantity", "", Quantity.RegisterReader, ItemCategory.Other, (w,t,u,f,p) => (w.GetMeterTestRslt(t) != null) ? FormatStr(f, w.GetMeterTestRslt(t).GetQuantityFromUnits()) : string.Empty));
AllItems.Add(new WMeterRsltItemSpec(ItemID.RR_Units, "RR Units", "", Quantity.RegisterReader, ItemCategory.Other, (w,t,u,f,p) => (w.GetMeterTestRslt(t) != null) ? FormatStr(f, w.GetMeterTestRslt(t).QuantityUnits) : string.Empty));
/// Common /// Common
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_name, Strings.Test + "()", Quantity.String, ItemCategory.TestData, (w,t,u,f,p) => FormatStr(f, (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Name()))); AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_name, Strings.Test + "()", Quantity.String, ItemCategory.TestData, (w,t,u,f,p) => FormatStr(f, (w.GetTestRslt(t) == null) ? "" : w.GetTestRslt(t).Name())));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Procedure_name, Strings.Procedure, Quantity.String, ItemCategory.Other, (w,t,u,f,p) => FormatStr(f, w.ProcedureName()))); AllItems.Add(new WMeterRsltItemSpec(ItemID.Procedure_name, Strings.Procedure, Quantity.String, ItemCategory.Other, (w,t,u,f,p) => FormatStr(f, w.ProcedureName())));
@@ -155,21 +161,22 @@ namespace Results
/// ///
AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_volume, Strings.Test_vol + "()", Quantity.Volume, ItemCategory.TestData, (w,t,u,f,p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V2", w.GetTestRslt(t).TargetVolume()))); AllItems.Add(new WMeterRsltItemSpec(ItemID.Test_volume, Strings.Test_vol + "()", Quantity.Volume, ItemCategory.TestData, (w,t,u,f,p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V2", w.GetTestRslt(t).TargetVolume())));
AllItems.Add(new WMeterRsltItemSpec(ItemID.VolumeCTV, string.Format("{0} CTV ()", Strings.VName_Vol), Quantity.Volume, ItemCategory.TestResult, (w,t,u,f,p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetTestRslt(t).VolumeCTV))); AllItems.Add(new WMeterRsltItemSpec(ItemID.VolumeCTV, string.Format("{0} CTV ()", Strings.VName_Vol), Quantity.Volume, ItemCategory.TestResult, (w,t,u,f,p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", w.GetTestRslt(t).VolumeCTV)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume, string.Format("{0} Mt. ()", Strings.VName_Vol), Strings.Tooltip_Vol_Mt, Quantity.Volume, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume).VolumeMeter) : ((w.GetMeterTestRslt(t) != null) ? FormatDbl(u,f,p, "V4", w.GetMeterTestRslt(t).VolumeMeter) : string.Empty))); AllItems.Add(new WMeterRsltItemSpec(ItemID.Quantity, string.Format("{0} Mt. ()", Strings.VName_Quantity), Strings.Tooltip_Vol_Mt, Quantity.MultiFunctionalVariables, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume) != null) ? FormatDbl(u, f, p, "V4", (w.GetMeterTestRslt(t).GetQuantityFromUnits() == "Mass" ? w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume).MassMeter : w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume).VolumeMeter)) : ((w.GetMeterTestRslt(t) != null) ? FormatDbl(u, f, p, "V4", (w.GetMeterTestRslt(t).GetQuantityFromUnits() == "Mass" ? w.GetMeterTestRslt(t).MassMeter : w.GetMeterTestRslt(t).VolumeMeter)) : string.Empty)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_volume, string.Format("{0} rm ()", Strings.VName_Vol), Strings.Tooltip_Vol_rm, Quantity.Volume, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume).VolumeRef) : ((w.GetMeterTestRslt(t) != null) ? FormatDbl(u,f,p, "V4", w.GetMeterTestRslt(t).VolumeRef) : string.Empty))); AllItems.Add(new WMeterRsltItemSpec(ItemID.Reference_quantity,string.Format("{0} rm ()", Strings.VName_Quantity), Strings.Tooltip_Vol_rm, Quantity.MultiFunctionalVariables, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume) != null) ? FormatDbl(u, f, p, "V4", (w.GetMeterTestRslt(t).GetQuantityFromUnits() == "Mass" ? w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume).MassRef : w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume).VolumeRef)) : ((w.GetMeterTestRslt(t) != null) ? FormatDbl(u, f, p, "V4", (w.GetMeterTestRslt(t).GetQuantityFromUnits() == "Mass" ? w.GetMeterTestRslt(t).MassRef : w.GetMeterTestRslt(t).VolumeRef)) : string.Empty)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume_main, string.Format("{0} {1} ()", Strings.VName_Vol, Strings.main), Quantity.Volume, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain).VolumeMeter) : string.Empty)); AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume_main, string.Format("{0} {1} ()", Strings.VName_Vol, Strings.main), Quantity.Volume, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain).VolumeMeter) : string.Empty));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume_aux, string.Format("{0} {1} ()", Strings.VName_Vol, Strings.aux), Quantity.Volume, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux).VolumeMeter) : string.Empty)); AllItems.Add(new WMeterRsltItemSpec(ItemID.Volume_aux, string.Format("{0} {1} ()", Strings.VName_Vol, Strings.aux), Quantity.Volume, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux).VolumeMeter) : string.Empty));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume, Strings.Start_volume + "()", Quantity.Volume, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume).VolumeStart) : ((w.GetMeterTestRslt(t) != null) ? FormatDbl(u,f,p, "V4", w.GetMeterTestRslt(t).VolumeStart) : string.Empty))); AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_quantity, Strings.Start_quantity + "()", Quantity.MultiFunctionalVariables, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume).VolumeStart) : ((w.GetMeterTestRslt(t) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeStart) : string.Empty)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume_main, Strings.Start_volume_main + "()", Quantity.Volume, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain).VolumeStart) : string.Empty)); AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume_main, Strings.Start_volume_main + "()", Quantity.Volume, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain).VolumeStart) : string.Empty));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume_aux, Strings.Start_volume_aux + "()", Quantity.Volume, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux).VolumeStart) : string.Empty)); AllItems.Add(new WMeterRsltItemSpec(ItemID.Start_volume_aux, Strings.Start_volume_aux + "()", Quantity.Volume, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux).VolumeStart) : string.Empty));
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume, Strings.End_volume + "()", Quantity.Volume, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume).VolumeEnd) : ((w.GetMeterTestRslt(t) != null) ? FormatDbl(u,f,p, "V4", w.GetMeterTestRslt(t).VolumeEnd) : string.Empty))); AllItems.Add(new WMeterRsltItemSpec(ItemID.End_quantity, Strings.End_quantity + "()", Quantity.MultiFunctionalVariables, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.HeatMeterVolume).VolumeEnd) : ((w.GetMeterTestRslt(t) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).VolumeEnd) : string.Empty)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume_main, Strings.End_volume_main + "()", Quantity.Volume, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain).VolumeEnd) : string.Empty)); AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume_main, Strings.End_volume_main + "()", Quantity.Volume, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain).VolumeEnd) : string.Empty));
AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume_aux, Strings.End_volume_aux + "()", Quantity.Volume, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux).VolumeEnd) : string.Empty)); AllItems.Add(new WMeterRsltItemSpec(ItemID.End_volume_aux, Strings.End_volume_aux + "()", Quantity.Volume, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux) != null) ? FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t, CompoundMeterId.CompoundAux).VolumeEnd) : string.Empty));
/// ///
/// Mass /// Mass
/// ///
AllItems.Add(new WMeterRsltItemSpec(ItemID.Mass_start_raw, string.Format("{0} ST raw ()", Strings.VName_Mass), Quantity.Mass, ItemCategory.TestResult, (w,t,u,f,p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u,f,p, "V4", w.GetTestRslt(t).MassStartRaw))); AllItems.Add(new WMeterRsltItemSpec(ItemID.MassCTV, string.Format("{0} CTV ()", Strings.VName_Mass), Quantity.Mass, ItemCategory.TestResult, (w,t,u,f,p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u,f,p, "V4", w.GetTestRslt(t).MassCTV)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Mass_start_raw, string.Format("{0} ST raw ()", Strings.VName_Mass), Quantity.Mass, ItemCategory.TestResult, (w,t,u,f,p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u,f,p, "V4", w.GetTestRslt(t).MassStartRaw)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Mass_start, string.Format("{0} ST ()", Strings.VName_Mass), Quantity.Mass, ItemCategory.TestResult, (w,t,u,f,p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u,f,p, "V4", w.GetTestRslt(t).MassStart))); AllItems.Add(new WMeterRsltItemSpec(ItemID.Mass_start, string.Format("{0} ST ()", Strings.VName_Mass), Quantity.Mass, ItemCategory.TestResult, (w,t,u,f,p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u,f,p, "V4", w.GetTestRslt(t).MassStart)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Mass_end_raw, string.Format("{0} EN raw ()", Strings.VName_Mass), Quantity.Mass, ItemCategory.TestResult, (w,t,u,f,p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u,f,p, "V4", w.GetTestRslt(t).MassEndRaw))); AllItems.Add(new WMeterRsltItemSpec(ItemID.Mass_end_raw, string.Format("{0} EN raw ()", Strings.VName_Mass), Quantity.Mass, ItemCategory.TestResult, (w,t,u,f,p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u,f,p, "V4", w.GetTestRslt(t).MassEndRaw)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Mass_end, string.Format("{0} EN ()", Strings.VName_Mass), Quantity.Mass, ItemCategory.TestResult, (w,t,u,f,p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u,f,p, "V4", w.GetTestRslt(t).MassEnd))); AllItems.Add(new WMeterRsltItemSpec(ItemID.Mass_end, string.Format("{0} EN ()", Strings.VName_Mass), Quantity.Mass, ItemCategory.TestResult, (w,t,u,f,p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u,f,p, "V4", w.GetTestRslt(t).MassEnd)));
@@ -374,10 +381,11 @@ namespace Results
AllItems.Add(new WMeterRsltItemSpec(ItemID.Camera_angle_start, "Start angle ()", "Start angle measured by a camera",Quantity.Pulses, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t) == null) ? string.Empty : FormatDbl(u,f,p, "F0", w.GetMeterTestRslt(t).IsCamera() ? w.GetMeterTestRslt(t).VolumeStart * w.GetMeterTestRslt(t).PulsesPerLiter : 0))); AllItems.Add(new WMeterRsltItemSpec(ItemID.Camera_angle_start, "Start angle ()", "Start angle measured by a camera",Quantity.Pulses, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t) == null) ? string.Empty : FormatDbl(u,f,p, "F0", w.GetMeterTestRslt(t).IsCamera() ? w.GetMeterTestRslt(t).VolumeStart * w.GetMeterTestRslt(t).PulsesPerLiter : 0)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Camera_angle_end, "End angle ()", "End angle measured by a camera", Quantity.Pulses, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t) == null) ? string.Empty : FormatDbl(u,f,p, "F0", w.GetMeterTestRslt(t).IsCamera() ? w.GetMeterTestRslt(t).VolumeEnd * w.GetMeterTestRslt(t).PulsesPerLiter : 0))); AllItems.Add(new WMeterRsltItemSpec(ItemID.Camera_angle_end, "End angle ()", "End angle measured by a camera", Quantity.Pulses, ItemCategory.MeterResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t) == null) ? string.Empty : FormatDbl(u,f,p, "F0", w.GetMeterTestRslt(t).IsCamera() ? w.GetMeterTestRslt(t).VolumeEnd * w.GetMeterTestRslt(t).PulsesPerLiter : 0)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Pulses_per_liter, Strings.PulsesLiter, Quantity.PulsePerLtr, ItemCategory.MeterData, (w,t,u,f,p) => FormatDbl(u, f, p, "V4", w.WaterMeterData.PulsesPerLtr)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Pls_per_ltr_aux, Strings.PulsesLiter + " aux", Quantity.PulsePerLtr, ItemCategory.MeterData, (w, t, u, f, p) => FormatDbl(u, f, p, "V4", w.WaterMeterData.PulsesPerLtrAux))); AllItems.Add(new WMeterRsltItemSpec(ItemID.Pulses_per_unit, Strings.PulsesUnit, Quantity.PulsePerUnit, ItemCategory.MeterData, (w,t,u,f,p) => FormatDbl(u, f, p, "V4", w.WaterMeterData.PulsesPerLtr)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Pulse__liter, Strings.PulsesLiter + "()", Quantity.PulsePerLtr, ItemCategory.TestResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t) == null) ? string.Empty : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).IsCamera() ? 0 : w.GetMeterTestRslt(t).PulsesPerLiter))); AllItems.Add(new WMeterRsltItemSpec(ItemID.Pls_per_ltr_aux, Strings.PulsesUnit + " aux", Quantity.PulsePerUnit, ItemCategory.MeterData, (w,t,u,f,p) => FormatDbl(u, f, p, "V4", w.WaterMeterData.PulsesPerLtrAux)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Degree__liter, "Degree per liter ()", Quantity.PulsePerLtr, ItemCategory.TestResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t) == null) ? string.Empty : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).IsCamera() ? w.GetMeterTestRslt(t).PulsesPerLiter : 0))); AllItems.Add(new WMeterRsltItemSpec(ItemID.Pulse__liter, Strings.PulsesUnit + "()", Quantity.PulsePerUnit, ItemCategory.TestResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t) == null) ? string.Empty : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).IsCamera() ? 0 : w.GetMeterTestRslt(t).PulsesPerLiter)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Degree__liter, "Degree per unit ()", Quantity.PulsePerUnit, ItemCategory.TestResult, (w,t,u,f,p) => (w.GetMeterTestRslt(t) == null) ? string.Empty : FormatDbl(u, f, p, "V4", w.GetMeterTestRslt(t).IsCamera() ? w.GetMeterTestRslt(t).PulsesPerLiter : 0)));
/// Water meters results (combined) /// Water meters results (combined)
AllItems.Add(new WMeterRsltItemSpec(ItemID.Pulses_main, Strings.Pulses + " " + Strings.main + "()", Quantity.Pulses, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) == null) ? string.Empty : FormatDbl(u, f, p, "F0", w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain).IsPulses() ? w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain).PulsesMeter : 0))); AllItems.Add(new WMeterRsltItemSpec(ItemID.Pulses_main, Strings.Pulses + " " + Strings.main + "()", Quantity.Pulses, ItemCategory.MeterResult, (w, t, u, f, p) => (w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain) == null) ? string.Empty : FormatDbl(u, f, p, "F0", w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain).IsPulses() ? w.GetMeterTestRslt(t, CompoundMeterId.CompoundMain).PulsesMeter : 0)));
@@ -405,7 +413,7 @@ namespace Results
AllItems.Add(new WMeterRsltItemSpec(ItemID.Watermeters, Strings.WMs, Quantity.String, ItemCategory.Other, (w,t,u,f,p) => FormatStr(f, w.Batch.WatermetersStr))); AllItems.Add(new WMeterRsltItemSpec(ItemID.Watermeters, Strings.WMs, Quantity.String, ItemCategory.Other, (w,t,u,f,p) => FormatStr(f, w.Batch.WatermetersStr)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Batch_start_time, Strings.Start, Quantity.DateTime, ItemCategory.Other, (w,t,u,f,p) => string.IsNullOrEmpty(f) ? w.Batch.StartTime.ToString() : string.Format(f, w.Batch.StartTime))); AllItems.Add(new WMeterRsltItemSpec(ItemID.Batch_start_time, Strings.Start, Quantity.DateTime, ItemCategory.Other, (w,t,u,f,p) => string.IsNullOrEmpty(f) ? w.Batch.StartTime.ToString() : string.Format(f, w.Batch.StartTime)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Batch_end_time, Strings.End, Quantity.DateTime, ItemCategory.Other, (w,t,u,f,p) => string.IsNullOrEmpty(f) ? w.Batch.EndTime.ToString() : string.Format(f, w.Batch.EndTime))); AllItems.Add(new WMeterRsltItemSpec(ItemID.Batch_end_time, Strings.End, Quantity.DateTime, ItemCategory.Other, (w,t,u,f,p) => string.IsNullOrEmpty(f) ? w.Batch.EndTime.ToString() : string.Format(f, w.Batch.EndTime)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Lite_per_pulse_Read, "1 / PlsPerLtr_Read", Quantity.PulsePerLtr, ItemCategory.Other, (w,t,u,f,p) => FormatDbl(u, f, p, "V4", (w.WaterMeterData.PulsesPerLtr != 0) ? 1/w.WaterMeterData.PulsesPerLtr : 0))); AllItems.Add(new WMeterRsltItemSpec(ItemID.Unit_per_pulse_Read, "1 / PlsPerUnit_Read", Quantity.PulsePerUnit,ItemCategory.Other, (w,t,u,f,p) => FormatDbl(u, f, p, "V4", (w.WaterMeterData.PulsesPerLtr != 0) ? 1 / w.WaterMeterData.PulsesPerLtr : 0)));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Passed_meters_count, Strings.Passed_meters_count, Quantity.Number, ItemCategory.Other, (w,t,u,f,p) => FormatInt(f, w.Batch.PassedMetersCount()))); AllItems.Add(new WMeterRsltItemSpec(ItemID.Passed_meters_count, Strings.Passed_meters_count, Quantity.Number, ItemCategory.Other, (w,t,u,f,p) => FormatInt(f, w.Batch.PassedMetersCount())));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Failed_meters_count, Strings.Failed_meters_count, Quantity.Number, ItemCategory.Other, (w,t,u,f,p) => FormatInt(f, w.Batch.FailedMetersCount()))); AllItems.Add(new WMeterRsltItemSpec(ItemID.Failed_meters_count, Strings.Failed_meters_count, Quantity.Number, ItemCategory.Other, (w,t,u,f,p) => FormatInt(f, w.Batch.FailedMetersCount())));
AllItems.Add(new WMeterRsltItemSpec(ItemID.Failed_meters_countE15, Strings.Failed_meters_count + "E15", Quantity.Number, ItemCategory.Other, (w,t,u,f,p) => FormatInt(f, w.Batch.FailedMetersCountE15()))); AllItems.Add(new WMeterRsltItemSpec(ItemID.Failed_meters_countE15, Strings.Failed_meters_count + "E15", Quantity.Number, ItemCategory.Other, (w,t,u,f,p) => FormatInt(f, w.Batch.FailedMetersCountE15())));
@@ -1,5 +0,0 @@
is_global = true
build_property.RootNamespace = SharedComponents
build_property.ProjectDir = C:\Users\micha\git\tbf\SharedComponents\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
@@ -1,15 +1,16 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?> <?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' "> <PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess> <RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool> <RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile> <ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot> <NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\micha\.nuget\packages\</NuGetPackageFolders> <NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\MFRNIAK\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle> <NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.14.0</NuGetToolVersion> <NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.14.0</NuGetToolVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' "> <ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\micha\.nuget\packages\" /> <SourceRoot Include="C:\Users\MFRNIAK\.nuget\packages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
</ItemGroup> </ItemGroup>
</Project> </Project>
+2
View File
@@ -44,6 +44,8 @@ namespace SharedDatabase.Forms
{ {
InitializeComponent(); InitializeComponent();
this.Icon = Properties.Resources.TBF_icon;
loginStatePictureBox1.Image = Properties.Resources.questionMark; loginStatePictureBox1.Image = Properties.Resources.questionMark;
loginStatePictureBox2.Image = Properties.Resources.questionMark; loginStatePictureBox2.Image = Properties.Resources.questionMark;
authorizedUser1 = null; authorizedUser1 = null;
+3
View File
@@ -31,6 +31,9 @@ namespace SharedDatabase.Forms
public EditSelectedUser() public EditSelectedUser()
{ {
InitializeComponent(); InitializeComponent();
this.Icon = Properties.Resources.TBF_icon;
this.toolTip1.SetToolTip(this.txtName, string.Format(Strings.max_0_alphanum_chars, 20)); this.toolTip1.SetToolTip(this.txtName, string.Format(Strings.max_0_alphanum_chars, 20));
oriGroupMember = new bool[(displayedGroups != null) ? displayedGroups.Count : 0]; oriGroupMember = new bool[(displayedGroups != null) ? displayedGroups.Count : 0];
okBtn.Enabled = false; okBtn.Enabled = false;
+2
View File
@@ -45,6 +45,8 @@ namespace SharedDatabase.Forms
{ {
InitializeComponent(); InitializeComponent();
this.Icon = Properties.Resources.TBF_icon;
oriBackColor = BackColor; oriBackColor = BackColor;
} }
@@ -22,6 +22,8 @@ namespace SharedDatabase.Forms
public PasswordChangeDlg() public PasswordChangeDlg()
{ {
InitializeComponent(); InitializeComponent();
this.Icon = Properties.Resources.TBF_icon;
} }
/// <summary> /// <summary>
@@ -30,6 +32,9 @@ namespace SharedDatabase.Forms
public PasswordChangeDlg(string predefinedUser) public PasswordChangeDlg(string predefinedUser)
{ {
InitializeComponent(); InitializeComponent();
this.Icon = Properties.Resources.TBF_icon;
userNameTextBox.Text = predefinedUser; userNameTextBox.Text = predefinedUser;
} }
+2
View File
@@ -46,6 +46,8 @@ namespace SharedDatabase.Forms
{ {
InitializeComponent(); InitializeComponent();
this.Icon = Properties.Resources.TBF_icon;
oriBackColor = BackColor; oriBackColor = BackColor;
} }
+2
View File
@@ -46,6 +46,8 @@ namespace SharedDatabase.Forms
{ {
InitializeComponent(); InitializeComponent();
this.Icon = Properties.Resources.TBF_icon;
loginStatePictureBox1.Image = Properties.Resources.questionMark; loginStatePictureBox1.Image = Properties.Resources.questionMark;
loginStatePictureBox2.Image = Properties.Resources.questionMark; loginStatePictureBox2.Image = Properties.Resources.questionMark;
loginStatePictureBox3.Image = Properties.Resources.questionMark; loginStatePictureBox3.Image = Properties.Resources.questionMark;
@@ -35,6 +35,9 @@ namespace SharedDatabase.Forms
public UserManagementDlg(NHibernate.ISession session, bool showLocalExtensions) public UserManagementDlg(NHibernate.ISession session, bool showLocalExtensions)
{ {
InitializeComponent(); InitializeComponent();
this.Icon = Properties.Resources.TBF_icon;
this.session = session; this.session = session;
this.showExtensions = showLocalExtensions; this.showExtensions = showLocalExtensions;
if (showLocalExtensions) copyFromRemoteButton.Visible = true; if (showLocalExtensions) copyFromRemoteButton.Visible = true;
+11 -1
View File
@@ -19,7 +19,7 @@ namespace SharedDatabase.Properties {
// class via a tool like ResGen or Visual Studio. // class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen // To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project. // with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources { internal class Resources {
@@ -89,5 +89,15 @@ namespace SharedDatabase.Properties {
return ((System.Drawing.Bitmap)(obj)); return ((System.Drawing.Bitmap)(obj));
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
internal static System.Drawing.Icon TBF_icon {
get {
object obj = ResourceManager.GetObject("TBF_icon", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
} }
} }
+3
View File
@@ -127,4 +127,7 @@
<data name="rejected" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="rejected" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Pictures\rejected.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Pictures\rejected.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="TBF_icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\TBF_icon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root> </root>
Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

+3
View File
@@ -221,6 +221,9 @@
<None Include="Pictures\questionMark.bmp" /> <None Include="Pictures\questionMark.bmp" />
<None Include="Pictures\rejected.bmp" /> <None Include="Pictures\rejected.bmp" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="Resources\TBF_icon.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- 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. Other similar extension points exist, see Microsoft.Common.targets.
+28
View File
@@ -119,6 +119,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sensus.iPerl.TestConsole",
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NfcS5_DLL", "..\NfcS5_DLL\NfcS5_DLL.csproj", "{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NfcS5_DLL", "..\NfcS5_DLL\NfcS5_DLL.csproj", "{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NfcC7_DLL", "NfcC7_DLL\NfcC7_DLL.csproj", "{53E75979-B530-4805-8FC9-B314F14A62BE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NfcC7_DLL.Tests", "NfcC7_DLL.Tests\NfcC7_DLL.Tests.csproj", "{715605C5-568B-48D6-9C09-2DC5F2E81F66}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@@ -539,6 +543,30 @@ Global
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Release|Mixed Platforms.Build.0 = Release|Any CPU {5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Release|x86.ActiveCfg = Release|Any CPU {5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Release|x86.ActiveCfg = Release|Any CPU
{5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Release|x86.Build.0 = Release|Any CPU {5954D496-CAAB-4F7A-BDE2-BDC8F47DAB19}.Release|x86.Build.0 = Release|Any CPU
{53E75979-B530-4805-8FC9-B314F14A62BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{53E75979-B530-4805-8FC9-B314F14A62BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{53E75979-B530-4805-8FC9-B314F14A62BE}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{53E75979-B530-4805-8FC9-B314F14A62BE}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{53E75979-B530-4805-8FC9-B314F14A62BE}.Debug|x86.ActiveCfg = Debug|Any CPU
{53E75979-B530-4805-8FC9-B314F14A62BE}.Debug|x86.Build.0 = Debug|Any CPU
{53E75979-B530-4805-8FC9-B314F14A62BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{53E75979-B530-4805-8FC9-B314F14A62BE}.Release|Any CPU.Build.0 = Release|Any CPU
{53E75979-B530-4805-8FC9-B314F14A62BE}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{53E75979-B530-4805-8FC9-B314F14A62BE}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{53E75979-B530-4805-8FC9-B314F14A62BE}.Release|x86.ActiveCfg = Release|Any CPU
{53E75979-B530-4805-8FC9-B314F14A62BE}.Release|x86.Build.0 = Release|Any CPU
{715605C5-568B-48D6-9C09-2DC5F2E81F66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{715605C5-568B-48D6-9C09-2DC5F2E81F66}.Debug|Any CPU.Build.0 = Debug|Any CPU
{715605C5-568B-48D6-9C09-2DC5F2E81F66}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{715605C5-568B-48D6-9C09-2DC5F2E81F66}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{715605C5-568B-48D6-9C09-2DC5F2E81F66}.Debug|x86.ActiveCfg = Debug|Any CPU
{715605C5-568B-48D6-9C09-2DC5F2E81F66}.Debug|x86.Build.0 = Debug|Any CPU
{715605C5-568B-48D6-9C09-2DC5F2E81F66}.Release|Any CPU.ActiveCfg = Release|Any CPU
{715605C5-568B-48D6-9C09-2DC5F2E81F66}.Release|Any CPU.Build.0 = Release|Any CPU
{715605C5-568B-48D6-9C09-2DC5F2E81F66}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{715605C5-568B-48D6-9C09-2DC5F2E81F66}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{715605C5-568B-48D6-9C09-2DC5F2E81F66}.Release|x86.ActiveCfg = Release|Any CPU
{715605C5-568B-48D6-9C09-2DC5F2E81F66}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
+44
View File
@@ -0,0 +1,44 @@
///
/// Copyright (c) 2017 Sensus Metering Systems
///
using System.Drawing;
using System.Windows.Forms;
namespace TBF.Boxes
{
public class CheckBoxImage : PictureBox
{
private bool cbChecked;
private readonly Image checkedImg;
private readonly Image uncheckedImg;
public CheckBoxImage()
: this(new Bitmap(TBF.Properties.Resources.SwitchOn), new Bitmap(TBF.Properties.Resources.SwitchOff), true)
{
SizeMode = PictureBoxSizeMode.StretchImage;
}
public CheckBoxImage(Image checkedImg, Image uncheckedImg, bool initState)
: base()
{
this.checkedImg = checkedImg;
this.uncheckedImg = uncheckedImg;
Click += (sender, e) => { Checked = !Checked; };
Checked = initState;
}
public bool Checked
{
get { return cbChecked; }
set
{
if (Enabled)
{
Image = value ? checkedImg : uncheckedImg;
cbChecked = value;
}
}
}
}
}
+2 -2
View File
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number // Build Number
// Revision // Revision
// //
[assembly: AssemblyVersion("3.9.2147.1")] [assembly: AssemblyVersion("3.9.2149.4")]
[assembly: AssemblyFileVersion("3.9.2147.1")] [assembly: AssemblyFileVersion("3.9.2149.4")]
+11 -1
View File
@@ -19,7 +19,7 @@ namespace TBF.Properties {
// class via a tool like ResGen or Visual Studio. // class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen // To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project. // with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources { internal class Resources {
@@ -150,6 +150,16 @@ namespace TBF.Properties {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
internal static System.Drawing.Icon TBF_icon {
get {
object obj = ResourceManager.GetObject("TBF_icon", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>
+3
View File
@@ -208,4 +208,7 @@
<data name="TControl_XL_idle" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="TControl_XL_idle" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Rig\Modbus\TempControl\Pictures\TControl-XL-idle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Rig\Modbus\TempControl\Pictures\TControl-XL-idle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="TBF_icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\TBF_icon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root> </root>
+1 -1
View File
@@ -19,8 +19,8 @@
<requestedExecutionLevel level="asInvoker" uiAccess="false" /> <requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges> </requestedPrivileges>
<applicationRequestMinimum> <applicationRequestMinimum>
<PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true" ID="Custom" SameSite="site" />
<defaultAssemblyRequest permissionSetReference="Custom" /> <defaultAssemblyRequest permissionSetReference="Custom" />
<PermissionSet class="System.Security.PermissionSet" version="1" ID="Custom" SameSite="site" Unrestricted="true" />
</applicationRequestMinimum> </applicationRequestMinimum>
</security> </security>
</trustInfo> </trustInfo>
+5
View File
@@ -0,0 +1,5 @@
## Version History
| Version | Target Environment | Title | Description |
|------------|--------------------------------------------------------------|-----------------------------------------------------|------------------------------------|
| 3.9.2149.0 | HeatMeters, Heat meter sensors, Procedure Dilog, Tab Process | Excanged columns value 'Sensor' and 'Heat meter sensor' | Fix in code ProcedureDlg, row 1851 |
+28
View File
@@ -1,6 +1,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:4.0.30319.42000
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
@@ -4415,6 +4416,15 @@ namespace TBF.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Pulses per kilogram.
/// </summary>
internal static string PulsesPerKilogram {
get {
return ResourceManager.GetString("PulsesPerKilogram", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Pulses per kWh. /// Looks up a localized string similar to Pulses per kWh.
/// </summary> /// </summary>
@@ -4433,6 +4443,15 @@ namespace TBF.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Pulses per unit.
/// </summary>
internal static string PulsesPerUnit {
get {
return ResourceManager.GetString("PulsesPerUnit", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Pump. /// Looks up a localized string similar to Pump.
/// </summary> /// </summary>
@@ -6686,6 +6705,15 @@ namespace TBF.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Units.
/// </summary>
internal static string Units {
get {
return ResourceManager.GetString("Units", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Unlock. /// Looks up a localized string similar to Unlock.
/// </summary> /// </summary>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+9
View File
@@ -126,4 +126,13 @@
<data name="ShowDialog" xml:space="preserve"> <data name="ShowDialog" xml:space="preserve">
<value>Mostrar diálogo</value> <value>Mostrar diálogo</value>
</data> </data>
<data name="PulsesPerUnit" xml:space="preserve">
<value />
</data>
<data name="PulsesPerKilogram" xml:space="preserve">
<value />
</data>
<data name="Units" xml:space="preserve">
<value />
</data>
</root> </root>
+38 -32
View File
@@ -117,9 +117,6 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="Activity" xml:space="preserve">
<value>Activité</value>
</data>
<data name="Confirmation" xml:space="preserve"> <data name="Confirmation" xml:space="preserve">
<value>Confirmation</value> <value>Confirmation</value>
</data> </data>
@@ -399,9 +396,6 @@
<data name="Tol_red_pct_chdr" xml:space="preserve"> <data name="Tol_red_pct_chdr" xml:space="preserve">
<value>Toler rouge. [%]</value> <value>Toler rouge. [%]</value>
</data> </data>
<data name="Test_time_s_chdr" xml:space="preserve">
<value>Temps test [s]</value>
</data>
<data name="Error_while_creating_DB_Reason" xml:space="preserve"> <data name="Error_while_creating_DB_Reason" xml:space="preserve">
<value>Erreur lors de la création de la base de données. Raison:</value> <value>Erreur lors de la création de la base de données. Raison:</value>
</data> </data>
@@ -525,9 +519,6 @@
<data name="RelativeQto" xml:space="preserve"> <data name="RelativeQto" xml:space="preserve">
<value>Q relatif à</value> <value>Q relatif à</value>
</data> </data>
<data name="TargetQ" xml:space="preserve">
<value>Q cible [m3/h]</value>
</data>
<data name="Compound_meters" xml:space="preserve"> <data name="Compound_meters" xml:space="preserve">
<value>Mètres composés</value> <value>Mètres composés</value>
</data> </data>
@@ -618,6 +609,9 @@
<data name="Switching_flow_detection" xml:space="preserve"> <data name="Switching_flow_detection" xml:space="preserve">
<value>Détection flux commutation</value> <value>Détection flux commutation</value>
</data> </data>
<data name="Activity" xml:space="preserve">
<value>Activité</value>
</data>
<data name="Progress" xml:space="preserve"> <data name="Progress" xml:space="preserve">
<value>Progrès</value> <value>Progrès</value>
</data> </data>
@@ -888,7 +882,7 @@
<data name="Qrise" xml:space="preserve"> <data name="Qrise" xml:space="preserve">
<value>Q hausse</value> <value>Q hausse</value>
</data> </data>
<data name="Serial_Number" xml:space="preserve"> <data name="Serial_number" xml:space="preserve">
<value>Numéro série</value> <value>Numéro série</value>
</data> </data>
<data name="State" xml:space="preserve"> <data name="State" xml:space="preserve">
@@ -939,6 +933,9 @@
<data name="Purchase_order" xml:space="preserve"> <data name="Purchase_order" xml:space="preserve">
<value>Commande</value> <value>Commande</value>
</data> </data>
<data name="Project_number" xml:space="preserve">
<value>Numéro de projet</value>
</data>
<data name="Ambient_humidity" xml:space="preserve"> <data name="Ambient_humidity" xml:space="preserve">
<value>Humidité ambiante</value> <value>Humidité ambiante</value>
</data> </data>
@@ -1245,9 +1242,6 @@
<data name="Target_ref_pulses_" xml:space="preserve"> <data name="Target_ref_pulses_" xml:space="preserve">
<value>Cible ref impulsions:</value> <value>Cible ref impulsions:</value>
</data> </data>
<data name="Target_volume_l_" xml:space="preserve">
<value>Volume cible [l]:</value>
</data>
<data name="Save_column_widths" xml:space="preserve"> <data name="Save_column_widths" xml:space="preserve">
<value>Enregistrer largeurs colonne</value> <value>Enregistrer largeurs colonne</value>
</data> </data>
@@ -1386,9 +1380,6 @@
<data name="Last_changed_by" xml:space="preserve"> <data name="Last_changed_by" xml:space="preserve">
<value>Dernier changement dby</value> <value>Dernier changement dby</value>
</data> </data>
<data name="Meter_types_tested" xml:space="preserve">
<value>Types compteurs testés</value>
</data>
<data name="Notes" xml:space="preserve"> <data name="Notes" xml:space="preserve">
<value>Remarques</value> <value>Remarques</value>
</data> </data>
@@ -1671,6 +1662,9 @@
<data name="Protected_procedure" xml:space="preserve"> <data name="Protected_procedure" xml:space="preserve">
<value>Procédure protégée</value> <value>Procédure protégée</value>
</data> </data>
<data name="Empty" xml:space="preserve">
<value>Vidanger</value>
</data>
<data name="Session" xml:space="preserve"> <data name="Session" xml:space="preserve">
<value>Session</value> <value>Session</value>
</data> </data>
@@ -1713,9 +1707,6 @@
<data name="RFID_communication_failed" xml:space="preserve"> <data name="RFID_communication_failed" xml:space="preserve">
<value>Échec communication RFID</value> <value>Échec communication RFID</value>
</data> </data>
<data name="Opto_head_was_disabled_by_the_user" xml:space="preserve">
<value>tête désactivée par utilisateur</value>
</data>
<data name="failed_0_1_exclamation" xml:space="preserve"> <data name="failed_0_1_exclamation" xml:space="preserve">
<value>{0}' exclamation échoué ({1}) !!!</value> <value>{0}' exclamation échoué ({1}) !!!</value>
</data> </data>
@@ -1803,9 +1794,6 @@
<data name="Refresh" xml:space="preserve"> <data name="Refresh" xml:space="preserve">
<value>Rafraîchir</value> <value>Rafraîchir</value>
</data> </data>
<data name="current" xml:space="preserve">
<value>actuel</value>
</data>
<data name="Flow" xml:space="preserve"> <data name="Flow" xml:space="preserve">
<value>Couler</value> <value>Couler</value>
</data> </data>
@@ -1905,7 +1893,7 @@
<data name="Import" xml:space="preserve"> <data name="Import" xml:space="preserve">
<value>Importation</value> <value>Importation</value>
</data> </data>
<data name="repetition" xml:space="preserve"> <data name="Repetition" xml:space="preserve">
<value>répétition</value> <value>répétition</value>
</data> </data>
<data name="Result" xml:space="preserve"> <data name="Result" xml:space="preserve">
@@ -1989,6 +1977,9 @@
<data name="End_session" xml:space="preserve"> <data name="End_session" xml:space="preserve">
<value>Terminer le cycle</value> <value>Terminer le cycle</value>
</data> </data>
<data name="Fill" xml:space="preserve">
<value>Inonder</value>
</data>
<data name="Pipeline" xml:space="preserve"> <data name="Pipeline" xml:space="preserve">
<value>Pipeline</value> <value>Pipeline</value>
</data> </data>
@@ -2001,25 +1992,40 @@
<data name="Q_tg" xml:space="preserve"> <data name="Q_tg" xml:space="preserve">
<value>Q obj.</value> <value>Q obj.</value>
</data> </data>
<data name="Empty" xml:space="preserve">
<value>Vidanger</value>
</data>
<data name="Empty_the_tank" xml:space="preserve"> <data name="Empty_the_tank" xml:space="preserve">
<value>Vidanger réservoir</value> <value>Vidanger réservoir</value>
</data> </data>
<data name="Fill" xml:space="preserve">
<value>Inonder</value>
</data>
<data name="Current" xml:space="preserve"> <data name="Current" xml:space="preserve">
<value>Curren</value> <value>Curren</value>
</data> </data>
<data name="Voltage" xml:space="preserve"> <data name="Voltage" xml:space="preserve">
<value>Tension</value> <value>Tension</value>
</data> </data>
<data name="Project_number" xml:space="preserve">
<value>Numéro de projet</value>
</data>
<data name="ShowDialog" xml:space="preserve"> <data name="ShowDialog" xml:space="preserve">
<value>Afficher la boîte de dialogue</value> <value>Afficher la boîte de dialogue</value>
</data> </data>
<data name="Meter_types_tested" xml:space="preserve">
<value>Types compteurs testés</value>
</data>
<data name="TargetQ" xml:space="preserve">
<value>Q cible [m3/h]</value>
</data>
<data name="Target_volume_l_" xml:space="preserve">
<value>Volume cible [l]:</value>
</data>
<data name="Opto_head_was_disabled_by_the_user" xml:space="preserve">
<value>tête désactivée par utilisateur</value>
</data>
<data name="Test_time_s_chdr" xml:space="preserve">
<value>Temps test [s]</value>
</data>
<data name="PulsesPerUnit" xml:space="preserve">
<value />
</data>
<data name="PulsesPerKilogram" xml:space="preserve">
<value />
</data>
<data name="Units" xml:space="preserve">
<value />
</data>
</root> </root>
+67 -58
View File
@@ -117,9 +117,6 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="Activity" xml:space="preserve">
<value>Attività</value>
</data>
<data name="Confirmation" xml:space="preserve"> <data name="Confirmation" xml:space="preserve">
<value>conferma</value> <value>conferma</value>
</data> </data>
@@ -252,9 +249,6 @@
<data name="Nr" xml:space="preserve"> <data name="Nr" xml:space="preserve">
<value>numero</value> <value>numero</value>
</data> </data>
<data name="Mass" xml:space="preserve">
<value>massa</value>
</data>
<data name="AddBtnText" xml:space="preserve"> <data name="AddBtnText" xml:space="preserve">
<value>Aggiunta</value> <value>Aggiunta</value>
</data> </data>
@@ -276,12 +270,6 @@
<data name="OkBtnText" xml:space="preserve"> <data name="OkBtnText" xml:space="preserve">
<value>Ok</value> <value>Ok</value>
</data> </data>
<data name="Flow" xml:space="preserve">
<value>flusso</value>
</data>
<data name="Pressure" xml:space="preserve">
<value>pressione</value>
</data>
<data name="Invalid_username_or_password" xml:space="preserve"> <data name="Invalid_username_or_password" xml:space="preserve">
<value>Username o password non validi</value> <value>Username o password non validi</value>
</data> </data>
@@ -399,12 +387,6 @@
<data name="Output_chdr" xml:space="preserve"> <data name="Output_chdr" xml:space="preserve">
<value>Uscite</value> <value>Uscite</value>
</data> </data>
<data name="Q_from_lph" xml:space="preserve">
<value>Qda [l/h]</value>
</data>
<data name="Q_to_lph" xml:space="preserve">
<value>Q a [l/h]</value>
</data>
<data name="Red_type_chdr" xml:space="preserve"> <data name="Red_type_chdr" xml:space="preserve">
<value>tipo rosso</value> <value>tipo rosso</value>
</data> </data>
@@ -414,9 +396,6 @@
<data name="Tol_red_pct_chdr" xml:space="preserve"> <data name="Tol_red_pct_chdr" xml:space="preserve">
<value>tolleranza rossa [%]</value> <value>tolleranza rossa [%]</value>
</data> </data>
<data name="Test_time_s_chdr" xml:space="preserve">
<value>test time [s]</value>
</data>
<data name="Error_while_creating_DB_Reason" xml:space="preserve"> <data name="Error_while_creating_DB_Reason" xml:space="preserve">
<value>errore durante la creazione del data base. ragioni:</value> <value>errore durante la creazione del data base. ragioni:</value>
</data> </data>
@@ -540,9 +519,6 @@
<data name="RelativeQto" xml:space="preserve"> <data name="RelativeQto" xml:space="preserve">
<value>Q relativo a</value> <value>Q relativo a</value>
</data> </data>
<data name="TargetQ" xml:space="preserve">
<value>target Q [m3/h]</value>
</data>
<data name="Compound_meters" xml:space="preserve"> <data name="Compound_meters" xml:space="preserve">
<value>metri composti</value> <value>metri composti</value>
</data> </data>
@@ -633,6 +609,9 @@
<data name="Switching_flow_detection" xml:space="preserve"> <data name="Switching_flow_detection" xml:space="preserve">
<value>rilevamento del flusso di commutazione</value> <value>rilevamento del flusso di commutazione</value>
</data> </data>
<data name="Activity" xml:space="preserve">
<value>Attività</value>
</data>
<data name="Progress" xml:space="preserve"> <data name="Progress" xml:space="preserve">
<value>progressi</value> <value>progressi</value>
</data> </data>
@@ -903,7 +882,7 @@
<data name="Qrise" xml:space="preserve"> <data name="Qrise" xml:space="preserve">
<value>Qalta</value> <value>Qalta</value>
</data> </data>
<data name="Serial_Number" xml:space="preserve"> <data name="Serial_number" xml:space="preserve">
<value>Numero Seriale</value> <value>Numero Seriale</value>
</data> </data>
<data name="State" xml:space="preserve"> <data name="State" xml:space="preserve">
@@ -954,6 +933,9 @@
<data name="Purchase_order" xml:space="preserve"> <data name="Purchase_order" xml:space="preserve">
<value>ordine acquisto</value> <value>ordine acquisto</value>
</data> </data>
<data name="Project_number" xml:space="preserve">
<value>Numero del progetto</value>
</data>
<data name="Ambient_humidity" xml:space="preserve"> <data name="Ambient_humidity" xml:space="preserve">
<value>Umidità dell'ambiente</value> <value>Umidità dell'ambiente</value>
</data> </data>
@@ -981,9 +963,6 @@
<data name="Start" xml:space="preserve"> <data name="Start" xml:space="preserve">
<value>Inizio</value> <value>Inizio</value>
</data> </data>
<data name="AtTemperature_C" xml:space="preserve">
<value>@temperatura [°C]</value>
</data>
<data name="Density" xml:space="preserve"> <data name="Density" xml:space="preserve">
<value>densità</value> <value>densità</value>
</data> </data>
@@ -1125,15 +1104,15 @@
<data name="ID" xml:space="preserve"> <data name="ID" xml:space="preserve">
<value>ID </value> <value>ID </value>
</data> </data>
<data name="Focus" xml:space="preserve">
<value>messa a fuoco</value>
</data>
<data name="Grab" xml:space="preserve"> <data name="Grab" xml:space="preserve">
<value>afferrare</value> <value>afferrare</value>
</data> </data>
<data name="Live" xml:space="preserve"> <data name="Live" xml:space="preserve">
<value>dal vivo</value> <value>dal vivo</value>
</data> </data>
<data name="Camera" xml:space="preserve">
<value>Fotocamera</value>
</data>
<data name="Closing_the_tank" xml:space="preserve"> <data name="Closing_the_tank" xml:space="preserve">
<value>chiusura del serbatoio</value> <value>chiusura del serbatoio</value>
</data> </data>
@@ -1212,15 +1191,15 @@
<data name="Compound_meter_0" xml:space="preserve"> <data name="Compound_meter_0" xml:space="preserve">
<value>misuratore composto {0}</value> <value>misuratore composto {0}</value>
</data> </data>
<data name="Error_" xml:space="preserve">
<value>Errore:</value>
</data>
<data name="Estimated_time_s_" xml:space="preserve"> <data name="Estimated_time_s_" xml:space="preserve">
<value>tempo stimato [s]:</value> <value>tempo stimato [s]:</value>
</data> </data>
<data name="Mass_diff_kg_" xml:space="preserve"> <data name="Mass_diff_kg_" xml:space="preserve">
<value>mass diff [kg]:</value> <value>mass diff [kg]:</value>
</data> </data>
<data name="Mass" xml:space="preserve">
<value>massa</value>
</data>
<data name="Meter" xml:space="preserve"> <data name="Meter" xml:space="preserve">
<value>metri</value> <value>metri</value>
</data> </data>
@@ -1260,9 +1239,6 @@
<data name="Target_ref_pulses_" xml:space="preserve"> <data name="Target_ref_pulses_" xml:space="preserve">
<value>Target ref. count:</value> <value>Target ref. count:</value>
</data> </data>
<data name="Target_volume_l_" xml:space="preserve">
<value>target volume [l]:</value>
</data>
<data name="Save_column_widths" xml:space="preserve"> <data name="Save_column_widths" xml:space="preserve">
<value>salva larghezza colonne</value> <value>salva larghezza colonne</value>
</data> </data>
@@ -1314,6 +1290,9 @@
<data name="Print_watermeter_results" xml:space="preserve"> <data name="Print_watermeter_results" xml:space="preserve">
<value>stampare i risultati dei contatori</value> <value>stampare i risultati dei contatori</value>
</data> </data>
<data name="Save_again" xml:space="preserve">
<value>inviato</value>
</data>
<data name="Sent" xml:space="preserve"> <data name="Sent" xml:space="preserve">
<value>inviato</value> <value>inviato</value>
</data> </data>
@@ -1398,9 +1377,6 @@
<data name="Last_changed_by" xml:space="preserve"> <data name="Last_changed_by" xml:space="preserve">
<value>ultimo cambiato da </value> <value>ultimo cambiato da </value>
</data> </data>
<data name="Meter_types_tested" xml:space="preserve">
<value>tipi di contatori testati</value>
</data>
<data name="Notes" xml:space="preserve"> <data name="Notes" xml:space="preserve">
<value>note</value> <value>note</value>
</data> </data>
@@ -1572,9 +1548,6 @@
<data name="User_code" xml:space="preserve"> <data name="User_code" xml:space="preserve">
<value>codice utente</value> <value>codice utente</value>
</data> </data>
<data name="Save_again" xml:space="preserve">
<value>inviato</value>
</data>
<data name="Failed_to_initialize_device_0_1_2" xml:space="preserve"> <data name="Failed_to_initialize_device_0_1_2" xml:space="preserve">
<value>Errore dispositivo '{0}':{1}{2}</value> <value>Errore dispositivo '{0}':{1}{2}</value>
</data> </data>
@@ -1686,8 +1659,8 @@
<data name="Protected_procedure" xml:space="preserve"> <data name="Protected_procedure" xml:space="preserve">
<value>Procedura protetta</value> <value>Procedura protetta</value>
</data> </data>
<data name="Drain" xml:space="preserve"> <data name="Empty" xml:space="preserve">
<value>Drenare</value> <value>Svuotare</value>
</data> </data>
<data name="Session" xml:space="preserve"> <data name="Session" xml:space="preserve">
<value>Sessione</value> <value>Sessione</value>
@@ -1740,14 +1713,17 @@
<data name="Correction" xml:space="preserve"> <data name="Correction" xml:space="preserve">
<value>correzione</value> <value>correzione</value>
</data> </data>
<data name="Camera" xml:space="preserve"> <data name="Start_the_test_bench" xml:space="preserve">
<value>Fotocamera</value> <value>Avvio del banco prova</value>
</data> </data>
<data name="Finish_the_session_please" xml:space="preserve"> <data name="Finish_the_session_please" xml:space="preserve">
<value>Finire la misurazione perfavore</value> <value>Finire la misurazione perfavore</value>
</data> </data>
<data name="Start_the_test_bench" xml:space="preserve"> <data name="Flow" xml:space="preserve">
<value>Avvio del banco prova</value> <value>flusso</value>
</data>
<data name="Pressure" xml:space="preserve">
<value>pressione</value>
</data> </data>
<data name="Flow_adjustment_failed" xml:space="preserve"> <data name="Flow_adjustment_failed" xml:space="preserve">
<value>Errore impostazione del flusso</value> <value>Errore impostazione del flusso</value>
@@ -1761,12 +1737,6 @@
<data name="Abort_session" xml:space="preserve"> <data name="Abort_session" xml:space="preserve">
<value>Interrompere</value> <value>Interrompere</value>
</data> </data>
<data name="Empty" xml:space="preserve">
<value>Svuotare</value>
</data>
<data name="Empty_the_tank" xml:space="preserve">
<value>Svuotare il serbatoio</value>
</data>
<data name="End_session" xml:space="preserve"> <data name="End_session" xml:space="preserve">
<value>Finire il ciclo</value> <value>Finire il ciclo</value>
</data> </data>
@@ -1779,16 +1749,55 @@
<data name="Start_cycle" xml:space="preserve"> <data name="Start_cycle" xml:space="preserve">
<value>Avviare il ciclo</value> <value>Avviare il ciclo</value>
</data> </data>
<data name="Empty_the_tank" xml:space="preserve">
<value>Svuotare il serbatoio</value>
</data>
<data name="Current" xml:space="preserve"> <data name="Current" xml:space="preserve">
<value>Corrente</value> <value>Corrente</value>
</data> </data>
<data name="Voltage" xml:space="preserve"> <data name="Voltage" xml:space="preserve">
<value>Voltaggio</value> <value>Voltaggio</value>
</data> </data>
<data name="Project_number" xml:space="preserve">
<value>Numero del progetto</value>
</data>
<data name="ShowDialog" xml:space="preserve"> <data name="ShowDialog" xml:space="preserve">
<value>Mostra dialogo</value> <value>Mostra dialogo</value>
</data> </data>
<data name="Meter_types_tested" xml:space="preserve">
<value>tipi di contatori testati</value>
</data>
<data name="Q_from_lph" xml:space="preserve">
<value>Qda [l/h]</value>
</data>
<data name="Q_to_lph" xml:space="preserve">
<value>Q a [l/h]</value>
</data>
<data name="TargetQ" xml:space="preserve">
<value>target Q [m3/h]</value>
</data>
<data name="Target_volume_l_" xml:space="preserve">
<value>target volume [l]:</value>
</data>
<data name="Test_time_s_chdr" xml:space="preserve">
<value>test time [s]</value>
</data>
<data name="AtTemperature_C" xml:space="preserve">
<value>@temperatura [°C]</value>
</data>
<data name="Focus" xml:space="preserve">
<value>messa a fuoco</value>
</data>
<data name="Error_" xml:space="preserve">
<value>Errore:</value>
</data>
<data name="Drain" xml:space="preserve">
<value>Drenare</value>
</data>
<data name="PulsesPerUnit" xml:space="preserve">
<value />
</data>
<data name="PulsesPerKilogram" xml:space="preserve">
<value />
</data>
<data name="Units" xml:space="preserve">
<value />
</data>
</root> </root>
File diff suppressed because it is too large Load Diff
+12 -4
View File
@@ -198,10 +198,10 @@
<data name="Reg_valve" xml:space="preserve"> <data name="Reg_valve" xml:space="preserve">
<value>Reg. valve</value> <value>Reg. valve</value>
</data> </data>
<data name="RegulMinStep" xml:space="preserve"> <data name="RegulMinStep" xml:space="preserve">
<value>Reg. min step</value> <value>Reg. min step</value>
</data> </data>
<data name="Application_Diagnostic" xml:space="preserve"> <data name="Application_Diagnostic" xml:space="preserve">
<value>Application diagnostic</value> <value>Application diagnostic</value>
</data> </data>
<data name="Balance" xml:space="preserve"> <data name="Balance" xml:space="preserve">
@@ -2449,7 +2449,7 @@
<data name="Upgrade_DB" xml:space="preserve"> <data name="Upgrade_DB" xml:space="preserve">
<value>Upgrade database</value> <value>Upgrade database</value>
</data> </data>
<data name="AppDiagnostic" xml:space="preserve"> <data name="AppDiagnostic" xml:space="preserve">
<value>Application diagnostic</value> <value>Application diagnostic</value>
</data> </data>
<data name="About" xml:space="preserve"> <data name="About" xml:space="preserve">
@@ -2473,5 +2473,13 @@
<data name="SaveCommunication" xml:space="preserve"> <data name="SaveCommunication" xml:space="preserve">
<value>Save Communication</value> <value>Save Communication</value>
</data> </data>
<data name="PulsesPerUnit" xml:space="preserve">
<value>Pulses per unit</value>
</data>
<data name="PulsesPerKilogram" xml:space="preserve">
<value>Pulses per kilogram</value>
</data>
<data name="Units" xml:space="preserve">
<value>Units</value>
</data>
</root> </root>
File diff suppressed because it is too large Load Diff
+85 -76
View File
@@ -117,9 +117,6 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="Activity" xml:space="preserve">
<value>Активность</value>
</data>
<data name="Confirmation" xml:space="preserve"> <data name="Confirmation" xml:space="preserve">
<value>Подтверждение</value> <value>Подтверждение</value>
</data> </data>
@@ -183,6 +180,12 @@
<data name="P_out" xml:space="preserve"> <data name="P_out" xml:space="preserve">
<value>P вниз</value> <value>P вниз</value>
</data> </data>
<data name="Q_from" xml:space="preserve">
<value>Q от</value>
</data>
<data name="Q_to" xml:space="preserve">
<value>Q до</value>
</data>
<data name="Reference" xml:space="preserve"> <data name="Reference" xml:space="preserve">
<value>Ссылка</value> <value>Ссылка</value>
</data> </data>
@@ -240,9 +243,6 @@
<data name="Nr" xml:space="preserve"> <data name="Nr" xml:space="preserve">
<value>№</value> <value>№</value>
</data> </data>
<data name="Mass" xml:space="preserve">
<value>Масса</value>
</data>
<data name="AddBtnText" xml:space="preserve"> <data name="AddBtnText" xml:space="preserve">
<value>Добавить</value> <value>Добавить</value>
</data> </data>
@@ -264,12 +264,6 @@
<data name="OkBtnText" xml:space="preserve"> <data name="OkBtnText" xml:space="preserve">
<value>OK</value> <value>OK</value>
</data> </data>
<data name="Flow" xml:space="preserve">
<value>Расход</value>
</data>
<data name="Pressure" xml:space="preserve">
<value>Давление</value>
</data>
<data name="Username" xml:space="preserve"> <data name="Username" xml:space="preserve">
<value>Имя пользователя</value> <value>Имя пользователя</value>
</data> </data>
@@ -384,12 +378,6 @@
<data name="Output_chdr" xml:space="preserve"> <data name="Output_chdr" xml:space="preserve">
<value>Выход</value> <value>Выход</value>
</data> </data>
<data name="Q_from_lph" xml:space="preserve">
<value>Q от [л/ч]</value>
</data>
<data name="Q_to_lph" xml:space="preserve">
<value>Q до [л/ч]</value>
</data>
<data name="Red_type_chdr" xml:space="preserve"> <data name="Red_type_chdr" xml:space="preserve">
<value>Тип сокращ.</value> <value>Тип сокращ.</value>
</data> </data>
@@ -399,9 +387,6 @@
<data name="Tol_red_pct_chdr" xml:space="preserve"> <data name="Tol_red_pct_chdr" xml:space="preserve">
<value>Toler. red. [%]</value> <value>Toler. red. [%]</value>
</data> </data>
<data name="Test_time_s_chdr" xml:space="preserve">
<value>Время теста [с]</value>
</data>
<data name="Error_while_creating_DB_Reason" xml:space="preserve"> <data name="Error_while_creating_DB_Reason" xml:space="preserve">
<value>Ошибка при создании базы данных. Причина:</value> <value>Ошибка при создании базы данных. Причина:</value>
</data> </data>
@@ -525,9 +510,6 @@
<data name="RelativeQto" xml:space="preserve"> <data name="RelativeQto" xml:space="preserve">
<value>Относительный Q до</value> <value>Относительный Q до</value>
</data> </data>
<data name="TargetQ" xml:space="preserve">
<value>Заданный Q [м3/ч]</value>
</data>
<data name="Compound_meters" xml:space="preserve"> <data name="Compound_meters" xml:space="preserve">
<value>Комбинированные счетчики</value> <value>Комбинированные счетчики</value>
</data> </data>
@@ -618,6 +600,9 @@
<data name="Switching_flow_detection" xml:space="preserve"> <data name="Switching_flow_detection" xml:space="preserve">
<value>Переключение потока</value> <value>Переключение потока</value>
</data> </data>
<data name="Activity" xml:space="preserve">
<value>Активность</value>
</data>
<data name="Progress" xml:space="preserve"> <data name="Progress" xml:space="preserve">
<value>Прогресс</value> <value>Прогресс</value>
</data> </data>
@@ -888,7 +873,7 @@
<data name="Qrise" xml:space="preserve"> <data name="Qrise" xml:space="preserve">
<value>Qпониж</value> <value>Qпониж</value>
</data> </data>
<data name="Serial_Number" xml:space="preserve"> <data name="Serial_number" xml:space="preserve">
<value>Серийный номер</value> <value>Серийный номер</value>
</data> </data>
<data name="State" xml:space="preserve"> <data name="State" xml:space="preserve">
@@ -939,6 +924,9 @@
<data name="Purchase_order" xml:space="preserve"> <data name="Purchase_order" xml:space="preserve">
<value>Заказ</value> <value>Заказ</value>
</data> </data>
<data name="Project_number" xml:space="preserve">
<value>Номер проекта</value>
</data>
<data name="Ambient_humidity" xml:space="preserve"> <data name="Ambient_humidity" xml:space="preserve">
<value>Относительная влажность окружающей среды</value> <value>Относительная влажность окружающей среды</value>
</data> </data>
@@ -966,9 +954,6 @@
<data name="Start" xml:space="preserve"> <data name="Start" xml:space="preserve">
<value>Старт</value> <value>Старт</value>
</data> </data>
<data name="AtTemperature_C" xml:space="preserve">
<value>температура [°C]</value>
</data>
<data name="Density" xml:space="preserve"> <data name="Density" xml:space="preserve">
<value>Плотность</value> <value>Плотность</value>
</data> </data>
@@ -996,12 +981,6 @@
<data name="Qt" xml:space="preserve"> <data name="Qt" xml:space="preserve">
<value>Qt</value> <value>Qt</value>
</data> </data>
<data name="cold" xml:space="preserve">
<value>холодный</value>
</data>
<data name="hot" xml:space="preserve">
<value>горячий</value>
</data>
<data name="Water" xml:space="preserve"> <data name="Water" xml:space="preserve">
<value>Вода</value> <value>Вода</value>
</data> </data>
@@ -1110,9 +1089,6 @@
<data name="ID" xml:space="preserve"> <data name="ID" xml:space="preserve">
<value>ID</value> <value>ID</value>
</data> </data>
<data name="Focus" xml:space="preserve">
<value>Сфокусировать</value>
</data>
<data name="Grab" xml:space="preserve"> <data name="Grab" xml:space="preserve">
<value>Захватить</value> <value>Захватить</value>
</data> </data>
@@ -1203,6 +1179,9 @@
<data name="Mass_diff_kg_" xml:space="preserve"> <data name="Mass_diff_kg_" xml:space="preserve">
<value>Mass diff. [kg]:</value> <value>Mass diff. [kg]:</value>
</data> </data>
<data name="Mass" xml:space="preserve">
<value>Масса</value>
</data>
<data name="Meter" xml:space="preserve"> <data name="Meter" xml:space="preserve">
<value>Счетчик</value> <value>Счетчик</value>
</data> </data>
@@ -1242,9 +1221,6 @@
<data name="Target_ref_pulses_" xml:space="preserve"> <data name="Target_ref_pulses_" xml:space="preserve">
<value>Target ref. count:</value> <value>Target ref. count:</value>
</data> </data>
<data name="Target_volume_l_" xml:space="preserve">
<value>Заданный объем [л]:</value>
</data>
<data name="Save_column_widths" xml:space="preserve"> <data name="Save_column_widths" xml:space="preserve">
<value>Сохранить ширину столбцов</value> <value>Сохранить ширину столбцов</value>
</data> </data>
@@ -1296,9 +1272,6 @@
<data name="Print_watermeter_results" xml:space="preserve"> <data name="Print_watermeter_results" xml:space="preserve">
<value>Печатать результатов водосчетчиков</value> <value>Печатать результатов водосчетчиков</value>
</data> </data>
<data name="Again" xml:space="preserve">
<value>Снова</value>
</data>
<data name="Sent" xml:space="preserve"> <data name="Sent" xml:space="preserve">
<value>Отправлено</value> <value>Отправлено</value>
</data> </data>
@@ -1383,9 +1356,6 @@
<data name="Last_changed_by" xml:space="preserve"> <data name="Last_changed_by" xml:space="preserve">
<value>Изменено</value> <value>Изменено</value>
</data> </data>
<data name="Meter_types_tested" xml:space="preserve">
<value>Типы испытываемых счетчиков</value>
</data>
<data name="Notes" xml:space="preserve"> <data name="Notes" xml:space="preserve">
<value>Заметки</value> <value>Заметки</value>
</data> </data>
@@ -1557,6 +1527,57 @@
<data name="User_code" xml:space="preserve"> <data name="User_code" xml:space="preserve">
<value>Код пользователя</value> <value>Код пользователя</value>
</data> </data>
<data name="Resetting_scales" xml:space="preserve">
<value>Сброс весов</value>
</data>
<data name="Correction" xml:space="preserve">
<value>Коррекция</value>
</data>
<data name="Flow" xml:space="preserve">
<value>Расход</value>
</data>
<data name="Pressure" xml:space="preserve">
<value>Давление</value>
</data>
<data name="Result" xml:space="preserve">
<value>Результат</value>
</data>
<data name="Evaporation" xml:space="preserve">
<value>испарение</value>
</data>
<data name="String1" xml:space="preserve">
<value>Строка 1</value>
</data>
<data name="Current" xml:space="preserve">
<value>Current</value>
</data>
<data name="Voltage" xml:space="preserve">
<value>Voltage</value>
</data>
<data name="cold" xml:space="preserve">
<value>холодный</value>
</data>
<data name="hot" xml:space="preserve">
<value>горячий</value>
</data>
<data name="Test_method2" xml:space="preserve">
<value>Метод испытаний 2</value>
</data>
<data name="Meter_types_tested" xml:space="preserve">
<value>Типы испытываемых счетчиков</value>
</data>
<data name="Short_dercription" xml:space="preserve">
<value>Краткое описание</value>
</data>
<data name="Q_from_lph" xml:space="preserve">
<value>Q от [л/ч]</value>
</data>
<data name="Q_to_lph" xml:space="preserve">
<value>Q до [л/ч]</value>
</data>
<data name="TargetQ" xml:space="preserve">
<value>Заданный Q [м3/ч]</value>
</data>
<data name="P_in_end" xml:space="preserve"> <data name="P_in_end" xml:space="preserve">
<value>P вверх конец</value> <value>P вверх конец</value>
</data> </data>
@@ -1569,43 +1590,31 @@
<data name="P_out_start" xml:space="preserve"> <data name="P_out_start" xml:space="preserve">
<value>P вниз начало</value> <value>P вниз начало</value>
</data> </data>
<data name="Q_from" xml:space="preserve"> <data name="Target_volume_l_" xml:space="preserve">
<value>Q от</value> <value>Заданный объем [л]:</value>
</data> </data>
<data name="Q_to" xml:space="preserve"> <data name="Test_time_s_chdr" xml:space="preserve">
<value>Q до</value> <value>Время теста [с]</value>
</data>
<data name="AtTemperature_C" xml:space="preserve">
<value>температура [°C]</value>
</data>
<data name="Focus" xml:space="preserve">
<value>Сфокусировать</value>
</data> </data>
<data name="ROI_Detection_in_ProgressROI_Detection_in_Progress" xml:space="preserve"> <data name="ROI_Detection_in_ProgressROI_Detection_in_Progress" xml:space="preserve">
<value>Продолжается распознавание</value> <value>Продолжается распознавание</value>
</data> </data>
<data name="String1" xml:space="preserve"> <data name="Again" xml:space="preserve">
<value>Строка 1</value> <value>Снова</value>
</data> </data>
<data name="Test_method2" xml:space="preserve"> <data name="PulsesPerUnit" xml:space="preserve">
<value>Метод испытаний 2</value> <value />
</data> </data>
<data name="Short_dercription" xml:space="preserve"> <data name="PulsesPerKilogram" xml:space="preserve">
<value>Краткое описание</value> <value />
</data> </data>
<data name="Correction" xml:space="preserve"> <data name="Units" xml:space="preserve">
<value>Коррекция</value> <value />
</data>
<data name="Resetting_scales" xml:space="preserve">
<value>Сброс весов</value>
</data>
<data name="Result" xml:space="preserve">
<value>Результат</value>
</data>
<data name="Evaporation" xml:space="preserve">
<value>испарение</value>
</data>
<data name="Current" xml:space="preserve">
<value>Current</value>
</data>
<data name="Voltage" xml:space="preserve">
<value>Voltage</value>
</data>
<data name="Project_number" xml:space="preserve">
<value>Номер проекта</value>
</data> </data>
</root> </root>
+37 -28
View File
@@ -117,33 +117,51 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="Activity" xml:space="preserve"> <data name="Error" xml:space="preserve">
<value>Činnosť</value> <value>Chyba</value>
</data>
<data name="Sensor" xml:space="preserve">
<value>Senzor</value>
</data> </data>
<data name="CancelBtnText" xml:space="preserve"> <data name="CancelBtnText" xml:space="preserve">
<value>Zrušiť</value> <value>Zrušiť</value>
</data> </data>
<data name="Compound" xml:space="preserve"> <data name="OkBtnText" xml:space="preserve">
<value>Združený</value> <value>Áno</value>
</data>
<data name="Exit" xml:space="preserve">
<value>Ukončiť</value>
</data> </data>
<data name="Compound_meters" xml:space="preserve"> <data name="Compound_meters" xml:space="preserve">
<value>Združené vodomery</value> <value>Združené vodomery</value>
</data> </data>
<data name="Error" xml:space="preserve"> <data name="Activity" xml:space="preserve">
<value>Chyba</value> <value>Činnosť</value>
</data>
<data name="Compound" xml:space="preserve">
<value>Združený</value>
</data>
<data name="Serial_number" xml:space="preserve">
<value>Sériové číslo</value>
</data>
<data name="Project_number" xml:space="preserve">
<value>Číslo projektu</value>
</data> </data>
<data name="Language" xml:space="preserve"> <data name="Language" xml:space="preserve">
<value>Jazyk</value> <value>Jazyk</value>
</data> </data>
<data name="OkBtnText" xml:space="preserve"> <data name="Paths" xml:space="preserve">
<value>Áno</value> <value>Cesty</value>
</data> </data>
<data name="Head_was_disabled_by_the_user" xml:space="preserve"> <data name="Meter" xml:space="preserve">
<value>Hlavica bola vypnutá používateľom</value> <value>Merač</value>
</data> </data>
<data name="RFID_communication_failed" xml:space="preserve"> <data name="RFID_communication_failed" xml:space="preserve">
<value>Zlyhala RFID komunikácia</value> <value>Zlyhala RFID komunikácia</value>
</data> </data>
<data name="Head_was_disabled_by_the_user" xml:space="preserve">
<value>Hlavica bola vypnutá používateľom</value>
</data>
<data name="Level" xml:space="preserve"> <data name="Level" xml:space="preserve">
<value>Hladina</value> <value>Hladina</value>
</data> </data>
@@ -156,15 +174,9 @@
<data name="Side" xml:space="preserve"> <data name="Side" xml:space="preserve">
<value>Strana</value> <value>Strana</value>
</data> </data>
<data name="Meter" xml:space="preserve">
<value>Merač</value>
</data>
<data name="Result" xml:space="preserve"> <data name="Result" xml:space="preserve">
<value>Výsledok</value> <value>Výsledok</value>
</data> </data>
<data name="Sensor" xml:space="preserve">
<value>Senzor</value>
</data>
<data name="Mute_alarm" xml:space="preserve"> <data name="Mute_alarm" xml:space="preserve">
<value>Stlmiť sirénu</value> <value>Stlmiť sirénu</value>
</data> </data>
@@ -217,9 +229,6 @@
<data name="Production_order_and_serial_numbers" xml:space="preserve"> <data name="Production_order_and_serial_numbers" xml:space="preserve">
<value>Výrobná zákazka a sériové čísla</value> <value>Výrobná zákazka a sériové čísla</value>
</data> </data>
<data name="Serial_number" xml:space="preserve">
<value>Sériové číslo</value>
</data>
<data name="Serial_numbers" xml:space="preserve"> <data name="Serial_numbers" xml:space="preserve">
<value>Sériové čísla</value> <value>Sériové čísla</value>
</data> </data>
@@ -235,19 +244,19 @@
<data name="Do_you_really_want_to_delete_all_codes_Q" xml:space="preserve"> <data name="Do_you_really_want_to_delete_all_codes_Q" xml:space="preserve">
<value>Naozaj chcete vymazať všetky kódy ?</value> <value>Naozaj chcete vymazať všetky kódy ?</value>
</data> </data>
<data name="Exit" xml:space="preserve">
<value>Ukončiť</value>
</data>
<data name="Paths" xml:space="preserve">
<value>Cesty</value>
</data>
<data name="Project_number" xml:space="preserve">
<value>Číslo projektu</value>
</data>
<data name="ShowDialog" xml:space="preserve"> <data name="ShowDialog" xml:space="preserve">
<value>Zobraz dialóg</value> <value>Zobraz dialóg</value>
</data> </data>
<data name="SaveCommunication" xml:space="preserve"> <data name="SaveCommunication" xml:space="preserve">
<value>Ulož komunikáciu</value> <value>Ulož komunikáciu</value>
</data> </data>
<data name="PulsesPerUnit" xml:space="preserve">
<value />
</data>
<data name="PulsesPerKilogram" xml:space="preserve">
<value />
</data>
<data name="Units" xml:space="preserve">
<value />
</data>
</root> </root>
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

+8 -5
View File
@@ -73,8 +73,11 @@ namespace TBF.Rig.Ambient.Comet
[XmlIgnore] [XmlIgnore]
public IList<GNode> GNodes { get; set; } public IList<GNode> GNodes { get; set; }
/// Private parameterless constructor invoked by all other (public) constructors [XmlIgnore]
AmbientCfg() public bool IsOffline { get; set; }
/// Private parameterless constructor invoked by all other (public) constructors
AmbientCfg()
{ {
GNodes = new List<GNode>(); GNodes = new List<GNode>();
Format = string.Empty; Format = string.Empty;
@@ -128,15 +131,15 @@ namespace TBF.Rig.Ambient.Comet
"Stop bits", /// 4 "Stop bits", /// 4
"Handshake", /// 5 "Handshake", /// 5
"Set DTR to one", /// 6 "Set DTR to one", /// 6
"Unit of temperature", /// 7 "Units of temperature", /// 7
"Temperature limit Lo", /// 8 "Temperature limit Lo", /// 8
"Temperature limit Hi", /// 9 "Temperature limit Hi", /// 9
"Default temperature", /// 10 "Default temperature", /// 10
"Unit of pressure", /// 11 "Units of pressure", /// 11
"Pressure limit Lo", /// 12 "Pressure limit Lo", /// 12
"Pressure limit Hi", /// 13 "Pressure limit Hi", /// 13
"Default pressure", /// 14 "Default pressure", /// 14
"Unit of rel. humidity", /// 15 "Units of rel. humidity", /// 15
"Rel. humidity limit Lo", /// 16 "Rel. humidity limit Lo", /// 16
"Rel. humidity limit Hi", /// 17 "Rel. humidity limit Hi", /// 17
"Default retl. humidity", /// 18 "Default retl. humidity", /// 18
+2
View File
@@ -67,11 +67,13 @@ namespace TBF.Rig.BuiltIn.PumpTandem
if (pump1 is BuiltIn.Pump.Pump) { mask1 = (pump1 as BuiltIn.Pump.Pump).Mask; } if (pump1 is BuiltIn.Pump.Pump) { mask1 = (pump1 as BuiltIn.Pump.Pump).Mask; }
else if (pump1 is Danfoss.VLT2800.Pump) { mask1 = (pump1 as Danfoss.VLT2800.Pump).Mask; } else if (pump1 is Danfoss.VLT2800.Pump) { mask1 = (pump1 as Danfoss.VLT2800.Pump).Mask; }
else if (pump1 is Modbus.PumpFM.DanfossVLT.Pump) { mask1 = (pump1 as Modbus.PumpFM.DanfossVLT.Pump).Mask; } else if (pump1 is Modbus.PumpFM.DanfossVLT.Pump) { mask1 = (pump1 as Modbus.PumpFM.DanfossVLT.Pump).Mask; }
else if (pump1 is Modbus.PumpFM.Grundfoss.Pump) { mask1 = (pump1 as Modbus.PumpFM.Grundfoss.Pump).Mask; }
else { mask1 = 0; } else { mask1 = 0; }
if (pump2 is BuiltIn.Pump.Pump) { mask2 = (pump2 as BuiltIn.Pump.Pump).Mask; } if (pump2 is BuiltIn.Pump.Pump) { mask2 = (pump2 as BuiltIn.Pump.Pump).Mask; }
else if (pump2 is Danfoss.VLT2800.Pump) { mask2 = (pump2 as Danfoss.VLT2800.Pump).Mask; } else if (pump2 is Danfoss.VLT2800.Pump) { mask2 = (pump2 as Danfoss.VLT2800.Pump).Mask; }
else if (pump2 is Modbus.PumpFM.DanfossVLT.Pump) { mask2 = (pump2 as Modbus.PumpFM.DanfossVLT.Pump).Mask; } else if (pump2 is Modbus.PumpFM.DanfossVLT.Pump) { mask2 = (pump2 as Modbus.PumpFM.DanfossVLT.Pump).Mask; }
else if (pump2 is Modbus.PumpFM.Grundfoss.Pump) { mask2 = (pump2 as Modbus.PumpFM.Grundfoss.Pump).Mask; }
else { mask2 = 0; } else { mask2 = 0; }
log.FatalFormat("{0} initialized: {1}", Name, this); log.FatalFormat("{0} initialized: {1}", Name, this);
@@ -44,6 +44,7 @@ namespace TBF.Rig.BuiltIn.PumpTandem
if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is BuiltIn.Pump.PumpFactory || if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is BuiltIn.Pump.PumpFactory ||
TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Danfoss.VLT2800.PumpFactory || TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Danfoss.VLT2800.PumpFactory ||
TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Modbus.PumpFM.DanfossVLT.Factory || TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Modbus.PumpFM.DanfossVLT.Factory ||
TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Modbus.PumpFM.Grundfoss.Factory ||
TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is BuiltIn.PumpTandem.PumpFactory) TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is BuiltIn.PumpTandem.PumpFactory)
{ {
pump1ComboBox.Items.Add(cmpnt.Name); pump1ComboBox.Items.Add(cmpnt.Name);
+4 -2
View File
@@ -120,7 +120,8 @@ namespace TBF.Rig.BuiltIn
if (valve is PumpTandem.Pump) point.MasksOpen |= (valve as PumpTandem.Pump).Mask; if (valve is PumpTandem.Pump) point.MasksOpen |= (valve as PumpTandem.Pump).Mask;
if (valve is Danfoss.VLT2800.Pump) point.MasksOpen |= (valve as Danfoss.VLT2800.Pump).Mask; if (valve is Danfoss.VLT2800.Pump) point.MasksOpen |= (valve as Danfoss.VLT2800.Pump).Mask;
if (valve is Modbus.PumpFM.DanfossVLT.Pump) point.MasksOpen |= (valve as Modbus.PumpFM.DanfossVLT.Pump).Mask; if (valve is Modbus.PumpFM.DanfossVLT.Pump) point.MasksOpen |= (valve as Modbus.PumpFM.DanfossVLT.Pump).Mask;
} if (valve is Modbus.PumpFM.Grundfoss.Pump) point.MasksOpen |= (valve as Modbus.PumpFM.Grundfoss.Pump).Mask;
}
point.MasksClose = 0; point.MasksClose = 0;
foreach (var valve in point.VClose) foreach (var valve in point.VClose)
{ {
@@ -129,7 +130,8 @@ namespace TBF.Rig.BuiltIn
if (valve is PumpTandem.Pump) point.MasksClose |= (valve as PumpTandem.Pump).Mask; if (valve is PumpTandem.Pump) point.MasksClose |= (valve as PumpTandem.Pump).Mask;
if (valve is Danfoss.VLT2800.Pump) point.MasksClose |= (valve as Danfoss.VLT2800.Pump).Mask; if (valve is Danfoss.VLT2800.Pump) point.MasksClose |= (valve as Danfoss.VLT2800.Pump).Mask;
if (valve is Modbus.PumpFM.DanfossVLT.Pump) point.MasksClose |= (valve as Modbus.PumpFM.DanfossVLT.Pump).Mask; if (valve is Modbus.PumpFM.DanfossVLT.Pump) point.MasksClose |= (valve as Modbus.PumpFM.DanfossVLT.Pump).Mask;
} if (valve is Modbus.PumpFM.Grundfoss.Pump) point.MasksClose |= (valve as Modbus.PumpFM.Grundfoss.Pump).Mask;
}
point.TimeSec += timeShift; point.TimeSec += timeShift;
} }
} }
+2
View File
@@ -35,6 +35,7 @@ namespace TBF.Rig.BuiltIn
if (vlv is Pump.Pump && ((vlv as Pump.Pump).Mask & changed) == 0) continue; if (vlv is Pump.Pump && ((vlv as Pump.Pump).Mask & changed) == 0) continue;
if (vlv is Danfoss.VLT2800.Pump && ((vlv as Danfoss.VLT2800.Pump).Mask & changed) == 0) continue; if (vlv is Danfoss.VLT2800.Pump && ((vlv as Danfoss.VLT2800.Pump).Mask & changed) == 0) continue;
if (vlv is Modbus.PumpFM.DanfossVLT.Pump && ((vlv as Modbus.PumpFM.DanfossVLT.Pump).Mask & changed) == 0) continue; if (vlv is Modbus.PumpFM.DanfossVLT.Pump && ((vlv as Modbus.PumpFM.DanfossVLT.Pump).Mask & changed) == 0) continue;
if (vlv is Modbus.PumpFM.Grundfoss.Pump && ((vlv as Modbus.PumpFM.Grundfoss.Pump).Mask & changed) == 0) continue;
if ((vlv != null) && (vlv.Delay > max)) max = vlv.Delay; if ((vlv != null) && (vlv.Delay > max)) max = vlv.Delay;
} }
@@ -45,6 +46,7 @@ namespace TBF.Rig.BuiltIn
if (vlv is Pump.Pump && ((vlv as Pump.Pump).Mask & changed) == 0) continue; if (vlv is Pump.Pump && ((vlv as Pump.Pump).Mask & changed) == 0) continue;
if (vlv is Danfoss.VLT2800.Pump && ((vlv as Danfoss.VLT2800.Pump).Mask & changed) == 0) continue; if (vlv is Danfoss.VLT2800.Pump && ((vlv as Danfoss.VLT2800.Pump).Mask & changed) == 0) continue;
if (vlv is Modbus.PumpFM.DanfossVLT.Pump && ((vlv as Modbus.PumpFM.DanfossVLT.Pump).Mask & changed) == 0) continue; if (vlv is Modbus.PumpFM.DanfossVLT.Pump && ((vlv as Modbus.PumpFM.DanfossVLT.Pump).Mask & changed) == 0) continue;
if (vlv is Modbus.PumpFM.Grundfoss.Pump && ((vlv as Modbus.PumpFM.Grundfoss.Pump).Mask & changed) == 0) continue;
if ((vlv != null) && (vlv.Delay > max)) max = vlv.Delay; if ((vlv != null) && (vlv.Delay > max)) max = vlv.Delay;
} }
@@ -2,6 +2,7 @@
/// Copyright (c) 2021-2023 Sensus Slovensko a.s. /// Copyright (c) 2021-2023 Sensus Slovensko a.s.
/// ///
using System; using System;
using Common;
using log4net; using log4net;
using TBF.Rig.Sequences; using TBF.Rig.Sequences;
@@ -12,6 +13,10 @@ namespace TBF.Rig.ControlBoard.Uni
private static readonly ILog log = LogManager.GetLogger(typeof(FlyingStartStopTestOp)); private static readonly ILog log = LogManager.GetLogger(typeof(FlyingStartStopTestOp));
public override string ToString() { return string.Format("FlyingStartStopTestOp()"); } public override string ToString() { return string.Format("FlyingStartStopTestOp()"); }
private DateTime startTimeForSimulation;
private bool simulationTimerStarted = false;
/// Arguments of the constructor /// Arguments of the constructor
readonly UniCB uniCB; readonly UniCB uniCB;
readonly double qFrom; readonly double qFrom;
@@ -123,6 +128,28 @@ namespace TBF.Rig.ControlBoard.Uni
{ {
log.DebugFormat("Op.Run() opState={0}", opState); log.DebugFormat("Op.Run() opState={0}", opState);
//Simulation of processing time 25 seconds
if (uniCB.DebugLevel == DebugMode.Simulate)
{
if (opState == OpState.StartingTest)
{
startTimeForSimulation = DateTime.Now;
simulationTimerStarted = false;
}
if (opState == OpState.TestInProgress)
{
if (!simulationTimerStarted)
{
startTimeForSimulation = DateTime.Now;
simulationTimerStarted = true;
}
else if (DateTime.Now - startTimeForSimulation > TimeSpan.FromSeconds(25))
{
return Event.TestCompleted;
}
}
}
switch (opState) switch (opState)
{ {
case OpState.StartingTest: case OpState.StartingTest:
@@ -5,6 +5,7 @@ using System;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
using Common;
using log4net; using log4net;
using TBF.Rig.GenericDevices; using TBF.Rig.GenericDevices;
@@ -25,6 +26,9 @@ namespace TBF.Rig.ControlBoard.Uni
readonly int pulsesCount; /// Number of reference pulses for a complete test readonly int pulsesCount; /// Number of reference pulses for a complete test
readonly bool withDiverter; /// Test with diverter (and scale) readonly bool withDiverter; /// Test with diverter (and scale)
private DateTime startTimeForSimulation;
private bool simulationTimerStarted = false;
/// ///
/// Internal state of this operation /// Internal state of this operation
/// ///
@@ -183,6 +187,28 @@ namespace TBF.Rig.ControlBoard.Uni
{ {
log.DebugFormat("Run() opState={0}", opState); log.DebugFormat("Run() opState={0}", opState);
//Simulation of processing time 25 seconds
if (uniCB.DebugLevel == DebugMode.Simulate)
{
if (opState == OpState.StartingTest)
{
startTimeForSimulation = DateTime.Now;
simulationTimerStarted = false;
}
if (opState == OpState.TestInProgress)
{
if (!simulationTimerStarted)
{
startTimeForSimulation = DateTime.Now;
simulationTimerStarted = true;
}
else if (DateTime.Now - startTimeForSimulation > TimeSpan.FromSeconds(25))
{
return Event.TestCompleted;
}
}
}
switch (opState) switch (opState)
{ {
case OpState.StartingTest: case OpState.StartingTest:
@@ -57,6 +57,9 @@ namespace TBF.Rig.DataEntry.Combined
public CycleBeginningForm(int compoundWaterMetersCount, bool remarksEnabled) public CycleBeginningForm(int compoundWaterMetersCount, bool remarksEnabled)
{ {
InitializeComponent(); InitializeComponent();
this.Icon = Properties.Resources.TBF_icon;
ControlBox = false; ControlBox = false;
TextBoxesCount = 3; TextBoxesCount = 3;
+4 -1
View File
@@ -33,7 +33,10 @@ namespace TBF.Rig.DataEntry.Combined
public CycleEndForm() public CycleEndForm()
{ {
InitializeComponent(); InitializeComponent();
ControlBox = false;
this.Icon = Properties.Resources.TBF_icon;
ControlBox = false;
MainStateText = new string[TBF.Data.CompoundWMsCount]; MainStateText = new string[TBF.Data.CompoundWMsCount];
AuxStateText = new string[TBF.Data.CompoundWMsCount]; AuxStateText = new string[TBF.Data.CompoundWMsCount];
@@ -56,7 +56,10 @@ namespace TBF.Rig.DataEntry.Combined
public TestStartEndForm() public TestStartEndForm()
{ {
InitializeComponent(); InitializeComponent();
ControlBox = false;
this.Icon = Properties.Resources.TBF_icon;
ControlBox = false;
TextBoxesCount = 3; TextBoxesCount = 3;
+1
View File
@@ -16,6 +16,7 @@ namespace TBF.Rig.DataEntry
[Description("Load")] Load, /// Load from water meters when the form is open, save on OK [Description("Load")] Load, /// Load from water meters when the form is open, save on OK
[Description("Load (readonly)")] LoadReadOnly, /// Load from water meters when the form is open, prevent changes, do not save [Description("Load (readonly)")] LoadReadOnly, /// Load from water meters when the form is open, prevent changes, do not save
[Description("Set")] Set, /// Set to 'yes' when the form is open [Description("Set")] Set, /// Set to 'yes' when the form is open
[Description("Set by RegReader")] RegReader, /// Set to 'yes' when the form is open
Count, Count,
} }
@@ -49,7 +49,10 @@ namespace TBF.Rig.DataEntry.HeatMeters12
public CycleBeginningForm() public CycleBeginningForm()
{ {
InitializeComponent(); InitializeComponent();
ControlBox = false;
this.Icon = Properties.Resources.TBF_icon;
ControlBox = false;
labels = new Label[] { label1, label2, label3, label4, label5, label6, labels = new Label[] { label1, label2, label3, label4, label5, label6,
label7, label8, label9, label10, label11, label12 }; label7, label8, label9, label10, label11, label12 };
@@ -29,7 +29,10 @@ namespace TBF.Rig.DataEntry.HeatMeters12
public CycleEndForm(int waterMetersCount) public CycleEndForm(int waterMetersCount)
{ {
InitializeComponent(); InitializeComponent();
ControlBox = false;
this.Icon = Properties.Resources.TBF_icon;
ControlBox = false;
this.WaterMetersCount = waterMetersCount; this.WaterMetersCount = waterMetersCount;
EndStateText = new string[WaterMetersCount]; EndStateText = new string[WaterMetersCount];
@@ -61,7 +61,10 @@ namespace TBF.Rig.DataEntry.HeatMeters12
public TestStartEndForm() public TestStartEndForm()
{ {
InitializeComponent(); InitializeComponent();
ControlBox = false;
this.Icon = Properties.Resources.TBF_icon;
ControlBox = false;
TextBoxesCount = 12; TextBoxesCount = 12;
@@ -49,7 +49,10 @@ namespace TBF.Rig.DataEntry.HeatMeters6
public CycleBeginningForm() public CycleBeginningForm()
{ {
InitializeComponent(); InitializeComponent();
ControlBox = false;
this.Icon = Properties.Resources.TBF_icon;
ControlBox = false;
labels = new Label[] { label1, label2, label3, label4, label5, label6 }; labels = new Label[] { label1, label2, label3, label4, label5, label6 };
comboBoxes = new ComboBox[] { comboBox1, comboBox2, comboBox3, comboBox4, comboBox5, comboBox6 }; comboBoxes = new ComboBox[] { comboBox1, comboBox2, comboBox3, comboBox4, comboBox5, comboBox6 };

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