Fix things after testing with virtual serial port
This commit is contained in:
@@ -24,7 +24,8 @@ namespace PamhagenSysCtrl {
|
||||
borderStyle.Setters.Add(new Setter(Border.CornerRadiusProperty, new CornerRadius(5)));
|
||||
b.Resources.Add(typeof(Border), borderStyle);
|
||||
b.Click += (sender, evt) => {
|
||||
if (App.Plant == null) return;
|
||||
if (App.Plant == null || sender is not Button b) return;
|
||||
var i = int.Parse($"{b.Content}"[1..]);
|
||||
if (App.Plant.WantValveOpen(i)) {
|
||||
App.Plant.CloseV(i);
|
||||
} else {
|
||||
@@ -62,6 +63,25 @@ namespace PamhagenSysCtrl {
|
||||
b.Foreground = target ? Brushes.DarkRed : Brushes.Black;
|
||||
b.Background = actual ? Brushes.MistyRose : Brushes.WhiteSmoke;
|
||||
}
|
||||
|
||||
Status.Text = $"""
|
||||
Gradation °Oe: {plant.GradationOe:N2}
|
||||
Presse Querschnecke: {plant.PresseQuerSchnecke}
|
||||
Füllstände:
|
||||
Wanne A1: {plant.FillLevelA1} (ausgewählt: {plant.WantA1Selected}, Status: {plant.IsA1Selected})
|
||||
Wanne A2: {plant.FillLevelA2} (ausgewählt: {plant.WantA2Selected}, Status: {plant.IsA2Selected})
|
||||
Presse 1: {plant.FillLevelPress1}
|
||||
Presse 2: {plant.FillLevelPress2}
|
||||
Tank 1: {plant.FillLevelT1}
|
||||
Tank 2: {plant.FillLevelT2}
|
||||
Tank 3: {plant.FillLevelT3}
|
||||
Tank 4: {plant.FillLevelT4}
|
||||
Tank 5: {plant.FillLevelT5}
|
||||
Tank 6: {plant.FillLevelT6}
|
||||
Tank 7: {plant.FillLevelT7}
|
||||
Tank 8: {plant.FillLevelT8}
|
||||
Tank 9: {plant.FillLevelT9}
|
||||
""";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user