Add switcher
This commit is contained in:
@@ -61,31 +61,31 @@
|
||||
Margin="135,115,10,10" VerticalAlignment="Top" HorizontalAlignment="Left"
|
||||
Click="GradationPumpButton_Click"/>
|
||||
|
||||
<Button x:Name="MP1ForwardButton" Content="Zurück" Padding="2" Height="30" Width="60"
|
||||
<Button x:Name="MP1BackwardButton" Content="Zurück" Padding="2" Height="30" Width="60"
|
||||
FontSize="14" BorderThickness="2" FontWeight="Bold"
|
||||
Margin="290,10,10,10" VerticalAlignment="Top" HorizontalAlignment="Left"
|
||||
Click="MP1ForwardButton_Click"/>
|
||||
Click="MP1BackwardButton_Click"/>
|
||||
<Button x:Name="MP1HaltButton" Content="MP1" Padding="2" Height="30" Width="60"
|
||||
FontSize="14" BorderThickness="2" FontWeight="Bold"
|
||||
Margin="350,10,10,10" VerticalAlignment="Top" HorizontalAlignment="Left"
|
||||
Click="MP1HaltButton_Click"/>
|
||||
<Button x:Name="MP1BackwardButton" Content="Vor" Padding="2" Height="30" Width="60"
|
||||
<Button x:Name="MP1ForwardButton" Content="Vor" Padding="2" Height="30" Width="60"
|
||||
FontSize="14" BorderThickness="2" FontWeight="Bold"
|
||||
Margin="410,10,10,10" VerticalAlignment="Top" HorizontalAlignment="Left"
|
||||
Click="MP1BackwardButton_Click"/>
|
||||
Click="MP1ForwardButton_Click"/>
|
||||
|
||||
<Button x:Name="MP2ForwardButton" Content="Zurück" Padding="2" Height="30" Width="60"
|
||||
<Button x:Name="MP2BackwardButton" Content="Zurück" Padding="2" Height="30" Width="60"
|
||||
FontSize="14" BorderThickness="2" FontWeight="Bold"
|
||||
Margin="290,45,10,10" VerticalAlignment="Top" HorizontalAlignment="Left"
|
||||
Click="MP2ForwardButton_Click"/>
|
||||
Click="MP2BackwardButton_Click"/>
|
||||
<Button x:Name="MP2HaltButton" Content="MP2" Padding="2" Height="30" Width="60"
|
||||
FontSize="14" BorderThickness="2" FontWeight="Bold"
|
||||
Margin="350,45,10,10" VerticalAlignment="Top" HorizontalAlignment="Left"
|
||||
Click="MP2HaltButton_Click"/>
|
||||
<Button x:Name="MP2BackwardButton" Content="Vor" Padding="2" Height="30" Width="60"
|
||||
<Button x:Name="MP2ForwardButton" Content="Vor" Padding="2" Height="30" Width="60"
|
||||
FontSize="14" BorderThickness="2" FontWeight="Bold"
|
||||
Margin="410,45,10,10" VerticalAlignment="Top" HorizontalAlignment="Left"
|
||||
Click="MP2BackwardButton_Click"/>
|
||||
Click="MP2ForwardButton_Click"/>
|
||||
|
||||
<Button x:Name="P12Button" Content="Pumpe 1/2" Padding="2" Height="30" Width="180"
|
||||
FontSize="14" BorderThickness="2" FontWeight="Bold"
|
||||
|
||||
@@ -74,8 +74,26 @@ namespace PamhagenSysCtrl.Windows {
|
||||
} else {
|
||||
App.Plant?.StartRebler();
|
||||
}
|
||||
} else if (c is Switcher switcher) {
|
||||
if (App.Plant?.WantA1Selected ?? false) {
|
||||
App.Plant?.SelectA2();
|
||||
} else {
|
||||
App.Plant?.SelectA1();
|
||||
}
|
||||
} else if (c is EncasedAuger auger) {
|
||||
//
|
||||
if (auger == Graph.Auger1) {
|
||||
if (auger.IsActive) {
|
||||
App.Plant?.StopAuger1();
|
||||
} else {
|
||||
App.Plant?.StartAuger1();
|
||||
}
|
||||
} else if (auger == Graph.Auger2) {
|
||||
if (auger.IsActive) {
|
||||
App.Plant?.StopAuger2();
|
||||
} else {
|
||||
App.Plant?.StartAuger2();
|
||||
}
|
||||
}
|
||||
} else if (c is ConveyorBelt belt) {
|
||||
if (belt.IsActive) {
|
||||
App.Plant?.StopBelt();
|
||||
|
||||
Reference in New Issue
Block a user