Add remaining tanks

This commit is contained in:
2026-07-13 17:11:21 +02:00
parent 011f90233c
commit 74ec9527da
13 changed files with 378 additions and 110 deletions
+14 -12
View File
@@ -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;
}
}