Various.Evaporation comp., MetrologyDlgEvaporationTab and IEvaporation/IScaleOrTank/ITankDraining with EvaporationRate(double T) introduced.

This commit is contained in:
Milan Hanajik 2019-05-15 14:04:40 +02:00
parent 59087474d9
commit 1a122cfa12
27 changed files with 1024 additions and 87 deletions

View File

@ -33,6 +33,7 @@ namespace TBF.BenchControl.Dummy.Balance
public IValve DrainValve2 { get { return null; } }
public bool ContainsMoreThen(float thld) { return (thld == 0); }
public bool IsEmpty() { return true; }
public double EvaporationRate(double t) { return 0; }
public string Format { get { return "F3"; } }
public int EmptyTimeSec { get { return 5; } }
public float BuoyancyTemp { get { return 20.0f; } }

View File

@ -0,0 +1,17 @@
///
/// Copyright (c) 2019 Sensus Slovensko a.s.
///
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.GenericDevices
{
public interface IEvaporation : IComponent
{
/// <summary>
/// For a given temperature in [°C] returns evaporation rate in [kg/s]
/// </summary>
/// <param name="flow">Water temperature in [°C]</param>
/// <returns>Evaporation rate in [kg/s]</returns>
double EvaporationRate(double temperature);
}
}

View File

@ -38,6 +38,13 @@ namespace TBF.BenchControl.GenericDevices
/// </summary>
bool ContainsMoreThen(float thld);
/// <summary>
/// For a given temperature in [°C] returns evaporation rate in [kg/s]
/// </summary>
/// <param name="flow">Water temperature in [°C]</param>
/// <returns>Evaporation rate in [kg/s]</returns>
double EvaporationRate(double temperature);
/// <summary>
/// Format string to be used as ToString() argument (e.g. "F3" to obtain resolution 1g)
/// </summary>

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2017 Sensus Metering Systems
/// Copyright (c) 2017-2019 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
@ -13,5 +13,6 @@ namespace TBF.BenchControl.GenericDevices
IValve DrainValve { get; }
bool IsEmpty();
bool ContainsMoreThen(float thld);
double EvaporationRate(double temperature); /// Returns evaporation rate in kg/s
}
}

View File

@ -25,5 +25,10 @@ namespace TBF.BenchControl.GenericDevices
/// Name of the drain valve
/// </summary>
string DrainValve { get; }
/// <summary>
/// Name of the evaporation component
/// </summary>
string Evaporation { get; }
}
}

View File

@ -38,6 +38,9 @@ namespace TBF.BenchControl.MettlerToledo.Multi
private int drainTimeSec;
public int DrainTimeSec { get { return drainTimeSec; } set { drainTimeSec = value; } }
private string evaporation;
public string Evaporation { get { return evaporation; } set { evaporation = value; } }
public int ComPortNr;
public int BaudRate;
public Parity Parity;

View File

@ -42,8 +42,11 @@ namespace TBF.BenchControl.MettlerToledo.Standard
private string drainValve;
public string DrainValve { get { return drainValve; } set { drainValve = value; } }
private int drainTimeSec;
public int DrainTimeSec { get { return drainTimeSec; } set { drainTimeSec = value; } }
private int drainTimeSec;
public int DrainTimeSec { get { return drainTimeSec; } set { drainTimeSec = value; } }
private string evaporation;
public string Evaporation { get { return evaporation; } set { evaporation = value; } }
public string Format;

View File

@ -62,34 +62,36 @@ namespace TBF.BenchControl.MettlerToledo.Standard
this.label6 = new System.Windows.Forms.Label();
this.emptyUpTextBox = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.evaporationComboBox = new System.Windows.Forms.ComboBox();
this.evaporationLabel = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// handshakeComboBox
//
this.handshakeComboBox.Enabled = false;
this.handshakeComboBox.FormattingEnabled = true;
this.handshakeComboBox.Location = new System.Drawing.Point(236, 222);
this.handshakeComboBox.Location = new System.Drawing.Point(236, 252);
this.handshakeComboBox.Name = "handshakeComboBox";
this.handshakeComboBox.Size = new System.Drawing.Size(43, 21);
this.handshakeComboBox.TabIndex = 29;
this.handshakeComboBox.TabIndex = 31;
//
// stopBitsComboBox
//
this.stopBitsComboBox.Enabled = false;
this.stopBitsComboBox.FormattingEnabled = true;
this.stopBitsComboBox.Location = new System.Drawing.Point(236, 200);
this.stopBitsComboBox.Location = new System.Drawing.Point(236, 229);
this.stopBitsComboBox.Name = "stopBitsComboBox";
this.stopBitsComboBox.Size = new System.Drawing.Size(43, 21);
this.stopBitsComboBox.TabIndex = 27;
this.stopBitsComboBox.TabIndex = 29;
//
// parityComboBox
//
this.parityComboBox.Enabled = false;
this.parityComboBox.FormattingEnabled = true;
this.parityComboBox.Location = new System.Drawing.Point(100, 222);
this.parityComboBox.Location = new System.Drawing.Point(100, 252);
this.parityComboBox.Name = "parityComboBox";
this.parityComboBox.Size = new System.Drawing.Size(43, 21);
this.parityComboBox.TabIndex = 23;
this.parityComboBox.TabIndex = 25;
//
// nameTextBox
//
@ -120,85 +122,85 @@ namespace TBF.BenchControl.MettlerToledo.Standard
// handshakeLabel
//
this.handshakeLabel.AutoSize = true;
this.handshakeLabel.Location = new System.Drawing.Point(162, 225);
this.handshakeLabel.Location = new System.Drawing.Point(162, 255);
this.handshakeLabel.Name = "handshakeLabel";
this.handshakeLabel.Size = new System.Drawing.Size(62, 13);
this.handshakeLabel.TabIndex = 28;
this.handshakeLabel.TabIndex = 30;
this.handshakeLabel.Text = "Handshake";
//
// stopBitsLabel
//
this.stopBitsLabel.AutoSize = true;
this.stopBitsLabel.Location = new System.Drawing.Point(162, 203);
this.stopBitsLabel.Location = new System.Drawing.Point(162, 232);
this.stopBitsLabel.Name = "stopBitsLabel";
this.stopBitsLabel.Size = new System.Drawing.Size(49, 13);
this.stopBitsLabel.TabIndex = 26;
this.stopBitsLabel.TabIndex = 28;
this.stopBitsLabel.Text = "Stop Bits";
//
// dataBitsTextBox
//
this.dataBitsTextBox.Enabled = false;
this.dataBitsTextBox.Location = new System.Drawing.Point(236, 178);
this.dataBitsTextBox.Location = new System.Drawing.Point(236, 206);
this.dataBitsTextBox.Name = "dataBitsTextBox";
this.dataBitsTextBox.Size = new System.Drawing.Size(43, 20);
this.dataBitsTextBox.TabIndex = 25;
this.dataBitsTextBox.TabIndex = 27;
//
// dataBitsLabel
//
this.dataBitsLabel.AutoSize = true;
this.dataBitsLabel.Location = new System.Drawing.Point(162, 181);
this.dataBitsLabel.Location = new System.Drawing.Point(162, 209);
this.dataBitsLabel.Name = "dataBitsLabel";
this.dataBitsLabel.Size = new System.Drawing.Size(50, 13);
this.dataBitsLabel.TabIndex = 24;
this.dataBitsLabel.TabIndex = 26;
this.dataBitsLabel.Text = "Data Bits";
//
// partityLabel
//
this.partityLabel.AutoSize = true;
this.partityLabel.Location = new System.Drawing.Point(26, 225);
this.partityLabel.Location = new System.Drawing.Point(26, 255);
this.partityLabel.Name = "partityLabel";
this.partityLabel.Size = new System.Drawing.Size(33, 13);
this.partityLabel.TabIndex = 22;
this.partityLabel.TabIndex = 24;
this.partityLabel.Text = "Parity";
//
// baudRateTextBox
//
this.baudRateTextBox.Enabled = false;
this.baudRateTextBox.Location = new System.Drawing.Point(100, 200);
this.baudRateTextBox.Location = new System.Drawing.Point(100, 229);
this.baudRateTextBox.Name = "baudRateTextBox";
this.baudRateTextBox.Size = new System.Drawing.Size(43, 20);
this.baudRateTextBox.TabIndex = 21;
this.baudRateTextBox.TabIndex = 23;
//
// baudRateLabel
//
this.baudRateLabel.AutoSize = true;
this.baudRateLabel.Location = new System.Drawing.Point(26, 203);
this.baudRateLabel.Location = new System.Drawing.Point(26, 232);
this.baudRateLabel.Name = "baudRateLabel";
this.baudRateLabel.Size = new System.Drawing.Size(53, 13);
this.baudRateLabel.TabIndex = 20;
this.baudRateLabel.TabIndex = 22;
this.baudRateLabel.Text = "Baud rate";
//
// comPortNrTextBox
//
this.comPortNrTextBox.Enabled = false;
this.comPortNrTextBox.Location = new System.Drawing.Point(100, 178);
this.comPortNrTextBox.Location = new System.Drawing.Point(100, 206);
this.comPortNrTextBox.Name = "comPortNrTextBox";
this.comPortNrTextBox.Size = new System.Drawing.Size(43, 20);
this.comPortNrTextBox.TabIndex = 19;
this.comPortNrTextBox.TabIndex = 21;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(26, 181);
this.label1.Location = new System.Drawing.Point(26, 209);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(67, 13);
this.label1.TabIndex = 18;
this.label1.TabIndex = 20;
this.label1.Text = "Serial port #:";
//
// capacityLabel
//
this.capacityLabel.AutoSize = true;
this.capacityLabel.Location = new System.Drawing.Point(26, 82);
this.capacityLabel.Location = new System.Drawing.Point(26, 76);
this.capacityLabel.Name = "capacityLabel";
this.capacityLabel.Size = new System.Drawing.Size(75, 13);
this.capacityLabel.TabIndex = 5;
@ -207,7 +209,7 @@ namespace TBF.BenchControl.MettlerToledo.Standard
// capacityTextBox
//
this.capacityTextBox.Enabled = false;
this.capacityTextBox.Location = new System.Drawing.Point(137, 79);
this.capacityTextBox.Location = new System.Drawing.Point(137, 73);
this.capacityTextBox.Name = "capacityTextBox";
this.capacityTextBox.Size = new System.Drawing.Size(43, 20);
this.capacityTextBox.TabIndex = 6;
@ -215,7 +217,7 @@ namespace TBF.BenchControl.MettlerToledo.Standard
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(186, 82);
this.label2.Location = new System.Drawing.Point(186, 76);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(19, 13);
this.label2.TabIndex = 7;
@ -224,7 +226,7 @@ namespace TBF.BenchControl.MettlerToledo.Standard
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(186, 104);
this.label3.Location = new System.Drawing.Point(186, 99);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(19, 13);
this.label3.TabIndex = 10;
@ -233,7 +235,7 @@ namespace TBF.BenchControl.MettlerToledo.Standard
// emptyTextBox
//
this.emptyTextBox.Enabled = false;
this.emptyTextBox.Location = new System.Drawing.Point(137, 101);
this.emptyTextBox.Location = new System.Drawing.Point(137, 96);
this.emptyTextBox.Name = "emptyTextBox";
this.emptyTextBox.Size = new System.Drawing.Size(43, 20);
this.emptyTextBox.TabIndex = 9;
@ -241,7 +243,7 @@ namespace TBF.BenchControl.MettlerToledo.Standard
// emptyLabel
//
this.emptyLabel.AutoSize = true;
this.emptyLabel.Location = new System.Drawing.Point(26, 104);
this.emptyLabel.Location = new System.Drawing.Point(26, 99);
this.emptyLabel.Name = "emptyLabel";
this.emptyLabel.Size = new System.Drawing.Size(109, 13);
this.emptyLabel.TabIndex = 8;
@ -250,33 +252,33 @@ namespace TBF.BenchControl.MettlerToledo.Standard
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(186, 149);
this.label4.Location = new System.Drawing.Point(186, 170);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(24, 13);
this.label4.TabIndex = 17;
this.label4.TabIndex = 19;
this.label4.Text = "sec";
//
// drainTimeTextBox
//
this.drainTimeTextBox.Enabled = false;
this.drainTimeTextBox.Location = new System.Drawing.Point(137, 146);
this.drainTimeTextBox.Location = new System.Drawing.Point(137, 167);
this.drainTimeTextBox.Name = "drainTimeTextBox";
this.drainTimeTextBox.Size = new System.Drawing.Size(43, 20);
this.drainTimeTextBox.TabIndex = 16;
this.drainTimeTextBox.TabIndex = 18;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(26, 149);
this.label5.Location = new System.Drawing.Point(26, 170);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(54, 13);
this.label5.TabIndex = 15;
this.label5.TabIndex = 17;
this.label5.Text = "Drain time";
//
// formatTextBox
//
this.formatTextBox.Enabled = false;
this.formatTextBox.Location = new System.Drawing.Point(137, 49);
this.formatTextBox.Location = new System.Drawing.Point(137, 50);
this.formatTextBox.Name = "formatTextBox";
this.formatTextBox.Size = new System.Drawing.Size(43, 20);
this.formatTextBox.TabIndex = 4;
@ -284,7 +286,7 @@ namespace TBF.BenchControl.MettlerToledo.Standard
// formatLabel
//
this.formatLabel.AutoSize = true;
this.formatLabel.Location = new System.Drawing.Point(26, 52);
this.formatLabel.Location = new System.Drawing.Point(26, 53);
this.formatLabel.Name = "formatLabel";
this.formatLabel.Size = new System.Drawing.Size(76, 13);
this.formatLabel.TabIndex = 3;
@ -294,24 +296,24 @@ namespace TBF.BenchControl.MettlerToledo.Standard
//
this.drainValveComboBox.Enabled = false;
this.drainValveComboBox.FormattingEnabled = true;
this.drainValveComboBox.Location = new System.Drawing.Point(137, 123);
this.drainValveComboBox.Location = new System.Drawing.Point(137, 143);
this.drainValveComboBox.Name = "drainValveComboBox";
this.drainValveComboBox.Size = new System.Drawing.Size(143, 21);
this.drainValveComboBox.TabIndex = 14;
this.drainValveComboBox.TabIndex = 16;
//
// drainingValveLabel
//
this.drainingValveLabel.AutoSize = true;
this.drainingValveLabel.Location = new System.Drawing.Point(26, 126);
this.drainingValveLabel.Location = new System.Drawing.Point(26, 146);
this.drainingValveLabel.Name = "drainingValveLabel";
this.drainingValveLabel.Size = new System.Drawing.Size(61, 13);
this.drainingValveLabel.TabIndex = 13;
this.drainingValveLabel.TabIndex = 15;
this.drainingValveLabel.Text = "Drain valve";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(285, 104);
this.label6.Location = new System.Drawing.Point(285, 99);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(19, 13);
this.label6.TabIndex = 12;
@ -320,7 +322,7 @@ namespace TBF.BenchControl.MettlerToledo.Standard
// emptyUpTextBox
//
this.emptyUpTextBox.Enabled = false;
this.emptyUpTextBox.Location = new System.Drawing.Point(236, 101);
this.emptyUpTextBox.Location = new System.Drawing.Point(236, 96);
this.emptyUpTextBox.Name = "emptyUpTextBox";
this.emptyUpTextBox.Size = new System.Drawing.Size(43, 20);
this.emptyUpTextBox.TabIndex = 11;
@ -328,16 +330,36 @@ namespace TBF.BenchControl.MettlerToledo.Standard
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(225, 87);
this.label7.Location = new System.Drawing.Point(225, 81);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(83, 13);
this.label7.TabIndex = 30;
this.label7.Text = "not draining (up)";
//
// evaporationComboBox
//
this.evaporationComboBox.Enabled = false;
this.evaporationComboBox.FormattingEnabled = true;
this.evaporationComboBox.Location = new System.Drawing.Point(137, 119);
this.evaporationComboBox.Name = "evaporationComboBox";
this.evaporationComboBox.Size = new System.Drawing.Size(143, 21);
this.evaporationComboBox.TabIndex = 14;
//
// evaporationLabel
//
this.evaporationLabel.AutoSize = true;
this.evaporationLabel.Location = new System.Drawing.Point(26, 122);
this.evaporationLabel.Name = "evaporationLabel";
this.evaporationLabel.Size = new System.Drawing.Size(64, 13);
this.evaporationLabel.TabIndex = 13;
this.evaporationLabel.Text = "Evaporation";
//
// BalanceCfgCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.evaporationComboBox);
this.Controls.Add(this.evaporationLabel);
this.Controls.Add(this.label7);
this.Controls.Add(this.label6);
this.Controls.Add(this.emptyUpTextBox);
@ -370,7 +392,7 @@ namespace TBF.BenchControl.MettlerToledo.Standard
this.Controls.Add(this.comPortNrTextBox);
this.Controls.Add(this.label1);
this.Name = "BalanceCfgCtrl";
this.Size = new System.Drawing.Size(327, 250);
this.Size = new System.Drawing.Size(400, 350);
this.Load += new System.EventHandler(this.BalanceCfgCtrl_Load);
this.ResumeLayout(false);
this.PerformLayout();
@ -410,5 +432,7 @@ namespace TBF.BenchControl.MettlerToledo.Standard
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox emptyUpTextBox;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.ComboBox evaporationComboBox;
private System.Windows.Forms.Label evaporationLabel;
}
}

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2013-2018 Sensus Slovensko a.s.
/// Copyright (c) 2013-2019 Sensus Slovensko a.s.
///
using System;
using System.Windows.Forms;
@ -100,6 +100,7 @@ namespace TBF.BenchControl.MettlerToledo.Standard
if (parent.TbfComponents != null)
{
evaporationComboBox.Items.Add("---");
drainValveComboBox.Items.Add("---");
foreach (var cmpnt in parent.TbfComponents)
{
@ -107,6 +108,10 @@ namespace TBF.BenchControl.MettlerToledo.Standard
{
drainValveComboBox.Items.Add(cmpnt.Name);
}
else if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Various.Evaporation.Factory)
{
evaporationComboBox.Items.Add(cmpnt.Name);
}
}
}
@ -127,8 +132,9 @@ namespace TBF.BenchControl.MettlerToledo.Standard
emptyTextBox.Text = config.Empty.ToString();
emptyUpTextBox.Text = config.EmptyUp.ToString();
formatTextBox.Text = (config.Format.Length > 1) ? config.Format.Substring(1) : config.Format;
drainTimeTextBox.Text = config.DrainTimeSec.ToString();
evaporationComboBox.Text = string.IsNullOrEmpty(config.Evaporation) ? "---" : config.Evaporation;
drainValveComboBox.Text = string.IsNullOrEmpty(config.DrainValve) ? "---" : config.DrainValve;
drainTimeTextBox.Text = config.DrainTimeSec.ToString();
comPortNrTextBox.Text = config.ComPortNr.ToString();
baudRateTextBox.Text = config.BaudRate.ToString();
@ -145,8 +151,9 @@ namespace TBF.BenchControl.MettlerToledo.Standard
emptyTextBox.Enabled = true;
emptyUpTextBox.Enabled = true;
formatTextBox.Enabled = true;
drainTimeTextBox.Enabled = true;
evaporationComboBox.Enabled = true;
drainValveComboBox.Enabled = true;
drainTimeTextBox.Enabled = true;
comPortNrTextBox.Enabled = true;
baudRateTextBox.Enabled = true;
@ -197,7 +204,12 @@ namespace TBF.BenchControl.MettlerToledo.Standard
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "'Decimal points' should be between 0 and 9";
}
if (!drainValveComboBox.Items.Contains(drainValveComboBox.Text))
if (!evaporationComboBox.Items.Contains(evaporationComboBox.Text))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "Invalid 'Evaporation'";
}
if (!drainValveComboBox.Items.Contains(drainValveComboBox.Text))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "Invalid 'Drain valve'";
@ -222,6 +234,7 @@ namespace TBF.BenchControl.MettlerToledo.Standard
config.Empty = Utils.ParseUFloat(emptyTextBox.Text);
config.EmptyUp = Utils.ParseUFloat(emptyUpTextBox.Text);
config.Format = "F" + formatTextBox.Text;
config.Evaporation = evaporationComboBox.Text.Equals("---") ? string.Empty : evaporationComboBox.Text;
config.DrainTimeSec = int.Parse(drainTimeTextBox.Text);
config.DrainValve = drainValveComboBox.Text.Equals("---") ? string.Empty : drainValveComboBox.Text;

View File

@ -30,9 +30,9 @@ namespace TBF.BenchControl.MettlerToledo
readonly GenericDevices.ITankDrainingCfg tankDrainingCfg;
bool hasDrainValve { get { return !string.IsNullOrEmpty(tankDrainingCfg.DrainValve); } } /// Available in UI (unlike 'drainValve')
IValve drainValve;
public GenericDevices.IValve DrainValve { get { return drainValve; } }
IEvaporation evaporationCmpnt;
IOperation openTheDrainValveOp;
IOperation closeTheDrainValveOp;
@ -75,6 +75,7 @@ namespace TBF.BenchControl.MettlerToledo
protected void Initalize()
{
drainValve = TbfComponents.FindComponent(tankDrainingCfg.DrainValve) as IValve;
evaporationCmpnt = TbfComponents.FindComponent(tankDrainingCfg.Evaporation) as IEvaporation;
openTheDrainValveOp = new Elde.SetValvesOp(StateMachine.ControlBoard, drainValve, null);
closeTheDrainValveOp = new Elde.SetValvesOp(StateMachine.ControlBoard, null, drainValve);
@ -136,6 +137,13 @@ namespace TBF.BenchControl.MettlerToledo
public virtual bool IsEmpty() { return false; }
public virtual bool ContainsMoreThen(float thld) { return thld == 0; }
/// <summary>
/// For a given temperature in [°C] returns an evaporation rate in [kg/s]
/// </summary>
public double EvaporationRate(double temperature)
{
return (evaporationCmpnt != null) ? evaporationCmpnt.EvaporationRate(temperature) : 0;
}
public int ConditionsCount
{

View File

@ -170,6 +170,7 @@ namespace TBF.BenchControl
Factories.Add(new Elde.Valve.ValveFactory());
Factories.Add(new Elde.ValveEx.ValveFactory());
Factories.Add(new Various.ErrorFlags.Factory());
Factories.Add(new Various.Evaporation.Factory());
Factories.Add(new Various.TankWithLevelMsrmnt.Factory());
Factories.Add(new WaterMeters.Munich.WaterMeterFactory()); /// 'WaterMeters.Munich'
Factories.Add(new WaterMeters.WaterMeter.WaterMeterFactory()); /// 'WaterMeter'

View File

@ -656,17 +656,18 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
tstRslt.StartTime = TestStartTime;
tstRslt.EndTime = TestEndTime;
tstRslt.FlowSetTime = flowSetTime;
tstRslt.TimeBtwnMassMsrmnts = tMass2 - tMass1;
tstRslt.TestTime = cBrd.TTime; /// [s] measurement time
tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0)); /// Pulses of the master flow meter (test total)
tstRslt.TimeBtwnMassMsrmnts = tMass2 - tMass1;
double massOfEvaporatedWater = tstRslt.TimeBtwnMassMsrmnts * outPath.Scale.EvaporationRate(tstRslt.TempDivMean);
tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0)); /// Pulses of the master flow meter (test total)
tstRslt.MassStartRaw = StartMass.Val;
tstRslt.MassStart = Config.Formulas.CorrectedValue(tstRslt.MassStartRaw, scale.Corrections);
tstRslt.MassEndRaw = EndMass.Val;
tstRslt.MassEnd = Config.Formulas.CorrectedValue(tstRslt.MassEndRaw, scale.Corrections);
tstRslt.FlowMass = 3600.0 * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.TestTime; /// [kg/h]
tstRslt.FlowMass = 3600.0 * (tstRslt.MassEnd - tstRslt.MassStart + massOfEvaporatedWater) / tstRslt.TestTime; /// [kg/h]
tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * cBrd.EtPulses(0) / tstRslt.TestTime; /// [m3/h]
tstRslt.Buoyancy = Config.Formulas.Buoyancy();
tstRslt.VolumeCTV = 1000 * tstRslt.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.DensityLine; /// [l] commercially true volume
tstRslt.VolumeCTV = 1000 * tstRslt.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart + massOfEvaporatedWater) / tstRslt.DensityLine; /// [l] commercially true volume
if ((outPath.Diverter != null) && (tstRslt.TestTime > float.Epsilon))
{
tstRslt.TestTimeCorrection = outPath.Diverter.TestTimeCorrection(tstRslt.FlowVolume);

View File

@ -510,7 +510,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
Program.LocalSettings.RealDensity,
Program.LocalSettings.AtTemperature); /// [kg/m3] ///
double buoyancy = Config.Formulas.Buoyancy();
double volumeCTV = 1000.0 * buoyancy * (massEnd - massStart) / densityOut;
double massOfEvaporatedWater = (double)(tMass2 - tMass1) * outPath.Scale.EvaporationRate(TempDivStat.Average);
double volumeCTV = 1000.0 * buoyancy * (massEnd - massStart + massOfEvaporatedWater) / densityOut;
///
/// Enter watermeter end states here
@ -561,14 +562,14 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
tstRslt.StartTime = TestStartTime;
tstRslt.EndTime = TestEndTime;
tstRslt.FlowSetTime = flowSetTime;
tstRslt.TimeBtwnMassMsrmnts = tMass2 - tMass1;
tstRslt.TestTime = cBrd.TTime; /// [s] measurement time
tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0)); /// Pulses of the master flow meter (test total)
tstRslt.TimeBtwnMassMsrmnts = tMass2 - tMass1;
tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0)); /// Pulses of the master flow meter (test total)
tstRslt.MassStartRaw = StartMass.Val;
tstRslt.MassStart = massStart; /// [kg] calculated before displaying 'End state' dialog
tstRslt.MassEndRaw = EndMass.Val;
tstRslt.MassEnd = massEnd; /// [kg] calculated before displaying 'End state' dialog
tstRslt.FlowMass = 3600.0 * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.TestTime; /// [kg/h]
tstRslt.FlowMass = 3600.0 * (tstRslt.MassEnd - tstRslt.MassStart + massOfEvaporatedWater) / tstRslt.TestTime; /// [kg/h]
tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime;
tstRslt.Buoyancy = buoyancy;
tstRslt.VolumeCTV = volumeCTV; /// [kg] calculated before displaying 'End state' dialog

View File

@ -818,8 +818,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEvaluation
Program.LocalSettings.RealDensity,
Program.LocalSettings.AtTemperature); /// [kg/m3] ///
double buoyancy = Config.Formulas.Buoyancy();
double volumeCTV = 1000.0 * buoyancy * (massEnd - massStart) / densityOut;
double massOfEvaporatedWater = (double)(tMass2 - tMass1) * outPath.Scale.EvaporationRate(TempDivStat.Average);
double volumeCTV = 1000.0 * buoyancy * (massEnd - massStart + massOfEvaporatedWater) / densityOut;
if (debugLevel == Config.Entities.DebugMode.Simulate) volumeCTV = test.Volume;
double refEnergy = Energy.Sum * volumeCTV / VolumeForEnergy.Sum; /// [J]=[J]*[l]/[l]
@ -923,15 +923,14 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEvaluation
tstRslt.StartTime = TestStartTime;
tstRslt.EndTime = TestEndTime;
tstRslt.FlowSetTime = flowSetTime;
tstRslt.TimeBtwnMassMsrmnts = tMass2 - tMass1;
tstRslt.TestTime = Math.Max(1.0, EndTime - StartTime); /// [s] measurement time, at least 1 to prevent division by zero
tstRslt.TimeBtwnMassMsrmnts = tMass2 - tMass1;
tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0)); /// Pulses of the master flow meter (test total)
tstRslt.MassStartRaw = StartMass.Val;
tstRslt.MassStart = massStart;
tstRslt.MassEndRaw = EndMass.Val;
tstRslt.MassEnd = massEnd;
tstRslt.FlowMass = 3600.0 * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.TestTime; /// [kg/h]
tstRslt.FlowMass = 3600.0 * (tstRslt.MassEnd - tstRslt.MassStart + massOfEvaporatedWater) / tstRslt.TestTime; /// [kg/h]
tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h]
tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
tstRslt.Buoyancy = buoyancy;

View File

@ -808,7 +808,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
Program.LocalSettings.RealDensity,
Program.LocalSettings.AtTemperature); /// [kg/m3] ///
double buoyancy = Config.Formulas.Buoyancy();
double volumeCTV = 1000.0 * buoyancy * (massEnd - massStart) / densityOut;
double massOfEvaporatedWater = (double)(tMass2 - tMass1) * outPath.Scale.EvaporationRate(TempDivStat.Average);
double volumeCTV = 1000.0 * buoyancy * (massEnd - massStart + massOfEvaporatedWater) / densityOut;
if (debugLevel == Config.Entities.DebugMode.Simulate) volumeCTV = test.Volume;
double refEnergy = Energy.Sum * volumeCTV / VolumeForEnergy.Sum; /// [J]=[J]*[l]/[l]
@ -956,15 +957,14 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
tstRslt.StartTime = TestStartTime;
tstRslt.EndTime = TestEndTime;
tstRslt.FlowSetTime = flowSetTime;
tstRslt.TimeBtwnMassMsrmnts = tMass2 - tMass1;
tstRslt.TestTime = Math.Max(1.0, EndTime - StartTime); /// [s] measurement time, at least 1 to prevent division by zero
tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0)); /// Pulses of the master flow meter (test total)
tstRslt.TimeBtwnMassMsrmnts = tMass2 - tMass1;
tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0)); /// Pulses of the master flow meter (test total)
tstRslt.MassStartRaw = StartMass.Val;
tstRslt.MassStart = massStart;
tstRslt.MassEndRaw = EndMass.Val;
tstRslt.MassEnd = massEnd;
tstRslt.FlowMass = 3600.0 * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.TestTime; /// [kg/h]
tstRslt.FlowMass = 3600.0 * (tstRslt.MassEnd - tstRslt.MassStart + massOfEvaporatedWater) / tstRslt.TestTime; /// [kg/h]
tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h]
tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
tstRslt.Buoyancy = buoyancy;

View File

@ -720,8 +720,9 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl
tstRslt.StartTime = TestStartTime;
tstRslt.EndTime = TestEndTime;
tstRslt.FlowSetTime = flowSetTime;
tstRslt.TimeBtwnMassMsrmnts = tMass2 - tMass1;
tstRslt.TestTime = cBrd.TTime; /// [s] measurement time
tstRslt.TimeBtwnMassMsrmnts = tMass2 - tMass1;
double massOfEvaporatedWater = tstRslt.TimeBtwnMassMsrmnts * outPath.Scale.EvaporationRate(tstRslt.TempDivMean);
tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0)); /// Pulses of the master flow meter (test total)
tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h]
///
@ -732,8 +733,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl
tstRslt.MassStart = Config.Formulas.CorrectedValue(tstRslt.MassStartRaw, scale.Corrections);
tstRslt.MassEndRaw = EndMass.Val;
tstRslt.MassEnd = Config.Formulas.CorrectedValue(tstRslt.MassEndRaw, scale.Corrections);
tstRslt.FlowMass = 3600 * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.TestTime; /// [kg/h]
tstRslt.VolumeCTV = 1000 * tstRslt.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.DensityLine; /// [l] commercially true volume
tstRslt.FlowMass = 3600 * (tstRslt.MassEnd - tstRslt.MassStart + massOfEvaporatedWater) / tstRslt.TestTime; /// [kg/h]
tstRslt.VolumeCTV = 1000 * tstRslt.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart + massOfEvaporatedWater) / tstRslt.DensityLine; /// [l] commercially true volume
if ((outPath.Diverter != null) && (tstRslt.TestTime > float.Epsilon))
{
tstRslt.TestTimeCorrection = outPath.Diverter.TestTimeCorrection(tstRslt.FlowVolume);

View File

@ -814,17 +814,18 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollComparative
tstRslt.StartTime = TestStartTime;
tstRslt.EndTime = TestEndTime;
tstRslt.FlowSetTime = flowSetTime;
tstRslt.TimeBtwnMassMsrmnts = tMass2 - tMass1;
tstRslt.TestTime = cBrd.TTime; /// [s] measurement time
tstRslt.TimeBtwnMassMsrmnts = tMass2 - tMass1;
double massOfEvaporatedWater = tstRslt.TimeBtwnMassMsrmnts * outPath.Scale.EvaporationRate(tstRslt.TempDivMean);
tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0)); /// Pulses of the master flow meter (test total)
tstRslt.MassStartRaw = StartMass.Val;
tstRslt.MassStart = StartMass.Val;
tstRslt.MassEndRaw = EndMass.Val;
tstRslt.MassEnd = EndMass.Val + (refMass - (measuredRefMass.Val - StartMass.Val));
tstRslt.FlowMass = 3600.0 * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.TestTime; /// [kg/h]
tstRslt.FlowMass = 3600.0 * (tstRslt.MassEnd - tstRslt.MassStart + massOfEvaporatedWater) / tstRslt.TestTime; /// [kg/h]
tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h]
tstRslt.Buoyancy = Config.Formulas.Buoyancy();
tstRslt.VolumeCTV = 1000 * tstRslt.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.DensityLine; /// [l] commercially true volume
tstRslt.VolumeCTV = 1000 * tstRslt.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart + massOfEvaporatedWater) / tstRslt.DensityLine; /// [l] commercially true volume
if ((outPath.Diverter != null) && (tstRslt.TestTime > float.Epsilon))
{
tstRslt.TestTimeCorrection = outPath.Diverter.TestTimeCorrection(tstRslt.FlowVolume);

View File

@ -732,18 +732,19 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
tstRslt.StartTime = TestStartTime;
tstRslt.EndTime = TestEndTime;
tstRslt.FlowSetTime = flowSetTime;
tstRslt.TimeBtwnMassMsrmnts = tMass2 - tMass1;
tstRslt.TestTime = cBrd.TTime; /// [s] measurement time (TODO: or cBrd.ImpulseTime(0) ???)
tstRslt.TimeBtwnMassMsrmnts = tMass2 - tMass1;
double massOfEvaporatedWater = (double)tstRslt.TimeBtwnMassMsrmnts * outPath.Scale.EvaporationRate(tstRslt.TempDivMean);
tstRslt.PulsesMaster = massPulses; /// Pulses of the master flow meter (test total)
tstRslt.TotalPulsesMstr = totalPulses;
tstRslt.MassStartRaw = StartMass.Val;
tstRslt.MassStart = Formulas.CorrectedValue(tstRslt.MassStartRaw, scale.Corrections);
tstRslt.MassEndRaw = EndMass.Val;
tstRslt.MassEnd = Formulas.CorrectedValue(tstRslt.MassEndRaw, scale.Corrections);
tstRslt.FlowMass = 3600 * (tstRslt.MassEnd - tstRslt.MassStart) * totalPulses / (tstRslt.TestTime * massPulses); /// [kg/h]
tstRslt.FlowMass = 3600 * (tstRslt.MassEnd - tstRslt.MassStart + massOfEvaporatedWater) * totalPulses / (tstRslt.TestTime * massPulses); /// [kg/h]
tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * totalPulses / tstRslt.TestTime; /// [m3/h]
tstRslt.Buoyancy = Formulas.Buoyancy();
tstRslt.VolumeCTV = 1000 * tstRslt.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.DensityLine; /// [l] commercially true volume of collected water
tstRslt.VolumeCTV = 1000 * tstRslt.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart + massOfEvaporatedWater) / tstRslt.DensityLine; /// [l] commercially true volume of collected water
if ((outPath.Diverter != null) && (tstRslt.TestTime > float.Epsilon))
{
tstRslt.TestTimeCorrection = outPath.Diverter.TestTimeCorrection(tstRslt.FlowVolume);

View File

@ -721,17 +721,18 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
tstRslt.StartTime = TestStartTime;
tstRslt.EndTime = TestEndTime;
tstRslt.FlowSetTime = flowSetTime;
tstRslt.TimeBtwnMassMsrmnts = tMass2 - tMass1;
tstRslt.TestTime = cBrd.TTime; /// [s] measurement time
tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0)); /// Pulses of the master flow meter (test total)
tstRslt.TimeBtwnMassMsrmnts = tMass2 - tMass1;
double massOfEvaporatedWater = (double)tstRslt.TimeBtwnMassMsrmnts * outPath.Scale.EvaporationRate(tstRslt.TempDivMean);
tstRslt.PulsesMaster = Convert.ToDouble(cBrd.EtPulses(0)); /// Pulses of the master flow meter (test total)
tstRslt.MassStartRaw = StartMass.Val;
tstRslt.MassStart = Config.Formulas.CorrectedValue(tstRslt.MassStartRaw, scale.Corrections);
tstRslt.MassEndRaw = EndMass.Val;
tstRslt.MassEnd = Config.Formulas.CorrectedValue(tstRslt.MassEndRaw, scale.Corrections);
tstRslt.FlowMass = 3600.0 * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.TestTime; /// [kg/h]
tstRslt.FlowMass = 3600.0 * (tstRslt.MassEnd - tstRslt.MassStart + massOfEvaporatedWater) / tstRslt.TestTime; /// [kg/h]
tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h]
tstRslt.Buoyancy = Config.Formulas.Buoyancy();
tstRslt.VolumeCTV = 1000 * tstRslt.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.DensityLine; /// [l] commercially true volume
tstRslt.VolumeCTV = 1000 * tstRslt.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart + massOfEvaporatedWater) / tstRslt.DensityLine; /// [l] commercially true volume
if ((outPath.Diverter != null) && (tstRslt.TestTime > float.Epsilon))
{
tstRslt.TestTimeCorrection = outPath.Diverter.TestTimeCorrection(tstRslt.FlowVolume);

View File

@ -0,0 +1,38 @@
///
/// Copyright (c) 2019 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
using log4net;
using Config.Entities;
using TBF.BenchControl.GenericDevices;
namespace TBF.BenchControl.Various.Evaporation
{
public class Component : ComponentBase, IEvaporation
{
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
public override string ToString()
{
return string.Format("{0}({1})", this.GetType().Namespace.Substring(17), Cfg.ToString(1));
}
public Component()
{
}
public Component(Generic.IComponentCfg cfg)
: base(cfg)
{
log.Debug(this.ToString());
}
/// <summary>
/// For a given temperature in [°C] returns an evaporation rate in [kg/s]
/// </summary>
public double EvaporationRate(double temperature)
{
return Config.Formulas.GetCorrection(temperature, Corrections) / 3600.0; /// Converted from kg/h to kg/s
}
}
}

View File

@ -0,0 +1,27 @@
///
/// Copyright (c) 2019 Sensus Slovensko a.s.
///
using System.Collections.Generic;
using TBF.BenchControl.Generic;
using TBF.BenchControl.Configs.NameOnly;
namespace TBF.BenchControl.Various.Evaporation
{
public class Factory : IComponentFactory
{
public string ClassName { get { return this.GetType().Namespace.Substring(17); } }
public void ResetStaticProperties() { }
public IComponent DummyComponent() { return new Component(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Component(cfg); }
public IComponentCfg DefaultConfig() { return new TestMethodCfg(this.GetType().Namespace.Substring(25), this); }
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
{
return ComponentCfgBase.CreateFromDbEntity(TestMethodCfg.Serializer, component, this);
}
}
}

View File

@ -32,6 +32,9 @@ namespace TBF.BenchControl.Various.TankWithLevelMsrmnt
private int drainTimeSec;
public int DrainTimeSec { get { return drainTimeSec; } set { drainTimeSec = value; } }
private string evaporation;
public string Evaporation { get { return evaporation; } set { evaporation = value; } }
public string DrainValve2;
public string LevelMeasurement; /// Name of a level measurement component, 'Various.ManualLevelMsrmnt' is used when left empty.
public float ThldLevel1; /// Threshold level 1 (used by WaitTankContainsMoreThenOp) in l or kg

View File

@ -44,10 +44,12 @@ namespace TBF
int fixedCount = 0;
int balancesCount = 0;
int levelMetersCount = 0;
int flowMetersCount = 0;
int divertersCount = 0;
int flowMetersCount = 0;
int pressMetersCount = 0;
int tempMetersCount = 0;
int platinumTempMetersCount = 0;
int evaporationsCount = 0;
session = Config.FluentCommon.CreateSession(Users.Entities.DBKind.Config);
cmpntEntities = session.QueryOver<Component>()
@ -152,7 +154,7 @@ namespace TBF
/// Tab-pages for diverters
if (factory is BenchControl.Elde.Diverter.DiverterFactory)
{
levelMetersCount++;
divertersCount++;
TabPage tabPage = new TabPage(" " + cmpnt.Name + " ");
MetrologyDlgDiverterTab uiControl = new MetrologyDlgDiverterTab();
uiControl.MeterEntity = cmpnt;
@ -176,6 +178,20 @@ namespace TBF
tabPage.Controls.Add(uiControl);
metrologyTabControl.TabPages.Add(tabPage);
}
/// Tab-pages for water tank evaporation rates
if (factory is BenchControl.Various.Evaporation.Factory)
{
evaporationsCount++;
TabPage tabPage = new TabPage(" " + cmpnt.Name + " ");
MetrologyDlgEvaporationTab uiControl = new MetrologyDlgEvaporationTab();
uiControl.MeterEntity = cmpnt;
uiControl.CalibInfoCfg = factory.CmpntCfgFromCmpntEntity(cmpnt) as BenchControl.GenericDevices.ICalibInfoCfg;
uiControl.Dock = DockStyle.Fill;
tabPage.Tag = uiControl;
tabPage.Controls.Add(uiControl);
metrologyTabControl.TabPages.Add(tabPage);
}
}
}

View File

@ -588,6 +588,7 @@
</Compile>
<Compile Include="BenchControl\Elde\ValveEx\ValveFactory.cs" />
<Compile Include="BenchControl\GenericDevices\ICalibInfoCfg.cs" />
<Compile Include="BenchControl\GenericDevices\IEvaporation.cs" />
<Compile Include="BenchControl\GenericDevices\IParallelOutput.cs" />
<Compile Include="BenchControl\GenericDevices\IReceivesDataFromRadio.cs" />
<Compile Include="BenchControl\GenericDevices\IStartInfoReader.cs" />
@ -1454,6 +1455,8 @@
<Compile Include="BenchControl\Various\ErrorFlags\TestParams.cs" />
<Compile Include="BenchControl\Various\ErrorFlags\Errors.cs" />
<Compile Include="BenchControl\Various\ErrorFlags\ErrorsCfg.cs" />
<Compile Include="BenchControl\Various\Evaporation\Component.cs" />
<Compile Include="BenchControl\Various\Evaporation\Factory.cs" />
<Compile Include="BenchControl\Various\ManualLevelMsrmnt\ManualLevelMsrmnt.cs" />
<Compile Include="BenchControl\Various\ManualLevelMsrmnt\Factory.cs" />
<Compile Include="BenchControl\Various\ManualLevelMsrmnt\WaterLevelForm.cs">
@ -2242,6 +2245,12 @@
<Compile Include="UiControls\MetrologyDlgDiverterTab.designer.cs">
<DependentUpon>MetrologyDlgDiverterTab.cs</DependentUpon>
</Compile>
<Compile Include="UiControls\MetrologyDlgEvaporationTab.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="UiControls\MetrologyDlgEvaporationTab.designer.cs">
<DependentUpon>MetrologyDlgEvaporationTab.cs</DependentUpon>
</Compile>
<Compile Include="UiControls\MetrologyDlgFlowMeterTab.cs">
<SubType>UserControl</SubType>
</Compile>
@ -3190,6 +3199,9 @@
<EmbeddedResource Include="UiControls\MetrologyDlgDiverterTab.resx">
<DependentUpon>MetrologyDlgDiverterTab.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UiControls\MetrologyDlgEvaporationTab.resx">
<DependentUpon>MetrologyDlgEvaporationTab.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UiControls\MetrologyDlgFlowMeterTab.resx">
<DependentUpon>MetrologyDlgFlowMeterTab.cs</DependentUpon>
</EmbeddedResource>

View File

@ -0,0 +1,291 @@
///
/// Copyright (c) 2019 Sensus Slovensko a.s.
///
namespace TBF.UiControls
{
partial class MetrologyDlgEvaporationTab
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.calibrationGroupBox = new System.Windows.Forms.GroupBox();
this.calibValidDateTextBox = new System.Windows.Forms.TextBox();
this.calibValidDateLabel = new System.Windows.Forms.Label();
this.calibDateTextBox = new System.Windows.Forms.TextBox();
this.calibDateLabel = new System.Windows.Forms.Label();
this.calibCertificateNrTextBox = new System.Windows.Forms.TextBox();
this.calibCertificateNrLabel = new System.Windows.Forms.Label();
this.nameGroupBox = new System.Windows.Forms.GroupBox();
this.pressFromToLabel = new System.Windows.Forms.Label();
this.tempFromToLabel = new System.Windows.Forms.Label();
this.cmpntNameLabel = new System.Windows.Forms.Label();
this.testGroupBox = new System.Windows.Forms.GroupBox();
this.correctedTextBox = new System.Windows.Forms.TextBox();
this.measuredTextBox = new System.Windows.Forms.TextBox();
this.correctedLabel = new System.Windows.Forms.Label();
this.measuredLabel = new System.Windows.Forms.Label();
this.listViewEx = new Results.Forms.ListViewEx();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.calibrationGroupBox.SuspendLayout();
this.nameGroupBox.SuspendLayout();
this.testGroupBox.SuspendLayout();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.calibrationGroupBox);
this.splitContainer1.Panel1.Controls.Add(this.nameGroupBox);
this.splitContainer1.Panel1.Controls.Add(this.testGroupBox);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.listViewEx);
this.splitContainer1.Size = new System.Drawing.Size(650, 400);
this.splitContainer1.SplitterDistance = 102;
this.splitContainer1.TabIndex = 2;
//
// calibrationGroupBox
//
this.calibrationGroupBox.Controls.Add(this.calibValidDateTextBox);
this.calibrationGroupBox.Controls.Add(this.calibValidDateLabel);
this.calibrationGroupBox.Controls.Add(this.calibDateTextBox);
this.calibrationGroupBox.Controls.Add(this.calibDateLabel);
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrTextBox);
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrLabel);
this.calibrationGroupBox.Location = new System.Drawing.Point(186, 10);
this.calibrationGroupBox.Name = "calibrationGroupBox";
this.calibrationGroupBox.Size = new System.Drawing.Size(228, 86);
this.calibrationGroupBox.TabIndex = 7;
this.calibrationGroupBox.TabStop = false;
this.calibrationGroupBox.Text = "Calibration";
//
// calibValidDateTextBox
//
this.calibValidDateTextBox.Enabled = false;
this.calibValidDateTextBox.Location = new System.Drawing.Point(140, 59);
this.calibValidDateTextBox.Name = "calibValidDateTextBox";
this.calibValidDateTextBox.Size = new System.Drawing.Size(82, 20);
this.calibValidDateTextBox.TabIndex = 15;
//
// calibValidDateLabel
//
this.calibValidDateLabel.AutoSize = true;
this.calibValidDateLabel.Location = new System.Drawing.Point(17, 62);
this.calibValidDateLabel.Name = "calibValidDateLabel";
this.calibValidDateLabel.Size = new System.Drawing.Size(52, 13);
this.calibValidDateLabel.TabIndex = 14;
this.calibValidDateLabel.Text = "Valid until";
//
// calibDateTextBox
//
this.calibDateTextBox.Enabled = false;
this.calibDateTextBox.Location = new System.Drawing.Point(140, 37);
this.calibDateTextBox.Name = "calibDateTextBox";
this.calibDateTextBox.Size = new System.Drawing.Size(82, 20);
this.calibDateTextBox.TabIndex = 13;
//
// calibDateLabel
//
this.calibDateLabel.AutoSize = true;
this.calibDateLabel.Location = new System.Drawing.Point(17, 40);
this.calibDateLabel.Name = "calibDateLabel";
this.calibDateLabel.Size = new System.Drawing.Size(30, 13);
this.calibDateLabel.TabIndex = 12;
this.calibDateLabel.Text = "Date";
//
// calibCertificateNrTextBox
//
this.calibCertificateNrTextBox.Enabled = false;
this.calibCertificateNrTextBox.Location = new System.Drawing.Point(140, 15);
this.calibCertificateNrTextBox.Name = "calibCertificateNrTextBox";
this.calibCertificateNrTextBox.Size = new System.Drawing.Size(82, 20);
this.calibCertificateNrTextBox.TabIndex = 11;
//
// calibCertificateNrLabel
//
this.calibCertificateNrLabel.AutoSize = true;
this.calibCertificateNrLabel.Location = new System.Drawing.Point(17, 18);
this.calibCertificateNrLabel.Name = "calibCertificateNrLabel";
this.calibCertificateNrLabel.Size = new System.Drawing.Size(69, 13);
this.calibCertificateNrLabel.TabIndex = 10;
this.calibCertificateNrLabel.Text = "Certificate nr.";
//
// nameGroupBox
//
this.nameGroupBox.Controls.Add(this.pressFromToLabel);
this.nameGroupBox.Controls.Add(this.tempFromToLabel);
this.nameGroupBox.Controls.Add(this.cmpntNameLabel);
this.nameGroupBox.Location = new System.Drawing.Point(16, 10);
this.nameGroupBox.Name = "nameGroupBox";
this.nameGroupBox.Size = new System.Drawing.Size(160, 86);
this.nameGroupBox.TabIndex = 5;
this.nameGroupBox.TabStop = false;
this.nameGroupBox.Text = "Component";
//
// pressFromToLabel
//
this.pressFromToLabel.AutoSize = true;
this.pressFromToLabel.Location = new System.Drawing.Point(14, 62);
this.pressFromToLabel.Name = "pressFromToLabel";
this.pressFromToLabel.Size = new System.Drawing.Size(0, 13);
this.pressFromToLabel.TabIndex = 2;
//
// tempFromToLabel
//
this.tempFromToLabel.AutoSize = true;
this.tempFromToLabel.Location = new System.Drawing.Point(14, 44);
this.tempFromToLabel.Name = "tempFromToLabel";
this.tempFromToLabel.Size = new System.Drawing.Size(0, 13);
this.tempFromToLabel.TabIndex = 1;
//
// cmpntNameLabel
//
this.cmpntNameLabel.AutoSize = true;
this.cmpntNameLabel.Location = new System.Drawing.Point(43, 22);
this.cmpntNameLabel.Name = "cmpntNameLabel";
this.cmpntNameLabel.Size = new System.Drawing.Size(64, 13);
this.cmpntNameLabel.TabIndex = 0;
this.cmpntNameLabel.Text = "cmpntName";
//
// testGroupBox
//
this.testGroupBox.Controls.Add(this.correctedTextBox);
this.testGroupBox.Controls.Add(this.measuredTextBox);
this.testGroupBox.Controls.Add(this.correctedLabel);
this.testGroupBox.Controls.Add(this.measuredLabel);
this.testGroupBox.Location = new System.Drawing.Point(424, 10);
this.testGroupBox.Name = "testGroupBox";
this.testGroupBox.Size = new System.Drawing.Size(170, 88);
this.testGroupBox.TabIndex = 4;
this.testGroupBox.TabStop = false;
this.testGroupBox.Text = "Correction test";
//
// correctedTextBox
//
this.correctedTextBox.Location = new System.Drawing.Point(91, 37);
this.correctedTextBox.Name = "correctedTextBox";
this.correctedTextBox.ReadOnly = true;
this.correctedTextBox.Size = new System.Drawing.Size(73, 20);
this.correctedTextBox.TabIndex = 5;
//
// measuredTextBox
//
this.measuredTextBox.Location = new System.Drawing.Point(91, 15);
this.measuredTextBox.Name = "measuredTextBox";
this.measuredTextBox.Size = new System.Drawing.Size(73, 20);
this.measuredTextBox.TabIndex = 4;
this.measuredTextBox.TextChanged += new System.EventHandler(this.measuredTextBox_TextChanged);
//
// correctedLabel
//
this.correctedLabel.AutoSize = true;
this.correctedLabel.Location = new System.Drawing.Point(17, 40);
this.correctedLabel.Name = "correctedLabel";
this.correctedLabel.Size = new System.Drawing.Size(53, 13);
this.correctedLabel.TabIndex = 3;
this.correctedLabel.Text = "Corrected";
//
// measuredLabel
//
this.measuredLabel.AutoSize = true;
this.measuredLabel.Location = new System.Drawing.Point(17, 18);
this.measuredLabel.Name = "measuredLabel";
this.measuredLabel.Size = new System.Drawing.Size(54, 13);
this.measuredLabel.TabIndex = 2;
this.measuredLabel.Text = "Measured";
//
// listViewEx
//
this.listViewEx.AllowColumnReorder = true;
this.listViewEx.Dock = System.Windows.Forms.DockStyle.Fill;
this.listViewEx.DoubleClickActivation = false;
this.listViewEx.FullRowSelect = true;
this.listViewEx.GridLines = true;
this.listViewEx.Location = new System.Drawing.Point(0, 0);
this.listViewEx.Name = "listViewEx";
this.listViewEx.Size = new System.Drawing.Size(650, 294);
this.listViewEx.TabIndex = 0;
this.listViewEx.UseCompatibleStateImageBehavior = false;
this.listViewEx.View = System.Windows.Forms.View.Details;
this.listViewEx.SelectedIndexChanged += new System.EventHandler(this.listViewEx_SelectedIndexChanged);
//
// MetrologyDlgLevelMeterTab
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.splitContainer1);
this.Name = "MetrologyDlgLevelMeterTab";
this.Size = new System.Drawing.Size(650, 400);
this.Load += new System.EventHandler(this.MetrologyDlgEvaporationTab_Load);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.calibrationGroupBox.ResumeLayout(false);
this.calibrationGroupBox.PerformLayout();
this.nameGroupBox.ResumeLayout(false);
this.nameGroupBox.PerformLayout();
this.testGroupBox.ResumeLayout(false);
this.testGroupBox.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.Label cmpntNameLabel;
private Results.Forms.ListViewEx listViewEx;
private System.Windows.Forms.GroupBox testGroupBox;
private System.Windows.Forms.TextBox correctedTextBox;
private System.Windows.Forms.TextBox measuredTextBox;
private System.Windows.Forms.Label correctedLabel;
private System.Windows.Forms.Label measuredLabel;
private System.Windows.Forms.GroupBox nameGroupBox;
private System.Windows.Forms.GroupBox calibrationGroupBox;
private System.Windows.Forms.TextBox calibValidDateTextBox;
private System.Windows.Forms.Label calibValidDateLabel;
private System.Windows.Forms.TextBox calibDateTextBox;
private System.Windows.Forms.Label calibDateLabel;
private System.Windows.Forms.TextBox calibCertificateNrTextBox;
private System.Windows.Forms.Label calibCertificateNrLabel;
private System.Windows.Forms.Label pressFromToLabel;
private System.Windows.Forms.Label tempFromToLabel;
}
}

View File

@ -0,0 +1,342 @@
///
/// Copyright (c) 2019 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Windows.Forms;
using log4net;
using Config.Entities;
using TBF.Resources;
namespace TBF.UiControls
{
public partial class MetrologyDlgEvaporationTab : UserControl, IMetrologyDlgTab
{
static readonly ILog log = LogManager.GetLogger(typeof(MetrologyDlgLevelMeterTab));
/// <summary>
/// Component entity that has a list of 'measurement-correction' pairs
/// to be updated in the database on OK.
/// </summary>
Component meterEntity;
public Component MeterEntity
{
get { return meterEntity; }
set { meterEntity = value; }
}
/// <summary>
/// Calibration information configuration
/// </summary>
public BenchControl.GenericDevices.ICalibInfoCfg CalibInfoCfg;
/// <summary>
/// A list of 'measurement-correction' pairs to be deleted from the database on OK.
/// </summary>
public IList<MeasurementCorrection> ToBeRemoved
{
get { return toBeRemoved; }
set { toBeRemoved = value; }
}
IList<MeasurementCorrection> toBeRemoved;
MetrologyDlg parent;
bool unlocked;
Control measurementTextBox;
Control correctionTextBox;
public MetrologyDlgEvaporationTab()
{
InitializeComponent();
toBeRemoved = new List<MeasurementCorrection>();
}
private void MetrologyDlgEvaporationTab_Load(object sender, System.EventArgs e)
{
if (meterEntity == null) return;
parent = ParentForm as MetrologyDlg;
Localize();
/// Panel1
cmpntNameLabel.Text = meterEntity.Name;
testGroupBox.Text = Strings.Test_measured_corrected;
measuredLabel.Text = Strings.Measured;
correctedLabel.Text = Strings.Corrected;
measuredTextBox.Text = string.Empty;
correctedTextBox.Text = string.Empty;
/// Panel2
measurementTextBox = new TextBox();
correctionTextBox = new TextBox();
this.Controls.Add(measurementTextBox);
this.Controls.Add(correctionTextBox);
listViewEx.SubItemClicked += new Results.Forms.SubItemEventHandler(listViewEx_SubItemClicked);
listViewEx.SubItemRightClicked += new Results.Forms.SubItemEventHandler(listViewEx_SubItemRightClicked);
listViewEx.SubItemEndEditing += new Results.Forms.SubItemEndEditingEventHandler(listViewEx_SubItemEndEditing);
listViewEx.Columns.Add(new ColumnHeader() { Text = Strings.Nr, Width = 60 });
listViewEx.Columns.Add(new ColumnHeader() { Text = string.Format("{0} [°C]", Strings.Temperature), Width = 100 });
listViewEx.Columns.Add(new ColumnHeader() { Text = string.Format("{0} [g/hour]", Strings.Correction), Width = 100 });
RefreshAll();
}
void Localize()
{
nameGroupBox.Text = Strings.Component;
calibrationGroupBox.Text = Strings.Calibration;
calibCertificateNrLabel.Text = Strings.Certificate;
calibDateLabel.Text = Strings.Date;
calibValidDateLabel.Text = Strings.Valid_until;
testGroupBox.Text = Strings.Test_measured_corrected;
measuredLabel.Text = Strings.Measured;
correctedLabel.Text = Strings.Corrected;
}
void RefreshAll()
{
if (CalibInfoCfg != null)
{
calibCertificateNrTextBox.Text = CalibInfoCfg.CalibCertificateNr;
calibDateTextBox.Text = CalibInfoCfg.CalibDate.ToShortDateString();
calibValidDateTextBox.Text = CalibInfoCfg.CalibValidDate.ToShortDateString();
}
listViewEx.Items.Clear();
foreach (var corr in MeterEntity.Corrections)
{
AddOneLVI(corr);
}
}
void AddOneLVI(MeasurementCorrection corr)
{
int nr = listViewEx.Items.Count + 1;
ListViewItem lvi = new ListViewItem(nr.ToString());
lvi.SubItems.Add(corr.Measurement.ToString());
lvi.SubItems.Add((1000 * corr.Correction).ToString());
lvi.Tag = corr;
listViewEx.Items.Add(lvi);
}
void listViewEx_SubItemClicked(object sender, Results.Forms.SubItemEventArgs e)
{
if (unlocked && e.SubItem == 1)
{
listViewEx.StartEditing(measurementTextBox, e.Item, e.SubItem);
}
else if (unlocked && e.SubItem == 2)
{
listViewEx.StartEditing(correctionTextBox, e.Item, e.SubItem);
}
}
void listViewEx_SubItemRightClicked(object sender, Results.Forms.SubItemEventArgs e)
{
if (!unlocked || e.SubItem < 1 || e.SubItem > 2) return;
if (DialogResult.Yes == MessageBox.Show(Strings.Do_you_want_to_copy_this_value_to_all_cells_below_this_cell,
Strings.Confirmation, MessageBoxButtons.YesNo, MessageBoxIcon.Question))
{
int columnNr = e.SubItem;
string value = null;
System.Drawing.Color backColor = System.Drawing.Color.White;
foreach (ListViewItem item in listViewEx.Items)
{
if (value != null && item.SubItems.Count > columnNr)
{
item.SubItems[columnNr].Text = value;
item.SubItems[columnNr].BackColor = backColor;
ParseItem(item, columnNr, value);
}
else if (item == e.Item)
{
value = item.SubItems[columnNr].Text;
backColor = item.SubItems[columnNr].BackColor;
}
}
}
}
void listViewEx_SubItemEndEditing(object sender, Results.Forms.SubItemEndEditingEventArgs e)
{
if (ParseItem(e.Item, e.SubItem, e.DisplayText)) return;
/// New value NOK, revert the original text
e.DisplayText = e.Item.Text;
e.Cancel = true;
}
/// <summary>
/// Parse text of a ListViewItem
/// </summary>
/// <returns>true = value parsed OK</returns>
bool ParseItem(ListViewItem item, int subItem, string value)
{
float fvalue;
if (subItem == 1 && Utils.TryParseEFloat(value, out fvalue) && fvalue >= 0)
{
(item.Tag as MeasurementCorrection).Measurement = fvalue;
return true;
}
else if (subItem == 2 && Utils.TryParseEFloat(value, out fvalue))
{
(item.Tag as MeasurementCorrection).Correction = fvalue / 1000;
return true;
}
else
{
return false;
}
}
public void Unlock()
{
unlocked = true;
calibCertificateNrTextBox.Enabled = true;
calibDateTextBox.Enabled = true;
calibValidDateTextBox.Enabled = true;
if (listViewEx.SelectedItems.Count == 1)
{
int ix = listViewEx.SelectedIndices[0];
listViewEx.Focus();
listViewEx.Items[ix].Selected = true;
listViewEx.Items[ix].EnsureVisible();
}
}
public void OkBtnClicked()
{
if (CalibInfoCfg != null)
{
try
{
CalibInfoCfg.CalibCertificateNr = calibCertificateNrTextBox.Text;
CalibInfoCfg.CalibDate = DateTime.Parse(calibDateTextBox.Text);
CalibInfoCfg.CalibValidDate = DateTime.Parse(calibValidDateTextBox.Text);
Component modified = CalibInfoCfg.CreateDbEntity();
MeterEntity.Parameters = modified.Parameters;
}
catch
{
MessageBox.Show(Strings.Invalid_calib_info_Correct_pls,
Strings.Error,
MessageBoxButtons.OK,
MessageBoxIcon.Exclamation);
}
}
}
public void CancelBtnClicked()
{
}
public void AddOne()
{
MeasurementCorrection corr = new MeasurementCorrection();
MeterEntity.Corrections.Add(corr);
AddOneLVI(corr);
listViewEx.Focus();
listViewEx.SelectedItems.Clear();
listViewEx.Items[listViewEx.Items.Count - 1].Selected = true;
listViewEx.Items[listViewEx.Items.Count - 1].EnsureVisible();
}
public void RemoveSelected()
{
if (listViewEx.SelectedItems.Count != 1) return;
int removeItemNr = listViewEx.SelectedIndices[0];
MeasurementCorrection selected = (MeasurementCorrection)listViewEx.SelectedItems[0].Tag;
if (selected.Id != 0) toBeRemoved.Add(selected);
MeterEntity.Corrections.RemoveAt(removeItemNr);
RefreshAll();
if (removeItemNr < listViewEx.Items.Count)
{
listViewEx.Focus();
listViewEx.Items[removeItemNr].Selected = true;
listViewEx.Items[removeItemNr].EnsureVisible();
}
else
{
parent.UpdateButtonStates(SharedButtons.SelectedItemPos.None);
}
}
public void MoveUpSelected()
{
}
public void MoveDownSelected()
{
}
/// <summary>
/// Event handler that indicates the selected item position
/// and updates 'Remove', 'Up' and 'Down' buttons in the parent dialog.
/// </summary>
private void listViewEx_SelectedIndexChanged(object sender, EventArgs e)
{
if (listViewEx.SelectedItems.Count != 1)
{
parent.UpdateButtonStates(SharedButtons.SelectedItemPos.None);
}
else if (listViewEx.Items.Count == 1)
{
parent.UpdateButtonStates(SharedButtons.SelectedItemPos.FirstAndLast);
}
else if (listViewEx.SelectedIndices[0] == 0)
{
parent.UpdateButtonStates(SharedButtons.SelectedItemPos.First);
}
else if (listViewEx.SelectedIndices[0] == (listViewEx.Items.Count - 1))
{
parent.UpdateButtonStates(SharedButtons.SelectedItemPos.Last);
}
else
{
parent.UpdateButtonStates(SharedButtons.SelectedItemPos.Middle);
}
}
private void measuredTextBox_TextChanged(object sender, EventArgs e)
{
float measured;
if (float.TryParse(measuredTextBox.Text,
NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingSign | NumberStyles.AllowExponent,
CultureInfo.CurrentCulture,
out measured) ||
float.TryParse(measuredTextBox.Text,
NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingSign | NumberStyles.AllowExponent,
CultureInfo.InvariantCulture,
out measured))
{
double corrected = Config.Formulas.CorrectedValue(measured, meterEntity.Corrections);
correctedTextBox.Text = corrected.ToString();
}
}
public string GetWarningsBeforeSaving(ref Dictionary<string, string> renmInfo)
{
return string.Empty;
}
public void UpdateRelatedItems(Dictionary<string, string> renameInfo)
{
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>