Cleanup and Enhancement

This commit is contained in:
2026-07-10 12:01:21 +02:00
parent fb35ddb389
commit ac2eafc8c6
4 changed files with 21 additions and 11 deletions
+3 -1
View File
@@ -27,7 +27,9 @@ namespace PamhagenSysCtrl {
b.Click += (sender, evt) => {
if (App.Plant == null || sender is not Button b) return;
var i = int.Parse($"{b.Content}"[1..]);
if (App.Plant.WantValveOpen(i)) {
if (i > 57) {
return;
} else if (App.Plant.WantValveOpen(i)) {
App.Plant.CloseV(i);
} else {
App.Plant.OpenV(i);