C3032
2025-12-20 d0ded5cd9bf5070a120bad58b5be21fe2ac6a4ff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
<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>