20240815_FJEQ_upperpc_seabed/FujianEarthquake_seabed_UI/备份/PowSettingView.xaml

284 lines
17 KiB
Plaintext
Raw Permalink Normal View History

<UserControl x:Class="FujianEarthquake.Views.UserControls.PowSettingView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:FujianEarthquake.Views.UserControls"
xmlns:converters="clr-namespace:FujianEarthquake.Common"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:hc="https://handyorg.github.io/handycontrol"
mc:Ignorable="d"
Background="{DynamicResource RegionBrush}"
FontFamily="{StaticResource DigitalDisplay}"
Height="280" Width="450">
<UserControl.Resources>
<converters:BtnConvert x:Key="BtnConvert"/>
<sys:Boolean x:Key="BoolTrue">True</sys:Boolean>
<sys:Boolean x:Key="BoolFalse">False</sys:Boolean>
<Style TargetType="TextBox">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TextBox" >
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}" CornerRadius="0"
SnapsToDevicePixels="True">
<ScrollViewer x:Name="PART_ContentHost" Focusable="False"
HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Hidden"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="4*"/>
</Grid.RowDefinitions>
<TextBlock Text="开 关 设 置" FontSize="20" Foreground="White" Background="Transparent"
HorizontalAlignment="Center" VerticalAlignment="Center"/>
<hc:Divider VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0,0,0,4"
Width="450"/>
<Button Width="22" Height="22" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource PrimaryBrush}"
hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right"
VerticalAlignment="Center" Margin="0,0,10,2" Command="hc:ControlCommands.Close"/>
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition Height="0.3*"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="0.3*"/>
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="0.8*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="输出开关:" FontSize="18" Foreground="White" Background="Transparent"
HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
<Image Grid.Column="1" Source="{Binding OutputState}" Height="30" Width="30"
Stretch="Fill" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="-10,10"/>
<TextBlock Grid.Column="2" Name="OutputPowerOpenMsg" Text="{Binding OutputPowerOpenMsg}"
FontSize="14" Foreground="{Binding OutputPowerOpenMsgForeground}"
HorizontalAlignment="Center" Visibility="{Binding OutputPowerOpenMsgVisibility}"
VerticalAlignment="Top"/>
<Button Grid.Column="2" Name="OutputPowerPicker" HorizontalAlignment="Center" VerticalAlignment="Bottom"
Width="90" Height="35" Background="Transparent"
BorderThickness="1" BorderBrush="White" Style="{StaticResource ButtonStyle}"
Command="{Binding ShoreBaseStationSwitchCommand}" IsEnabled="{Binding OutputPowerOpenBtnIsEnabled}">
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="8"/>
</Style>
</Button.Resources>
<Button.Content>
<StackPanel Orientation="Horizontal">
<Image Source="/Assets/Images/Start.png" Stretch="Fill" Width="16"
Height="16"/>
<TextBlock Text="打开" Foreground="White" Margin="10,0,0,0" FontSize="14"
VerticalAlignment="Center"/>
</StackPanel>
</Button.Content>
<Button.CommandParameter>
<MultiBinding Converter="{StaticResource ResourceKey=BtnConvert}">
<MultiBinding.Bindings>
<Binding ElementName="OutputPowerPicker" Path="Name"/>
<Binding Source="{StaticResource BoolTrue}"/>
</MultiBinding.Bindings>
</MultiBinding>
</Button.CommandParameter>
</Button>
<TextBlock Grid.Column="3" Name="OutputPowerCloseMsg" Text="{Binding OutputPowerCloseMsg}"
FontSize="14" Foreground="{Binding OutputPowerCloseMsgForeground}"
HorizontalAlignment="Center" Visibility="{Binding OutputPowerCloseMsgVisibility}"
VerticalAlignment="Top"/>
<Button Grid.Column="3" HorizontalAlignment="Left" VerticalAlignment="Bottom"
Width="90" Height="35" Background="Transparent"
BorderThickness="1" BorderBrush="White" Style="{StaticResource ButtonStyle}"
Command="{Binding ShoreBaseStationSwitchCommand}" IsEnabled="{Binding OutputPowerCloseBtnIsEnabled}">
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="8"/>
</Style>
</Button.Resources>
<Button.Content>
<StackPanel Orientation="Horizontal">
<Image Source="/Assets/Images/Stop.png" Stretch="Fill" Width="16"
Height="16"/>
<TextBlock Text="关闭" Foreground="White" Margin="10,0,0,0" FontSize="14"
VerticalAlignment="Center" HorizontalAlignment="Center"/>
</StackPanel>
</Button.Content>
<Button.CommandParameter>
<MultiBinding Converter="{StaticResource ResourceKey=BtnConvert}">
<MultiBinding.Bindings>
<Binding ElementName="OutputPowerPicker" Path="Name"/>
<Binding Source="{StaticResource BoolFalse}"/>
</MultiBinding.Bindings>
</MultiBinding>
</Button.CommandParameter>
</Button>
</Grid>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="0.3*"/>
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="0.8*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="输出过压保护:" FontSize="18" Foreground="White" Background="Transparent"
HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
<Image Grid.Column="1" Name="OutputVolProStateImage" Source="{Binding OutputVolProState}" Height="30" Width="30"
Stretch="Fill" HorizontalAlignment="Center" VerticalAlignment="Bottom"/>
<TextBlock Grid.Column="2" Name="OutputVolProPowerOpenMsg" Text="{Binding OutputVolProPowerOpenMsg}"
FontSize="14" Foreground="{Binding OutputVolProPowerOpenMsgForeground}"
HorizontalAlignment="Center" Visibility="{Binding OutputVolProPowerOpenMsgVisibility}"
VerticalAlignment="Top"/>
<Button Grid.Column="2" Name="OutputVolProPowerPicker" HorizontalAlignment="Center" VerticalAlignment="Bottom"
Width="90" Height="35" Background="Transparent"
BorderThickness="1" BorderBrush="White" Style="{StaticResource ButtonStyle}"
Command="{Binding ShoreBaseStationSwitchCommand}" IsEnabled="{Binding OutputVolProPowerOpenBtnIsEnabled}">
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="8"/>
</Style>
</Button.Resources>
<Button.Content>
<StackPanel Orientation="Horizontal">
<Image Source="/Assets/Images/Start.png" Stretch="Fill" Width="16"
Height="16"/>
<TextBlock Text="打开" Foreground="White" Margin="10,0,0,0" FontSize="14"
VerticalAlignment="Center"/>
</StackPanel>
</Button.Content>
<Button.CommandParameter>
<MultiBinding Converter="{StaticResource ResourceKey=BtnConvert}">
<MultiBinding.Bindings>
<Binding ElementName="OutputVolProPowerPicker" Path="Name"/>
<Binding Source="{StaticResource BoolTrue}"/>
</MultiBinding.Bindings>
</MultiBinding>
</Button.CommandParameter>
</Button>
<TextBlock Grid.Column="3" Name="OutputVolProPowerCloseMsg" Text="{Binding OutputVolProPowerCloseMsg}"
FontSize="14" Foreground="{Binding OutputVolProPowerCloseMsgForeground}"
HorizontalAlignment="Center" Visibility="{Binding OutputVolProPowerCloseMsgVisibility}"
VerticalAlignment="Top"/>
<Button Grid.Column="3" HorizontalAlignment="Left" VerticalAlignment="Bottom"
Width="90" Height="35" Background="Transparent"
BorderThickness="1" BorderBrush="White" Style="{StaticResource ButtonStyle}"
Command="{Binding ShoreBaseStationSwitchCommand}" IsEnabled="{Binding OutputVolProPowerCloseBtnIsEnabled}">
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="8"/>
</Style>
</Button.Resources>
<Button.Content>
<StackPanel Orientation="Horizontal">
<Image Source="/Assets/Images/Stop.png" Stretch="Fill" Width="16"
Height="16"/>
<TextBlock Text="关闭" Foreground="White" Margin="10,0,0,0" FontSize="14"
VerticalAlignment="Center" HorizontalAlignment="Center"/>
</StackPanel>
</Button.Content>
<Button.CommandParameter>
<MultiBinding Converter="{StaticResource ResourceKey=BtnConvert}">
<MultiBinding.Bindings>
<Binding ElementName="OutputVolProPowerPicker" Path="Name"/>
<Binding Source="{StaticResource BoolFalse}"/>
</MultiBinding.Bindings>
</MultiBinding>
</Button.CommandParameter>
</Button>
</Grid>
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="0.3*"/>
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="0.8*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="输出过流保护:" FontSize="18" Foreground="White" Background="Transparent"
HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
<Image Grid.Column="1" Source="{Binding SBSSDM.CurProStatus}" Height="30" Width="30"
Stretch="Fill" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="-20,0,0,0"/>
<TextBlock Grid.Column="2" Name="OutputCurProPowerOpenMsg" Text="{Binding OutputCurProPowerOpenMsg}"
FontSize="14" Foreground="{Binding OutputCurProPowerOpenMsgForeground}"
HorizontalAlignment="Center" Visibility="{Binding OutputCurProPowerOpenMsgVisibility}"
VerticalAlignment="Top"/>
<Button Grid.Column="2" Name="OutputCurProPowerPicker" HorizontalAlignment="Center" VerticalAlignment="Bottom"
Width="90" Height="35" Background="Transparent"
BorderThickness="1" BorderBrush="White" Style="{StaticResource ButtonStyle}"
Command="{Binding ShoreBaseStationSwitchCommand}" IsEnabled="{Binding OutputCurProPowerOpenBtnIsEnabled}">
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="8"/>
</Style>
</Button.Resources>
<Button.Content>
<StackPanel Orientation="Horizontal">
<Image Source="/Assets/Images/Start.png" Stretch="Fill" Width="16"
Height="16"/>
<TextBlock Text="打开" Foreground="White" Margin="10,0,0,0" FontSize="14"
VerticalAlignment="Center"/>
</StackPanel>
</Button.Content>
<Button.CommandParameter>
<MultiBinding Converter="{StaticResource ResourceKey=BtnConvert}">
<MultiBinding.Bindings>
<Binding ElementName="OutputCurProPowerPicker" Path="Name"/>
<Binding Source="{StaticResource BoolTrue}"/>
</MultiBinding.Bindings>
</MultiBinding>
</Button.CommandParameter>
</Button>
<TextBlock Grid.Column="3" Name="OutputCurProPowerCloseMsg" Text="{Binding OutputCurProPowerCloseMsg}"
FontSize="14" Foreground="{Binding OutputCurProPowerCloseMsgForeground}"
HorizontalAlignment="Center" Visibility="{Binding OutputCurProPowerCloseMsgVisibility}"
VerticalAlignment="Top"/>
<Button Grid.Column="3" HorizontalAlignment="Left" VerticalAlignment="Bottom"
Width="90" Height="35" Background="Transparent"
BorderThickness="1" BorderBrush="White" Style="{StaticResource ButtonStyle}"
Command="{Binding ShoreBaseStationSwitchCommand}" IsEnabled="{Binding OutputCurProPowerCloseBtnIsEnabled}">
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="8"/>
</Style>
</Button.Resources>
<Button.Content>
<StackPanel Orientation="Horizontal">
<Image Source="/Assets/Images/Stop.png" Stretch="Fill" Width="16"
Height="16"/>
<TextBlock Text="关闭" Foreground="White" Margin="10,0,0,0" FontSize="14"
VerticalAlignment="Center" HorizontalAlignment="Center"/>
</StackPanel>
</Button.Content>
<Button.CommandParameter>
<MultiBinding Converter="{StaticResource ResourceKey=BtnConvert}">
<MultiBinding.Bindings>
<Binding ElementName="OutputCurProPowerPicker" Path="Name"/>
<Binding Source="{StaticResource BoolFalse}"/>
</MultiBinding.Bindings>
</MultiBinding>
</Button.CommandParameter>
</Button>
</Grid>
</Grid>
</Grid>
</UserControl>