Add remaining tanks
This commit is contained in:
@@ -22,6 +22,18 @@ namespace PamhagenSysCtrl.Helpers.Pipeline {
|
||||
return p;
|
||||
}
|
||||
|
||||
public Pipe CreateTwoWayPipe(INode n1, INode n2, bool verticalFirst = false) {
|
||||
Nodes.Add(n1);
|
||||
Nodes.Add(n2);
|
||||
var p = new Pipe(n1, n2, verticalFirst, twoWay: true);
|
||||
n1.Inputs.Add(p);
|
||||
n1.Outputs.Add(p);
|
||||
n2.Inputs.Add(p);
|
||||
n2.Outputs.Add(p);
|
||||
Edges.Add(p);
|
||||
return p;
|
||||
}
|
||||
|
||||
public Inlet CreateInlet(INode start, ISink end) {
|
||||
Nodes.Add(start);
|
||||
Nodes.Add(end);
|
||||
@@ -32,16 +44,26 @@ namespace PamhagenSysCtrl.Helpers.Pipeline {
|
||||
return p;
|
||||
}
|
||||
|
||||
public Outlet CreateOutlet(ISource start, INode end) {
|
||||
Nodes.Add(start);
|
||||
Nodes.Add(end);
|
||||
var p = new Outlet(start, end);
|
||||
start.Outputs.Add(p);
|
||||
end.Inputs.Add(p);
|
||||
Edges.Add(p);
|
||||
return p;
|
||||
}
|
||||
|
||||
public Path? GetPath(INode start, INode end, Func<INode, bool>? valid = null) {
|
||||
if (!Nodes.Contains(start) || !Nodes.Contains(end)) throw new ArgumentException("Start/end node not contained in graph");
|
||||
valid ??= a => true;
|
||||
List<(IEdge, INode)> hops = [];
|
||||
Path? path = null;
|
||||
foreach (var o in start.Outputs) {
|
||||
if (!valid(o.End)) {
|
||||
continue;
|
||||
} else if (o.End == end) {
|
||||
if (o.End == end) {
|
||||
return new(start, [(o, o.End)]);
|
||||
} else if (!valid(o.End)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
var p = GetPath(o.End, end, valid);
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace PamhagenSysCtrl.Helpers.Pipeline {
|
||||
public interface IEdge {
|
||||
|
||||
public INode Start { get; }
|
||||
public INode End { get; }
|
||||
public bool IsTwoWay { get; }
|
||||
public bool Orientation { get; }
|
||||
public bool Highlight { get; set; }
|
||||
public Brush? Highlight { get; set; }
|
||||
|
||||
public void Draw(Canvas canvas);
|
||||
public bool Update(double x, double y);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
namespace PamhagenSysCtrl.Helpers.Pipeline {
|
||||
public interface ISource : INode {
|
||||
public double BottomY { get; }
|
||||
public bool IsFilled { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,8 +8,9 @@ namespace PamhagenSysCtrl.Helpers.Pipeline {
|
||||
public INode Start { get; set; }
|
||||
public INode End => Sink;
|
||||
public ISink Sink { get; set; }
|
||||
public bool IsTwoWay => false;
|
||||
public bool Orientation { get; set; }
|
||||
public bool Highlight { get; set; }
|
||||
public Brush? Highlight { get; set; }
|
||||
|
||||
private Line? _outer1;
|
||||
private Line? _outer2;
|
||||
@@ -36,7 +37,7 @@ namespace PamhagenSysCtrl.Helpers.Pipeline {
|
||||
Y2 = y2,
|
||||
StrokeThickness = 10,
|
||||
Stroke = Brushes.Black,
|
||||
StrokeStartLineCap = PenLineCap.Square,
|
||||
StrokeStartLineCap = PenLineCap.Round,
|
||||
StrokeEndLineCap = PenLineCap.Round,
|
||||
};
|
||||
_inner1 = new Line() {
|
||||
@@ -46,7 +47,7 @@ namespace PamhagenSysCtrl.Helpers.Pipeline {
|
||||
Y2 = y2,
|
||||
StrokeThickness = 6,
|
||||
Stroke = Brushes.DarkGray,
|
||||
StrokeStartLineCap = PenLineCap.Square,
|
||||
StrokeStartLineCap = PenLineCap.Round,
|
||||
StrokeEndLineCap = PenLineCap.Round,
|
||||
};
|
||||
_outer2 = new Line() {
|
||||
@@ -76,8 +77,8 @@ namespace PamhagenSysCtrl.Helpers.Pipeline {
|
||||
}
|
||||
|
||||
public bool Update(double x, double y) {
|
||||
_inner1?.Stroke = Highlight ? Brushes.Green : Brushes.DarkGray;
|
||||
_inner2?.Stroke = Highlight ? Brushes.Green : Brushes.DarkGray;
|
||||
_inner1?.Stroke = Highlight ?? Brushes.DarkGray;
|
||||
_inner2?.Stroke = Highlight ?? Brushes.DarkGray;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace PamhagenSysCtrl.Helpers.Pipeline {
|
||||
public class Outlet : IEdge {
|
||||
|
||||
public const double POINT = 16;
|
||||
|
||||
public INode Start => Source;
|
||||
public INode End { get; set; }
|
||||
public ISource Source { get; set; }
|
||||
public bool IsTwoWay => false;
|
||||
public bool Orientation { get; set; }
|
||||
public Brush? Highlight { get; set; }
|
||||
|
||||
private Polygon? _hopper;
|
||||
private Line? _outer1;
|
||||
private Line? _outer2;
|
||||
private Line? _inner1;
|
||||
private Line? _inner2;
|
||||
|
||||
public Outlet(ISource start, INode end) {
|
||||
Source = start;
|
||||
End = end;
|
||||
Orientation = true;
|
||||
}
|
||||
|
||||
public void Draw(Canvas canvas) {
|
||||
var x1 = Start.CenterX ;
|
||||
var y1 = Source.BottomY;
|
||||
var x2 = Orientation ? Start.CenterX : End.CenterX;
|
||||
var y2 = Orientation ? End.CenterY : Start.CenterY;
|
||||
var x3 = End.CenterX;
|
||||
var y3 = End.CenterY;
|
||||
_hopper = new Polygon() {
|
||||
Points = [new(x1 - POINT, y1 - 2), new(x1 + POINT, y1 - 2), new(x1, y1 + POINT)],
|
||||
Fill = Brushes.DarkGray,
|
||||
Stroke = Brushes.Black,
|
||||
StrokeThickness = 2,
|
||||
};
|
||||
_outer1 = new Line() {
|
||||
X1 = x1,
|
||||
Y1 = y1,
|
||||
X2 = x2,
|
||||
Y2 = y2,
|
||||
StrokeThickness = 10,
|
||||
Stroke = Brushes.Black,
|
||||
StrokeStartLineCap = PenLineCap.Round,
|
||||
StrokeEndLineCap = PenLineCap.Round,
|
||||
};
|
||||
_inner1 = new Line() {
|
||||
X1 = x1,
|
||||
Y1 = y1,
|
||||
X2 = x2,
|
||||
Y2 = y2,
|
||||
StrokeThickness = 6,
|
||||
Stroke = Brushes.DarkGray,
|
||||
StrokeStartLineCap = PenLineCap.Round,
|
||||
StrokeEndLineCap = PenLineCap.Round,
|
||||
};
|
||||
_outer2 = new Line() {
|
||||
X1 = x2,
|
||||
Y1 = y2,
|
||||
X2 = x3,
|
||||
Y2 = y3,
|
||||
StrokeThickness = 10,
|
||||
Stroke = Brushes.Black,
|
||||
StrokeStartLineCap = PenLineCap.Round,
|
||||
StrokeEndLineCap = PenLineCap.Round,
|
||||
};
|
||||
_inner2 = new Line() {
|
||||
X1 = x2,
|
||||
Y1 = y2,
|
||||
X2 = x3,
|
||||
Y2 = y3,
|
||||
StrokeThickness = 6,
|
||||
Stroke = Brushes.DarkGray,
|
||||
StrokeStartLineCap = PenLineCap.Square,
|
||||
StrokeEndLineCap = PenLineCap.Square,
|
||||
};
|
||||
canvas.Children.Add(_outer1);
|
||||
canvas.Children.Add(_outer2);
|
||||
canvas.Children.Add(_hopper);
|
||||
canvas.Children.Add(_inner1);
|
||||
canvas.Children.Add(_inner2);
|
||||
}
|
||||
|
||||
public bool Update(double x, double y) {
|
||||
_inner1?.Stroke = Highlight ?? Brushes.DarkGray;
|
||||
_inner2?.Stroke = Highlight ?? Brushes.DarkGray;
|
||||
_hopper?.Fill = Highlight ?? Brushes.DarkGray;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,18 +8,20 @@ namespace PamhagenSysCtrl.Helpers.Pipeline {
|
||||
|
||||
public INode Start { get; set; }
|
||||
public INode End { get; set; }
|
||||
public bool IsTwoWay { get; set; }
|
||||
public bool Orientation { get; set; }
|
||||
public bool Highlight { get; set; }
|
||||
public Brush? Highlight { get; set; }
|
||||
|
||||
private Line? _outer1;
|
||||
private Line? _outer2;
|
||||
private Line? _inner1;
|
||||
private Line? _inner2;
|
||||
|
||||
public Pipe(INode start, INode end, bool orientation = false) {
|
||||
public Pipe(INode start, INode end, bool orientation = false, bool twoWay = false) {
|
||||
Start = start;
|
||||
End = end;
|
||||
Orientation = orientation;
|
||||
IsTwoWay = twoWay;
|
||||
}
|
||||
|
||||
public void Draw(Canvas canvas) {
|
||||
@@ -33,29 +35,29 @@ namespace PamhagenSysCtrl.Helpers.Pipeline {
|
||||
X1 = x1, Y1 = y1, X2 = x2, Y2 = y2,
|
||||
StrokeThickness = 10,
|
||||
Stroke = Brushes.Black,
|
||||
StrokeStartLineCap = PenLineCap.Square,
|
||||
StrokeEndLineCap = PenLineCap.Square,
|
||||
StrokeStartLineCap = PenLineCap.Round,
|
||||
StrokeEndLineCap = PenLineCap.Round,
|
||||
};
|
||||
_inner1 = new Line() {
|
||||
X1 = x1, Y1 = y1, X2 = x2, Y2 = y2,
|
||||
StrokeThickness = 6,
|
||||
Stroke = Brushes.DarkGray,
|
||||
StrokeStartLineCap = PenLineCap.Square,
|
||||
StrokeEndLineCap = PenLineCap.Square,
|
||||
StrokeStartLineCap = PenLineCap.Round,
|
||||
StrokeEndLineCap = PenLineCap.Round,
|
||||
};
|
||||
_outer2 = new Line() {
|
||||
X1 = x2, Y1 = y2, X2 = x3, Y2 = y3,
|
||||
StrokeThickness = 10,
|
||||
Stroke = Brushes.Black,
|
||||
StrokeStartLineCap = PenLineCap.Square,
|
||||
StrokeEndLineCap = PenLineCap.Square,
|
||||
StrokeStartLineCap = PenLineCap.Round,
|
||||
StrokeEndLineCap = PenLineCap.Round,
|
||||
};
|
||||
_inner2 = new Line() {
|
||||
X1 = x2, Y1 = y2, X2 = x3, Y2 = y3,
|
||||
StrokeThickness = 6,
|
||||
Stroke = Brushes.DarkGray,
|
||||
StrokeStartLineCap = PenLineCap.Square,
|
||||
StrokeEndLineCap = PenLineCap.Square,
|
||||
StrokeStartLineCap = PenLineCap.Round,
|
||||
StrokeEndLineCap = PenLineCap.Round,
|
||||
};
|
||||
canvas.Children.Add(_outer1);
|
||||
canvas.Children.Add(_outer2);
|
||||
@@ -64,8 +66,8 @@ namespace PamhagenSysCtrl.Helpers.Pipeline {
|
||||
}
|
||||
|
||||
public bool Update(double x, double y) {
|
||||
_inner1?.Stroke = Highlight ? Brushes.Green: Brushes.DarkGray;
|
||||
_inner2?.Stroke = Highlight ? Brushes.Green : Brushes.DarkGray;
|
||||
_inner1?.Stroke = Highlight ?? Brushes.DarkGray;
|
||||
_inner2?.Stroke = Highlight ?? Brushes.DarkGray;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace PamhagenSysCtrl.Helpers.Pipeline {
|
||||
public ISet<IEdge> Inputs { get; init; }
|
||||
public ISet<IEdge> Outputs { get; init; }
|
||||
|
||||
private Polygon? _rect;
|
||||
private Shape? _rect;
|
||||
|
||||
public PipeJoin(double x, double y) {
|
||||
CenterX = x;
|
||||
@@ -26,35 +26,47 @@ namespace PamhagenSysCtrl.Helpers.Pipeline {
|
||||
}
|
||||
|
||||
public void Draw(Canvas canvas) {
|
||||
bool? top = Inputs.Any(e => e.Start.CenterY < CenterY && (!e.Orientation || e.Start.CenterX == CenterX)) ? false : Outputs.Any(e => e.End.CenterY < CenterY && (e.Orientation || e.Start.CenterX == CenterX)) ? true : null;
|
||||
bool? right = Inputs.Any(e => e.Start.CenterX > CenterX && (e.Orientation || e.Start.CenterY == CenterY)) ? false : Outputs.Any(e => e.End.CenterX > CenterX && (!e.Orientation || e.Start.CenterY == CenterY)) ? true : null;
|
||||
bool? bottom = Inputs.Any(e => e.Start.CenterY > CenterY && (!e.Orientation || e.Start.CenterX == CenterX)) ? false : Outputs.Any(e => e.End.CenterY > CenterY && (e.Orientation || e.Start.CenterX == CenterX)) ? true : null;
|
||||
bool? left = Inputs.Any(e => e.Start.CenterX < CenterX && (e.Orientation || e.Start.CenterY == CenterY)) ? false : Outputs.Any(e => e.End.CenterX < CenterX && (!e.Orientation || e.Start.CenterY == CenterY)) ? true : null;
|
||||
var it = Inputs.Any(e => (e.Start.CenterY < CenterY && (!e.Orientation || e.Start.CenterX == CenterX)) || (e.IsTwoWay && e.End.CenterY < CenterY && (!e.Orientation || e.End.CenterX == CenterX)));
|
||||
var ot = Outputs.Any(e => (e.End.CenterY < CenterY && ( e.Orientation || e.End.CenterX == CenterX)) || (e.IsTwoWay && e.Start.CenterY < CenterY && ( e.Orientation || e.Start.CenterX == CenterX)));
|
||||
var ir = Inputs.Any(e => (e.Start.CenterX > CenterX && ( e.Orientation || e.Start.CenterY == CenterY)) || (e.IsTwoWay && e.End.CenterX > CenterX && ( e.Orientation || e.End.CenterY == CenterY)));
|
||||
var or = Outputs.Any(e => (e.End.CenterX > CenterX && (!e.Orientation || e.End.CenterY == CenterY)) || (e.IsTwoWay && e.Start.CenterX > CenterX && (!e.Orientation || e.Start.CenterY == CenterY)));
|
||||
var ib = Inputs.Any(e => (e.Start.CenterY > CenterY && (!e.Orientation || e.Start.CenterX == CenterX)) || (e.IsTwoWay && e.End.CenterY > CenterY && (!e.Orientation || e.End.CenterX == CenterX)));
|
||||
var ob = Outputs.Any(e => (e.End.CenterY > CenterY && ( e.Orientation || e.End.CenterX == CenterX)) || (e.IsTwoWay && e.Start.CenterY > CenterY && ( e.Orientation || e.Start.CenterX == CenterX)));
|
||||
var il = Inputs.Any(e => (e.Start.CenterX < CenterX && ( e.Orientation || e.Start.CenterY == CenterY)) || (e.IsTwoWay && e.End.CenterX < CenterX && ( e.Orientation || e.End.CenterY == CenterY)));
|
||||
var ol = Outputs.Any(e => (e.End.CenterX < CenterX && (!e.Orientation || e.End.CenterY == CenterY)) || (e.IsTwoWay && e.Start.CenterX < CenterX && (!e.Orientation || e.Start.CenterY == CenterY)));
|
||||
|
||||
var points = new List<Point> {
|
||||
new(0, 0)
|
||||
};
|
||||
if (top == true) {
|
||||
if (ot && it) {
|
||||
points.AddRange([new(SIZE / 2 - POINT, 0), new(SIZE / 2, -POINT / 2), new(SIZE / 2, POINT / 2), new(SIZE / 2 + POINT, 0)]);
|
||||
} else if (ot) {
|
||||
points.AddRange([new(SIZE / 2 - POINT, 0), new(SIZE / 2, -POINT), new(SIZE / 2 + POINT, 0)]);
|
||||
} else if (top == false) {
|
||||
} else if (it) {
|
||||
points.AddRange([new(SIZE / 2 - POINT, 0), new(SIZE / 2, POINT), new(SIZE / 2 + POINT, 0)]);
|
||||
}
|
||||
points.Add(new(SIZE, 0));
|
||||
if (right == true) {
|
||||
if (or && ir) {
|
||||
points.AddRange([new(SIZE, SIZE / 2 - POINT), new(SIZE + POINT / 2, SIZE / 2), new(SIZE - POINT / 2, SIZE / 2), new(SIZE, SIZE / 2 + POINT)]);
|
||||
} else if (or) {
|
||||
points.AddRange([new(SIZE, SIZE / 2 - POINT), new(SIZE + POINT, SIZE / 2), new(SIZE, SIZE / 2 + POINT)]);
|
||||
} else if (right == false) {
|
||||
} else if (ir) {
|
||||
points.AddRange([new(SIZE, SIZE / 2 - POINT), new(SIZE - POINT, SIZE / 2), new(SIZE, SIZE / 2 + POINT)]);
|
||||
}
|
||||
points.Add(new(SIZE, SIZE));
|
||||
if (bottom == true) {
|
||||
if (ob && ib) {
|
||||
points.AddRange([new(SIZE / 2 + POINT, SIZE), new(SIZE / 2, SIZE + POINT / 2), new(SIZE / 2, SIZE - POINT / 2), new(SIZE / 2 - POINT, SIZE)]);
|
||||
} else if (ob) {
|
||||
points.AddRange([new(SIZE / 2 + POINT, SIZE), new(SIZE / 2, SIZE + POINT), new(SIZE / 2 - POINT, SIZE)]);
|
||||
} else if (bottom == false) {
|
||||
} else if (ib) {
|
||||
points.AddRange([new(SIZE / 2 + POINT, SIZE), new(SIZE / 2, SIZE - POINT), new(SIZE / 2 - POINT, SIZE)]);
|
||||
}
|
||||
points.Add(new(0, SIZE));
|
||||
if (left == true) {
|
||||
if (ol && il) {
|
||||
points.AddRange([new(0, SIZE / 2 + POINT), new(-POINT / 2, SIZE / 2), new(POINT / 2, SIZE / 2), new(0, SIZE / 2 - POINT)]);
|
||||
} else if (ol) {
|
||||
points.AddRange([new(0, SIZE / 2 + POINT), new(-POINT, SIZE / 2), new(0, SIZE / 2 - POINT)]);
|
||||
} else if (left == false) {
|
||||
} else if (il) {
|
||||
points.AddRange([new(0, SIZE / 2 + POINT), new(POINT, SIZE / 2), new(0, SIZE / 2 - POINT)]);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace PamhagenSysCtrl.Helpers.Pipeline {
|
||||
public ISet<IEdge> Inputs { get; init; }
|
||||
public ISet<IEdge> Outputs { get; init; }
|
||||
|
||||
private Ellipse? _circle;
|
||||
private Shape? _circle;
|
||||
private TextBlock? _text;
|
||||
|
||||
public Pump(string label, double x, double y) {
|
||||
@@ -26,7 +26,7 @@ namespace PamhagenSysCtrl.Helpers.Pipeline {
|
||||
}
|
||||
|
||||
public void Draw(Canvas canvas) {
|
||||
_circle = new() {
|
||||
_circle = new Ellipse() {
|
||||
Height = RADIUS,
|
||||
Width = RADIUS,
|
||||
Fill = Brushes.WhiteSmoke,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Windows.Controls;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
@@ -11,6 +12,7 @@ namespace PamhagenSysCtrl.Helpers.Pipeline {
|
||||
public double CenterX { get; set; }
|
||||
public double CenterY { get; set; }
|
||||
public double TopY => CenterY - HEIGHT / 2;
|
||||
public double BottomY => CenterY + HEIGHT / 2;
|
||||
public string Label { get; set; }
|
||||
public bool IsFull => CallbackIsFull();
|
||||
public bool IsFilled => CallbackIsFilled();
|
||||
@@ -21,6 +23,9 @@ namespace PamhagenSysCtrl.Helpers.Pipeline {
|
||||
protected Func<bool> CallbackIsFilled;
|
||||
protected Func<bool> CallbackIsFull;
|
||||
|
||||
private Shape? _rect;
|
||||
private TextBlock? _text;
|
||||
|
||||
public Tank(string label, double x, double y, Func<bool> cbFilled, Func<bool> cbFull) {
|
||||
CenterX = x;
|
||||
CenterY = y;
|
||||
@@ -32,20 +37,31 @@ namespace PamhagenSysCtrl.Helpers.Pipeline {
|
||||
}
|
||||
|
||||
public void Draw(Canvas canvas) {
|
||||
var rect = new Rectangle() {
|
||||
_rect = new Rectangle() {
|
||||
Width = WIDTH,
|
||||
Height = HEIGHT,
|
||||
Stroke = Brushes.Black,
|
||||
StrokeThickness = 2,
|
||||
Fill = Brushes.White,
|
||||
Fill = Brushes.WhiteSmoke,
|
||||
};
|
||||
rect.SetValue(Canvas.LeftProperty, CenterX - WIDTH / 2);
|
||||
rect.SetValue(Canvas.TopProperty, CenterY - HEIGHT / 2);
|
||||
canvas.Children.Add(rect);
|
||||
_text = new() {
|
||||
Text = Label,
|
||||
FontSize = 12,
|
||||
Width = WIDTH,
|
||||
TextAlignment = TextAlignment.Center,
|
||||
VerticalAlignment = VerticalAlignment.Center,
|
||||
};
|
||||
_rect.SetValue(Canvas.LeftProperty, CenterX - WIDTH / 2);
|
||||
_rect.SetValue(Canvas.TopProperty, CenterY - HEIGHT / 2);
|
||||
_text.SetValue(Canvas.LeftProperty, CenterX - WIDTH / 2);
|
||||
_text.SetValue(Canvas.TopProperty, CenterY - 8);
|
||||
canvas.Children.Add(_rect);
|
||||
canvas.Children.Add(_text);
|
||||
}
|
||||
|
||||
public bool Update(double x, double y) {
|
||||
var hover = Math.Abs(x - CenterX) <= WIDTH / 2 && Math.Abs(y - CenterY) <= HEIGHT / 2;
|
||||
_rect?.Fill = hover ? Brushes.LightGray : Brushes.WhiteSmoke;
|
||||
return hover;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace PamhagenSysCtrl.Helpers.Pipeline {
|
||||
|
||||
public double CenterX { get; set; }
|
||||
public double CenterY { get; set; }
|
||||
public double BottomY => CenterY;
|
||||
public string Label { get; set; }
|
||||
public bool IsFilled => CallbackIsFilled();
|
||||
public ISet<IEdge> Inputs { get; init; }
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace PamhagenSysCtrl.Helpers.Pipeline {
|
||||
protected Func<bool> CallbackIsOpen;
|
||||
protected Func<bool> CallbackWantOpen;
|
||||
|
||||
private Ellipse? _circle;
|
||||
private Shape? _circle;
|
||||
private TextBlock? _text;
|
||||
|
||||
public Valve(string label, double x, double y, Func<bool> cbOpen, Func<bool> cbWant) {
|
||||
@@ -34,7 +34,7 @@ namespace PamhagenSysCtrl.Helpers.Pipeline {
|
||||
}
|
||||
|
||||
public void Draw(Canvas canvas) {
|
||||
_circle = new() {
|
||||
_circle = new Ellipse() {
|
||||
Height = RADIUS,
|
||||
Width = RADIUS,
|
||||
Fill = Brushes.DarkGray,
|
||||
|
||||
Reference in New Issue
Block a user