This commit is contained in:
@@ -16,11 +16,13 @@ namespace PamhagenSysCtrl.Helpers.Pipeline {
|
||||
|
||||
public int Orientation { get; set; }
|
||||
|
||||
public bool IsOpen => CallbackIsOpen();
|
||||
public bool IsOpen => CallbackIsOpen() == true;
|
||||
public bool IsClosed => CallbackIsOpen() == false;
|
||||
public bool IsTransitioning => CallbackIsOpen() == null;
|
||||
public ISet<IEdge> Inputs { get; init; }
|
||||
public ISet<IEdge> Outputs { get; init; }
|
||||
|
||||
protected Func<bool> CallbackIsOpen;
|
||||
protected Func<bool?> CallbackIsOpen;
|
||||
|
||||
protected Rectangle? _background;
|
||||
protected Polygon? _triangles;
|
||||
@@ -29,7 +31,7 @@ namespace PamhagenSysCtrl.Helpers.Pipeline {
|
||||
protected ((Point Top, Point Bottom) Closed, (Point Top, Point Bottom) Open) _middlePoints;
|
||||
protected TextBlock? _text;
|
||||
|
||||
public Valve(double x, double y, int orientation, Func<bool> cbOpen) {
|
||||
public Valve(double x, double y, int orientation, Func<bool?> cbOpen) {
|
||||
CenterX = x;
|
||||
CenterY = y;
|
||||
CallbackIsOpen = cbOpen;
|
||||
|
||||
Reference in New Issue
Block a user