SchematicDrawing: Editing completed, TODO: Display
This commit is contained in:
@@ -11,12 +11,13 @@ using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.Elde.PressureMeter
|
||||
{
|
||||
public class PressureMeter : ComponentBase, GenericDevices.IPressureMeter, GenericDevices.IHasCalendarEvents
|
||||
public class PressureMeter : ComponentBase, GenericDevices.IPressureMeter, GenericDevices.IHasCalendarEvents, SchematicDrawing.IDrawingItemCmpnt
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(PressureMeter));
|
||||
public override string ToString() { return string.Format("PressureMeter({0})", Cfg.ToString(1)); }
|
||||
|
||||
readonly PressureMeterCfg pressureMeterCfg;
|
||||
public SchematicDrawing.IDrawingItemCfg DrawingItemCfg { get { return pressureMeterCfg as SchematicDrawing.IDrawingItemCfg; } }
|
||||
|
||||
public readonly ControlBoardDev ControlBoard;
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Elde.PressureMeter
|
||||
{
|
||||
public class PressureMeterCfg : ComponentCfgBase, IChildComponentCfg, TBF.BenchControl.GenericDevices.ICalibInfoCfg
|
||||
public class PressureMeterCfg : ComponentCfgBase, IChildComponentCfg, TBF.BenchControl.GenericDevices.ICalibInfoCfg, SchematicDrawing.IDrawingItemCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(PressureMeterCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -25,29 +25,31 @@ namespace TBF.BenchControl.Elde.PressureMeter
|
||||
public byte RS485Address; /// 0..255
|
||||
|
||||
/// Calibration info serialized parameters displayed in Metrology tab page
|
||||
string calibCertificateNr;
|
||||
DateTime calibDate;
|
||||
DateTime calibValidDate;
|
||||
public string CalibCertificateNr
|
||||
{
|
||||
get { return calibCertificateNr; }
|
||||
set { calibCertificateNr = value; }
|
||||
}
|
||||
public DateTime CalibDate
|
||||
{
|
||||
get { return calibDate; }
|
||||
set { calibDate = value; }
|
||||
}
|
||||
public DateTime CalibValidDate
|
||||
{
|
||||
get { return calibValidDate; }
|
||||
set { calibValidDate = value; }
|
||||
}
|
||||
public string CalibCertificateNr { get; set; }
|
||||
public DateTime CalibDate { get; set; }
|
||||
public DateTime CalibValidDate { get; set; }
|
||||
|
||||
/// Schematic drawing info
|
||||
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
|
||||
PressureMeterCfg()
|
||||
{
|
||||
Name = "Pr";
|
||||
Shape = SchematicDrawing.Shape.PressM;
|
||||
ParentName = "CB";
|
||||
Idx0 = 0;
|
||||
Protocol = MeretProtocol.Modbus;
|
||||
@@ -60,7 +62,9 @@ namespace TBF.BenchControl.Elde.PressureMeter
|
||||
this.Factory = factory;
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
public bool IsHidden() { return (X == 0) && (Y == 0); }
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("Name={0}, Parent={1}, Idx0={2}, Protocol={3}, Address={4}",
|
||||
Name,
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace TBF.BenchControl.Elde.PressureMeter
|
||||
public class PressureMeterFactory : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return "PressureMeter"; } }
|
||||
public override string ToString() { return ClassName; }
|
||||
|
||||
public void ResetStaticProperties() { PressureMeter.ResetStaticProperties(); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user