20240801_FJEQ_upperpc/FujianEarthquake_seabed_now/FujianEarthquake/Views/SystemControlView.xaml
XuMin 78cfbd3709 1 增加岸基站通信数据解析代码;
2 增加岸基站通信数据发送代码;
3 对岸基站通信数据收发代码进行测试,并解决出现的问题;
2024-09-30 14:06:43 +08:00

900 lines
60 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<UserControl x:Class="FujianEarthquake.Views.SystemControlView"
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"
xmlns:Converter="clr-namespace:FujianEarthquake.Common"
xmlns:ConnectConvert="clr-namespace:FujianEarthquake.Common.ConnectConvert"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d"
xmlns:hc="https://handyorg.github.io/handycontrol"
FontFamily="{StaticResource DigitalDisplay}"
Name="SystemControlPage"
d:DesignHeight="850" d:DesignWidth="1550">
<UserControl.Resources>
<Converter:NegateConverter x:Key="NegateConverter"/>
<Converter:BtnConvert x:Key="BtnConvert" />
<ConnectConvert:ConnectConvertClient x:Key="ConnectConvertClient" />
<ConnectConvert:ConnectConvertServer x:Key="ConnectConvertServer" />
<Style TargetType="GroupBox">
<Setter Property="Margin" Value="10,5"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="GroupBox">
<Grid>
<!--左上角-->
<Polyline HorizontalAlignment="Left" VerticalAlignment="Top"
Points="0 30,0 10,10 0,30 0" Stroke="#9918AABD" StrokeThickness="1"/>
<!--左上角点-->
<Ellipse Width="4" Height="4" VerticalAlignment="Top" HorizontalAlignment="Left"
Fill="#9918AABD" Margin="24,-2,0,0"/>
<Ellipse Width="4" Height="4" VerticalAlignment="Top" HorizontalAlignment="Left"
Fill="#9918AABD" Margin="-2,24,0,0"/>
<!--右上角-->
<Path Data="M0 0, 3 3, 30 3, 33 0, 68 0, 73 7,78 7, 78 10M8 0, 25 0"
Stroke="#5518AABD" VerticalAlignment="Top" HorizontalAlignment="Right"/>
<!--左下角-->
<Polyline Points="0,0 0,15 10,15" Stroke="#5518AABD" VerticalAlignment="Bottom"
HorizontalAlignment="Left"/>
<!--右下角-->
<Polyline Points="10,0 0,10" Stroke="#5518AABD" VerticalAlignment="Bottom"
HorizontalAlignment="Right"/>
<!--右下角图表-->
<Polyline Points="0,7 7 7 7 0" Fill="#9918AABD" VerticalAlignment="Bottom"
HorizontalAlignment="Right"/>
<Border BorderBrush="#5518AABD" BorderThickness="0,1,0,0" VerticalAlignment="Top"
Margin="30,-0.5,78,0"/>
<Border BorderBrush="#5518AABD" BorderThickness="0,0,1,0" HorizontalAlignment="Right"
Margin="0,10"/>
<Border BorderBrush="#5518AABD" BorderThickness="0,1,0,0" VerticalAlignment="Bottom"
Margin="10,0"/>
<Border BorderBrush="#5518AABD" BorderThickness="0,0,1,0" HorizontalAlignment="Left"
Margin="-0.5,15"/>
<!--箭头-->
<Path Data="M0 0,3 0,5 4,3 8,0 8,3 4" Fill="#9918AABD" VerticalAlignment="Top"
HorizontalAlignment="Left" Margin="10,13"/>
<Path Data="M0 0,3 0,5 4,3 8,0 8,3 4" Fill="#5518AABD" VerticalAlignment="Top"
HorizontalAlignment="Left" Margin="16,13"/>
<!--字体-->
<TextBlock Text="{TemplateBinding Header}" Foreground="#18AABD"
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="25,12"/>
<!-- 占位对象 -->
<ContentPresenter />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="TextBlockStyle" TargetType="TextBlock">
<Style.Setters>
<Setter Property="Width" Value="30"/>
<Setter Property="Height" Value="auto"/>
<Setter Property="Margin" Value="0,0,5,0"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="Foreground" Value="Red"/>
</Style.Setters>
</Style>
<Style x:Key="StationChangeStyle" TargetType="RadioButton">
<Setter Property="Width" Value="60"/>
<Setter Property="Height" Value="24"/>
<Setter Property="Foreground" Value="#888"/>
<Setter Property="Background" Value="#DDD"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<Border Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" Value="Orange"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
</Style.Triggers>
</Style>
<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>
<sys:Boolean x:Key="BoolTrue">True</sys:Boolean>
<sys:Boolean x:Key="BoolFalse">False</sys:Boolean>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="2.5*"/>
<RowDefinition Height="3*"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<GroupBox Header="连接状态">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<!--Socket通信①-->
<Grid Grid.Column="0">
<Grid.RowDefinitions>
<RowDefinition Height="0.6*"/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition Height="0.1*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center"
Orientation="Horizontal">
<TextBlock Margin="0,0,0,0" VerticalAlignment="Top" FontSize="18"
Foreground="White" Text="海底基站通信 ①"/>
</StackPanel>
<StackPanel Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center"
Orientation="Horizontal">
<TextBlock Margin="0,0,6,0" VerticalAlignment="Center" FontSize="16"
Foreground="White" Text="IP"/>
<TextBlock Width="16"/>
<TextBox Name="SubmarineIP1" Width="120" VerticalAlignment="Center" Background="Transparent"
HorizontalAlignment="Center" FontSize="16" Foreground="White" CaretBrush="White"
BorderThickness="0,0,0,1.2" BorderBrush="#FF424242" HorizontalContentAlignment="Center"
IsEnabled="{Binding serverModel1.IsOpened, Converter={StaticResource NegateConverter}}">
<TextBox.Text>
<Binding NotifyOnValidationError="True" Path="SocketServerInfo1.IP"
UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<Converter:CustomValidationRule ValidateType="IP"/>
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
</StackPanel>
<StackPanel Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center"
Orientation="Horizontal">
<TextBlock Margin="0,0,10,0" VerticalAlignment="Center" FontSize="16"
Foreground="White" Text="Port"/>
<TextBox Name="SubmarinePort1" Width="120" VerticalAlignment="Center" FontSize="16"
Foreground="White" Background="Transparent" CaretBrush="White"
BorderThickness="0,0,0,1.2" BorderBrush="#FF424242" HorizontalContentAlignment="Center"
IsEnabled="{Binding serverModel1.IsOpened, Converter={StaticResource NegateConverter}}">
<TextBox.Text>
<Binding NotifyOnValidationError="True" Path="SocketServerInfo1.Port"
UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<Converter:CustomValidationRule ValidateType="Port"/>
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
</StackPanel>
<StackPanel Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center"
Orientation="Horizontal">
<Button Width="100" Height="35" Margin="10,0" HorizontalAlignment="Left"
VerticalAlignment="Center"
Command="{Binding Socket1DoOpenCommand}" BorderBrush="White"
Background="Transparent" Style="{StaticResource ButtonStyle}">
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="8"/>
</Style>
</Button.Resources>
<Button.Content>
<StackPanel Orientation="Horizontal">
<Image Source="/Assets/Images/ConnectState.png" Stretch="Fill" Width="20" Height="20"/>
<TextBlock Text="{Binding serverModel1.IsOpened, Converter={StaticResource ResourceKey=ConnectConvertServer}}"
HorizontalAlignment="Center" VerticalAlignment="Center"
Margin="10,0,0,0" FontSize="16" Foreground="White"/>
</StackPanel>
</Button.Content>
</Button>
</StackPanel>
</Grid>
<!--Socket通信②-->
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="0.6*"/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition Height="0.1*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center"
Orientation="Horizontal">
<TextBlock Margin="0,0,0,0" VerticalAlignment="Top" FontSize="18"
Foreground="White" Text="海底基站通信 ②"/>
</StackPanel>
<StackPanel Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center"
Orientation="Horizontal">
<TextBlock Margin="0,0,6,0" VerticalAlignment="Center" FontSize="16"
Foreground="White" Text="IP"/>
<TextBlock Width="16"/>
<TextBox Name="SubmarineIP2" Width="120" VerticalAlignment="Center" Background="Transparent"
HorizontalAlignment="Center" FontSize="16" Foreground="White" CaretBrush="White"
BorderThickness="0,0,0,1.2" BorderBrush="#FF424242" HorizontalContentAlignment="Center"
IsEnabled="{Binding serverModel2.IsOpened, Converter={StaticResource NegateConverter}}">
<TextBox.Text>
<Binding NotifyOnValidationError="True" Path="SocketServerInfo2.IP"
UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<Converter:CustomValidationRule ValidateType="IP"/>
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
</StackPanel>
<StackPanel Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center"
Orientation="Horizontal">
<TextBlock Margin="0,0,10,0" VerticalAlignment="Center" FontSize="16"
Foreground="White" Text="Port"/>
<TextBox Name="SubmarinePort2" Width="120" VerticalAlignment="Center" FontSize="16"
Foreground="White" Background="Transparent" CaretBrush="White"
BorderThickness="0,0,0,1.2" BorderBrush="#FF424242" HorizontalContentAlignment="Center"
IsEnabled="{Binding serverModel2.IsOpened, Converter={StaticResource NegateConverter}}">
<TextBox.Text>
<Binding NotifyOnValidationError="True" Path="SocketServerInfo2.Port"
UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<Converter:CustomValidationRule ValidateType="Port"/>
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
</StackPanel>
<StackPanel Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center"
Orientation="Horizontal">
<Button Width="100" Height="35" Margin="10,0" HorizontalAlignment="Left"
VerticalAlignment="Center"
Command="{Binding Socket2DoOpenCommand}" BorderBrush="White"
Background="Transparent" Style="{StaticResource ButtonStyle}">
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="8"/>
</Style>
</Button.Resources>
<Button.Content>
<StackPanel Orientation="Horizontal">
<Image Source="/Assets/Images/ConnectState.png" Stretch="Fill" Width="20" Height="20"/>
<TextBlock Text="{Binding serverModel2.IsOpened, Converter={StaticResource ResourceKey=ConnectConvertServer}}"
HorizontalAlignment="Center" VerticalAlignment="Center"
Margin="10,0,0,0" FontSize="16" Foreground="White"/>
</StackPanel>
</Button.Content>
</Button>
</StackPanel>
</Grid>
<!--Socket通信②-->
<Grid Grid.Column="2">
<Grid.RowDefinitions>
<RowDefinition Height="0.6*"/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition Height="0.1*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center"
Orientation="Horizontal">
<TextBlock Margin="0,0,0,0" VerticalAlignment="Top" FontSize="18"
Foreground="White" Text="海底基站通信 ③"/>
</StackPanel>
<StackPanel Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center"
Orientation="Horizontal">
<TextBlock Margin="0,0,6,0" VerticalAlignment="Center" FontSize="16"
Foreground="White" Text="IP"/>
<TextBlock Width="16"/>
<TextBox Name="SubmarineIP3" Width="120" VerticalAlignment="Center" Background="Transparent"
HorizontalAlignment="Center" FontSize="16" Foreground="White" CaretBrush="White"
BorderThickness="0,0,0,1.2" BorderBrush="#FF424242" HorizontalContentAlignment="Center"
IsEnabled="{Binding serverModel3.IsOpened, Converter={StaticResource NegateConverter}}">
<TextBox.Text>
<Binding NotifyOnValidationError="True" Path="SocketServerInfo3.IP"
UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<Converter:CustomValidationRule ValidateType="IP"/>
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
</StackPanel>
<StackPanel Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center"
Orientation="Horizontal">
<TextBlock Margin="0,0,10,0" VerticalAlignment="Center" FontSize="16"
Foreground="White" Text="Port"/>
<TextBox Name="SubmarinePort3" Width="120" VerticalAlignment="Center" FontSize="16"
Foreground="White" Background="Transparent" CaretBrush="White"
BorderThickness="0,0,0,1.2" BorderBrush="#FF424242" HorizontalContentAlignment="Center"
IsEnabled="{Binding serverModel3.IsOpened, Converter={StaticResource NegateConverter}}">
<TextBox.Text>
<Binding NotifyOnValidationError="True" Path="SocketServerInfo3.Port"
UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<Converter:CustomValidationRule ValidateType="Port"/>
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
</StackPanel>
<StackPanel Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center"
Orientation="Horizontal">
<Button Width="100" Height="35" Margin="10,0" HorizontalAlignment="Left"
VerticalAlignment="Center"
Command="{Binding Socket3DoOpenCommand}" BorderBrush="White"
Background="Transparent" Style="{StaticResource ButtonStyle}">
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="8"/>
</Style>
</Button.Resources>
<Button.Content>
<StackPanel Orientation="Horizontal">
<Image Source="/Assets/Images/ConnectState.png" Stretch="Fill" Width="20" Height="20"/>
<TextBlock Text="{Binding serverModel3.IsOpened, Converter={StaticResource ResourceKey=ConnectConvertServer}}"
HorizontalAlignment="Center" VerticalAlignment="Center"
Margin="10,0,0,0" FontSize="16" Foreground="White"/>
</StackPanel>
</Button.Content>
</Button>
</StackPanel>
</Grid>
<!--升压站通信-->
<Grid Grid.Column="3">
<Grid.RowDefinitions>
<RowDefinition Height="0.6*"/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition Height="0.1*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center"
Orientation="Horizontal">
<TextBlock Margin="0,0,0,0" VerticalAlignment="Top" FontSize="18"
Foreground="White" Text="岸基站通信"/>
</StackPanel>
<StackPanel Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center"
Orientation="Horizontal">
<TextBlock Margin="0,0,6,0" VerticalAlignment="Center" FontSize="16"
Foreground="White" Text="IP"/>
<TextBlock Width="16"/>
<TextBox Name="ShoreIP1" Width="120" VerticalAlignment="Center" Background="Transparent"
HorizontalAlignment="Center" FontSize="16" Foreground="White" CaretBrush="White"
BorderThickness="0,0,0,1" BorderBrush="#FF424242" HorizontalContentAlignment="Center"
IsEnabled="{Binding clientModel1.IsConnected, Converter={StaticResource NegateConverter}}">
<TextBox.Text>
<Binding NotifyOnValidationError="True" Path="SocketInfo1.IP"
UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<Converter:CustomValidationRule ValidateType="IP"/>
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
</StackPanel>
<StackPanel Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center"
Orientation="Horizontal">
<TextBlock Margin="0,0,10,0" VerticalAlignment="Center" FontSize="16"
Foreground="White" Text="Port"/>
<TextBox Name="ShorePort1" Width="120" VerticalAlignment="Center" FontSize="16"
Foreground="White" Background="Transparent" CaretBrush="White"
BorderThickness="0,0,0,1" BorderBrush="#FF424242" HorizontalContentAlignment="Center"
IsEnabled="{Binding clientModel1.IsConnected, Converter={StaticResource NegateConverter}}">
<TextBox.Text>
<Binding NotifyOnValidationError="True" Path="SocketInfo1.Port"
UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<Converter:CustomValidationRule ValidateType="Port"/>
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
</StackPanel>
<StackPanel Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center"
Orientation="Horizontal">
<Button Width="100" Height="35" Margin="10,0" HorizontalAlignment="Left"
VerticalAlignment="Center"
Command="{Binding Socket1DoConnectCommand}" BorderBrush="White"
Background="Transparent" Style="{StaticResource ButtonStyle}">
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="8"/>
</Style>
</Button.Resources>
<Button.Content>
<StackPanel Orientation="Horizontal">
<Image Source="/Assets/Images/ConnectState.png" Stretch="Fill" Width="20" Height="20"/>
<TextBlock Text="{Binding clientModel1.IsConnected, Converter={StaticResource ResourceKey=ConnectConvertClient}}"
HorizontalAlignment="Center" VerticalAlignment="Center"
Margin="10,0,0,0" FontSize="16" Foreground="White"/>
</StackPanel>
</Button.Content>
</Button>
</StackPanel>
</Grid>
</Grid>
</GroupBox>
</Grid>
<Grid Grid.Row="1">
<GroupBox Header="继电控制">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid Grid.Column="0">
<Grid.RowDefinitions>
<RowDefinition Height="0.4*"/>
<RowDefinition/>
<RowDefinition/>
<!--<RowDefinition/>-->
</Grid.RowDefinitions>
<!--<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2.2*"/>
--><!--<ColumnDefinition Width="2.5*"/>--><!--
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center"
FontSize="16" Foreground="White" Text="海底基站电源:"/>
<Image Grid.Column="1" Source="{Binding JBSM.JunBox_Power}" Height="40" Width="40"
Stretch="Fill"/>
<Button Grid.Column="2" Name="BaseStationPowerPicker" HorizontalAlignment="Center" VerticalAlignment="Center"
Width="100" Height="35" Background="Transparent" Margin="-20,0,0,0"
BorderThickness="1" BorderBrush="White" Style="{StaticResource ButtonStyle}"
Command="{Binding Switch}" IsEnabled="{Binding BaseStationPowerOpenBtnIsEnabled}">
<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="BaseStationPowerPicker" Path="Name"/>
<Binding Source="{StaticResource BoolTrue}"/>
</MultiBinding.Bindings>
</MultiBinding>
</Button.CommandParameter>
</Button>
<TextBlock Grid.Column="2" Name="BaseStationMsg" Text="{Binding BaseStationMsg}"
FontSize="14" Foreground="{Binding BaseStationMsgForeground}" Margin="0,0,-60,15"
HorizontalAlignment="Right" Visibility="{Binding BaseStationMsgVisibility}"
VerticalAlignment="Bottom"/>
<Button Grid.Column="3" HorizontalAlignment="Left" VerticalAlignment="Center"
Width="100" Height="35" Background="Transparent"
BorderThickness="1" BorderBrush="White" Style="{StaticResource ButtonStyle}"
Command="{Binding Switch}" IsEnabled="{Binding BaseStationPowerCloseBtnIsEnabled}">
<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="BaseStationPowerPicker" Path="Name"/>
<Binding Source="{StaticResource BoolFalse}"/>
</MultiBinding.Bindings>
</MultiBinding>
</Button.CommandParameter>
</Button>
</Grid>-->
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2.2*"/>
<!--<ColumnDefinition Width="2.5*"/>-->
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center"
FontSize="16" Foreground="White" Text="主地震仪电源:"/>
<Image Grid.Column="1" Source="{Binding JBSM.JunBox_Seis1}" Height="40" Width="40"
Stretch="Fill"/>
<Button Grid.Column="2" Name="MainSeisPowerPicker" HorizontalAlignment="Center" VerticalAlignment="Center"
Width="100" Height="35" Background="Transparent" Margin="-20,0,0,0"
BorderThickness="1" BorderBrush="White" Style="{StaticResource ButtonStyle}"
Command="{Binding Switch}" IsEnabled="{Binding MainSeisPowerOpenBtnIsEnabled}">
<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="MainSeisPowerPicker" Path="Name"/>
<Binding Source="{StaticResource BoolTrue}"/>
</MultiBinding.Bindings>
</MultiBinding>
</Button.CommandParameter>
</Button>
<TextBlock Grid.Column="2" Name="MainSeisMsg" Text="{Binding MainSeisMsg}"
FontSize="14" Foreground="{Binding MainSeisMsgForeground}" HorizontalAlignment="Right"
Visibility="{Binding MainSeisMsgVisibility}" Margin="0,0,-60,15"
VerticalAlignment="Bottom"/>
<Button Grid.Column="3" HorizontalAlignment="Left" VerticalAlignment="Center"
Width="100" Height="35" Background="Transparent"
BorderThickness="1" BorderBrush="White" Style="{StaticResource ButtonStyle}"
Command="{Binding Switch}" IsEnabled="{Binding MainSeisPowerCloseBtnIsEnabled}">
<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="MainSeisPowerPicker" Path="Name"/>
<Binding Source="{StaticResource BoolFalse}"/>
</MultiBinding.Bindings>
</MultiBinding>
</Button.CommandParameter>
</Button>
</Grid>
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2.2*"/>
<!--<ColumnDefinition Width="2.5*"/>-->
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center"
FontSize="16" Foreground="White" Text="备地震仪电源:"/>
<Image Grid.Column="1" Source="{Binding JBSM.JunBox_Seis2}" Height="40" Width="40"
Stretch="Fill"/>
<Button Grid.Column="2" Name="BackupSeisPowerPicker" HorizontalAlignment="Center" VerticalAlignment="Center"
Width="100" Height="35" Background="Transparent" Margin="-20,0,0,0"
BorderThickness="1" BorderBrush="White" Style="{StaticResource ButtonStyle}"
Command="{Binding Switch}" IsEnabled="{Binding BackupSeisPowerOpenBtnIsEnabled}">
<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="BackupSeisPowerPicker" Path="Name"/>
<Binding Source="{StaticResource BoolTrue}"/>
</MultiBinding.Bindings>
</MultiBinding>
</Button.CommandParameter>
</Button>
<TextBlock Grid.Column="2" Name="BackupSeisMsg" Text="{Binding BackupSeisMsg}"
FontSize="14" Foreground="{Binding BackupSeisMsgForeground}" HorizontalAlignment="Right"
Visibility="{Binding BackupSeisMsgVisibility}" Margin="0,0,-60,15"
VerticalAlignment="Bottom"/>
<Button Grid.Column="3" HorizontalAlignment="Left" VerticalAlignment="Center"
Width="100" Height="35" Background="Transparent"
BorderThickness="1" BorderBrush="White" Style="{StaticResource ButtonStyle}"
Command="{Binding Switch}" IsEnabled="{Binding BackupSeisPowerCloseBtnIsEnabled}">
<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="BackupSeisPowerPicker" Path="Name"/>
<Binding Source="{StaticResource BoolFalse}"/>
</MultiBinding.Bindings>
</MultiBinding>
</Button.CommandParameter>
</Button>
</Grid>
</Grid>
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="0.4*"/>
<RowDefinition/>
<RowDefinition/>
<!--<RowDefinition/>-->
</Grid.RowDefinitions>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2.2*"/>
<!--<ColumnDefinition Width="2.5*"/>-->
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center"
FontSize="16" Foreground="White" Text="摄像电源:"/>
<Image Grid.Column="1" Source="{Binding JBSM.JunBox_Video}" Height="40" Width="40"
Stretch="Fill"/>
<Button Grid.Column="2" Name="VideoPowerPicker" HorizontalAlignment="Center" VerticalAlignment="Center"
Width="100" Height="35" Background="Transparent" Margin="-20,0,0,0"
BorderThickness="1" BorderBrush="White" Style="{StaticResource ButtonStyle}"
Command="{Binding Switch}" IsEnabled="{Binding VideoPowerOpenBtnIsEnabled}">
<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="VideoPowerPicker" Path="Name"/>
<Binding Source="{StaticResource BoolTrue}"/>
</MultiBinding.Bindings>
</MultiBinding>
</Button.CommandParameter>
</Button>
<TextBlock Grid.Column="2" Name="VideoMsg" Text="{Binding VideoMsg}"
FontSize="14" Foreground="{Binding VideoMsgForeground}" HorizontalAlignment="Right"
Visibility="{Binding VideoMsgVisibility}" Margin="0,0,-60,15"
VerticalAlignment="Bottom"/>
<Button Grid.Column="3" HorizontalAlignment="Left" VerticalAlignment="Center"
Width="100" Height="35" Background="Transparent"
BorderThickness="1" BorderBrush="White" Style="{StaticResource ButtonStyle}"
Command="{Binding Switch}" IsEnabled="{Binding VideoPowerCloseBtnIsEnabled}">
<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="VideoPowerPicker" Path="Name"/>
<Binding Source="{StaticResource BoolFalse}"/>
</MultiBinding.Bindings>
</MultiBinding>
</Button.CommandParameter>
</Button>
</Grid>
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2.2*"/>
<!--<ColumnDefinition Width="2.5*"/>-->
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center"
FontSize="16" Foreground="White" Text="摄像灯电源:"/>
<Image Grid.Column="1" Source="{Binding JBSM.JunBox_Lamp}" Height="40" Width="40"
Stretch="Fill"/>
<Button Grid.Column="2" Name="LampPowerPicker" HorizontalAlignment="Center" VerticalAlignment="Center"
Width="100" Height="35" Background="Transparent" Margin="-20,0,0,0"
BorderThickness="1" BorderBrush="White" Style="{StaticResource ButtonStyle}"
Command="{Binding Switch}" IsEnabled="{Binding LampPowerOpenBtnIsEnabled}">
<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="LampPowerPicker" Path="Name"/>
<Binding Source="{StaticResource BoolTrue}"/>
</MultiBinding.Bindings>
</MultiBinding>
</Button.CommandParameter>
</Button>
<TextBlock Grid.Column="2" Name="LampMsg" Text="{Binding LampMsg}"
FontSize="14" Foreground="{Binding LampMsgForeground}" HorizontalAlignment="Right"
Visibility="{Binding LampMsgVisibility}" Margin="0,0,-60,15"
VerticalAlignment="Bottom"/>
<Button Grid.Column="3" HorizontalAlignment="Left" VerticalAlignment="Center"
Width="100" Height="35" Background="Transparent"
BorderThickness="1" BorderBrush="White" Style="{StaticResource ButtonStyle}"
Command="{Binding Switch}" IsEnabled="{Binding LampPowerCloseBtnIsEnabled}">
<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="LampPowerPicker" Path="Name"/>
<Binding Source="{StaticResource BoolFalse}"/>
</MultiBinding.Bindings>
</MultiBinding>
</Button.CommandParameter>
</Button>
</Grid>
</Grid>
<Grid Grid.Column="2">
<Grid.RowDefinitions>
<RowDefinition Height="0.4*"/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center"
FontSize="16" Foreground="White" Text="主地震仪保护状态:"/>
<Border Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center"
Width="20" Height="20" CornerRadius="10" Margin="10,0,0,0"
Background="{Binding JBSM.JunBox_ProBoard_Seis1_State}"/>
</Grid>
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center"
FontSize="16" Foreground="White" Text="备地震仪保护状态:"/>
<Border Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center"
Width="20" Height="20" CornerRadius="10" Margin="10,0,0,0"
Background="{Binding JBSM.JunBox_ProBoard_Seis2_State}"/>
</Grid>
<Grid Grid.Row="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center"
FontSize="16" Foreground="White" Text="摄像保护状态:"/>
<Border Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center"
Width="20" Height="20" CornerRadius="10" Margin="10,0,0,0"
Background="{Binding JBSM.JunBox_ProBoard_Video_State}"/>
</Grid>
<Grid Grid.Row="4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center"
FontSize="16" Foreground="White" Text="光电转换器电源状态:"/>
<!--<Border Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center"
Width="20" Height="20" CornerRadius="10" Margin="5,0,0,0"
Background="{Binding JBSM.JunBox_PhoConverter_Power}"/>-->
<Image Grid.Column="1" Source="{Binding JBSM.JunBox_PhoConverter_Power}" Height="40" Width="40"
Stretch="Fill" VerticalAlignment="Center" HorizontalAlignment="Left"/>
</Grid>
</Grid>
</Grid>
</GroupBox>
</Grid>
</Grid>
</UserControl>