|
@@ -3,6 +3,7 @@
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
+ xmlns:data="clr-namespace:Shaker.Model;assembly=Shaker"
|
|
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
|
|
xmlns:local="clr-namespace:ShakerManger.View"
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
@@ -205,13 +206,45 @@
|
|
|
<ColumnDefinition />
|
|
|
<ColumnDefinition Width="66" />
|
|
|
</Grid.ColumnDefinitions>
|
|
|
- <TextBlock
|
|
|
- Grid.ColumnSpan="2"
|
|
|
- HorizontalAlignment="Center"
|
|
|
- VerticalAlignment="Center"
|
|
|
- FontSize="36"
|
|
|
- Foreground="{StaticResource forecolor}"
|
|
|
- Text="{Binding Title, StringFormat={}{0}功放控制}" />
|
|
|
+ <Grid Grid.Column="0" Grid.ColumnSpan="2">
|
|
|
+ <StackPanel
|
|
|
+ Margin="10,0,0,0"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ VerticalAlignment="Bottom"
|
|
|
+ Orientation="Vertical">
|
|
|
+ <Ellipse
|
|
|
+ Width="42"
|
|
|
+ Height="42"
|
|
|
+ Fill="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=StackPanel}, Path=Children[1].Foreground}" />
|
|
|
+ <TextBlock
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Text="{Binding CurrentData.OperatingStatus, Converter={StaticResource EnumToDescription}}">
|
|
|
+ <TextBlock.Style>
|
|
|
+ <Style TargetType="TextBlock">
|
|
|
+ <Style.Triggers>
|
|
|
+ <DataTrigger Binding="{Binding CurrentData.OperatingStatus}" Value="{x:Static data:OperatingStatus.Run}">
|
|
|
+ <Setter Property="Foreground" Value="Green" />
|
|
|
+ </DataTrigger>
|
|
|
+ <DataTrigger Binding="{Binding CurrentData.OperatingStatus}" Value="{x:Static data:OperatingStatus.Warn}">
|
|
|
+ <Setter Property="Foreground" Value="Red" />
|
|
|
+ </DataTrigger>
|
|
|
+ <DataTrigger Binding="{Binding CurrentData.OperatingStatus}" Value="{x:Static data:OperatingStatus.Wait}">
|
|
|
+ <Setter Property="Foreground" Value="Yellow" />
|
|
|
+ </DataTrigger>
|
|
|
+ </Style.Triggers>
|
|
|
+ </Style>
|
|
|
+ </TextBlock.Style>
|
|
|
+ </TextBlock>
|
|
|
+ </StackPanel>
|
|
|
+ <TextBlock
|
|
|
+ Grid.ColumnSpan="2"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ FontSize="36"
|
|
|
+ Foreground="{StaticResource forecolor}"
|
|
|
+ Text="{Binding Title, StringFormat={}{0}功放控制}" />
|
|
|
+ </Grid>
|
|
|
<Button
|
|
|
Grid.Column="1"
|
|
|
hc:IconElement.Geometry="{StaticResource CloseGeometry}"
|
|
@@ -287,20 +320,65 @@
|
|
|
Width="{StaticResource size}"
|
|
|
Height="{StaticResource size}"
|
|
|
hc:IconElement.Geometry="{StaticResource StartGeometry}"
|
|
|
- Command="{Binding StartCommand}"
|
|
|
- Style="{StaticResource ImageButton}" />
|
|
|
+ Command="{Binding StartCommand}">
|
|
|
+ <Button.Style>
|
|
|
+ <Style TargetType="Button" BasedOn="{StaticResource ImageButton}">
|
|
|
+ <Style.Triggers>
|
|
|
+ <DataTrigger Binding="{Binding CurrentData.OperatingStatus}" Value="{x:Static data:OperatingStatus.Run}">
|
|
|
+ <Setter Property="IsEnabled" Value="False" />
|
|
|
+ </DataTrigger>
|
|
|
+ <DataTrigger Binding="{Binding CurrentData.OperatingStatus}" Value="{x:Static data:OperatingStatus.Warn}">
|
|
|
+ <Setter Property="IsEnabled" Value="False" />
|
|
|
+ </DataTrigger>
|
|
|
+ <DataTrigger Binding="{Binding CurrentData.OperatingStatus}" Value="{x:Static data:OperatingStatus.Wait}">
|
|
|
+ <Setter Property="IsEnabled" Value="True" />
|
|
|
+ </DataTrigger>
|
|
|
+ </Style.Triggers>
|
|
|
+ </Style>
|
|
|
+ </Button.Style>
|
|
|
+ </Button>
|
|
|
<Button
|
|
|
Width="{StaticResource size}"
|
|
|
Height="{StaticResource size}"
|
|
|
hc:IconElement.Geometry="{StaticResource StopGeometry}"
|
|
|
- Command="{Binding StopCommand}"
|
|
|
- Style="{StaticResource ImageButton}" />
|
|
|
+ Command="{Binding StopCommand}">
|
|
|
+ <Button.Style>
|
|
|
+ <Style TargetType="Button" BasedOn="{StaticResource ImageButton}">
|
|
|
+ <Style.Triggers>
|
|
|
+ <DataTrigger Binding="{Binding CurrentData.OperatingStatus}" Value="{x:Static data:OperatingStatus.Run}">
|
|
|
+ <Setter Property="IsEnabled" Value="True" />
|
|
|
+ </DataTrigger>
|
|
|
+ <DataTrigger Binding="{Binding CurrentData.OperatingStatus}" Value="{x:Static data:OperatingStatus.Warn}">
|
|
|
+ <Setter Property="IsEnabled" Value="False" />
|
|
|
+ </DataTrigger>
|
|
|
+ <DataTrigger Binding="{Binding CurrentData.OperatingStatus}" Value="{x:Static data:OperatingStatus.Wait}">
|
|
|
+ <Setter Property="IsEnabled" Value="False" />
|
|
|
+ </DataTrigger>
|
|
|
+ </Style.Triggers>
|
|
|
+ </Style>
|
|
|
+ </Button.Style>
|
|
|
+ </Button>
|
|
|
<Button
|
|
|
Width="{StaticResource size}"
|
|
|
Height="{StaticResource size}"
|
|
|
hc:IconElement.Geometry="{StaticResource ResetGeometry}"
|
|
|
- Command="{Binding ResetCommand}"
|
|
|
- Style="{StaticResource ImageButton}" />
|
|
|
+ Command="{Binding ResetCommand}">
|
|
|
+ <Button.Style>
|
|
|
+ <Style TargetType="Button" BasedOn="{StaticResource ImageButton}">
|
|
|
+ <Style.Triggers>
|
|
|
+ <DataTrigger Binding="{Binding CurrentData.OperatingStatus}" Value="{x:Static data:OperatingStatus.Run}">
|
|
|
+ <Setter Property="IsEnabled" Value="False" />
|
|
|
+ </DataTrigger>
|
|
|
+ <DataTrigger Binding="{Binding CurrentData.OperatingStatus}" Value="{x:Static data:OperatingStatus.Warn}">
|
|
|
+ <Setter Property="IsEnabled" Value="True" />
|
|
|
+ </DataTrigger>
|
|
|
+ <DataTrigger Binding="{Binding CurrentData.OperatingStatus}" Value="{x:Static data:OperatingStatus.Wait}">
|
|
|
+ <Setter Property="IsEnabled" Value="False" />
|
|
|
+ </DataTrigger>
|
|
|
+ </Style.Triggers>
|
|
|
+ </Style>
|
|
|
+ </Button.Style>
|
|
|
+ </Button>
|
|
|
</UniformGrid>
|
|
|
</Grid>
|
|
|
</Border>
|