Schematic drawing with live function, bench control by mouse, Dijkstra algo, vacuum, etc.

This commit is contained in:
Milan Hanajik
2020-06-14 13:01:53 +02:00
parent 2945049288
commit 1f67899a5c
223 changed files with 5684 additions and 3772 deletions
@@ -5,13 +5,13 @@ using log4net;
namespace TBF.BenchControl.Various.Drawing.Knee
{
public class Component : ComponentBase, SchematicDrawing.IDrawingItemCmpnt
public class Component : ComponentBase, SchematicDrawing.IDrawingItCmpnt
{
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
readonly Configuration myCfg;
public SchematicDrawing.IDrawingItemCfg DrawingItemCfg { get { return myCfg as SchematicDrawing.IDrawingItemCfg; } }
public SchematicDrawing.IDrawingItem DrawingItem { get { return myCfg as SchematicDrawing.IDrawingItem; } }
public Component() { }
@@ -10,7 +10,7 @@ using TBF.BenchControl.Generic;
namespace TBF.BenchControl.Various.Drawing.Knee
{
public class Configuration : ComponentCfgBase, IComponentCfg, Config.Entities.IParamsProvider, SchematicDrawing.IDrawingItemCfg
public class Configuration : ComponentCfgBase, IComponentCfg, Config.Entities.IParamsProvider, IDrawingItem
{
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(Configuration) })[0];
public override XmlSerializer GetSerializer() { return Serializer; }
@@ -29,26 +29,27 @@ namespace TBF.BenchControl.Various.Drawing.Knee
public int LblX { get; set; }
public int LblY { get; set; }
public 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 Orient ValOrient { get; set; }
[XmlIgnore]
public IList<GNode> GNodes { get; set; }
public Configuration() { }
public Configuration()
{
GNodes = new List<GNode>();
}
public Configuration(string name, IComponentFactory factory)
: this()
{
Shape = Shape.Knee;
Sz = Sz.M;
Name = name;
ParentName = string.Empty;
Factory = factory;
Shape = SchematicDrawing.Shape.Knee;
Sz = Sz.K1;
}
public bool IsHidden() { return (X == 0) && (Y == 0); }
public string ComponentName { get { return Name; } }