SchematicDrawing: Editing completed, TODO: Display
This commit is contained in:
@@ -9,7 +9,7 @@ using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Ambient.Comet
|
||||
{
|
||||
public class AmbientCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
public class AmbientCfg : ComponentCfgBase, Generic.IComponentCfg, SchematicDrawing.IDrawingItemCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(AmbientCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -27,6 +27,22 @@ namespace TBF.BenchControl.Ambient.Comet
|
||||
public Handshake Handshake;
|
||||
public bool SetDtrToOne;
|
||||
|
||||
/// 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
|
||||
AmbientCfg()
|
||||
{
|
||||
@@ -39,6 +55,7 @@ namespace TBF.BenchControl.Ambient.Comet
|
||||
StopBits = System.IO.Ports.StopBits.Two;
|
||||
Handshake = System.IO.Ports.Handshake.None;
|
||||
SetDtrToOne = false;
|
||||
Shape = SchematicDrawing.Shape.Ambient;
|
||||
}
|
||||
|
||||
public AmbientCfg(IComponentFactory factory)
|
||||
@@ -47,7 +64,9 @@ namespace TBF.BenchControl.Ambient.Comet
|
||||
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}, Com{1}, {2}Bd, {3}-bits, parity={4}, stopBits={5}, {6}",
|
||||
Name, ComPortNr, BaudRate, DataBits, Parity, StopBits, Handshake);
|
||||
|
||||
Reference in New Issue
Block a user