123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289 |
- <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>
|