MiniPrf: - docu, - verbose labels

This commit is contained in:
Thomas Wiedebusch 2026-02-18 17:24:41 +01:00
parent abfe13c896
commit 7e7b826c98
11 changed files with 93 additions and 52 deletions

View File

@ -64,7 +64,7 @@ namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core
/// This is the maximum input value for the REF which CANNOT be stored to FM2014
/// but will be used to calculate the 'RefToDutScale_norm'.
/// </summary>
public const UInt32 REF_PULSES_PER_CM_REGULATION_INPUT_MAX = 100000000;
public const UInt32 REF_PULSES_PER_CM_REGULATION_INPUT_MAX = 1000000;
/// <summary>
/// FM2014 minimum REF to DUT scale for error display.

View File

@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.14.36310.24
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docu", "Docu", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Common", "Common", "{1C6D29D2-AC0D-48B2-932A-C9B94C3562F6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Ui", "Ui", "{BDA40851-F353-416A-A6A8-6BA33ACB7371}"

Binary file not shown.

Binary file not shown.

View File

@ -30,16 +30,15 @@
{
this.rtbHistory = new System.Windows.Forms.RichTextBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
//
// rtbHistory
//
this.rtbHistory.Dock = System.Windows.Forms.DockStyle.Fill;
this.rtbHistory.Location = new System.Drawing.Point(3, 53);
this.rtbHistory.Location = new System.Drawing.Point(3, 20);
this.rtbHistory.Name = "rtbHistory";
this.rtbHistory.Size = new System.Drawing.Size(478, 673);
this.rtbHistory.Size = new System.Drawing.Size(478, 706);
this.rtbHistory.TabIndex = 31;
this.rtbHistory.Text = "";
this.rtbHistory.TextChanged += new System.EventHandler(this.rtbHistory_TextChanged);
@ -50,31 +49,16 @@
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.Controls.Add(this.rtbHistory, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 0, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 111F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(484, 729);
this.tableLayoutPanel1.TabIndex = 38;
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.ColumnCount = 2;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 3);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 44F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(478, 44);
this.tableLayoutPanel2.TabIndex = 36;
//
// FrmHistory
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -90,7 +74,7 @@
this.Name = "FrmHistory";
this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "Process History";
this.Text = "Information";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmHistory_FormClosing);
this.tableLayoutPanel1.ResumeLayout(false);
this.ResumeLayout(false);
@ -98,11 +82,8 @@
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
/// <summary>
/// History display
/// </summary>
public System.Windows.Forms.RichTextBox rtbHistory;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
}
}

View File

@ -82,12 +82,14 @@
this.tbxActualFlowRateCmPerHour = new System.Windows.Forms.TextBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.gbxFM2014Setup.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picFM2014)).BeginInit();
this.gbxRegulationSetup.SuspendLayout();
this.gbxManualRefCalibration.SuspendLayout();
this.gbxDutToRefRegulation.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.menuStrip1.SuspendLayout();
this.SuspendLayout();
//
// gbxFM2014Setup
@ -666,11 +668,22 @@
//
// menuStrip1
//
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.helpToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.menuStrip1.Size = new System.Drawing.Size(544, 24);
this.menuStrip1.TabIndex = 85;
this.menuStrip1.Text = "menuStrip1";
this.menuStrip1.Text = "menuStripHelp";
//
// helpToolStripMenuItem
//
this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
this.helpToolStripMenuItem.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
this.helpToolStripMenuItem.Text = "&Help";
this.helpToolStripMenuItem.Click += new System.EventHandler(this.helpToolStripMenuItem_Click);
//
// FrmMainMiniPrf
//
@ -707,6 +720,8 @@
this.gbxDutToRefRegulation.ResumeLayout(false);
this.gbxDutToRefRegulation.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@ -766,6 +781,7 @@
private System.Windows.Forms.TextBox tbxDutPulsesMeasured;
private System.Windows.Forms.CheckBox cbxMeasuredDutPulses;
private System.Windows.Forms.Label lblMeasuredRefPulses;
private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;
}
}

View File

@ -15,6 +15,7 @@ using Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Config;
using Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core;
using Sensus.MiniPrf.Ui.Properties;
using System;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.IO.Ports;
@ -39,7 +40,7 @@ namespace Sensus.MiniPrf.Ui
{
#region Properties
// DEBUG to test multiple objects of FM2014
private static readonly String _assemblyExecRootPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
// cancellation token
private CancellationTokenSource _cancellationTokenSource;
@ -129,6 +130,8 @@ namespace Sensus.MiniPrf.Ui
_cancellationTokenSource = new CancellationTokenSource();
_cancellationToken = _cancellationTokenSource.Token;
helpToolStripMenuItem.Text = Resources.StrMenuHelp;
}
/// <summary>
@ -1364,8 +1367,31 @@ namespace Sensus.MiniPrf.Ui
SelectNextControl(ActiveControl, true, true, true, true);
}
}
#endregion Buttons and Controls
private void helpToolStripMenuItem_Click(Object sender, EventArgs e)
{
try
{
var filename = "";
if (Thread.CurrentThread.CurrentCulture.Name.Contains("de"))
{
filename = Path.Combine(_assemblyExecRootPath, "Docu", @"MiniPrf Kurzanleitung.pdf");
}
else if (Thread.CurrentThread.CurrentCulture.Name.Contains("en"))
{
filename = Path.Combine(_assemblyExecRootPath, "Docu", @"MiniPrf Quick Reference.pdf");
}
if (!string.IsNullOrEmpty(filename))
{
Process.Start(filename);
}
}
catch (Exception exception)
{
Console.WriteLine(exception.Message);
}
}
#endregion Buttons and Controls
}
}

View File

@ -89,6 +89,10 @@
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="Docu\MiniPrf Kurzanleitung.docx" />
<None Include="Docu\MiniPrf Kurzanleitung.pdf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
@ -142,6 +146,7 @@
<Name>ProcessExec</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>

View File

@ -198,7 +198,7 @@ namespace Sensus.MiniPrf.Ui.Properties {
}
/// <summary>
/// Looks up a localized string similar to Manual Calibration REF to Weight-Scale.
/// Looks up a localized string similar to Manual Calibration REF to Volume.
/// </summary>
internal static string StrGbxManualRefCalibration {
get {
@ -234,7 +234,7 @@ namespace Sensus.MiniPrf.Ui.Properties {
}
/// <summary>
/// Looks up a localized string similar to Attenuation []:.
/// Looks up a localized string similar to Analog Display Attenuation []:.
/// </summary>
internal static string StrLblAttenuation {
get {
@ -243,7 +243,7 @@ namespace Sensus.MiniPrf.Ui.Properties {
}
/// <summary>
/// Looks up a localized string similar to DUT [pulses/m³]:.
/// Looks up a localized string similar to DUT Pulseratio [pulses/m³]:.
/// </summary>
internal static string StrLblDutPulsesPerCm {
get {
@ -306,7 +306,7 @@ namespace Sensus.MiniPrf.Ui.Properties {
}
/// <summary>
/// Looks up a localized string similar to Measured DUT [pulses]:.
/// Looks up a localized string similar to DUT Pulses (measured):.
/// </summary>
internal static string StrLblMeasuredDutPulses {
get {
@ -315,7 +315,7 @@ namespace Sensus.MiniPrf.Ui.Properties {
}
/// <summary>
/// Looks up a localized string similar to Measured REF [pulses]:.
/// Looks up a localized string similar to REF Pulses (measured):.
/// </summary>
internal static string StrLblMeasuredRefPulses {
get {
@ -351,7 +351,7 @@ namespace Sensus.MiniPrf.Ui.Properties {
}
/// <summary>
/// Looks up a localized string similar to REF [pulses/m³]:.
/// Looks up a localized string similar to REF Pulseratio [pulses/m³]:.
/// </summary>
internal static string StrLblRefPulsesPerCm {
get {
@ -386,6 +386,15 @@ namespace Sensus.MiniPrf.Ui.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to &amp;Help.
/// </summary>
internal static string StrMenuHelp {
get {
return ResourceManager.GetString("StrMenuHelp", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Connecting to FM2014.
/// </summary>

View File

@ -169,28 +169,28 @@
<value>Verbunden:</value>
</data>
<data name="StrLblRefPulsesPerCm" xml:space="preserve">
<value>REF [Pulse/m³]:</value>
<value>REF Imulswertigkeit [Pulse/m³]:</value>
</data>
<data name="StrGbxRegulationSetup" xml:space="preserve">
<value>Regulierungseinstellungen</value>
</data>
<data name="StrLblDutPulsesPerCm" xml:space="preserve">
<value>DUT [Pulse/m³]:</value>
<value>DUT Impulswertigkeit [Pulse/m³]:</value>
</data>
<data name="StrLblScaleRefToDut" xml:space="preserve">
<value>REF/DUT Relation [norm]:</value>
</data>
<data name="StrLblAttenuation" xml:space="preserve">
<value>Dämpfung []:</value>
<value>Analoganzeigendämpfung []:</value>
</data>
<data name="StrBtnSaveRegulationSetup" xml:space="preserve">
<value>In FM2014 Speichern</value>
</data>
<data name="StrGbxManualRefCalibration" xml:space="preserve">
<value>Handkalibrierung REF zu Waage</value>
<value>Handkalibrierung REF zu Volumen</value>
</data>
<data name="StrLblMeasuredRefPulses" xml:space="preserve">
<value>Gemessene REF [Pulse]:</value>
<value>REF Impulse (gemessen):</value>
</data>
<data name="StrLblMeasuredWeightScaleVolume" xml:space="preserve">
<value>Volumen [Liter]:</value>
@ -205,7 +205,7 @@
<value>Aktuelle Abweichung [%]:</value>
</data>
<data name="StrChkUseDampedTolerance" xml:space="preserve">
<value>Toleranzdämpfung Ein</value>
<value>Meßwertabweichungsdämpfung Ein</value>
</data>
<data name="StrLblWaitingForMeterResponse" xml:space="preserve">
<value>WARTE AUF FM2014 ANTWORT</value>
@ -223,6 +223,9 @@
<value>REF Frequenz [Hz]</value>
</data>
<data name="StrLblMeasuredDutPulses" xml:space="preserve">
<value>Gemessene DUT [Pulse]:</value>
<value>DUT Impulse (gemessen):</value>
</data>
<data name="StrMenuHelp" xml:space="preserve">
<value>&amp;Hilfe</value>
</data>
</root>

View File

@ -169,28 +169,28 @@
<value>Connected:</value>
</data>
<data name="StrLblRefPulsesPerCm" xml:space="preserve">
<value>REF [pulses/m³]:</value>
<value>REF Pulseratio [pulses/m³]:</value>
</data>
<data name="StrGbxRegulationSetup" xml:space="preserve">
<value>Regulation Setup</value>
</data>
<data name="StrLblDutPulsesPerCm" xml:space="preserve">
<value>DUT [pulses/m³]:</value>
<value>DUT Pulseratio [pulses/m³]:</value>
</data>
<data name="StrLblScaleRefToDut" xml:space="preserve">
<value>Scale REF/DUT [norm]:</value>
</data>
<data name="StrLblAttenuation" xml:space="preserve">
<value>Attenuation []:</value>
<value>Analog Display Attenuation []:</value>
</data>
<data name="StrBtnSaveRegulationSetup" xml:space="preserve">
<value>Store in FM2014</value>
</data>
<data name="StrGbxManualRefCalibration" xml:space="preserve">
<value>Manual Calibration REF to Weight-Scale</value>
<value>Manual Calibration REF to Volume</value>
</data>
<data name="StrLblMeasuredRefPulses" xml:space="preserve">
<value>Measured REF [pulses]:</value>
<value>REF Pulses (measured):</value>
</data>
<data name="StrLblMeasuredWeightScaleVolume" xml:space="preserve">
<value>Volume [liters]:</value>
@ -230,6 +230,9 @@
<value>REF Frequency [Hz]</value>
</data>
<data name="StrLblMeasuredDutPulses" xml:space="preserve">
<value>Measured DUT [pulses]:</value>
<value>DUT Pulses (measured):</value>
</data>
<data name="StrMenuHelp" xml:space="preserve">
<value>&amp;Help</value>
</data>
</root>