Handle windows for manual control correctly
Test / Run tests (push) Successful in 13s

This commit is contained in:
2026-08-07 16:15:00 +02:00
parent 28aaa6b1f3
commit c82adcc054
4 changed files with 29 additions and 9 deletions
@@ -1,4 +1,5 @@
using PamhagenSysCtrl.Helpers;
using PamhagenSysCtrl.Windows;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
@@ -47,6 +48,14 @@ namespace PamhagenSysCtrl {
App.Plant?.Update += OnUpdate;
}
private void OnClosed(object sender, EventArgs evt) {
foreach (var win in Application.Current.Windows) {
if (win is PlantSchemeWindow w) {
w.Menu_Settings_ManualControl.IsChecked = false;
}
}
}
public void OnUpdate(object? sender, PlantEventArgs evt) {
if (sender is not PamhagenPlant plant) return;