This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace PamhagenSysCtrl.Helpers.Pipeline {
|
||||
public class ExternalValve : Valve {
|
||||
|
||||
public override string Label { get; }
|
||||
|
||||
public ExternalValve(string label, double x, double y, int orientation, Func<bool> cbOpen) :
|
||||
base(x, y, orientation, cbOpen) {
|
||||
Label = label;
|
||||
}
|
||||
|
||||
public override void Update(bool isHovering, bool isPressed) {
|
||||
_text?.Visibility = isHovering || (App.Plant?.ManualControlMode ?? false) ? Visibility.Visible : Visibility.Hidden;
|
||||
_triangles?.Fill =
|
||||
!IsOpen ? PamhagenBrushes.Red :
|
||||
IsOpen ? PamhagenBrushes.Green :
|
||||
Highlight ?? Brushes.DarkGray;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user