@@ -76,10 +76,6 @@ namespace PamhagenSysCtrl {
|
||||
StirrerMW2Button.Foreground = plant.IsStirrerMW2Active ? Brushes.DarkGreen : Brushes.DarkRed;
|
||||
StirrerMW2Button.Background = plant.IsStirrerMW2Active ? Brushes.MintCream : Brushes.MistyRose;
|
||||
|
||||
BeltButton.BorderBrush = plant.IsBeltActive ? Brushes.DarkGreen : Brushes.DarkRed;
|
||||
BeltButton.Foreground = plant.IsBeltActive ? Brushes.DarkGreen : Brushes.DarkRed;
|
||||
BeltButton.Background = plant.IsBeltActive ? Brushes.MintCream : Brushes.MistyRose;
|
||||
|
||||
Auger1Button.BorderBrush = plant.IsAuger1Active ? Brushes.DarkGreen : Brushes.DarkRed;
|
||||
Auger1Button.Foreground = plant.IsAuger1Active ? Brushes.DarkGreen : Brushes.DarkRed;
|
||||
Auger1Button.Background = plant.IsAuger1Active ? Brushes.MintCream : Brushes.MistyRose;
|
||||
@@ -88,6 +84,10 @@ namespace PamhagenSysCtrl {
|
||||
Auger2Button.Foreground = plant.IsAuger2Active ? Brushes.DarkGreen : Brushes.DarkRed;
|
||||
Auger2Button.Background = plant.IsAuger2Active ? Brushes.MintCream : Brushes.MistyRose;
|
||||
|
||||
Auger3Button.BorderBrush = plant.IsAuger3Active ? Brushes.DarkGreen : Brushes.DarkRed;
|
||||
Auger3Button.Foreground = plant.IsAuger3Active ? Brushes.DarkGreen : Brushes.DarkRed;
|
||||
Auger3Button.Background = plant.IsAuger3Active ? Brushes.MintCream : Brushes.MistyRose;
|
||||
|
||||
MP1BackwardButton.BorderBrush = plant.MP1 == MotorState.Backward ? Brushes.DarkGreen : Brushes.SlateGray;
|
||||
MP1BackwardButton.Foreground = plant.MP1 == MotorState.Backward ? Brushes.DarkGreen : Brushes.SlateGray;
|
||||
MP1BackwardButton.Background = plant.MP1 == MotorState.Backward ? Brushes.MintCream : Brushes.WhiteSmoke;
|
||||
@@ -200,19 +200,6 @@ namespace PamhagenSysCtrl {
|
||||
}
|
||||
}
|
||||
|
||||
private void BeltButton_Click(object? sender, RoutedEventArgs? evt) {
|
||||
if (App.Plant == null) return;
|
||||
try {
|
||||
if (App.Plant.IsBeltActive) {
|
||||
App.Plant.StopBelt();
|
||||
} else {
|
||||
App.Plant.StartBelt();
|
||||
}
|
||||
} catch (NoClearanceException exc) {
|
||||
MessageBox.Show($"{exc.Message}", "Keine Freigabe", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void Auger1Button_Click(object? sender, RoutedEventArgs? evt) {
|
||||
if (App.Plant == null) return;
|
||||
try {
|
||||
@@ -239,6 +226,19 @@ namespace PamhagenSysCtrl {
|
||||
}
|
||||
}
|
||||
|
||||
private void Auger3Button_Click(object? sender, RoutedEventArgs? evt) {
|
||||
if (App.Plant == null) return;
|
||||
try {
|
||||
if (App.Plant.IsAuger3Active) {
|
||||
App.Plant.StopAuger3();
|
||||
} else {
|
||||
App.Plant.StartAuger3();
|
||||
}
|
||||
} catch (NoClearanceException exc) {
|
||||
MessageBox.Show($"{exc.Message}", "Keine Freigabe", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void MP1BackwardButton_Click(object? sender, RoutedEventArgs? evt) {
|
||||
if (App.Plant == null) return;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user