tbf/TBF/BenchControl/MettlerToledo/Standard/BalanceNewFactory.cs
2021-04-08 12:03:25 +02:00

35 lines
1.1 KiB
C#

///
/// Copyright (c) 2013-2016 Sensus Metering Systems
///
using System.Collections.Generic;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.MettlerToledo.Standard
{
public class BalanceNewFactory : IComponentFactory
{
public string ClassName { get { return "MettlerToledoBalanceSN"; } }
/// <summary>Max. number of components of this class in the system</summary>
public int MaxCount { get { return 5; } }
public IComponent DummyComponent() { return new BalanceNewDev(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new BalanceNewDev(cfg); }
public IComponentCfg DefaultConfig() { return new BalanceCfg(this); }
public IComponentCfgCtrl CreateCfgCtrl() { return new BalanceCfgCtrl(); }
public IComponent ComponentFromCmpntCfg(IComponentCfg config, IList<Generic.IComponent> components)
{
return new BalanceNewDev((BalanceCfg)config);
}
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
{
return ComponentCfgBase.CreateFromDbEntity(BalanceCfg.Serializer, component, this);
}
}
}