Config.Data.RealDensity etc., DataContainers.Density and Buoyancy components, related metrology tabs modified/created.

This commit is contained in:
Milan Hanajik
2019-09-18 18:49:00 +02:00
parent 0468b5a1f5
commit 74f8c44783
49 changed files with 782 additions and 511 deletions
@@ -0,0 +1,39 @@
///
/// Copyright (c) 2019 Sensus Slovensko a.s.
///
using System;
using log4net;
namespace TBF.BenchControl.DataContainers.Buoyancy
{
/// <summary>
/// Holds measured (true) buoyancy value.
/// </summary>
public class Component : ComponentBase
{
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
public override string ToString() { return string.Format("{0}({1})", this.GetType().Namespace.Substring(32), Cfg.ToString(1)); }
readonly ComponentCfg myCfg;
public double Buoyancy { get { return myCfg.Buoyancy; } }
public Component()
{
}
public Component(Generic.IComponentCfg cfg)
: base(cfg)
{
myCfg = cfg as ComponentCfg;
/// This is to use data in formulas
Config.Data.Buoyancy = Buoyancy;
/// This is to have data in reports
Results.WMeterRsltItemSpec.Buoyancy = Buoyancy;
log.Debug(this.ToString());
}
}
}