/// /// Copyright (c) 2013-2016 Sensus Metering Systems /// using System.Collections.Generic; using System.Xml.Serialization; using TBF.Rig.Generic; namespace TBF.Rig.BuiltIn.PumpTandem { public class PumpCfg : ComponentCfgBase, IChildComponentCfg { public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(PumpCfg) })[0]; public override XmlSerializer GetSerializer() { return Serializer; } public IComponentCfgCtrl GetControl(IList cmpntEntities) { 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); } } }