46 lines
1.3 KiB
C#
46 lines
1.3 KiB
C#
///
|
|
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
|
///
|
|
using System.IO;
|
|
using System.Collections.Generic;
|
|
using System.Xml.Serialization;
|
|
using TBF.BenchControl.Generic;
|
|
|
|
namespace TBF.BenchControl.Elde.PumpTandem
|
|
{
|
|
public class PumpCfg : ComponentCfgBase, IChildComponentCfg
|
|
{
|
|
public IComponent GetComponent(IList<IComponent> components) { return new Pump(this, components); }
|
|
public IComponentCfgCtrl GetControl() { return new PumpCfgCtrl(); }
|
|
|
|
///
|
|
/// Serialized parameters
|
|
///
|
|
public string Pump1; /// Name of the pump 1 component
|
|
public string Pump2; /// Name of the pump 2 component
|
|
|
|
/// Private parameterless constructor invoked by all other (public) constructors
|
|
PumpCfg()
|
|
{
|
|
Name = "PumpTandem";
|
|
ParentName = string.Empty;
|
|
Pump1 = string.Empty;
|
|
Pump2 = string.Empty;
|
|
}
|
|
|
|
public PumpCfg(IComponentFactory factory)
|
|
: this()
|
|
{
|
|
this.Factory = factory;
|
|
}
|
|
|
|
public string ToString(int i)
|
|
{
|
|
return string.Format("Name={0}, Pump1={1}, Pump2={2}",
|
|
Name,
|
|
string.IsNullOrEmpty(Pump1) ? "-" : Pump1,
|
|
string.IsNullOrEmpty(Pump2) ? "-" : Pump2);
|
|
}
|
|
}
|
|
}
|