You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

149 lines
7.3 KiB

3 years ago
<Window x:Class="ECMonitor.PlayerDraw.FrmWarningDraw"
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"
mc:Ignorable="d"
Title="视频布防" Height="800" Width="1200" Loaded="Window_Loaded" SizeChanged="Window_SizeChanged" WindowStyle="None" WindowStartupLocation="CenterScreen" >
<!--<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary>
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
</ResourceDictionary>
--><!--<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.TabControl.xaml" />--><!--
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>-->
<Grid Background="{DynamicResource PrimaryBackGroupBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="40" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<DockPanel Grid.Row="0" MouseMove="DockPanel_MouseMove" >
<DockPanel.Background>
<ImageBrush ImageSource="/topbar.png" TileMode="Tile" Stretch="Fill" />
</DockPanel.Background>
<DockPanel DockPanel.Dock="Left" SnapsToDevicePixels="True" Margin="0,0,5,0">
<ListBox Margin="0,0,10,0"
Style="{StaticResource MaterialDesignToolToggleListBox }"
SelectedIndex="{Binding LineColor}"
Padding="0,0,0,0" SelectionChanged="LevelButtons_SelectionChanged"
Name="barLevelButtons">
<ListBoxItem >
<StackPanel Orientation="Horizontal" ToolTip="最高级别预警" >
<Rectangle Width="10" Height="10" Fill="Green" Margin="5,0,5,0"/>
<TextBlock Text="预警" Foreground="Green"/>
</StackPanel>
</ListBoxItem>
<ListBoxItem >
<StackPanel Orientation="Horizontal" ToolTip="中等级别告警" >
<Rectangle Width="10" Height="10" Fill="Yellow" Margin="0,0,5,0"/>
<TextBlock Text="告警" Foreground="Yellow"/>
</StackPanel>
</ListBoxItem>
<ListBoxItem >
<StackPanel Orientation="Horizontal" ToolTip="最高级别报警" >
<Rectangle Width="10" Height="10" Fill="Red" Margin="0,0,5,0"/>
<TextBlock Text="报警" Foreground="Red"/>
</StackPanel>
</ListBoxItem>
</ListBox>
<ListBox Margin="5,0,5,0"
Style="{StaticResource MaterialDesignToolToggleListBox}"
SelectedIndex="{Binding DrawType}"
Padding="0,0,0,0" SelectionChanged="ShareButtons_SelectionChanged"
Name="barShareButtons">
<ListBoxItem Padding="8,0,8,0" ToolTip="线段">
<Line Width="20" Height="1" Stroke="White" X1="0" X2="20" Y1="0" Y2="0" StrokeThickness="1"/>
</ListBoxItem>
<ListBoxItem Padding="8,0,10,0" ToolTip="多边形">
<Polygon Points="0,12 8,0 13,0 22,12 20,15 15,20" StrokeThickness="2" Stroke="White"/>
</ListBoxItem>
<ListBoxItem Padding="8,0,10,0" ToolTip="矩形">
<Rectangle Width="25" Height="18" Stroke="White" StrokeThickness="2" Fill="Transparent"/>
</ListBoxItem>
<ListBoxItem Padding="8,0,0,0" ToolTip="圆形" Visibility="Hidden">
<Ellipse Width="2" Height="2" Stroke="White" StrokeThickness="2" Fill="Transparent"/>
</ListBoxItem>
<ListBoxItem Padding="8,0,10,0" ToolTip="选取">
<Image Source="/PlayerDraw/选取.png" Width="28"></Image>
</ListBoxItem>
</ListBox>
<StackPanel Orientation="Horizontal" Margin="15,0,10,0" >
<Button Name="btnDelete" ToolTip="删除" Style="{DynamicResource TopButtonStyle}" Margin="0,0,10,0" Click="btnDelete_Click" >
<WrapPanel>
<Image Stretch="Uniform" Source="/PlayerDraw/删除 关闭 叉.png" />
</WrapPanel>
</Button>
<Button Name="btnSave" ToolTip="保存" Style="{DynamicResource TopButtonStyle}" Margin="10,0,10,0" Click="btnSave_Click" >
<WrapPanel>
<Image Source="/PlayerDraw/保存.png" />
</WrapPanel>
</Button>
</StackPanel>
</DockPanel>
<DockPanel DockPanel.Dock="Top" Height="18">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<Button Name="btnMin" Style="{DynamicResource TopRightButtonStyle}" Margin="0,0,10,0" Click="btnMin_Click">
<WrapPanel>
<Image Source="/min1.png" />
</WrapPanel>
</Button>
<!--<Button Name="btnMax" Style="{DynamicResource TopRightButtonStyle}" Margin="0,0,10,0" Click="btnMax_Click">
<WrapPanel>
<Image Source="/max2.png" Width="10" />
</WrapPanel>
</Button>-->
<Button Name="btnClose" Style="{DynamicResource TopRightButtonStyle}" Margin="0,0,10,0" Click="btnClose_Click">
<WrapPanel>
<Image Source="/close.png" />
</WrapPanel>
</Button>
</StackPanel>
</DockPanel>
</DockPanel>
<StackPanel x:Name="planMain" HorizontalAlignment="Stretch" Grid.Row="1" VerticalAlignment="Stretch" ></StackPanel>
<Grid x:Name="contenter" Grid.Row="1">
<!--写字板-->
<InkCanvas x:Name="writeBorad" Background="Transparent" PreviewMouseDown="writeBorad_PreviewMouseDown">
<!--<InkCanvas.ContextMenu>
<ContextMenu Opened="MenuOpened">
<MenuItem x:Name="copy" Header="删除" Click="Execute" >
<MenuItem.Icon>
<Image Stretch="Uniform" Source="/PlayerDraw/close.png" Width="20" Height="20"/>
</MenuItem.Icon>
</MenuItem>
</ContextMenu>
</InkCanvas.ContextMenu>-->
</InkCanvas>
</Grid>
</Grid>
</Window>