20230724_MBJC_upperpc/Views/FirstPageView.xaml
2024-01-22 13:36:57 +08:00

367 lines
18 KiB
XML

<UserControl
x:Class="_20230724_MBJC_upperpc.Views.FirstPageView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="clr-namespace:_20230724_MBJC_upperpc.Common"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:local="clr-namespace:_20230724_MBJC_upperpc.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:tool="clr-namespace:_3DTools;assembly=3DTools"
Name="Window"
d:DesignHeight="900"
d:DesignWidth="1600"
mc:Ignorable="d">
<UserControl.Resources>
<ResourceDictionary>
<converters:AspectRatioConverter x:Key="AspectRatioConverter" />
<converters:BottomCenterYConverter x:Key="BottomCenterYConverter" />
<converters:CenterConverterX x:Key="CenterConverterX" />
<converters:CenterConverterX_Half x:Key="CenterConverterX_Half" />
</ResourceDictionary>
</UserControl.Resources>
<Canvas>
<!-- 浮标本体 -->
<local:FirstPageBuoyControl
x:Name="Buoy"
Width="{Binding ElementName=Window, Path=ActualWidth, Converter={StaticResource AspectRatioConverter}, ConverterParameter=3}"
Height="{Binding ElementName=Window, Path=ActualHeight, Converter={StaticResource AspectRatioConverter}, ConverterParameter=2}"
Panel.ZIndex="1"
Beacon="{Binding Beacon1.Beacon}"
ButtonClick="Buoy_ButtonClick"
TBDEnable="False"
Text_Color="#99FFFFFF">
<Canvas.Left>
<MultiBinding Converter="{StaticResource CenterConverterX_Half}">
<Binding ElementName="Window" Path="ActualWidth" />
<Binding ElementName="Buoy" Path="ActualWidth" />
</MultiBinding>
</Canvas.Left>
<Canvas.Top>
<MultiBinding Converter="{StaticResource CenterConverterX_Half}">
<Binding ElementName="Window" Path="ActualHeight" />
<Binding ElementName="Buoy" Path="ActualHeight" />
</MultiBinding>
</Canvas.Top>
</local:FirstPageBuoyControl>
<!-- 锚1 -->
<local:FirstPageAnchorControl
x:Name="Anchor1"
Canvas.Top="0"
Width="{Binding ElementName=Window, Path=ActualWidth, Converter={StaticResource AspectRatioConverter}, ConverterParameter=8}"
Height="{Binding ElementName=Window, Path=ActualHeight, Converter={StaticResource AspectRatioConverter}, ConverterParameter=4.5}"
Panel.ZIndex="1"
AlarmInfo="告警:文件传输失败"
Beacon="{Binding Beacon1.Beacon}"
ButtonClick="Anchor1_ButtonClick"
Model_Visibility="{Binding Beacon1.Model_Visibility}"
TBDEnable="False"
Text_Color="#99FFFFFF">
<Canvas.Left>
<MultiBinding Converter="{StaticResource CenterConverterX}">
<Binding ElementName="Window" Path="ActualWidth" />
<Binding ElementName="Anchor1" Path="ActualWidth" />
</MultiBinding>
</Canvas.Left>
</local:FirstPageAnchorControl>
<!-- 锚2 -->
<local:FirstPageAnchorControl
x:Name="Anchor2"
Canvas.Top="0"
Width="{Binding ElementName=Window, Path=ActualWidth, Converter={StaticResource AspectRatioConverter}, ConverterParameter=8}"
Height="{Binding ElementName=Window, Path=ActualHeight, Converter={StaticResource AspectRatioConverter}, ConverterParameter=4.5}"
Panel.ZIndex="1"
AlarmInfo="告警:文件传输失败"
Beacon="{Binding Beacon2.Beacon}"
ButtonClick="Anchor2_ButtonClick"
Model_Visibility="{Binding Beacon2.Model_Visibility}"
TBDEnable="False"
Text_Color="#99FFFFFF">
<Canvas.Left>
<MultiBinding Converter="{StaticResource CenterConverterX}">
<Binding ElementName="Window" Path="ActualWidth" />
</MultiBinding>
</Canvas.Left>
</local:FirstPageAnchorControl>
<!-- 锚3 -->
<local:FirstPageAnchorControl
x:Name="Anchor3"
Canvas.Left="0"
Width="{Binding ElementName=Window, Path=ActualWidth, Converter={StaticResource AspectRatioConverter}, ConverterParameter=8}"
Height="{Binding ElementName=Window, Path=ActualHeight, Converter={StaticResource AspectRatioConverter}, ConverterParameter=4.5}"
Margin="20,0,0,0"
AlarmInfo="告警:文件传输失败"
Beacon="{Binding Beacon3.Beacon}"
ButtonClick="Anchor3_ButtonClick"
Model_Visibility="{Binding Beacon3.Model_Visibility}"
TBDEnable="False"
Text_Color="#99FFFFFF">
<Canvas.Top>
<MultiBinding Converter="{StaticResource CenterConverterX}">
<Binding ElementName="Window" Path="ActualHeight" />
<Binding ElementName="Anchor3" Path="ActualHeight" />
</MultiBinding>
</Canvas.Top>
</local:FirstPageAnchorControl>
<!-- 锚4 -->
<local:FirstPageAnchorControl
x:Name="Anchor4"
Canvas.Left="0"
Width="{Binding ElementName=Window, Path=ActualWidth, Converter={StaticResource AspectRatioConverter}, ConverterParameter=8}"
Height="{Binding ElementName=Window, Path=ActualHeight, Converter={StaticResource AspectRatioConverter}, ConverterParameter=4.5}"
Margin="20,0,0,0"
AlarmInfo="告警:文件传输失败"
Beacon="{Binding Beacon4.Beacon}"
ButtonClick="Anchor4_ButtonClick"
Model_Visibility="{Binding Beacon4.Model_Visibility}"
TBDEnable="False"
Text_Color="#99FFFFFF">
<Canvas.Top>
<MultiBinding Converter="{StaticResource CenterConverterX}">
<Binding ElementName="Window" Path="ActualHeight" />
</MultiBinding>
</Canvas.Top>
</local:FirstPageAnchorControl>
<!-- 锚5 -->
<local:FirstPageAnchorControl
x:Name="Anchor5"
Width="{Binding ElementName=Window, Path=ActualWidth, Converter={StaticResource AspectRatioConverter}, ConverterParameter=8}"
Height="{Binding ElementName=Window, Path=ActualHeight, Converter={StaticResource AspectRatioConverter}, ConverterParameter=4.5}"
AlarmInfo="告警:文件传输失败"
Beacon="{Binding Beacon5.Beacon}"
ButtonClick="Anchor5_ButtonClick"
Model_Visibility="{Binding Beacon5.Model_Visibility}"
TBDEnable="False"
Text_Color="#99FFFFFF">
<Canvas.Top>
<MultiBinding Converter="{StaticResource CenterConverterX}">
<Binding ElementName="Window" Path="ActualHeight" />
<Binding ElementName="Anchor5" Path="ActualHeight" />
</MultiBinding>
</Canvas.Top>
<Canvas.Left>
<MultiBinding Converter="{StaticResource CenterConverterX}" ConverterParameter="RightBottom">
<Binding ElementName="Window" Path="ActualWidth" />
<Binding ElementName="Anchor5" Path="ActualWidth" />
</MultiBinding>
</Canvas.Left>
</local:FirstPageAnchorControl>
<!-- 锚6 -->
<local:FirstPageAnchorControl
x:Name="Anchor6"
Width="{Binding ElementName=Window, Path=ActualWidth, Converter={StaticResource AspectRatioConverter}, ConverterParameter=8}"
Height="{Binding ElementName=Window, Path=ActualHeight, Converter={StaticResource AspectRatioConverter}, ConverterParameter=4.5}"
AlarmInfo="告警:文件传输失败"
Beacon="{Binding Beacon6.Beacon}"
ButtonClick="Anchor6_ButtonClick"
Model_Visibility="{Binding Beacon6.Model_Visibility}"
TBDEnable="False"
Text_Color="#99FFFFFF">
<Canvas.Top>
<MultiBinding Converter="{StaticResource CenterConverterX}">
<Binding ElementName="Window" Path="ActualHeight" />
</MultiBinding>
</Canvas.Top>
<Canvas.Left>
<MultiBinding Converter="{StaticResource CenterConverterX}" ConverterParameter="RightBottom">
<Binding ElementName="Window" Path="ActualWidth" />
<Binding ElementName="Anchor6" Path="ActualWidth" />
</MultiBinding>
</Canvas.Left>
</local:FirstPageAnchorControl>
<!-- 信标1 -->
<local:FirstPageAnchorControl
x:Name="Support1"
Width="{Binding ElementName=Window, Path=ActualWidth, Converter={StaticResource AspectRatioConverter}, ConverterParameter=8}"
Height="{Binding ElementName=Window, Path=ActualHeight, Converter={StaticResource AspectRatioConverter}, ConverterParameter=4.5}"
AlarmInfo="告警:文件传输失败"
Beacon="{Binding Beacon7.Beacon}"
ButtonClick="Support1_ButtonClick"
Model_Visibility="{Binding Beacon7.Model_Visibility}"
TBDEnable="False"
Text_Color="#99FFFFFF">
<Canvas.Top>
<MultiBinding Converter="{StaticResource CenterConverterX}" ConverterParameter="RightBottom">
<Binding ElementName="Window" Path="ActualHeight" />
<Binding ElementName="Support1" Path="ActualHeight" />
</MultiBinding>
</Canvas.Top>
<Canvas.Left>
<MultiBinding Converter="{StaticResource CenterConverterX}">
<Binding ElementName="Window" Path="ActualWidth" />
<Binding ElementName="Support1" Path="ActualWidth" />
</MultiBinding>
</Canvas.Left>
</local:FirstPageAnchorControl>
<!-- 信标2 -->
<local:FirstPageAnchorControl
x:Name="Support2"
Width="{Binding ElementName=Window, Path=ActualWidth, Converter={StaticResource AspectRatioConverter}, ConverterParameter=8}"
Height="{Binding ElementName=Window, Path=ActualHeight, Converter={StaticResource AspectRatioConverter}, ConverterParameter=4.5}"
AlarmInfo="告警:文件传输失败"
Beacon="{Binding Beacon8.Beacon}"
ButtonClick="Support2_ButtonClick"
Model_Visibility="{Binding Beacon8.Model_Visibility}"
TBDEnable="False"
Text_Color="#99FFFFFF">
<Canvas.Top>
<MultiBinding Converter="{StaticResource CenterConverterX}" ConverterParameter="RightBottom">
<Binding ElementName="Window" Path="ActualHeight" />
<Binding ElementName="Support1" Path="ActualHeight" />
</MultiBinding>
</Canvas.Top>
<Canvas.Left>
<MultiBinding Converter="{StaticResource CenterConverterX}">
<Binding ElementName="Window" Path="ActualWidth" />
</MultiBinding>
</Canvas.Left>
</local:FirstPageAnchorControl>
<Polyline
Panel.ZIndex="0"
Opacity="0.3"
Stroke="SkyBlue"
StrokeThickness="10">
<Polyline.Points>
<MultiBinding Converter="{StaticResource BottomCenterYConverter}" ConverterParameter="1">
<Binding ElementName="Buoy" Path="(Canvas.Left)" />
<Binding ElementName="Buoy" Path="ActualWidth" />
<Binding ElementName="Buoy" Path="ActualHeight" />
<Binding ElementName="Buoy" Path="(Canvas.Top)" />
<Binding ElementName="Anchor1" Path="(Canvas.Left)" />
<Binding ElementName="Anchor1" Path="ActualWidth" />
<Binding ElementName="Anchor1" Path="ActualHeight" />
<Binding ElementName="Anchor1" Path="(Canvas.Top)" />
</MultiBinding>
</Polyline.Points>
</Polyline>
<Polyline
Panel.ZIndex="0"
Opacity="0.3"
Stroke="SkyBlue"
StrokeThickness="10">
<Polyline.Points>
<MultiBinding Converter="{StaticResource BottomCenterYConverter}" ConverterParameter="2">
<Binding ElementName="Buoy" Path="(Canvas.Left)" />
<Binding ElementName="Buoy" Path="ActualWidth" />
<Binding ElementName="Buoy" Path="ActualHeight" />
<Binding ElementName="Buoy" Path="(Canvas.Top)" />
<Binding ElementName="Anchor2" Path="(Canvas.Left)" />
<Binding ElementName="Anchor2" Path="ActualWidth" />
<Binding ElementName="Anchor2" Path="ActualHeight" />
<Binding ElementName="Anchor2" Path="(Canvas.Top)" />
</MultiBinding>
</Polyline.Points>
</Polyline>
<Polyline Stroke="SkyBlue" StrokeThickness="10">
<Polyline.Points>
<MultiBinding Converter="{StaticResource BottomCenterYConverter}" ConverterParameter="3">
<Binding ElementName="Buoy" Path="(Canvas.Left)" />
<Binding ElementName="Buoy" Path="ActualWidth" />
<Binding ElementName="Buoy" Path="ActualHeight" />
<Binding ElementName="Buoy" Path="(Canvas.Top)" />
<Binding ElementName="Anchor3" Path="(Canvas.Left)" />
<Binding ElementName="Anchor3" Path="ActualWidth" />
<Binding ElementName="Anchor3" Path="ActualHeight" />
<Binding ElementName="Anchor3" Path="(Canvas.Top)" />
</MultiBinding>
</Polyline.Points>
</Polyline>
<Polyline Stroke="SkyBlue" StrokeThickness="10">
<Polyline.Points>
<MultiBinding Converter="{StaticResource BottomCenterYConverter}" ConverterParameter="4">
<Binding ElementName="Buoy" Path="(Canvas.Left)" />
<Binding ElementName="Buoy" Path="ActualWidth" />
<Binding ElementName="Buoy" Path="ActualHeight" />
<Binding ElementName="Buoy" Path="(Canvas.Top)" />
<Binding ElementName="Anchor4" Path="(Canvas.Left)" />
<Binding ElementName="Anchor4" Path="ActualWidth" />
<Binding ElementName="Anchor4" Path="ActualHeight" />
<Binding ElementName="Anchor4" Path="(Canvas.Top)" />
</MultiBinding>
</Polyline.Points>
</Polyline>
<Polyline Stroke="SkyBlue" StrokeThickness="10">
<Polyline.Points>
<MultiBinding Converter="{StaticResource BottomCenterYConverter}" ConverterParameter="5">
<Binding ElementName="Buoy" Path="(Canvas.Left)" />
<Binding ElementName="Buoy" Path="ActualWidth" />
<Binding ElementName="Buoy" Path="ActualHeight" />
<Binding ElementName="Buoy" Path="(Canvas.Top)" />
<Binding ElementName="Anchor5" Path="(Canvas.Left)" />
<Binding ElementName="Anchor5" Path="ActualWidth" />
<Binding ElementName="Anchor5" Path="ActualHeight" />
<Binding ElementName="Anchor5" Path="(Canvas.Top)" />
</MultiBinding>
</Polyline.Points>
</Polyline>
<Polyline Stroke="SkyBlue" StrokeThickness="10">
<Polyline.Points>
<MultiBinding Converter="{StaticResource BottomCenterYConverter}" ConverterParameter="6">
<Binding ElementName="Buoy" Path="(Canvas.Left)" />
<Binding ElementName="Buoy" Path="ActualWidth" />
<Binding ElementName="Buoy" Path="ActualHeight" />
<Binding ElementName="Buoy" Path="(Canvas.Top)" />
<Binding ElementName="Anchor6" Path="(Canvas.Left)" />
<Binding ElementName="Anchor6" Path="ActualWidth" />
<Binding ElementName="Anchor6" Path="ActualHeight" />
<Binding ElementName="Anchor6" Path="(Canvas.Top)" />
</MultiBinding>
</Polyline.Points>
</Polyline>
<Polyline
Stroke="SkyBlue"
StrokeDashArray="1,2"
StrokeDashCap="Round"
StrokeThickness="10">
<Polyline.Points>
<MultiBinding Converter="{StaticResource BottomCenterYConverter}" ConverterParameter="7">
<Binding ElementName="Buoy" Path="(Canvas.Left)" />
<Binding ElementName="Buoy" Path="ActualWidth" />
<Binding ElementName="Buoy" Path="ActualHeight" />
<Binding ElementName="Buoy" Path="(Canvas.Top)" />
<Binding ElementName="Support1" Path="(Canvas.Left)" />
<Binding ElementName="Support1" Path="ActualWidth" />
<Binding ElementName="Support1" Path="ActualHeight" />
<Binding ElementName="Support1" Path="(Canvas.Top)" />
</MultiBinding>
</Polyline.Points>
</Polyline>
<Polyline
Stroke="SkyBlue"
StrokeDashArray="1,2"
StrokeDashCap="Round"
StrokeThickness="10">
<Polyline.Points>
<MultiBinding Converter="{StaticResource BottomCenterYConverter}" ConverterParameter="8">
<Binding ElementName="Buoy" Path="(Canvas.Left)" />
<Binding ElementName="Buoy" Path="ActualWidth" />
<Binding ElementName="Buoy" Path="ActualHeight" />
<Binding ElementName="Buoy" Path="(Canvas.Top)" />
<Binding ElementName="Support2" Path="(Canvas.Left)" />
<Binding ElementName="Support2" Path="ActualWidth" />
<Binding ElementName="Support2" Path="ActualHeight" />
<Binding ElementName="Support2" Path="(Canvas.Top)" />
</MultiBinding>
</Polyline.Points>
</Polyline>
</Canvas>
</UserControl>