tbf/TestBenchFramework/BenchControl/DataEntry/HeatMeters6/Factory.cs
2016-10-11 13:05:40 +02:00

32 lines
1.0 KiB
C#

///
/// Copyright (c) 2016 Sensus Metering Systems
///
using System.Collections.Generic;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.DataEntry.HeatMeters6
{
public class Factory : IComponentFactory
{
public string ClassName { get { return this.GetType().Namespace.Substring("TBF.BenchControl.".Length); } }
public void ResetStaticProperties() { EntryForm.ResetStaticProperties(); }
public IComponent DummyComponent() { return new EntryForm(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryForm(cfg); }
public IComponentCfg DefaultConfig()
{
return new EntryFormCfg(this.GetType().Namespace.Substring("TBF.BenchControl.DataEntry.".Length), this);
}
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
{
IComponentCfg cfg = ComponentCfgBase.CreateFromDbEntity(typeof(EntryFormCfg), component, this);
(cfg as EntryFormCfg).Units = (cfg as EntryFormCfg).DefaultUnits;
return cfg;
}
}
}