59 lines
1.8 KiB
C#
59 lines
1.8 KiB
C#
///
|
|
/// Copyright (c) 2017-2020 Sensus Slovensko a.s.
|
|
///
|
|
using TBF.BenchControl.Generic;
|
|
using System.Xml.Serialization;
|
|
|
|
namespace TBF.BenchControl.Dummy.RegulValve
|
|
{
|
|
public class RegulValveCfg : ComponentCfgBase, IComponentCfg, SchematicDrawing.IDrawingItemCfg
|
|
{
|
|
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(RegulValveCfg) })[0];
|
|
public override XmlSerializer GetSerializer() { return Serializer; }
|
|
|
|
public IComponentCfgCtrl GetControl() { return new RegulValveCfgCtrl(); }
|
|
|
|
///
|
|
/// Serialized parameters
|
|
///
|
|
public ValveCategory Category; /// Feeding, Output or All
|
|
|
|
public SchematicDrawing.Shape Shape { get; set; }
|
|
public int X { get; set; }
|
|
public int Y { get; set; }
|
|
public SchematicDrawing.Sz Sz { get; set; }
|
|
public SchematicDrawing.Orient Orient { get; set; }
|
|
public bool Flip { get; set; }
|
|
public int LblX { get; set; }
|
|
public int LblY { get; set; }
|
|
public SchematicDrawing.Orient LblOrient { get; set; }
|
|
public int ValX { get; set; }
|
|
public int ValY { get; set; }
|
|
public double ValFact { get; set; }
|
|
public string ValFmt { get; set; }
|
|
public SchematicDrawing.Orient ValOrient { get; set; }
|
|
|
|
|
|
/// Private parameterless constructor invoked by all other (public) constructors
|
|
RegulValveCfg()
|
|
{
|
|
}
|
|
|
|
public RegulValveCfg(string name, IComponentFactory factory)
|
|
: this()
|
|
{
|
|
Name = name;
|
|
Factory = factory;
|
|
Category = ValveCategory.Output;
|
|
Shape = SchematicDrawing.Shape.RegV;
|
|
}
|
|
|
|
public bool IsHidden() { return (X == 0) && (Y == 0); }
|
|
|
|
public string ToString(int i)
|
|
{
|
|
return string.Format("Name={0}", Name);
|
|
}
|
|
}
|
|
}
|