/// /// 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 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; } } }