<Window x:Class="SmartScanner.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:SmartScanner"
|
xmlns:Properties="clr-namespace:SmartScanner.Properties"
|
mc:Ignorable="d"
|
Title="SmartScanner" Height="768" Width="1240">
|
<Grid Background="#3C3C3C">
|
<Grid.Resources>
|
<Style x:Key="SimpleLabeledToggleSwitchStyle" TargetType="{x:Type ToggleButton}">
|
<Setter Property="Background" Value="#E0E0E0"/>
|
<Setter Property="Foreground" Value="White"/>
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
<Setter Property="BorderThickness" Value="0"/>
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
<Grid>
|
<VisualStateManager.VisualStateGroups>
|
<!-- 仅保留Pressed和Disabled状态 -->
|
<VisualStateGroup x:Name="CommonStates">
|
<VisualState x:Name="Normal"/>
|
<VisualState x:Name="MouseOver">
|
<Storyboard>
|
<DoubleAnimation Storyboard.TargetName="SwitchThumb"
|
Storyboard.TargetProperty="Opacity"
|
To="0.8" Duration="0:0:0.1"/>
|
</Storyboard>
|
</VisualState>
|
<VisualState x:Name="Pressed">
|
<Storyboard>
|
<!-- 按下时的滑块放大效果 -->
|
<DoubleAnimation Storyboard.TargetName="SwitchThumb"
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
|
To="1.2" Duration="0:0:0.1"/>
|
<DoubleAnimation Storyboard.TargetName="SwitchThumb"
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"
|
To="1.2" Duration="0:0:0.1"/>
|
</Storyboard>
|
</VisualState>
|
<VisualState x:Name="Disabled">
|
<Storyboard>
|
<ColorAnimation Storyboard.TargetName="SwitchTrack"
|
Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
|
To="#EEEEEE" Duration="0"/>
|
<ColorAnimation Storyboard.TargetName="SwitchThumb"
|
Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
|
To="#BDBDBD" Duration="0"/>
|
<ColorAnimation Storyboard.TargetName="TextLabel"
|
Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)"
|
To="#BDBDBD" Duration="0"/>
|
</Storyboard>
|
</VisualState>
|
</VisualStateGroup>
|
|
<!-- 开关状态(保持不变) -->
|
<VisualStateGroup x:Name="CheckStates">
|
<VisualState x:Name="Checked">
|
<Storyboard>
|
<ThicknessAnimation Storyboard.TargetName="SwitchThumb"
|
Storyboard.TargetProperty="Margin"
|
To="26,0,0,0" Duration="0:0:0.2"/>
|
<ColorAnimation Storyboard.TargetName="SwitchTrack"
|
Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
|
To="#4CAF50" Duration="0:0:0.2"/>
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="TextLabel"
|
Storyboard.TargetProperty="Text">
|
<DiscreteObjectKeyFrame KeyTime="0" Value="单点ON"/>
|
</ObjectAnimationUsingKeyFrames>
|
<ColorAnimation Storyboard.TargetName="TextLabel"
|
Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)"
|
To="#4CAF50" Duration="0:0:0.2"/>
|
</Storyboard>
|
</VisualState>
|
<VisualState x:Name="Unchecked">
|
<Storyboard>
|
<ThicknessAnimation Storyboard.TargetName="SwitchThumb"
|
Storyboard.TargetProperty="Margin"
|
To="0,0,0,0" Duration="0:0:0.2"/>
|
<ColorAnimation Storyboard.TargetName="SwitchTrack"
|
Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
|
To="#E0E0E0" Duration="0:0:0.2"/>
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="TextLabel"
|
Storyboard.TargetProperty="Text">
|
<DiscreteObjectKeyFrame KeyTime="0" Value="单点OFF"/>
|
</ObjectAnimationUsingKeyFrames>
|
<ColorAnimation Storyboard.TargetName="TextLabel"
|
Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)"
|
To="#757575" Duration="0:0:0.2"/>
|
</Storyboard>
|
</VisualState>
|
</VisualStateGroup>
|
</VisualStateManager.VisualStateGroups>
|
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="*"/>
|
</Grid.ColumnDefinitions>
|
|
<!-- 开关轨道 -->
|
<Border x:Name="SwitchTrack"
|
Grid.Column="0"
|
Background="{TemplateBinding Background}"
|
CornerRadius="10"
|
Width="50"
|
Height="24"
|
Margin="0,0,10,0">
|
<Border x:Name="SwitchThumb"
|
Background="{TemplateBinding Foreground}"
|
CornerRadius="10"
|
Width="24"
|
Height="24"
|
HorizontalAlignment="Left"
|
Margin="0,0,0,0">
|
<Border.RenderTransform>
|
<TransformGroup>
|
<ScaleTransform/>
|
</TransformGroup>
|
</Border.RenderTransform>
|
</Border>
|
</Border>
|
|
<!-- 文字标签 -->
|
<TextBlock x:Name="TextLabel"
|
Grid.Column="1"
|
Text="OFF"
|
VerticalAlignment="Center"
|
Foreground="#757575"
|
FontWeight="SemiBold"/>
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
<Trigger Property="IsEnabled" Value="False">
|
<Setter TargetName="SwitchTrack" Property="Opacity" Value="0.6"/>
|
<Setter TargetName="TextLabel" Property="Opacity" Value="0.6"/>
|
</Trigger>
|
</ControlTemplate.Triggers>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
<Style x:Key="TabItemStyle">
|
<Style.Triggers>
|
<Trigger Property="TabItem.IsSelected" Value="True">
|
<Setter Property="TabItem.Background" Value="#6C6C6C"/>
|
<Setter Property="TabItem.Foreground" Value="Black"/>
|
</Trigger>
|
<Trigger Property="TabItem.IsSelected" Value="False">
|
<Setter Property="TabItem.Background" Value="#6C6C6C"/>
|
<Setter Property="TabItem.Foreground" Value="White"/>
|
</Trigger>
|
<Trigger Property="TabItem.IsMouseOver" Value="True">
|
<Setter Property="TabItem.Background" Value="#6C6C6C"/>
|
<Setter Property="TabItem.Foreground" Value="Black"/>
|
</Trigger>
|
<!--<Trigger Property="TabItem.IsMouseOver" Value="False">
|
<Setter Property="TabItem.Background" Value="#6C6C6C"/>
|
<Setter Property="TabItem.Foreground" Value="White"/>
|
</Trigger>-->
|
<!--<Trigger Property="TabItem.IsFocused" Value="True">
|
<Setter Property="TabItem.Background" Value="#4D0000"/>
|
<Setter Property="TabItem.Foreground" Value="#930000"/>
|
</Trigger>-->
|
<!--<Trigger Property="TabItem.IsFocused" Value="False">
|
<Setter Property="TabItem.Background" Value="#6C6C6C"/>
|
<Setter Property="TabItem.Foreground" Value="White"/>
|
</Trigger>-->
|
</Style.Triggers>
|
</Style>
|
<Style x:Key="FocusVisual">
|
<Setter Property="Control.Template">
|
<Setter.Value>
|
<ControlTemplate>
|
<Rectangle Margin="2" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
<!--按钮静态时背景颜色-->
|
<SolidColorBrush x:Key="Button.Static.Background" Color="#4F4F4F"/>
|
<!--按钮静态时边框颜色-->
|
<SolidColorBrush x:Key="Button.Static.Border" Color="#2F0000"/>
|
<!--按钮静态时文字颜色-->
|
<SolidColorBrush x:Key="Button.Static.Foreground" Color="White"/>
|
<!--鼠标移入时背景颜色-->
|
<SolidColorBrush x:Key="Button.MouseOver.Background" Color="#4D0000"/>
|
<!--鼠标移入时边框颜色-->
|
<SolidColorBrush x:Key="Button.MouseOver.Border" Color="#2F0000"/>
|
<!--鼠标按下时背景颜色-->
|
<SolidColorBrush x:Key="Button.Pressed.Background" Color="#4D0000"/>
|
<!--鼠标按下时边框颜色-->
|
<SolidColorBrush x:Key="Button.Pressed.Border" Color="#2F0000"/>
|
<!--按钮不使用时背景颜色-->
|
<SolidColorBrush x:Key="Button.Disabled.Background" Color="Gray"/>
|
<!--按钮不使用时边框颜色-->
|
<SolidColorBrush x:Key="Button.Disabled.Border" Color="#FFADB2B5"/>
|
<!--按钮不使用时文字颜色-->
|
<SolidColorBrush x:Key="Button.Disabled.Foreground" Color="White"/>
|
<Style x:Key="ButtonStyle" TargetType="{x:Type Button}">
|
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
|
<Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
|
<Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
|
<Setter Property="Foreground" Value="White"/>
|
<Setter Property="BorderThickness" Value="1"/>
|
<!--边框宽度,设置为0 即:无边框-->
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
<Setter Property="Padding" Value="1"/>
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="{x:Type Button}">
|
<Border x:Name="border" CornerRadius="5" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
|
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
</Border>
|
<!--触发器:根据依赖属性的值去控制控件的状态-->
|
<ControlTemplate.Triggers>
|
<!--默认属性-->
|
<Trigger Property="IsDefaulted" Value="true">
|
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
|
</Trigger>
|
<!--鼠标移入属性-->
|
<Trigger Property="IsMouseOver" Value="true">
|
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background}"/>
|
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
|
</Trigger>
|
<!--鼠标按下属性-->
|
<Trigger Property="IsPressed" Value="true">
|
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
|
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
|
</Trigger>
|
<!--按钮可用状态属性-->
|
<Trigger Property="IsEnabled" Value="false">
|
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
|
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
|
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
|
</Trigger>
|
</ControlTemplate.Triggers>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
|
<!--文本框样式-->
|
<SolidColorBrush x:Key="TextBox.Background" Color="#6C6C6C"/>
|
<SolidColorBrush x:Key="TextBox.BorderBrush" Color="#1F0000"/>
|
<SolidColorBrush x:Key="TextBox.Foreground" Color="White"/>
|
<Style x:Key="TextStyle" TargetType="{x:Type TextBox}">
|
<Setter Property="Background" Value="{StaticResource TextBox.Background}"/>
|
<Setter Property="BorderBrush" Value="{StaticResource TextBox.BorderBrush}"/>
|
<Setter Property="Foreground" Value="{StaticResource TextBox.Foreground}"/>
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
<Setter Property="BorderThickness" Value="1"/>
|
<Setter Property="HorizontalContentAlignment" Value="Right"/>
|
</Style>
|
<!-- 这会影响所有工具栏的溢出菜单 -->
|
<SolidColorBrush x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type ToolBar}, ResourceId=ToolBarMenuBackground}"
|
Color="#3C3C3C"/>
|
</Grid.Resources>
|
|
<!--<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="231*"/>
|
<ColumnDefinition Width="169*"/>
|
</Grid.ColumnDefinitions>-->
|
<Grid.RowDefinitions>
|
<RowDefinition Height="50"/>
|
<RowDefinition Height="15*"/>
|
</Grid.RowDefinitions>
|
<Grid Grid.Row="0" Grid.ColumnSpan="2">
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="160"/>
|
<ColumnDefinition Width="*"/>
|
</Grid.ColumnDefinitions>
|
<StackPanel Grid.Column="0" Height="50" Width="150" Margin="5,0,5,0.4" Grid.RowSpan="2">
|
<Image Stretch="Fill" Source="/Image/Currency/logo_01.png"/>
|
</StackPanel>
|
<ToolBarTray Grid.Column="1" Orientation="Horizontal" Background="#3C3C3C" Margin="0,0,-0.4,0.4" Grid.RowSpan="2">
|
<ToolBar Grid.Column="1" Margin="0,0,-0.4,0.4" Grid.RowSpan="2" Background="#3C3C3C" Height="50">
|
<Button x:Name="Refresh_Btn" Background="#7B7B7B" BorderThickness="0" ToolTip="刷新设备列表并连接设备" Height="30" Width="100" Style="{DynamicResource ButtonStyle}" Click="Refresh_Btn_Click" Margin="5,0,5,0">
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
<Image x:Name="Refresh_BtnImage" Stretch="Fill" RenderOptions.BitmapScalingMode="HighQuality" Source="\Image\ICON\link-m.png"/>
|
<TextBlock Text="刷新连接" VerticalAlignment="Center" Foreground="white"/>
|
</StackPanel>
|
</Button>
|
<!--<Button x:Name="IsConnect_Btn" Click="IsConnect_Btn_Click" Background="#7B7B7B" BorderThickness="0" Height="30" Width="100" Style="{DynamicResource ButtonStyle}" Margin="5,0,5,0">
|
<Label Content="连接" Foreground="White" />
|
</Button>-->
|
<Button x:Name="ProductMaanager_Btn" Click="ProductMaanager_Btn_Click" ToolTip="打开设备管理列表" Background="#7B7B7B" BorderThickness="0" Height="30" Width="100" Style="{DynamicResource ButtonStyle}" Margin="5,0,5,0">
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
<Image x:Name="ProductMaanager_BtnImage" Source="\Image\ICON\camera-switch-fill.png" RenderOptions.BitmapScalingMode="HighQuality" Stretch="Fill"/>
|
<TextBlock Text="设备管理" VerticalAlignment="Center" Foreground="White" />
|
</StackPanel>
|
</Button>
|
<!--<Button x:Name="Disconnect_Btn" Click="Disconnect_Btn_Click" Background="#7B7B7B" BorderThickness="0" Height="30" Width="100" IsEnabled="False" Style="{DynamicResource ButtonStyle}" Margin="5,0,5,0" Visibility="Collapsed">
|
<Label Content="断开连接" Foreground="White" />
|
</Button>-->
|
<Button x:Name="ResultJudge_Btn" Click="ResultJudge_Btn_Click" ToolTip="打开检测方案配置器" Background="#7B7B7B" BorderThickness="0" Height="30" Width="100" Style="{DynamicResource ButtonStyle}" Margin="5,0,5,0">
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
<Image x:Name="ResultJudge_BtnImage" Source="\Image\ICON\folder-2-fill.png" RenderOptions.BitmapScalingMode="HighQuality" Stretch="Fill"/>
|
<TextBlock Text="检测方案" VerticalAlignment="Center" Foreground="White" />
|
</StackPanel>
|
</Button>
|
<Button x:Name="ImageSetup_Btn" Click="ImageSetup_Btn_Click" ToolTip="打开图像存储设置" Background="#7B7B7B" BorderThickness="0" Height="30" Width="100" Style="{DynamicResource ButtonStyle}" Margin="5,0,5,0">
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
<Image x:Name="ImageSetup_BtnImage" Source="\Image\ICON\import-fill.png" RenderOptions.BitmapScalingMode="HighQuality" Stretch="Fill"/>
|
<TextBlock Text="存图设置" VerticalAlignment="Center" Foreground="White"/>
|
</StackPanel>
|
</Button>
|
<CheckBox Name="OutputCheckBox" Content="单点输出" VerticalAlignment="Center" Foreground="White" HorizontalAlignment="Center" IsChecked="{Binding Source={x:Static Properties:Settings.Default}, Path=OutputCheckBoxEnable, Mode=TwoWay}"
|
Checked="OutputCheckBox_Checked" Unchecked="OutputCheckBox_Unchecked" Style="{DynamicResource SimpleLabeledToggleSwitchStyle}"/>
|
<!--<Button x:Name="Start_Detector_Btn" Visibility="Hidden" Click="Start_Detector_Btn_Click" Background="#7B7B7B" BorderThickness="0" Height="30" Width="100" Style="{DynamicResource ButtonStyle}" Margin="5,0,5,0">
|
<Label Content="开始检测" Foreground="White" />
|
</Button>-->
|
|
<Button x:Name="Write" Background="#7B7B7B" BorderThickness="0" Height="30" Width="100" Style="{DynamicResource ButtonStyle}" Click="Write_Click" Margin="5,0,5,0">
|
<Label Content="通讯测试" Foreground="White" />
|
</Button>
|
<Button x:Name="Read" Background="#7B7B7B" BorderThickness="0" Height="30" Width="100" Style="{DynamicResource ButtonStyle}" Click="Read_Click" Margin="5,0,5,0">
|
<Label Content="手动采集" Foreground="White" />
|
</Button>
|
<Button x:Name="Reset" Background="#7B7B7B" BorderThickness="0" Height="30" Width="100" Style="{DynamicResource ButtonStyle}" Click="ReSet_Click" Margin="5,0,5,0">
|
<Label Content="界面重置" Foreground="White" />
|
</Button>
|
<Button x:Name="btnViewReports" Background="#7B7B7B" BorderThickness="0" Height="30" Width="100" Style="{DynamicResource ButtonStyle}" Click="btnViewReports_Click" Margin="5,0,5,0">
|
<Label Content="查看检测报告" Foreground="White" />
|
</Button>
|
<Button x:Name="btnViewLogs" Background="#7B7B7B" BorderThickness="0" Height="30" Width="100" Style="{DynamicResource ButtonStyle}" Click="btnViewLogs_Click" Margin="5,0,5,0">
|
<Label Content="查看日志" Foreground="White" />
|
</Button>
|
<Button x:Name="RestartButton" Background="#7B7B7B" BorderThickness="0" Height="30" Width="100" Style="{DynamicResource ButtonStyle}" Click="RestartButton_Click" Margin="5,0,5,0">
|
<Label Content="一键重启" Foreground="White" />
|
</Button>
|
<Button x:Name="VersionButton" Background="#7B7B7B" BorderThickness="0" Height="30" Width="100" Style="{DynamicResource ButtonStyle}" Click="VersionButton_Click" Margin="5,0,5,0">
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
<Label Content="版本说明" VerticalAlignment="Center" Foreground="White" Margin="5,0,0,0"/>
|
</StackPanel>
|
</Button>
|
<!--<Button x:Name="LogTest" Background="#7B7B7B" BorderThickness="0" Height="30" Width="100" Style="{DynamicResource ButtonStyle}" Click="AddTestLog_Click" Margin="5,0,5,0">
|
<Label Content="日志测试" Foreground="White" />
|
</Button>-->
|
</ToolBar>
|
</ToolBarTray>
|
</Grid>
|
<Grid Grid.Row="1">
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="1*"></ColumnDefinition>
|
<ColumnDefinition Width="0.05*"></ColumnDefinition>
|
<ColumnDefinition Width="5*"></ColumnDefinition>
|
<ColumnDefinition Width="0.05*"></ColumnDefinition>
|
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
</Grid.ColumnDefinitions>
|
<Grid Grid.Column="0">
|
<Grid.RowDefinitions>
|
<RowDefinition Height="0.11*"/>
|
<RowDefinition Height="1*"/>
|
<RowDefinition Height="0.11*"/>
|
<RowDefinition Height="1*"/>
|
</Grid.RowDefinitions>
|
<StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Center">
|
<!--<Button x:Name="IPSet" Content="IP设置" Foreground="White" Background="#7B7B7B" BorderThickness="0" Height="30" Width="100" Style="{DynamicResource ButtonStyle}" Click="IPSet_Click"></Button>-->
|
<Label Content="设备列表" HorizontalAlignment="Center" FontSize="20" FontFamily="Yu Gothic UI" Foreground="White"/>
|
</StackPanel>
|
<Grid Grid.Row="1">
|
<Border Grid.Row="0" BorderBrush="Black" BorderThickness="1" CornerRadius="5" Background="White">
|
<ListBox x:Name="DeviceListBox" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" FontSize="20" FontFamily="Yu Gothic UI" SelectionChanged="DeviceListBox_SelectionChanged">
|
</ListBox>
|
</Border>
|
</Grid>
|
<StackPanel Grid.Row="2">
|
<Label Content="设备信息" HorizontalAlignment="Center" FontSize="20" FontFamily="Yu Gothic UI" Foreground="White"/>
|
</StackPanel>
|
<Border Grid.Row="3" BorderBrush="Black" BorderThickness="1" CornerRadius="5" Background="White">
|
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
<Grid x:Name="ProductInformation">
|
<Grid.RowDefinitions>
|
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
</Grid.RowDefinitions>
|
<StackPanel Orientation="Horizontal" Grid.Row="0" VerticalAlignment="Center">
|
<TextBlock Text="IP地址:" Foreground="Black" FontSize="14"/>
|
<TextBlock Name="CameraIP" Text="" Margin="5,0,0,0" Foreground="Black" FontSize="14"/>
|
</StackPanel>
|
<StackPanel Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Center" >
|
<TextBlock Text="子网:" Foreground="Black" FontSize="14"/>
|
<TextBlock Name="CameraNetMask" Text="" Margin="5,0,0,0" Foreground="Black" FontSize="14"/>
|
</StackPanel>
|
<StackPanel Grid.Row="2" Orientation="Horizontal" VerticalAlignment="Center">
|
<TextBlock Text="网关:" Foreground="Black" FontSize="14"/>
|
<TextBlock Name="CameraGateWay" Text="" Margin="5,0,0,0" Foreground="Black" FontSize="14"/>
|
</StackPanel>
|
<StackPanel Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Center">
|
<TextBlock Text="固件版本:" Foreground="Black" FontSize="14"/>
|
<TextBlock Name="CameraFirmwareVersion" Text="" Margin="5,0,0,0" Foreground="Black" FontSize="14"/>
|
</StackPanel>
|
<StackPanel Grid.Row="4" Orientation="Horizontal" VerticalAlignment="Center">
|
<TextBlock Text="设备型号:" Foreground="Black" FontSize="14"/>
|
<TextBlock Name="CameraModel" Text="" Margin="5,0,0,0" Foreground="Black" FontSize="14"/>
|
</StackPanel>
|
<StackPanel Grid.Row="5" Orientation="Horizontal" VerticalAlignment="Center">
|
<TextBlock Text="设备名:" Foreground="Black" FontSize="14"/>
|
<TextBlock Name="CameraAlias" Text="" Margin="5,0,0,0" Foreground="Black" FontSize="14"/>
|
</StackPanel>
|
</Grid>
|
</ScrollViewer>
|
</Border>
|
</Grid>
|
<Grid Grid.Column="2">
|
<!--结果显示-->
|
<Grid.RowDefinitions>
|
<RowDefinition Height="auto"/>
|
<RowDefinition Height="11.5*"/>
|
<RowDefinition Height="3.5*"/>
|
</Grid.RowDefinitions>
|
<DockPanel Grid.Row="0" VerticalAlignment="Center">
|
<Grid>
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
</Grid.ColumnDefinitions>
|
<Grid.RowDefinitions>
|
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
</Grid.RowDefinitions>
|
<StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal" DockPanel.Dock="Left">
|
<TextBlock Text="检测状态:" Foreground="White" FontSize="23"/>
|
<TextBlock x:Name="DetectState" Text="未在检测" FontSize="23" Foreground="red"/>
|
</StackPanel>
|
|
<StackPanel Grid.Row="0" Grid.Column="2" Orientation="Horizontal" >
|
<TextBlock Text="通讯状态:" Foreground="White" FontSize="23"/>
|
<TextBlock x:Name="LinkState" Text="未连接" FontSize="23" Foreground="red"/>
|
</StackPanel>
|
<StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal">
|
<TextBlock Text="检测方案:" Foreground="White" FontSize="23"/>
|
<TextBlock x:Name="ProjectState" Text="未加载" FontSize="23" Foreground="red"/>
|
</StackPanel>
|
<StackPanel Grid.Row="1" Grid.Column="2" Orientation="Horizontal">
|
<TextBlock Text="检测模型:" Foreground="White" FontSize="23"/>
|
<TextBlock x:Name="ModelState" Text="未加载" FontSize="23" Foreground="red"/>
|
</StackPanel>
|
</Grid>
|
</DockPanel>
|
<Grid Grid.Row="1">
|
<Grid.RowDefinitions>
|
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
</Grid.RowDefinitions>
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
</Grid.ColumnDefinitions>
|
<Border x:Name="finall_result0" MouseLeftButtonDown="finall_result0_MouseLeftButtonDown" Grid.Row="0" Grid.Column="0" Background="#7B7B7B" BorderBrush="Black" BorderThickness="1" CornerRadius="5">
|
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<TextBlock x:Name="cameraAlias0" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></TextBlock>
|
<!--<TextBlock x:Name="deviceName0" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"/>-->
|
<!--<Button x:Name="finall_result0_Btn" Click="finall_result0_Btn_Click" Background="#7B7B7B"/>-->
|
</StackPanel>
|
<Label x:Name="Finall_result0" Content="" Foreground="White" FontSize="30" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></Label>
|
</StackPanel>
|
<!--结果显示1-->
|
</Border>
|
<Border x:Name="finall_result1" MouseLeftButtonDown="finall_result1_MouseLeftButtonDown" Grid.Row="0" Grid.Column="1" Background="#7B7B7B" BorderBrush="Black" BorderThickness="1" CornerRadius="5">
|
<!--结果显示2-->
|
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<TextBlock x:Name="cameraAlias1" Text="" Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></TextBlock>
|
<!--<TextBlock x:Name="deviceName1" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"/>-->
|
</StackPanel>
|
<Label x:Name="Finall_result1" Content="" Foreground="White" FontSize="30" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></Label>
|
</StackPanel>
|
</Border>
|
<Border x:Name="finall_result2" MouseLeftButtonDown="finall_result2_MouseLeftButtonDown" Grid.Row="0" Grid.Column="2" Background="#7B7B7B" BorderBrush="Black" BorderThickness="1" CornerRadius="5">
|
<!--结果显示3-->
|
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<TextBlock x:Name="cameraAlias2" Text="" Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></TextBlock>
|
<!--<TextBlock x:Name="deviceName2" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"/>-->
|
</StackPanel>
|
<Label x:Name="Finall_result2" Content="" Foreground="White" FontSize="30" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></Label>
|
</StackPanel>
|
</Border>
|
<Border x:Name="finall_result3" MouseLeftButtonDown="finall_result3_MouseLeftButtonDown" Grid.Row="0" Grid.Column="3" Background="#7B7B7B" BorderBrush="Black" BorderThickness="1" CornerRadius="5">
|
<!--结果显示4-->
|
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<TextBlock x:Name="cameraAlias3" Text="" Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></TextBlock>
|
<!--<TextBlock x:Name="deviceName3" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"/>-->
|
</StackPanel>
|
<Label x:Name="Finall_result3" Content="" Foreground="White" FontSize="30" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></Label>
|
</StackPanel>
|
</Border>
|
<Border x:Name="finall_result4" MouseLeftButtonDown="finall_result4_MouseLeftButtonDown" Grid.Row="1" Grid.Column="0" Background="#7B7B7B" BorderBrush="Black" BorderThickness="1" CornerRadius="5">
|
<!--结果显示5-->
|
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<TextBlock x:Name="cameraAlias4" Text="" Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></TextBlock>
|
<!--<TextBlock x:Name="deviceName4" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"/>-->
|
</StackPanel>
|
<Label x:Name="Finall_result4" Content="" Foreground="White" FontSize="30" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></Label>
|
</StackPanel>
|
</Border>
|
<Border x:Name="finall_result5" Grid.Row="1" MouseLeftButtonDown="finall_result5_MouseLeftButtonDown" Grid.Column="1" Background="#7B7B7B" BorderBrush="Black" BorderThickness="1" CornerRadius="5">
|
<!--结果显示6-->
|
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<TextBlock x:Name="cameraAlias5" Text="" Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></TextBlock>
|
<!--<TextBlock x:Name="deviceName5" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"/>-->
|
</StackPanel>
|
<Label x:Name="Finall_result5" Content="" Foreground="White" FontSize="30" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></Label>
|
</StackPanel>
|
</Border>
|
<Border x:Name="finall_result6" Grid.Row="1" MouseLeftButtonDown="finall_result6_MouseLeftButtonDown" Grid.Column="2" Background="#7B7B7B" BorderBrush="Black" BorderThickness="1" CornerRadius="5">
|
<!--结果显示7-->
|
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<TextBlock x:Name="cameraAlias6" Text="" Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></TextBlock>
|
<!--<TextBlock x:Name="deviceName6" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"/>-->
|
</StackPanel>
|
<Label x:Name="Finall_result6" Content="" Foreground="White" FontSize="30" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></Label>
|
</StackPanel>
|
</Border>
|
<Border x:Name="finall_result7" Grid.Row="1" MouseLeftButtonDown="finall_result7_MouseLeftButtonDown" Grid.Column="3" Background="#7B7B7B" BorderBrush="Black" BorderThickness="1" CornerRadius="5">
|
<!--结果显示8-->
|
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<TextBlock x:Name="cameraAlias7" Text="" Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></TextBlock>
|
<!--<TextBlock x:Name="deviceName7" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"/>-->
|
</StackPanel>
|
<Label x:Name="Finall_result7" Content="" Foreground="White" FontSize="30" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></Label>
|
</StackPanel>
|
</Border>
|
<Border x:Name="finall_result8" MouseLeftButtonDown="finall_result8_MouseLeftButtonDown" Grid.Row="2" Grid.Column="0" Background="#7B7B7B" BorderBrush="Black" BorderThickness="1" CornerRadius="5">
|
<!--结果显示9-->
|
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<TextBlock x:Name="cameraAlias8" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></TextBlock>
|
<!--<TextBlock x:Name="deviceName8" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"/>-->
|
</StackPanel>
|
<Label x:Name="Finall_result8" Content="" Foreground="White" FontSize="30" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></Label>
|
</StackPanel>
|
</Border>
|
<Border x:Name="finall_result9" MouseLeftButtonDown="finall_result9_MouseLeftButtonDown" Grid.Row="2" Grid.Column="1" Background="#7B7B7B" BorderBrush="Black" BorderThickness="1" CornerRadius="5">
|
<!--结果显示10-->
|
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<TextBlock x:Name="cameraAlias9" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></TextBlock>
|
<!--<TextBlock x:Name="deviceName9" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"/>-->
|
</StackPanel>
|
<Label x:Name="Finall_result9" Content="" Foreground="White" FontSize="30" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></Label>
|
</StackPanel>
|
</Border>
|
<Border x:Name="finall_result10" MouseLeftButtonDown="finall_result10_MouseLeftButtonDown" Grid.Row="2" Grid.Column="2" Background="#7B7B7B" BorderBrush="Black" BorderThickness="1" CornerRadius="5">
|
<!--结果显示11-->
|
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<TextBlock x:Name="cameraAlias10" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></TextBlock>
|
<!--<TextBlock x:Name="deviceName10" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"/>-->
|
</StackPanel>
|
<Label x:Name="Finall_result10" Content="" Foreground="White" FontSize="30" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></Label>
|
</StackPanel>
|
</Border>
|
<Border x:Name="finall_result11" MouseLeftButtonDown="finall_result11_MouseLeftButtonDown" Grid.Row="2" Grid.Column="3" Background="#7B7B7B" BorderBrush="Black" BorderThickness="1" CornerRadius="5">
|
<!--结果显示12-->
|
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<TextBlock x:Name="cameraAlias11" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></TextBlock>
|
<!--<TextBlock x:Name="deviceName11" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"/>-->
|
</StackPanel>
|
<Label x:Name="Finall_result11" Content="" Foreground="White" FontSize="30" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></Label>
|
</StackPanel>
|
</Border>
|
<Border x:Name="finall_result12" MouseLeftButtonDown="finall_result12_MouseLeftButtonDown" Grid.Row="3" Grid.Column="0" Background="#7B7B7B" BorderBrush="Black" BorderThickness="1" CornerRadius="5">
|
<!--结果显示13-->
|
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<TextBlock x:Name="cameraAlias12" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></TextBlock>
|
<!--<TextBlock x:Name="deviceName12" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"/>-->
|
</StackPanel>
|
<Label x:Name="Finall_result12" Content="" Foreground="White" FontSize="30" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></Label>
|
</StackPanel>
|
</Border>
|
<Border x:Name="finall_result13" MouseLeftButtonDown="finall_result13_MouseLeftButtonDown" Grid.Row="3" Grid.Column="1" Background="#7B7B7B" BorderBrush="Black" BorderThickness="1" CornerRadius="5">
|
<!--结果显示14-->
|
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<TextBlock x:Name="cameraAlias13" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></TextBlock>
|
<!--<TextBlock x:Name="deviceName13" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"/>-->
|
</StackPanel>
|
<Label x:Name="Finall_result13" Content="" Foreground="White" FontSize="30" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></Label>
|
</StackPanel>
|
</Border>
|
<Border x:Name="finall_result14" MouseLeftButtonDown="finall_result14_MouseLeftButtonDown" Grid.Row="3" Grid.Column="2" Background="#7B7B7B" BorderBrush="Black" BorderThickness="1" CornerRadius="5">
|
<!--结果显示15-->
|
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<TextBlock x:Name="cameraAlias14" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></TextBlock>
|
<!--<TextBlock x:Name="deviceName14" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"/>-->
|
</StackPanel>
|
<Label x:Name="Finall_result14" Content="" Foreground="White" FontSize="30" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></Label>
|
</StackPanel>
|
</Border>
|
<Border x:Name="finall_result15" MouseLeftButtonDown="finall_result15_MouseLeftButtonDown" Grid.Row="3" Grid.Column="3" Background="#7B7B7B" BorderBrush="Black" BorderThickness="1" CornerRadius="5">
|
<!--结果显示16-->
|
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<TextBlock x:Name="cameraAlias15" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></TextBlock>
|
<!--<TextBlock x:Name="deviceName15" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"/>-->
|
</StackPanel>
|
<Label x:Name="Finall_result15" Content="" Foreground="White" FontSize="30" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></Label>
|
</StackPanel>
|
</Border>
|
<Border x:Name="finall_result16" MouseLeftButtonDown="finall_result16_MouseLeftButtonDown" Grid.Row="4" Grid.Column="0" Background="#7B7B7B" BorderBrush="Black" BorderThickness="1" CornerRadius="5">
|
<!--结果显示17-->
|
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<TextBlock x:Name="cameraAlias16" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></TextBlock>
|
<!--<TextBlock x:Name="deviceName16" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"/>-->
|
</StackPanel>
|
<Label x:Name="Finall_result16" Content="" Foreground="White" FontSize="30" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></Label>
|
</StackPanel>
|
</Border>
|
<Border x:Name="finall_result17" MouseLeftButtonDown="finall_result17_MouseLeftButtonDown" Grid.Row="4" Grid.Column="1" Background="#7B7B7B" BorderBrush="Black" BorderThickness="1" CornerRadius="5">
|
<!--结果显示18-->
|
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<TextBlock x:Name="cameraAlias17" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></TextBlock>
|
<!--<TextBlock x:Name="deviceName17" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"/>-->
|
</StackPanel>
|
<Label x:Name="Finall_result17" Content="" Foreground="White" FontSize="30" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></Label>
|
</StackPanel>
|
</Border>
|
<Border x:Name="finall_result18" MouseLeftButtonDown="finall_result18_MouseLeftButtonDown" Grid.Row="4" Grid.Column="2" Background="#7B7B7B" BorderBrush="Black" BorderThickness="1" CornerRadius="5">
|
<!--结果显示19-->
|
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<TextBlock x:Name="cameraAlias18" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></TextBlock>
|
<!--<TextBlock x:Name="deviceName18" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"/>-->
|
</StackPanel>
|
<Label x:Name="Finall_result18" Content="" Foreground="White" FontSize="30" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></Label>
|
</StackPanel>
|
</Border>
|
<Border x:Name="finall_result19" MouseLeftButtonDown="finall_result19_MouseLeftButtonDown" Grid.Row="4" Grid.Column="3" Background="#7B7B7B" BorderBrush="Black" BorderThickness="1" CornerRadius="5">
|
<!--结果显示20-->
|
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<TextBlock x:Name="cameraAlias19" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></TextBlock>
|
<!--<TextBlock x:Name="deviceName19" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"/>-->
|
</StackPanel>
|
<Label x:Name="Finall_result19" Content="" Foreground="White" FontSize="30" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></Label>
|
</StackPanel>
|
</Border>
|
<Border x:Name="finall_result20" MouseLeftButtonDown="finall_result20_MouseLeftButtonDown" Grid.Row="5" Grid.Column="0" Background="#7B7B7B" BorderBrush="Black" BorderThickness="1" CornerRadius="5">
|
<!--结果显示21-->
|
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<TextBlock x:Name="cameraAlias20" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></TextBlock>
|
<!--<TextBlock x:Name="deviceName20" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"/>-->
|
</StackPanel>
|
<Label x:Name="Finall_result20" Content="" Foreground="White" FontSize="30" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></Label>
|
</StackPanel>
|
</Border>
|
<Border x:Name="finall_result21" MouseLeftButtonDown="finall_result21_MouseLeftButtonDown" Grid.Row="5" Grid.Column="1" Background="#7B7B7B" BorderBrush="Black" BorderThickness="1" CornerRadius="5">
|
<!--结果显示22-->
|
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<TextBlock x:Name="cameraAlias21" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></TextBlock>
|
<!--<TextBlock x:Name="deviceName21" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"/>-->
|
</StackPanel>
|
<Label x:Name="Finall_result21" Content="" Foreground="White" FontSize="30" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></Label>
|
</StackPanel>
|
</Border>
|
<Border x:Name="finall_result22" MouseLeftButtonDown="finall_result22_MouseLeftButtonDown" Grid.Row="5" Grid.Column="2" Background="#7B7B7B" BorderBrush="Black" BorderThickness="1" CornerRadius="5">
|
<!--结果显示23-->
|
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<TextBlock x:Name="cameraAlias22" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></TextBlock>
|
<!--<TextBlock x:Name="deviceName22" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"/>-->
|
</StackPanel>
|
<Label x:Name="Finall_result22" Content="" Foreground="White" FontSize="30" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></Label>
|
</StackPanel>
|
</Border>
|
<Border x:Name="finall_result23" MouseLeftButtonDown="finall_result23_MouseLeftButtonDown" Grid.Row="5" Grid.Column="3" Background="#7B7B7B" BorderBrush="Black" BorderThickness="1" CornerRadius="5">
|
<!--结果显示24-->
|
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<TextBlock x:Name="cameraAlias23" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></TextBlock>
|
<!--<TextBlock x:Name="deviceName23" Text=" " Height="30" Foreground="White" FontSize="15" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"/>-->
|
</StackPanel>
|
<Label x:Name="Finall_result23" Content="" Foreground="White" FontSize="30" FontFamily="Microsoft YaHei UI" FontWeight="Bold" HorizontalAlignment="Center"></Label>
|
</StackPanel>
|
</Border>
|
</Grid>
|
<Grid Grid.Row="2">
|
<Grid.RowDefinitions>
|
<RowDefinition Height="1*"/>
|
<RowDefinition Height="3*"/>
|
</Grid.RowDefinitions>
|
<StackPanel Grid.Row="0" >
|
<Label Content="检测日志" HorizontalAlignment="Center" FontSize="20" FontFamily="Yu Gothic UI" Foreground="White"/>
|
</StackPanel >
|
<Border Grid.Row="1" BorderBrush="White" BorderThickness="2" CornerRadius="5">
|
<ListView x:Name="LogListView" ItemsSource="{Binding LogEntries}" VirtualizingStackPanel.IsVirtualizing="True" BorderThickness="0" >
|
<!--<ListView.Template>
|
<ControlTemplate TargetType="ListView">
|
<ScrollViewer x:Name="ScrollViewer" VerticalScrollBarVisibility="Auto">
|
<ItemsPresenter/>
|
</ScrollViewer>
|
</ControlTemplate>
|
</ListView.Template>-->
|
<ListView.View>
|
<GridView>
|
<GridViewColumn Header="时间" Width="80">
|
<GridViewColumn.CellTemplate>
|
<DataTemplate>
|
<TextBlock Text="{Binding Timestamp, StringFormat='HH:mm:ss'}"
|
Foreground="{Binding Foreground}"/>
|
</DataTemplate>
|
</GridViewColumn.CellTemplate>
|
</GridViewColumn>
|
<GridViewColumn Header="级别" Width="80">
|
<GridViewColumn.CellTemplate>
|
<DataTemplate>
|
<TextBlock Text="{Binding Level}" Foreground="{Binding Foreground}"/>
|
</DataTemplate>
|
</GridViewColumn.CellTemplate>
|
</GridViewColumn>
|
<GridViewColumn Header="消息" Width="600">
|
<GridViewColumn.CellTemplate>
|
<DataTemplate>
|
<TextBlock Text="{Binding Message}"
|
TextWrapping="Wrap"
|
Foreground="{Binding Foreground}"/>
|
</DataTemplate>
|
</GridViewColumn.CellTemplate>
|
</GridViewColumn>
|
</GridView>
|
</ListView.View>
|
</ListView>
|
</Border>
|
<!--<Border Grid.Row="1" BorderBrush="White" BorderThickness="2" CornerRadius="5" Background="#3C3C3C">
|
<TextBox Name="Log1" VerticalScrollBarVisibility="Hidden" Foreground="Black" BorderThickness="0"/>
|
</Border>-->
|
</Grid>
|
</Grid>
|
|
<Grid Grid.Column="4">
|
<!--参数设置-->
|
<Grid.RowDefinitions>
|
<RowDefinition Height="1.5*"/>
|
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="1.5*"/>
|
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="1.5*"/>
|
<RowDefinition Height="5*"/>
|
</Grid.RowDefinitions>
|
|
<StackPanel Grid.Row="0">
|
<Label Content="工程设置" HorizontalAlignment="Center" FontSize="20" FontFamily="Yu Gothic UI" Foreground="White"/>
|
</StackPanel>
|
<Grid Grid.Row="1">
|
<Border Grid.Row="0" BorderBrush="White" BorderThickness="2" CornerRadius="5" Background="#3C3C3C">
|
<ScrollViewer VerticalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Hidden">
|
<StackPanel>
|
<!-- 输出设置 -->
|
<GroupBox Header="第①步:检测方案选择" Foreground="White" Margin="0,0,0,10" FontSize="14">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<ComboBox Name="cmbDetectionPlans" DisplayMemberPath="FileName" SelectedValuePath="FullPath" Height="20" Width="100" HorizontalContentAlignment="Left" FontSize="12"/>
|
<Button Name="ResultJudge_Path" Content="选择" Click="BtnSelectParam_Click" Width="50" Height="30" Margin="5,0,0,0" Style="{DynamicResource ButtonStyle}"/>
|
</StackPanel>
|
</GroupBox>
|
|
<!-- 推理引擎选择 -->
|
<GroupBox Header="第②步:模型选择" Margin="0,0,0,10" Foreground="White" FontSize="14">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<ComboBox Name="cmbModels" DisplayMemberPath="FileName" SelectedValuePath="FullPath" Height="20" Width="100" HorizontalContentAlignment="Left" FontSize="12"/>
|
<Button Name="Model_Path" Click="BtnConfirmModel_Click" Content="确定" Width="50" Height="30" Margin="5,0,0,0" Style="{DynamicResource ButtonStyle}"/>
|
</StackPanel>
|
</GroupBox>
|
|
<!-- 工程文件导出 -->
|
<GroupBox Header="第③步:工程文件导出" Foreground="White" FontSize="14">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<Button Name="Proj" Content="导出" Click="BtnExport_Click" Width="60" Height="30" Style="{DynamicResource ButtonStyle}"/>
|
</StackPanel>
|
</GroupBox>
|
|
<!-- 工程文件加载 -->
|
<GroupBox Header="第④步:工程文件加载" Foreground="White" FontSize="14">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<ComboBox Name="cmbProjects" DisplayMemberPath="FileName" SelectedValuePath="FullPath" Height="20" Width="100" HorizontalContentAlignment="Left" FontSize="12" Margin="0,0,5,0"/>
|
<Button Content="加载" Click="BtnLoad_Click" Width="60" Height="30" Style="{DynamicResource ButtonStyle}"/>
|
</StackPanel>
|
</GroupBox>
|
|
<!-- 刷新按钮 -->
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,10,0,0">
|
<Button Content="刷新" Click="BtnRefreshModels_Click" Width="60" Height="30" Style="{DynamicResource ButtonStyle}"/>
|
</StackPanel>
|
</StackPanel>
|
</ScrollViewer>
|
</Border>
|
</Grid>
|
|
<StackPanel Grid.Row="2">
|
<Label Content="通讯设置" HorizontalAlignment="Center" FontSize="20" FontFamily="Yu Gothic UI" Foreground="White"/>
|
</StackPanel>
|
<Border Grid.Row="3" BorderBrush="White" BorderThickness="2" CornerRadius="5" Background="#3C3C3C">
|
<Grid>
|
<Grid.RowDefinitions>
|
<!--<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>-->
|
</Grid.RowDefinitions>
|
<TabControl HorizontalAlignment="Center" Background="#3C3C3C" BorderThickness="0">
|
<TabItem Header="ModBus" IsSelected="True" Width="80" Background="#7B7B7B" Style="{StaticResource TabItemStyle}">
|
<StackPanel Margin="10">
|
<TextBlock Text="服务器IP:" HorizontalAlignment="Center" Foreground="White"/>
|
<ComboBox x:Name="Client_ServerIpComboBox" Width="140" IsEditable="True" SelectedIndex="0">
|
<ComboBoxItem Content="192.168.0.20" Width="120"/>
|
</ComboBox>
|
<TextBlock Text="端口号:" HorizontalAlignment="Center" Foreground="White"/>
|
<ComboBox x:Name="Client_PortComboBox" Width="140" SelectedIndex="0">
|
<ComboBoxItem Content="502" Width="120" />
|
</ComboBox>
|
<TextBlock Background="#3C3C3C" Height="10"></TextBlock>
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<Button x:Name="Client_connect" Content="连接" Click="Client_Connect_Click" Style="{DynamicResource ButtonStyle}" Width="50" Height="25" Background="#7B7B7B"/>
|
<!--<Button x:Name="Client_disconnect" Content="断开" Click="Client_Disconnect_Click" Style="{DynamicResource ButtonStyle}" Width="50" Height="25" Background="#7B7B7B"/>-->
|
<Button Content="清空" Click="Client_ClearClientLogs_Click" Style="{DynamicResource ButtonStyle}" Width="50" Height="25" Background="#7B7B7B"/>
|
</StackPanel>
|
<!--<TextBlock Text="数据发送:" HorizontalAlignment="Center" />
|
<TextBox x:Name="Client_DataToSendTextBox" Width="200"/>
|
<Button Content="发送" Click="Client_SendData_Click" />-->
|
|
<!--<TextBlock Text="消息:" HorizontalAlignment="Center" Foreground="White"/>-->
|
<ScrollViewer VerticalScrollBarVisibility="Hidden">
|
<TextBox x:Name="Client_LogsTextBox" Height="80" IsReadOnly="True" TextWrapping="Wrap" FontSize="11"/>
|
</ScrollViewer>
|
</StackPanel>
|
</TabItem>
|
|
<TabItem Header="TCP/IP" Width="80" Background="#7B7B7B" Style="{StaticResource TabItemStyle}" >
|
<ScrollViewer VerticalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Hidden">
|
<StackPanel Margin="10">
|
<TextBlock Text="服务器IP:" HorizontalAlignment="Center" Foreground="White"/>
|
<ComboBox x:Name="TCPServer_IpComboBox" SelectedIndex="0">
|
<ComboBoxItem Content="127.0.0.1" />
|
<ComboBoxItem Content="0.0.0.0" />
|
</ComboBox>
|
|
<TextBlock Text="端口号:" HorizontalAlignment="Center" Foreground="White"/>
|
<ComboBox x:Name="TCPServer_PortComboBox" SelectedIndex="0" IsEditable="True"
|
Text="{Binding Source={x:Static Properties:Settings.Default}, Path=DefaultPort, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
SelectedValue="{Binding Source={x:Static Properties:Settings.Default}, Path=SelectedPort, Mode=TwoWay}">
|
<ComboBoxItem Content="5011" Width="120"/>
|
<ComboBoxItem Content="8080" Width="120"/>
|
</ComboBox>
|
|
<CheckBox x:Name="TCPServer_EnableHeartbeat" Content="开启心跳检测" Checked="TCPServer_EnableHeartbeat_Checked" Unchecked="TCPServer_EnableHeartbeat_Unchecked" Foreground="White" Margin="0,10,0,0"/>
|
|
<StackPanel x:Name="TCPServer_HeartbeatPanel" Margin="0,5,0,0" Visibility="Collapsed">
|
<TextBlock Text="心跳指令:" HorizontalAlignment="Center" Foreground="White"/>
|
<TextBox x:Name="TCPServer_HeartbeatCommand" Text="heartBeat" HorizontalAlignment="Center"/>
|
|
<TextBlock Text="心跳周期(ms):" HorizontalAlignment="Center" Foreground="White" Margin="0,5,0,0"/>
|
<TextBox x:Name="TCPServer_HeartbeatInterval" Text="1000" HorizontalAlignment="Center"/>
|
</StackPanel>
|
|
<TextBlock Background="#3C3C3C" Height="10"></TextBlock>
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<Button x:Name="TCPServer_Start" Content="开启" ToolTip="服务器开启侦听" Click="TCPServer_Start_Click" Style="{DynamicResource ButtonStyle}" Width="50" Height="25" Background="#7B7B7B"/>
|
<Button x:Name="TCPServer_Stop" Content="停止" ToolTip="服务器停止侦听" Click="TCPServer_Stop_Click" Style="{DynamicResource ButtonStyle}" Width="50" Height="25" Background="#7B7B7B" Margin="5,0,0,0"/>
|
</StackPanel>
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<Button x:Name="RefreshIpButton" Content="刷新" ToolTip="刷新可用IP列表" Click="RefreshIpButton_Click" Style="{DynamicResource ButtonStyle}" Width="50" Height="25" Background="#7B7B7B"/>
|
<Button Content="清空" Click="TCPServer_ClearLogs_Click" ToolTip="清空日志栏" Style="{DynamicResource ButtonStyle}" Width="50" Height="25" Background="#7B7B7B" Margin="5,0,0,0"/>
|
</StackPanel>
|
|
<ScrollViewer VerticalScrollBarVisibility="Disabled" Height="80" Margin="0,5,0,0">
|
<TextBox x:Name="TCPServer_LogsTextBox" IsReadOnly="True" TextWrapping="Wrap" FontSize="11" MaxWidth="150"/>
|
</ScrollViewer>
|
</StackPanel>
|
</ScrollViewer>
|
</TabItem>
|
</TabControl>
|
|
</Grid>
|
</Border>
|
|
<StackPanel Grid.Row="4">
|
<Label Content="日志" HorizontalAlignment="Center" FontSize="20" FontFamily="Yu Gothic UI" Foreground="White"/>
|
</StackPanel>
|
|
<Border Grid.Row="5" BorderBrush="White" BorderThickness="2" CornerRadius="5" Background="#3C3C3C">
|
<TextBox Name="Log" VerticalScrollBarVisibility="Hidden" Foreground="Black" BorderThickness="0"/>
|
</Border>
|
</Grid>
|
</Grid>
|
</Grid>
|
</Window>
|