This commit is contained in:
1 parent
f4ef8d2f16
commit
3d24c65758
6 files changed
+231
-190
No files matched your search
@@ -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