Refactorization : BenchControl -> Rig

This commit is contained in:
Milan Hanajik
2021-03-05 16:12:24 +01:00
parent 84c8ec26b6
commit 6cf3bd6160
1461 changed files with 6330 additions and 6330 deletions
+46
View File
@@ -0,0 +1,46 @@
///
/// 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<Config.Entities.Component> 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);
}
}
}