390 lines
17 KiB
XML
390 lines
17 KiB
XML
<Window x:Class="_20230724_MBJC_upperpc.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:_20230724_MBJC_upperpc"
|
|
xmlns:converters="clr-namespace:_20230724_MBJC_upperpc.Common"
|
|
mc:Ignorable="d"
|
|
Title="锚点监测项目" Height="900" Width="1600" MinHeight="900" MinWidth="1600" Background="Transparent" FontFamily="Microsoft YaHei"
|
|
FontSize="12" FontWeight="ExtraLight" WindowStartupLocation="CenterScreen" Name="Window">
|
|
<WindowChrome.WindowChrome>
|
|
<WindowChrome GlassFrameThickness="-1" />
|
|
</WindowChrome.WindowChrome>
|
|
<!-- 资源 -->
|
|
<Window.Resources>
|
|
<!-- 资源字典 -->
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<!-- 统一的按钮样式 -->
|
|
<!--<ResourceDictionary Source="../Assets/Styles/DefaultStyle.xaml"/>-->
|
|
<ResourceDictionary>
|
|
<!-- 复选框按钮样式 -->
|
|
<Style x:Key="NavButtonStyle" TargetType="RadioButton">
|
|
<Setter Property="Foreground" Value="White" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="RadioButton">
|
|
<Border
|
|
Name="back"
|
|
Background="Transparent"
|
|
CornerRadius="8">
|
|
<ContentControl
|
|
Margin="20,4"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Content="{TemplateBinding Content}"
|
|
FontSize="13" />
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsChecked" Value="True">
|
|
<Setter TargetName="back" Property="Background" Value="#44FFFFFF" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</ResourceDictionary>
|
|
</ResourceDictionary.MergedDictionaries>
|
|
<Style x:Key="StationChangeStyle" TargetType="RadioButton">
|
|
<Setter Property="Width" Value="50" />
|
|
<Setter Property="Height" Value="22" />
|
|
<Setter Property="Foreground" Value="#888" />
|
|
<Setter Property="Background" Value="#DDD" />
|
|
<Setter Property="FontSize" Value="11" />
|
|
<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 x:Key="DataGridStyle" TargetType="{x:Type DataGrid}">
|
|
<Setter Property="AutoGenerateColumns" Value="False" />
|
|
<Setter Property="CanUserAddRows" Value="False" />
|
|
<Setter Property="CanUserDeleteRows" Value="False" />
|
|
<Setter Property="CanUserReorderColumns" Value="False" />
|
|
<Setter Property="CanUserResizeColumns" Value="True" />
|
|
<Setter Property="CanUserResizeRows" Value="False" />
|
|
<Setter Property="CanUserSortColumns" Value="True" />
|
|
<Setter Property="GridLinesVisibility" Value="All" />
|
|
<Setter Property="HeadersVisibility" Value="All" />
|
|
<Setter Property="IsReadOnly" Value="True" />
|
|
<Setter Property="MinRowHeight" Value="40" />
|
|
<Setter Property="Background" Value="#FF285173" />
|
|
<Setter Property="Foreground" Value="White" />
|
|
</Style>
|
|
<Style x:Key="ColumnHeaderStyle" TargetType="DataGridColumnHeader">
|
|
<Setter Property="Height" Value="30" />
|
|
<Setter Property="Foreground" Value="White" />
|
|
<Setter Property="FontSize" Value="12" />
|
|
<Setter Property="Background" Value="#FF285173" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
</Style>
|
|
<converters:ConnectConvert x:Key="ConnectConvert" />
|
|
<converters:ConnectConvert1 x:Key="ConnectConvert1" />
|
|
</ResourceDictionary>
|
|
|
|
</Window.Resources>
|
|
<Grid>
|
|
<!-- 背景颜色 -->
|
|
<Grid.Background>
|
|
<RadialGradientBrush>
|
|
<GradientStop Offset="0" Color="#FF285173" />
|
|
<GradientStop Offset="0.3" Color="#FF244967" />
|
|
<GradientStop Offset="1" Color="#FF14273A" />
|
|
</RadialGradientBrush>
|
|
</Grid.Background>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="45" />
|
|
<RowDefinition Height="38" />
|
|
<RowDefinition Height="30" />
|
|
<RowDefinition />
|
|
<RowDefinition Height="20" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- 标题栏部分 -->
|
|
<Border BorderBrush="#5518AABD" BorderThickness="0,0,0,1">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="45" />
|
|
<ColumnDefinition Width="auto" />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
<Image Source="Assets/Images/logo.png" />
|
|
<StackPanel
|
|
Grid.Column="1"
|
|
Margin="10,0,0,0"
|
|
VerticalAlignment="Center">
|
|
<TextBlock
|
|
Margin="0,-2"
|
|
FontSize="17"
|
|
Foreground="White"
|
|
Text="锚点监测项目" />
|
|
<TextBlock
|
|
Margin="0,2,0,0"
|
|
FontSize="12"
|
|
Foreground="LightGray"
|
|
Text="不忘初心 方得始终" />
|
|
</StackPanel>
|
|
<Grid Grid.Column="2">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition Height="13" />
|
|
</Grid.RowDefinitions>
|
|
<!-- 顶栏 设置鼠标左键按下事件(可以拖动窗口) -->
|
|
<Border
|
|
Height="132"
|
|
VerticalAlignment="Top"
|
|
CornerRadius="10,10,0,0"
|
|
MouseLeftButtonDown="Border_MouseLeftButtonDown" />
|
|
|
|
<Border
|
|
Width="200"
|
|
HorizontalAlignment="Right"
|
|
Background="Transparent"
|
|
WindowChrome.IsHitTestVisibleInChrome="True">
|
|
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
|
|
<Button
|
|
Click="MinButton_Click"
|
|
Content=""
|
|
Style="{StaticResource ControlButtonStyle}" />
|
|
<Button
|
|
Click="MaxButton_Click"
|
|
Content=""
|
|
Style="{StaticResource ControlButtonStyle}" />
|
|
<Button
|
|
Background="DarkRed"
|
|
Click="Button_Click"
|
|
Content=""
|
|
Style="{StaticResource ControlButtonStyle}" />
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<Border
|
|
Grid.Row="1"
|
|
BorderBrush="#5518AABD"
|
|
BorderThickness="0,1,0,0" />
|
|
<Border Grid.Row="1" Margin="0,3,0,2">
|
|
<Border.Background>
|
|
<VisualBrush
|
|
TileMode="Tile"
|
|
Viewport="0,0,7,7"
|
|
ViewportUnits="Absolute">
|
|
<VisualBrush.Visual>
|
|
<Grid Width="20" Height="20">
|
|
<Line
|
|
Stroke="Gray"
|
|
StrokeThickness="1"
|
|
X1="0"
|
|
X2="10"
|
|
Y1="10"
|
|
Y2="0" />
|
|
</Grid>
|
|
</VisualBrush.Visual>
|
|
</VisualBrush>
|
|
</Border.Background>
|
|
</Border>
|
|
</Grid>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- 系统状态连接信息 -->
|
|
<StackPanel
|
|
Grid.Row="1"
|
|
Margin="40,0,0,0"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
FontFamily="../Assets/Fonts/#iconfont"
|
|
FontSize="20"
|
|
Foreground="#55FFFFFF"
|
|
Text="" />
|
|
<TextBlock
|
|
Margin="10,0"
|
|
VerticalAlignment="Center"
|
|
FontSize="13"
|
|
Foreground="#99FFFFFF"
|
|
Text="系统状态信息" />
|
|
|
|
<!-- 北斗通信 -->
|
|
<TextBlock
|
|
Margin="20,0,0,0"
|
|
VerticalAlignment="Center"
|
|
Foreground="#99FFFFFF"
|
|
Text="基站上位机软件通信状态:" />
|
|
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
Foreground="{Binding comModel.IsConnected, Converter={StaticResource ResourceKey=ConnectConvert}}"
|
|
Text="{Binding comModel.IsConnected, Converter={StaticResource ResourceKey=ConnectConvert1}}">
|
|
<TextBlock.ToolTip>
|
|
<ToolTip
|
|
Name="BeidouCommunication"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Content="{Binding EM.ComConMessage}"
|
|
Style="{DynamicResource MyToolTipStyle}" />
|
|
</TextBlock.ToolTip>
|
|
</TextBlock>
|
|
|
|
<TextBlock
|
|
Margin="20,0,20,0"
|
|
VerticalAlignment="Center"
|
|
Foreground="Green"
|
|
Text="{Binding BDCountDown}" />
|
|
</StackPanel>
|
|
|
|
<!-- 时间日期状态信息 -->
|
|
<StackPanel
|
|
Grid.Row="1"
|
|
Margin="30,0"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock
|
|
x:Name="Datatime"
|
|
VerticalAlignment="Center"
|
|
FontFamily="../Assets/Fonts/#Digital Display"
|
|
FontSize="25"
|
|
Foreground="White" />
|
|
<StackPanel
|
|
Margin="15,0,0,0"
|
|
TextBlock.FontSize="10"
|
|
TextBlock.Foreground="White">
|
|
<TextBlock x:Name="Date" />
|
|
<TextBlock x:Name="week" HorizontalAlignment="Right" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
|
<!-- 菜单栏部分 -->
|
|
<Grid Grid.Row="2">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<StackPanel
|
|
Grid.Column="1"
|
|
Margin="20,0,0,0"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<!-- 浮标传感器数据 -->
|
|
<RadioButton
|
|
Command="{Binding NavChangedCommand}"
|
|
CommandParameter="FirstPageView"
|
|
Content="主界面"
|
|
IsChecked="True"
|
|
Style="{DynamicResource NavButtonStyle}" />
|
|
<!-- 平台信息 -->
|
|
<RadioButton
|
|
Command="{Binding NavChangedCommand}"
|
|
CommandParameter="Point1"
|
|
Content="平台信息"
|
|
Style="{DynamicResource NavButtonStyle}" />
|
|
<!-- 锚点信息 -->
|
|
<RadioButton
|
|
Command="{Binding NavChangedCommand}"
|
|
CommandParameter="Point1"
|
|
Content="锚点1"
|
|
Style="{DynamicResource NavButtonStyle}" />
|
|
<!-- 锚点2 -->
|
|
<RadioButton
|
|
Command="{Binding NavChangedCommand}"
|
|
CommandParameter="Point2"
|
|
Content="锚点2"
|
|
Style="{DynamicResource NavButtonStyle}" />
|
|
<!-- 锚点3 -->
|
|
<RadioButton
|
|
Command="{Binding NavChangedCommand}"
|
|
CommandParameter="Point3"
|
|
Content="锚点3"
|
|
Style="{DynamicResource NavButtonStyle}" />
|
|
<!-- 锚点4 -->
|
|
<RadioButton
|
|
Command="{Binding NavChangedCommand}"
|
|
CommandParameter="Point4"
|
|
Content="锚点4"
|
|
Style="{DynamicResource NavButtonStyle}" />
|
|
<!-- 锚点5 -->
|
|
<RadioButton
|
|
Command="{Binding NavChangedCommand}"
|
|
CommandParameter="Point5"
|
|
Content="锚点5"
|
|
Style="{DynamicResource NavButtonStyle}" />
|
|
<!-- 锚点6 -->
|
|
<RadioButton
|
|
Command="{Binding NavChangedCommand}"
|
|
CommandParameter="Point6"
|
|
Content="锚点6"
|
|
Style="{DynamicResource NavButtonStyle}" />
|
|
<!-- 基准点1 -->
|
|
<RadioButton
|
|
Command="{Binding NavChangedCommand}"
|
|
CommandParameter="Benchmark1"
|
|
Content="基准点1"
|
|
Style="{DynamicResource NavButtonStyle}" />
|
|
<!-- 基准点2 -->
|
|
<RadioButton
|
|
Command="{Binding NavChangedCommand}"
|
|
CommandParameter="Benchmark2"
|
|
Content="基准点2"
|
|
Style="{DynamicResource NavButtonStyle}" />
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
<!-- 内容部分 -->
|
|
<ContentControl Grid.Row="3" Content="{Binding PageContent}" />
|
|
|
|
<!-- 底部状态栏部分 -->
|
|
<Border
|
|
Grid.Row="4"
|
|
BorderBrush="#5518AABD"
|
|
BorderThickness="0,1,0,0">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition />
|
|
<ColumnDefinition Width="auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Border Margin="0,5">
|
|
<Border.Background>
|
|
<VisualBrush
|
|
TileMode="Tile"
|
|
Viewport="0,0,7,7"
|
|
ViewportUnits="Absolute">
|
|
<VisualBrush.Visual>
|
|
<Grid Width="20" Height="20">
|
|
<Line
|
|
Stroke="Gray"
|
|
StrokeThickness="1"
|
|
X1="0"
|
|
X2="10"
|
|
Y1="10"
|
|
Y2="0" />
|
|
</Grid>
|
|
</VisualBrush.Visual>
|
|
</VisualBrush>
|
|
</Border.Background>
|
|
</Border>
|
|
|
|
<!--<TextBlock Grid.Column="1" Text="2022-07-30" Foreground="DarkRed" VerticalAlignment="Center" FontSize="11" Margin="10,1" FontWeight="Bold"/>-->
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
</Window>
|