diff --git a/Common/Hardware/WaterMeter/MechanicalMeter/FM2014/FM2014Core/FM2014.cs b/Common/Hardware/WaterMeter/MechanicalMeter/FM2014/FM2014Core/FM2014.cs index 0e8daf39..e8df3d4b 100644 --- a/Common/Hardware/WaterMeter/MechanicalMeter/FM2014/FM2014Core/FM2014.cs +++ b/Common/Hardware/WaterMeter/MechanicalMeter/FM2014/FM2014Core/FM2014.cs @@ -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'. /// - public const UInt32 REF_PULSES_PER_CM_REGULATION_INPUT_MAX = 100000000; + public const UInt32 REF_PULSES_PER_CM_REGULATION_INPUT_MAX = 1000000; /// /// FM2014 minimum REF to DUT scale for error display. diff --git a/MiniPrf/MiniPrf.sln b/MiniPrf/MiniPrf.sln index c3abc473..2d1d485b 100644 --- a/MiniPrf/MiniPrf.sln +++ b/MiniPrf/MiniPrf.sln @@ -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}" diff --git a/MiniPrf/Ui/Docu/MiniPrf Kurzanleitung.docx b/MiniPrf/Ui/Docu/MiniPrf Kurzanleitung.docx new file mode 100644 index 00000000..975d96c8 Binary files /dev/null and b/MiniPrf/Ui/Docu/MiniPrf Kurzanleitung.docx differ diff --git a/MiniPrf/Ui/Docu/MiniPrf Kurzanleitung.pdf b/MiniPrf/Ui/Docu/MiniPrf Kurzanleitung.pdf new file mode 100644 index 00000000..c17fabca Binary files /dev/null and b/MiniPrf/Ui/Docu/MiniPrf Kurzanleitung.pdf differ diff --git a/MiniPrf/Ui/FrmHistory.Designer.cs b/MiniPrf/Ui/FrmHistory.Designer.cs index 6975b011..5e69a585 100644 --- a/MiniPrf/Ui/FrmHistory.Designer.cs +++ b/MiniPrf/Ui/FrmHistory.Designer.cs @@ -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; - /// - /// History display - /// + public System.Windows.Forms.RichTextBox rtbHistory; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; } } \ No newline at end of file diff --git a/MiniPrf/Ui/FrmMainMiniPrf.Designer.cs b/MiniPrf/Ui/FrmMainMiniPrf.Designer.cs index f0f4316c..bae2a5df 100644 --- a/MiniPrf/Ui/FrmMainMiniPrf.Designer.cs +++ b/MiniPrf/Ui/FrmMainMiniPrf.Designer.cs @@ -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; } } diff --git a/MiniPrf/Ui/FrmMainMiniPrf.cs b/MiniPrf/Ui/FrmMainMiniPrf.cs index c5ab38b9..40c82864 100644 --- a/MiniPrf/Ui/FrmMainMiniPrf.cs +++ b/MiniPrf/Ui/FrmMainMiniPrf.cs @@ -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; } /// @@ -169,7 +172,7 @@ namespace Sensus.MiniPrf.Ui cbxProgramComPort.Items.Add(comPort); } cbxProgramComPort.Text = cbxProgramComPort.Items[_comPortIdx].ToString(); - + // Select the last address var itemContent = _fm2014Config.Address ?? 1; for (var idx = 0; idx < cbxFM2014Address.Items.Count; idx++) @@ -901,7 +904,7 @@ namespace Sensus.MiniPrf.Ui if (FM2014.RegisteredFm2014s == null || FM2014.RegisteredFm2014s.Count == 0) return; - if (FM2014.RegulationMeasurement(Fm2014.RefPulses_per_cm, Fm2014.DutPulses_per_cm, + if (FM2014.RegulationMeasurement(Fm2014.RefPulses_per_cm, Fm2014.DutPulses_per_cm, Fm2014.DoublePulseDeadtime_ms, Fm2014.CurrentOutputAttenuation)) { _autoProgressBar = true; @@ -1364,8 +1367,31 @@ namespace Sensus.MiniPrf.Ui SelectNextControl(ActiveControl, true, true, true, true); } } + 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 - } } diff --git a/MiniPrf/Ui/MiniPrf.csproj b/MiniPrf/Ui/MiniPrf.csproj index f92d19d5..7fc30c47 100644 --- a/MiniPrf/Ui/MiniPrf.csproj +++ b/MiniPrf/Ui/MiniPrf.csproj @@ -89,6 +89,10 @@ Resources.resx True + + + PreserveNewest + SettingsSingleFileGenerator Settings.Designer.cs @@ -142,6 +146,7 @@ ProcessExec + diff --git a/MiniPrf/Ui/Properties/Resources.Designer.cs b/MiniPrf/Ui/Properties/Resources.Designer.cs index 2c42a2f0..db8fd88e 100644 --- a/MiniPrf/Ui/Properties/Resources.Designer.cs +++ b/MiniPrf/Ui/Properties/Resources.Designer.cs @@ -198,7 +198,7 @@ namespace Sensus.MiniPrf.Ui.Properties { } /// - /// 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. /// internal static string StrGbxManualRefCalibration { get { @@ -234,7 +234,7 @@ namespace Sensus.MiniPrf.Ui.Properties { } /// - /// Looks up a localized string similar to Attenuation []:. + /// Looks up a localized string similar to Analog Display Attenuation []:. /// internal static string StrLblAttenuation { get { @@ -243,7 +243,7 @@ namespace Sensus.MiniPrf.Ui.Properties { } /// - /// Looks up a localized string similar to DUT [pulses/m³]:. + /// Looks up a localized string similar to DUT Pulseratio [pulses/m³]:. /// internal static string StrLblDutPulsesPerCm { get { @@ -306,7 +306,7 @@ namespace Sensus.MiniPrf.Ui.Properties { } /// - /// Looks up a localized string similar to Measured DUT [pulses]:. + /// Looks up a localized string similar to DUT Pulses (measured):. /// internal static string StrLblMeasuredDutPulses { get { @@ -315,7 +315,7 @@ namespace Sensus.MiniPrf.Ui.Properties { } /// - /// Looks up a localized string similar to Measured REF [pulses]:. + /// Looks up a localized string similar to REF Pulses (measured):. /// internal static string StrLblMeasuredRefPulses { get { @@ -351,7 +351,7 @@ namespace Sensus.MiniPrf.Ui.Properties { } /// - /// Looks up a localized string similar to REF [pulses/m³]:. + /// Looks up a localized string similar to REF Pulseratio [pulses/m³]:. /// internal static string StrLblRefPulsesPerCm { get { @@ -386,6 +386,15 @@ namespace Sensus.MiniPrf.Ui.Properties { } } + /// + /// Looks up a localized string similar to &Help. + /// + internal static string StrMenuHelp { + get { + return ResourceManager.GetString("StrMenuHelp", resourceCulture); + } + } + /// /// Looks up a localized string similar to Connecting to FM2014. /// diff --git a/MiniPrf/Ui/Properties/Resources.de.resx b/MiniPrf/Ui/Properties/Resources.de.resx index 2bd6f6c4..f892f3b6 100644 --- a/MiniPrf/Ui/Properties/Resources.de.resx +++ b/MiniPrf/Ui/Properties/Resources.de.resx @@ -169,28 +169,28 @@ Verbunden: - REF [Pulse/m³]: + REF Imulswertigkeit [Pulse/m³]: Regulierungseinstellungen - DUT [Pulse/m³]: + DUT Impulswertigkeit [Pulse/m³]: REF/DUT Relation [norm]: - Dämpfung []: + Analoganzeigendämpfung []: In FM2014 Speichern - Handkalibrierung REF zu Waage + Handkalibrierung REF zu Volumen - Gemessene REF [Pulse]: + REF Impulse (gemessen): Volumen [Liter]: @@ -205,7 +205,7 @@ Aktuelle Abweichung [%]: - Toleranzdämpfung Ein + Meßwertabweichungsdämpfung Ein WARTE AUF FM2014 ANTWORT @@ -223,6 +223,9 @@ REF Frequenz [Hz] - Gemessene DUT [Pulse]: + DUT Impulse (gemessen): + + + &Hilfe \ No newline at end of file diff --git a/MiniPrf/Ui/Properties/Resources.resx b/MiniPrf/Ui/Properties/Resources.resx index 51e13c35..4ce8eb64 100644 --- a/MiniPrf/Ui/Properties/Resources.resx +++ b/MiniPrf/Ui/Properties/Resources.resx @@ -169,28 +169,28 @@ Connected: - REF [pulses/m³]: + REF Pulseratio [pulses/m³]: Regulation Setup - DUT [pulses/m³]: + DUT Pulseratio [pulses/m³]: Scale REF/DUT [norm]: - Attenuation []: + Analog Display Attenuation []: Store in FM2014 - Manual Calibration REF to Weight-Scale + Manual Calibration REF to Volume - Measured REF [pulses]: + REF Pulses (measured): Volume [liters]: @@ -230,6 +230,9 @@ REF Frequency [Hz] - Measured DUT [pulses]: + DUT Pulses (measured): + + + &Help \ No newline at end of file