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
@@ -0,0 +1,66 @@
///
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
///
using System;
using System.Xml.Serialization;
using Config.Entities;
using SchematicDrawing;
using TBF.Rig.Generic;
using System.Collections.Generic;
namespace TBF.Rig.WaterMeters.WaterMeter
{
public class WaterMeterCfg : ComponentCfgBase, Generic.IComponentCfg, IDrawingItem
{
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(WaterMeterCfg) })[0];
public override XmlSerializer GetSerializer() { return Serializer; }
public IComponentCfgCtrl GetControl(IList<Config.Entities.Component> cmpntEntities) { return new WaterMeterCfgCtrl(); }
///
/// Serialized parameters
///
/// Schematic drawing info
public Shape Shape { get; set; }
public int X { get; set; }
public int Y { get; set; }
public Sz Sz { get; set; }
public Orient Orient { get; set; }
public bool Flip { get; set; }
public int LblX { get; set; }
public int LblY { get; set; }
public Orient LblOrient { get; set; }
[XmlIgnore]
public IList<GNode> GNodes { get; set; }
/// <summary> Procedure parameters </summary>
[XmlIgnore]
public ProcParams ProcParams;
public override IParamsProvider GetRuntimeProcParamsProvider() { return ProcParams; }
public override IParamsProvider CreateProcParamsProvider() { return new ProcParams(true); }
/// Private parameterless constructor invoked by all other (public) constructors
WaterMeterCfg()
{
ProcParams = CreateProcParamsProvider() as ProcParams;
GNodes = new List<GNode>();
}
public WaterMeterCfg(IComponentFactory factory)
: this()
{
Shape = Shape.WaterM;
Sz = Sz.L;
Factory = factory;
Name = "WM";
ParentName = string.Empty;
}
public string ToString(int i)
{
return string.Format("{0} {1}[{2},{3}]", Name, Shape, X, Y);
}
}
}