307 lines
21 KiB
XML
307 lines
21 KiB
XML
<Window x:Class="FujianEarthquake.MainWindow"
|
|
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:local="clr-namespace:FujianEarthquake"
|
|
xmlns:ConnectConvert="clr-namespace:FujianEarthquake.Common.ConnectConvert"
|
|
mc:Ignorable="d"
|
|
Title="海洋地震综合观测系统" Height="900" Width="1600"
|
|
Background="Transparent"
|
|
ResizeMode="CanMinimize"
|
|
WindowStyle="None"
|
|
FontSize="12"
|
|
WindowStartupLocation="CenterScreen">
|
|
<!--<WindowChrome.WindowChrome>
|
|
<WindowChrome GlassFrameThickness="-1" />
|
|
</WindowChrome.WindowChrome>-->
|
|
|
|
<Window.Resources>
|
|
<ResourceDictionary>
|
|
<ImageBrush x:Key="StationChoosedBackground" ImageSource="Assets/Images/Main/StationChoose.png"/>
|
|
<ImageBrush x:Key="NavigateChoosedBackground" ImageSource="Assets/Images/Main/NavigateChoose.png"/>
|
|
<ImageBrush x:Key="NavigateChooseRightBackground" ImageSource="Assets/Images/Main/NavigateChooseRight.png"/>
|
|
<ImageBrush x:Key="NavigateChoosedLeftBackground" ImageSource="Assets/Images/Main/NavigateChooseLeft.png"/>
|
|
|
|
<ConnectConvert:ConnectConvert x:Key="ConnectConvert" />
|
|
<ConnectConvert:ConnectConvertServerState x:Key="ConnectConvertServerState" />
|
|
<ConnectConvert:ConnectConvertClientState x:Key="ConnectConvertClientState" />
|
|
<ConnectConvert:ConnectConvertServerImage x:Key="ConnectConvertServerImage" />
|
|
<ConnectConvert:ConnectConvertClientImage x:Key="ConnectConvertClientImage" />
|
|
|
|
<Style x:Key="StationChangeStyle" TargetType="RadioButton">
|
|
<Setter Property="Width" Value="80"/>
|
|
<Setter Property="Height" Value="30"/>
|
|
<Setter Property="Foreground" Value="#A4DDFF"/>
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="FontSize" Value="16"/>
|
|
<Setter Property="FontFamily" Value="{StaticResource SourceHanSansCNBold}"/>
|
|
<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="{StaticResource StationChoosedBackground}"/>
|
|
<Setter Property="Foreground" Value="#00C6FF"/>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<!--复选框按钮样式-->
|
|
<Style x:Key="NavButtonStyleLeft" TargetType="RadioButton">
|
|
<Setter Property="Foreground" Value="White"/>
|
|
<Setter Property="FontFamily" Value="{StaticResource SourceHanSansCNMedium}"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="RadioButton">
|
|
<Border Name="back" Background="Transparent" Margin="0,2,0,0">
|
|
<ContentControl Margin="21,4" HorizontalAlignment="Center"
|
|
VerticalAlignment="Center" Content="{TemplateBinding Content}"
|
|
FontSize="16"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsChecked" Value="True">
|
|
<Setter TargetName="back" Property="Background" Value="{StaticResource NavigateChoosedLeftBackground}"/>
|
|
<Setter Property="Foreground" Value="#11E0FF"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="NavButtonStyle" TargetType="RadioButton">
|
|
<Setter Property="Foreground" Value="White"/>
|
|
<Setter Property="FontFamily" Value="{StaticResource SourceHanSansCNMedium}"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="RadioButton">
|
|
<Border Name="back" Background="Transparent" Margin="0,2,0,0">
|
|
<ContentControl Margin="21,4" HorizontalAlignment="Center"
|
|
VerticalAlignment="Center" Content="{TemplateBinding Content}"
|
|
FontSize="16"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsChecked" Value="True">
|
|
<Setter TargetName="back" Property="Background" Value="{StaticResource NavigateChoosedBackground}"/>
|
|
<Setter Property="Foreground" Value="#11E0FF"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="NavButtonStyleRight" TargetType="RadioButton">
|
|
<Setter Property="Foreground" Value="White"/>
|
|
<Setter Property="FontFamily" Value="{StaticResource SourceHanSansCNMedium}"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="RadioButton">
|
|
<Border Name="back" Background="Transparent" Margin="0,2,0,0">
|
|
<ContentControl Margin="23,4" HorizontalAlignment="Center"
|
|
VerticalAlignment="Center" Content="{TemplateBinding Content}"
|
|
FontSize="16"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsChecked" Value="True">
|
|
<Setter TargetName="back" Property="Background" Value="{StaticResource NavigateChooseRightBackground}"/>
|
|
<Setter Property="Foreground" Value="#11E0FF"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
</ResourceDictionary>
|
|
</Window.Resources>
|
|
|
|
<Grid>
|
|
<!--背景颜色-->
|
|
<Grid.Background>
|
|
<ImageBrush ImageSource="Assets/Images/Main/Background.png" Stretch="Fill"/>
|
|
</Grid.Background>
|
|
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="50"/>
|
|
<RowDefinition Height="40"/>
|
|
<RowDefinition Height="50"/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!--标题栏部分-->
|
|
<Grid>
|
|
<Grid.Background>
|
|
<ImageBrush ImageSource="Assets/Images/Main/TopBackground.png"/>
|
|
</Grid.Background>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="45"/>
|
|
<ColumnDefinition Width="auto"/>
|
|
<ColumnDefinition/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Image Source="Assets/Images/Trademark.png"/>
|
|
<TextBlock Grid.Column="1" Text="福建海洋地震综合观测系统" FontSize="22" HorizontalAlignment="Center" FontWeight="Bold"
|
|
VerticalAlignment="Center" Foreground="#0093FF" Margin="20,0,0,0" FontFamily="{StaticResource Alimamashuheiti}"
|
|
MouseLeftButtonDown="TextBlock_MouseLeftButtonDown"/>
|
|
|
|
<Grid Grid.Column="2">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="1.3*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Margin="130,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<RadioButton Command="{Binding NavChangedCommand}" CommandParameter="1" Content="海底基站 1#"
|
|
IsChecked="True" Style="{StaticResource StationChangeStyle}" Width="120"/>
|
|
<RadioButton Command="{Binding NavChangedCommand}" CommandParameter="2" Content="海底基站 2#"
|
|
Style="{StaticResource StationChangeStyle}" Width="120"/>
|
|
<RadioButton Command="{Binding NavChangedCommand}" CommandParameter="3" Content="海底基站 3#"
|
|
Style="{StaticResource StationChangeStyle}" Width="120"/>
|
|
<!--<RadioButton Command="{Binding NavChangedCommand}" CommandParameter="4" Content="水池 一体式"
|
|
Style="{StaticResource StationChangeStyle}" Width="120"/>
|
|
<RadioButton Command="{Binding NavChangedCommand}" CommandParameter="5" Content="水池 多接口"
|
|
Style="{StaticResource StationChangeStyle}" Width="120"/>-->
|
|
</StackPanel>
|
|
|
|
<!--控制按钮-->
|
|
<Border Grid.Column="2" Width="100" HorizontalAlignment="Right" Background="Transparent"
|
|
Height="50">
|
|
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
|
|
<Button Click="MinButton_Click" Background="Transparent" Height="40" Width="40" BorderBrush="Transparent">
|
|
<Button.Content>
|
|
<Image Source="Assets/Images/Main/Min.png" Height="20" Width="20" Stretch="UniformToFill"/>
|
|
</Button.Content>
|
|
</Button>
|
|
<Button Click="Button_Click" Height="40" Width="40" BorderBrush="Transparent">
|
|
<Button.Content>
|
|
<Image Source="Assets/Images/Main/Close.png" Height="20" Width="20" Stretch="Uniform"/>
|
|
</Button.Content>
|
|
</Button>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<!--时间日期状态信息-->
|
|
<StackPanel Grid.Column="2" Margin="0,0,110,0" HorizontalAlignment="Right" VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<!--<StackPanel Margin="15,0,0,0" TextBlock.FontSize="15" TextBlock.Foreground="White" Orientation="Horizontal">-->
|
|
<TextBlock x:Name="Date" Margin="0,5,0,0" FontSize="15" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Top" FontFamily="{StaticResource SourceHanSansCNRegular}"/>
|
|
<TextBlock x:Name="Week" FontSize="15" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Bottom" FontFamily="{StaticResource SourceHanSansCNRegular}" Margin="10,0,0,0"/>
|
|
<!--</StackPanel>-->
|
|
<TextBlock x:Name="DataTime" VerticalAlignment="Center" FontFamily="{StaticResource DSDigitalBold}"
|
|
FontSize="20" Foreground="White" Margin="5,7,0,0"/>
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
</Grid>
|
|
|
|
<!--连接状态连接信息-->
|
|
<StackPanel Grid.Row="1" Margin="40,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<Image Source="Assets/Images/Main/LinkState.png" Height="24"/>
|
|
<TextBlock Margin="20,0,0,0" VerticalAlignment="Center" FontSize="15" Text="连接状态信息"
|
|
Foreground="#35A3FF" FontFamily="{StaticResource SourceHanSansCNRegular}"/>
|
|
<TextBlock Margin="40,0,0,0" VerticalAlignment="Center" Foreground="#63829B" Text="海底基站通信①:"
|
|
FontSize="15" FontFamily="{StaticResource SourceHanSansCNRegular}"/>
|
|
<Image Source="{Binding serverModel1.IsOpened, Converter={StaticResource ResourceKey=ConnectConvertServerImage}}" Height="16"/>
|
|
<TextBlock VerticalAlignment="Center" FontSize="15" FontFamily="{StaticResource SourceHanSansCNRegular}" Margin="10,0,15,0"
|
|
Foreground="{Binding serverModel1.IsOpened, Converter={StaticResource ResourceKey=ConnectConvert}}"
|
|
Text="{Binding serverModel1.IsOpened, Converter={StaticResource ResourceKey=ConnectConvertServerState}}"/>
|
|
<Image Source="{Binding serverModel1.server.IsConnected, Converter={StaticResource ResourceKey=ConnectConvertClientImage}}" Height="16"/>
|
|
<TextBlock VerticalAlignment="Center" FontSize="15" FontFamily="{StaticResource SourceHanSansCNRegular}" Margin="10,0,0,0"
|
|
Foreground="{Binding serverModel1.server.IsConnected, Converter={StaticResource ResourceKey=ConnectConvert}}"
|
|
Text="{Binding serverModel1.server.IsConnected, Converter={StaticResource ResourceKey=ConnectConvertClientState}}"/>
|
|
|
|
<TextBlock Margin="80,0,0,0" VerticalAlignment="Center" Foreground="#63829B" Text="海底基站通信②:"
|
|
FontSize="15" FontFamily="{StaticResource SourceHanSansCNRegular}"/>
|
|
<Image Source="{Binding serverModel2.IsOpened, Converter={StaticResource ResourceKey=ConnectConvertServerImage}}" Height="16"/>
|
|
<TextBlock VerticalAlignment="Center" FontSize="15" FontFamily="{StaticResource SourceHanSansCNRegular}" Margin="10,0,15,0"
|
|
Foreground="{Binding serverModel2.IsOpened, Converter={StaticResource ResourceKey=ConnectConvert}}"
|
|
Text="{Binding serverModel2.IsOpened, Converter={StaticResource ResourceKey=ConnectConvertServerState}}"/>
|
|
<Image Source="{Binding serverModel2.server.IsConnected, Converter={StaticResource ResourceKey=ConnectConvertClientImage}}" Height="16"/>
|
|
<TextBlock VerticalAlignment="Center" FontSize="15" FontFamily="{StaticResource SourceHanSansCNRegular}" Margin="10,0,0,0"
|
|
Foreground="{Binding serverModel2.server.IsConnected, Converter={StaticResource ResourceKey=ConnectConvert}}"
|
|
Text="{Binding serverModel2.server.IsConnected, Converter={StaticResource ResourceKey=ConnectConvertClientState}}"/>
|
|
|
|
<TextBlock Margin="80,0,0,0" VerticalAlignment="Center" Foreground="#63829B" Text="海底基站通信③:"
|
|
FontSize="15"/>
|
|
<Image Source="{Binding serverModel3.IsOpened, Converter={StaticResource ResourceKey=ConnectConvertServerImage}}" Height="16"/>
|
|
<TextBlock VerticalAlignment="Center" FontSize="15" FontFamily="{StaticResource SourceHanSansCNRegular}" Margin="10,0,15,0"
|
|
Foreground="{Binding serverModel3.IsOpened, Converter={StaticResource ResourceKey=ConnectConvert}}"
|
|
Text="{Binding serverModel3.IsOpened, Converter={StaticResource ResourceKey=ConnectConvertServerState}}"/>
|
|
<Image Source="{Binding serverModel3.server.IsConnected, Converter={StaticResource ResourceKey=ConnectConvertClientImage}}" Height="16"/>
|
|
<TextBlock VerticalAlignment="Center" FontSize="15" FontFamily="{StaticResource SourceHanSansCNRegular}" Margin="10,0,0,0"
|
|
Foreground="{Binding serverModel3.server.IsConnected, Converter={StaticResource ResourceKey=ConnectConvert}}"
|
|
Text="{Binding serverModel3.server.IsConnected, Converter={StaticResource ResourceKey=ConnectConvertClientState}}"/>
|
|
|
|
<!--<TextBlock Margin="20,0,0,0" VerticalAlignment="Center" Foreground="#99FFFFFF" Text="一体式节点通信:"
|
|
FontSize="14"/>-->
|
|
<!--<TextBlock VerticalAlignment="Center" FontSize="14"
|
|
Foreground="{Binding clientModel2.IsConnected, Converter={StaticResource ResourceKey=ConnectConvert}}"
|
|
Text="{Binding clientModel2.IsConnected, Converter={StaticResource ResourceKey=ConnectConvert4}}"/>-->
|
|
|
|
<!--<TextBlock Margin="20,0,0,0" VerticalAlignment="Center" Foreground="#99FFFFFF" Text="多接口节点通信:"
|
|
FontSize="14"/>-->
|
|
<!--<TextBlock VerticalAlignment="Center" FontSize="14"
|
|
Foreground="{Binding clientModel2.IsConnected, Converter={StaticResource ResourceKey=ConnectConvert}}"
|
|
Text="{Binding clientModel2.IsConnected, Converter={StaticResource ResourceKey=ConnectConvert4}}"/>-->
|
|
|
|
<TextBlock Margin="80,0,0,0" VerticalAlignment="Center" Foreground="#63829B" Text="岸基站通信:"
|
|
FontSize="15"/>
|
|
<Image Source="{Binding clientModel1.IsConnected, Converter={StaticResource ResourceKey=ConnectConvertClientImage}}" Height="16"/>
|
|
<TextBlock VerticalAlignment="Center" FontSize="15" FontFamily="{StaticResource SourceHanSansCNRegular}" Margin="10,0,0,0"
|
|
Foreground="{Binding clientModel1.IsConnected, Converter={StaticResource ResourceKey=ConnectConvert}}"
|
|
Text="{Binding clientModel1.IsConnected, Converter={StaticResource ResourceKey=ConnectConvertClientState}}"/>
|
|
|
|
<!--<TextBlock Margin="20,0,0,0" VerticalAlignment="Center" Foreground="#99FFFFFF" Text="岸基站通信②:"
|
|
FontSize="14"/>-->
|
|
<!--<TextBlock VerticalAlignment="Center" FontSize="14"
|
|
Foreground="{Binding clientModel2.IsConnected, Converter={StaticResource ResourceKey=ConnectConvert}}"
|
|
Text="{Binding clientModel2.IsConnected, Converter={StaticResource ResourceKey=ConnectConvert4}}"/>-->
|
|
</StackPanel>
|
|
|
|
<!--菜单栏部分-->
|
|
<Grid Grid.Row="2" Margin="60,0,60,0">
|
|
<Grid.Background>
|
|
<ImageBrush ImageSource="Assets/Images/Main/NavigateBox.png" Stretch="Fill"/>
|
|
</Grid.Background>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="300"/>
|
|
<ColumnDefinition/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<StackPanel Grid.Column="1" Margin="0,0,0,3" HorizontalAlignment="Left" VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<RadioButton Command="{Binding NavChangedCommand}" CommandParameter="RealTimeDataView" Height="39"
|
|
Content="实时数据" IsChecked="True" Style="{DynamicResource NavButtonStyleLeft}"/>
|
|
<RadioButton Command="{Binding NavChangedCommand}" CommandParameter="JunctionBoxEnvironDataView"
|
|
Content="接驳盒环境" Style="{DynamicResource NavButtonStyle}" Margin="10,0,0,0"/>
|
|
<RadioButton Command="{Binding NavChangedCommand}" CommandParameter="JunctionBoxStatusDataView"
|
|
Content="接驳盒状态" Style="{DynamicResource NavButtonStyle}" Margin="10,0,0,0"/>
|
|
<RadioButton Command="{Binding NavChangedCommand}" CommandParameter="ShoreBaseStationStatusDataView"
|
|
Content="岸基站状态" Style="{DynamicResource NavButtonStyle}" Margin="10,0,0,0"/>
|
|
<!--<RadioButton Command="{Binding NavChangedCommand}" CommandParameter="ShoreBaseStationControlView"
|
|
Content="岸基站控制" Style="{DynamicResource NavButtonStyle}"/>-->
|
|
<RadioButton Command="{Binding NavChangedCommand}" CommandParameter="SystemControlView"
|
|
Content="海底基站控制" Style="{DynamicResource NavButtonStyle}" Margin="10,0,0,0"/>
|
|
<RadioButton Command="{Binding NavChangedCommand}" CommandParameter="LogRecordView"
|
|
Content="日志记录" Style="{DynamicResource NavButtonStyle}" Margin="10,0,0,0"/>
|
|
<RadioButton Command="{Binding NavChangedCommand}" CommandParameter="AlarmRecordView"
|
|
Content="告警记录" Style="{DynamicResource NavButtonStyleRight}" Margin="5,0,0,0"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
<!--内容部分-->
|
|
<ContentControl Grid.Row="3" Content="{Binding PageContent}" Margin="0,5,0,0"/>
|
|
|
|
</Grid>
|
|
</Window>
|