|
@@ -0,0 +1,289 @@
|
|
|
+<UserControl
|
|
|
+ x:Class="ShakerManger.View.ShakerInfoView"
|
|
|
+ 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:hc="https://handyorg.github.io/handycontrol"
|
|
|
+ xmlns:local="clr-namespace:ShakerManger.View"
|
|
|
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
+ xmlns:vm="clr-namespace:ShakerManger.ViewModel"
|
|
|
+ d:DataContext="{d:DesignInstance {x:Type vm:ShakerControlViewModel}}"
|
|
|
+ d:DesignHeight="450"
|
|
|
+ d:DesignWidth="800"
|
|
|
+ mc:Ignorable="d">
|
|
|
+ <Viewbox Margin="4" Stretch="Fill">
|
|
|
+ <Grid Width="960" Height="460">
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="0.4*" />
|
|
|
+ <RowDefinition Height="0.6*" />
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition />
|
|
|
+ <ColumnDefinition />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <GroupBox
|
|
|
+ Grid.Row="0"
|
|
|
+ Grid.Column="0"
|
|
|
+ hc:TitleElement.Background="Transparent"
|
|
|
+ hc:TitleElement.Foreground="White"
|
|
|
+ hc:TitleElement.MinHeight="42"
|
|
|
+ Background="Transparent"
|
|
|
+ BorderBrush="Gray"
|
|
|
+ BorderThickness="1"
|
|
|
+ FontSize="22"
|
|
|
+ FontWeight="Bold"
|
|
|
+ Foreground="{StaticResource TitleBrush}"
|
|
|
+ Header="输出"
|
|
|
+ Style="{StaticResource GroupBoxTab}">
|
|
|
+ <Grid>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition />
|
|
|
+ <ColumnDefinition />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <StackPanel
|
|
|
+ Grid.Column="0"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Orientation="Vertical">
|
|
|
+ <StackPanel
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Orientation="Horizontal">
|
|
|
+ <Viewbox
|
|
|
+ Width="20"
|
|
|
+ Height="20"
|
|
|
+ Stretch="Fill">
|
|
|
+ <Path
|
|
|
+ Data="{StaticResource CurrentGeometry}"
|
|
|
+ Fill="Green"
|
|
|
+ Stretch="Fill" />
|
|
|
+ </Viewbox>
|
|
|
+ <TextBlock
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ FontSize="16"
|
|
|
+ FontWeight="Normal"
|
|
|
+ Foreground="White"
|
|
|
+ Text="电流(A)" />
|
|
|
+ </StackPanel>
|
|
|
+ <TextBlock
|
|
|
+ Margin="4,0,0,0"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ FontSize="48"
|
|
|
+ Foreground="Green"
|
|
|
+ Text="{Binding CurrentData.OutputCurrent, StringFormat={}{0:0000}}" />
|
|
|
+ </StackPanel>
|
|
|
+ <Line
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Stroke="Gray"
|
|
|
+ StrokeThickness="1"
|
|
|
+ X1="0"
|
|
|
+ X2="0"
|
|
|
+ Y1="0"
|
|
|
+ Y2="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Grid}, Path=ActualHeight}" />
|
|
|
+ <StackPanel
|
|
|
+ Grid.Column="1"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Orientation="Vertical">
|
|
|
+
|
|
|
+ <StackPanel
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Orientation="Horizontal">
|
|
|
+ <Viewbox
|
|
|
+ Width="20"
|
|
|
+ Height="20"
|
|
|
+ Stretch="Fill">
|
|
|
+ <Path
|
|
|
+ Data="{StaticResource VoltageGeometry}"
|
|
|
+ Fill="Green"
|
|
|
+ Stretch="Fill" />
|
|
|
+ </Viewbox>
|
|
|
+ <TextBlock
|
|
|
+ Margin="4,0,0,0"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ FontSize="16"
|
|
|
+ FontWeight="Normal"
|
|
|
+ Foreground="White"
|
|
|
+ Text="电压(V)" />
|
|
|
+ </StackPanel>
|
|
|
+ <TextBlock
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ FontSize="48"
|
|
|
+ Foreground="Green"
|
|
|
+ Text="{Binding CurrentData.OutputVoltage, StringFormat={}{0:0000}}" />
|
|
|
+ </StackPanel>
|
|
|
+ </Grid>
|
|
|
+ </GroupBox>
|
|
|
+
|
|
|
+ <GroupBox
|
|
|
+ Grid.Row="1"
|
|
|
+ Grid.Column="0"
|
|
|
+ Margin="0,4,0,0"
|
|
|
+ hc:TitleElement.Background="Transparent"
|
|
|
+ hc:TitleElement.Foreground="White"
|
|
|
+ hc:TitleElement.MinHeight="42"
|
|
|
+ Background="Transparent"
|
|
|
+ BorderBrush="Gray"
|
|
|
+ BorderThickness="1"
|
|
|
+ FontSize="22"
|
|
|
+ FontWeight="Black"
|
|
|
+ Foreground="{StaticResource TitleBrush}"
|
|
|
+ Header="系统"
|
|
|
+ Style="{StaticResource GroupBoxTab}">
|
|
|
+ <Grid Margin="4,0,0,0" TextBlock.FontWeight="Normal">
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition />
|
|
|
+ <RowDefinition />
|
|
|
+ <RowDefinition />
|
|
|
+ <RowDefinition />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <StackPanel
|
|
|
+ Grid.Row="0"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Orientation="Horizontal">
|
|
|
+ <TextBlock
|
|
|
+ Width="120"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ FontSize="16"
|
|
|
+ Foreground="White"
|
|
|
+ Text="励磁电流(A)" />
|
|
|
+ <TextBlock
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ FontSize="16"
|
|
|
+ Foreground="White"
|
|
|
+ Text="{Binding CurrentData.ExcitationCurrent, StringFormat={}{0:000}}" />
|
|
|
+ </StackPanel>
|
|
|
+ <StackPanel
|
|
|
+ Grid.Row="1"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Orientation="Horizontal">
|
|
|
+ <TextBlock
|
|
|
+ Width="120"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ FontSize="16"
|
|
|
+ Foreground="White"
|
|
|
+ Text="直流电压(V)" />
|
|
|
+ <TextBlock
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ FontSize="16"
|
|
|
+ Foreground="White"
|
|
|
+ Text="{Binding CurrentData.DCVoltage1, StringFormat={}{0:000}}" />
|
|
|
+ <TextBlock
|
|
|
+ Margin="20,0,0,0"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ FontSize="16"
|
|
|
+ Foreground="White"
|
|
|
+ Text="{Binding CurrentData.DCVoltage2, StringFormat={}{0:000}}" />
|
|
|
+ <TextBlock
|
|
|
+ Margin="20,0,0,0"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ FontSize="16"
|
|
|
+ Foreground="White"
|
|
|
+ Text="{Binding CurrentData.DCVoltage3, StringFormat={}{0:000}}" />
|
|
|
+ <TextBlock
|
|
|
+ Margin="20,0,0,0"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ FontSize="16"
|
|
|
+ Foreground="White"
|
|
|
+ Text="{Binding CurrentData.DCVoltage4, StringFormat={}{0:000}}" />
|
|
|
+ </StackPanel>
|
|
|
+ <StackPanel
|
|
|
+ Grid.Row="2"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Orientation="Horizontal">
|
|
|
+ <TextBlock
|
|
|
+ Width="120"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ FontSize="16"
|
|
|
+ Foreground="White"
|
|
|
+ Text="温度(℃)" />
|
|
|
+ <TextBlock
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ FontSize="16"
|
|
|
+ Foreground="White"
|
|
|
+ Text="{Binding CurrentData.AbutmentTemperature0, StringFormat={}{0:000}}" />
|
|
|
+ <TextBlock
|
|
|
+ Margin="20,0,0,0"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ FontSize="16"
|
|
|
+ Foreground="White"
|
|
|
+ Text="{Binding CurrentData.AbutmentTemperature1, StringFormat={}{0:000}}" />
|
|
|
+ </StackPanel>
|
|
|
+ <StackPanel
|
|
|
+ Grid.Row="3"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Orientation="Horizontal">
|
|
|
+ <TextBlock
|
|
|
+ Width="120"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ FontSize="16"
|
|
|
+ Foreground="White"
|
|
|
+ Text="三相电压(V)" />
|
|
|
+ <TextBlock
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ FontSize="16"
|
|
|
+ Foreground="White"
|
|
|
+ Text="{Binding CurrentData.ThreePhaseVoltage, StringFormat={}{0:000}}" />
|
|
|
+ </StackPanel>
|
|
|
+ </Grid>
|
|
|
+ </GroupBox>
|
|
|
+
|
|
|
+ <GroupBox
|
|
|
+ Grid.Row="0"
|
|
|
+ Margin="4,0,0,0"
|
|
|
+ Grid.Column="1"
|
|
|
+ Grid.RowSpan="2"
|
|
|
+ hc:TitleElement.Background="Transparent"
|
|
|
+ hc:TitleElement.Foreground="White"
|
|
|
+ hc:TitleElement.MinHeight="42"
|
|
|
+ Background="Transparent"
|
|
|
+ BorderBrush="Gray"
|
|
|
+ BorderThickness="1"
|
|
|
+ FontSize="22"
|
|
|
+ FontWeight="Black"
|
|
|
+ Foreground="{StaticResource TitleBrush}"
|
|
|
+ Header="系统"
|
|
|
+ Style="{StaticResource GroupBoxTab}">
|
|
|
+ <Grid Margin="4,0,0,0" TextBlock.FontWeight="Normal">
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="0.25*"/>
|
|
|
+ <RowDefinition Height="0.25*"/>
|
|
|
+ <RowDefinition Height="0.5*"/>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <hc:BulletCheckBox
|
|
|
+ Width="140"
|
|
|
+ Height="48"
|
|
|
+ BorderBrush="Gray"
|
|
|
+ CheckedText="开"
|
|
|
+ IsChecked="{Binding GainSwich}"
|
|
|
+ IsEnabled="{Binding ShakerControl.GainSwitchEnabled, Mode=OneWay}"
|
|
|
+ Text="关">
|
|
|
+ <hc:Interaction.Triggers>
|
|
|
+ <hc:EventTrigger EventName="Click">
|
|
|
+ <hc:ExInvokeCommandAction Command="{Binding ShakerControl.PowerAmplifier.GainSwitchCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=hc:BulletCheckBox}, Path=IsChecked}" />
|
|
|
+ </hc:EventTrigger>
|
|
|
+ </hc:Interaction.Triggers>
|
|
|
+ </hc:BulletCheckBox>
|
|
|
+ </Grid>
|
|
|
+ </GroupBox>
|
|
|
+ </Grid>
|
|
|
+ </Viewbox>
|
|
|
+
|
|
|
+</UserControl>
|