Ver Fonte

细节优化

Shun há 2 anos atrás
pai
commit
07b0c9db38

+ 1 - 1
src/YSAI.Tool.Wpf/Main.xaml.cs

@@ -32,7 +32,7 @@ namespace YSAI.Tool.Wpf
                     if (navigationViews.Count > 0)
                     {
                         //第一次打开显示的界面
-                        navigationViews[0].Navigate(typeof(YSAI.Tool.Wpf.views.Modbus));
+                        navigationViews[0].Navigate(typeof(YSAI.Tool.Wpf.views.UaClient));
                     }
                 });
             });

+ 28 - 28
src/YSAI.Tool.Wpf/controllers/MainController.cs

@@ -29,56 +29,56 @@ namespace YSAI.Tool.Wpf.controllers
                   {
                         NavigationCacheMode=NavigationCacheMode.Required,
                         Content = "Daq ‹ Client ›",
-                        Icon = new SymbolIcon { Symbol = SymbolRegular.DeviceMeetingRoom32  },
+                        Icon = new SymbolIcon { Symbol = SymbolRegular.ServerSurface16  },
                         MenuItems = new object[]
                         {
-                            CreationControl("[ OpcUa ]", SymbolRegular.ServerSurface16, typeof(YSAI.Tool.Wpf.views.UaClient)),
-                            CreationControl("[ OpcDa ]", SymbolRegular.ServerSurface16, typeof(YSAI.Tool.Wpf.views.DaClient)),
-                            CreationControl("[ OpcDa Http ]", SymbolRegular.Server20, typeof(YSAI.Tool.Wpf.views.DaHttp)),
-                            CreationControl("[ Modbus ]", SymbolRegular.BubbleMultiple20, typeof(YSAI.Tool.Wpf.views.Modbus)),
-                            CreationControl("[ 罗克韦尔 ]", SymbolRegular.BubbleMultiple20, typeof(YSAI.Tool.Wpf.views.AllenBradley)),
-                            CreationControl("[ 倍福 ]", SymbolRegular.BubbleMultiple20, typeof(YSAI.Tool.Wpf.views.Beckhoff)),
-                            CreationControl("[ 松下 ]", SymbolRegular.BubbleMultiple20, typeof(YSAI.Tool.Wpf.views.Mewtocol)),
-                            CreationControl("[ 三菱 ]", SymbolRegular.BubbleMultiple20, typeof(YSAI.Tool.Wpf.views.Mitsubishi)),
-                            CreationControl("[ 欧姆龙 ]", SymbolRegular.BubbleMultiple20, typeof(YSAI.Tool.Wpf.views.Omron)),
-                            CreationControl("[ 西门子 ]", SymbolRegular.BubbleMultiple20, typeof(YSAI.Tool.Wpf.views.Siemens)),
+                            CreationControl("[ OpcUa ]", SymbolRegular.DesktopFlow24, typeof(YSAI.Tool.Wpf.views.UaClient)),
+                            CreationControl("[ OpcDa ]", SymbolRegular.DesktopFlow24, typeof(YSAI.Tool.Wpf.views.DaClient)),
+                            CreationControl("[ OpcDa Http ]", SymbolRegular.DesktopFlow24, typeof(YSAI.Tool.Wpf.views.DaHttp)),
+                            CreationControl("[ Modbus ]", SymbolRegular.DesktopFlow24, typeof(YSAI.Tool.Wpf.views.Modbus)),
+                            CreationControl("[ 罗克韦尔 ]", SymbolRegular.DesktopFlow24, typeof(YSAI.Tool.Wpf.views.AllenBradley)),
+                            CreationControl("[ 倍福 ]", SymbolRegular.DesktopFlow24, typeof(YSAI.Tool.Wpf.views.Beckhoff)),
+                            CreationControl("[ 松下 ]", SymbolRegular.DesktopFlow24, typeof(YSAI.Tool.Wpf.views.Mewtocol)),
+                            CreationControl("[ 三菱 ]", SymbolRegular.DesktopFlow24, typeof(YSAI.Tool.Wpf.views.Mitsubishi)),
+                            CreationControl("[ 欧姆龙 ]", SymbolRegular.DesktopFlow24, typeof(YSAI.Tool.Wpf.views.Omron)),
+                            CreationControl("[ 西门子 ]", SymbolRegular.DesktopFlow24, typeof(YSAI.Tool.Wpf.views.Siemens)),
                         }
                   },
                    new NavigationViewItem()
                   {
                         NavigationCacheMode=NavigationCacheMode.Required,
                         Content = "Daq ‹ Service ›",
-                        Icon = new SymbolIcon { Symbol = SymbolRegular.DeviceMeetingRoom32  },
+                        Icon = new SymbolIcon { Symbol = SymbolRegular.ServerSurfaceMultiple16  },
                         MenuItems = new object[]
                         {
-                            CreationControl("[ OpcUa ]", SymbolRegular.ServerSurfaceMultiple16, typeof(YSAI.Tool.Wpf.views.UaService)),
+                            CreationControl("[ OpcUa ]", SymbolRegular.CloudFlow24, typeof(YSAI.Tool.Wpf.views.UaService)),
                         }
                   },
                   new NavigationViewItem()
                   {
                         NavigationCacheMode=NavigationCacheMode.Required,
                         Content = "Relay ‹ Client ›",
-                        Icon = new SymbolIcon { Symbol = SymbolRegular.DeviceMeetingRoom32  },
+                        Icon = new SymbolIcon { Symbol = SymbolRegular.ServerSurface16  },
                         MenuItems = new object[]
                         {
-                            CreationControl("[ Mqtt ]", SymbolRegular.ServerSurface16, typeof(YSAI.Tool.Wpf.views.MqttClient)),
-                            CreationControl("[ Kafka ]", SymbolRegular.BubbleMultiple20, typeof(YSAI.Tool.Wpf.views.Kafka)),
-                            CreationControl("[ NetMQ ]", SymbolRegular.BubbleMultiple20, typeof(YSAI.Tool.Wpf.views.NetMQ)),
-                            CreationControl("[ RabbitMQ ]", SymbolRegular.BubbleMultiple20, typeof(YSAI.Tool.Wpf.views.RabbitMQ)),
-                            CreationControl("[ Netty ]", SymbolRegular.ServerSurface16, typeof(YSAI.Tool.Wpf.views.NettyClient)),
+                            CreationControl("[ Mqtt ]", SymbolRegular.DesktopFlow24, typeof(YSAI.Tool.Wpf.views.MqttClient)),
+                            CreationControl("[ Kafka ]", SymbolRegular.DesktopFlow24, typeof(YSAI.Tool.Wpf.views.Kafka)),
+                            CreationControl("[ NetMQ ]", SymbolRegular.DesktopFlow24, typeof(YSAI.Tool.Wpf.views.NetMQ)),
+                            CreationControl("[ RabbitMQ ]", SymbolRegular.DesktopFlow24, typeof(YSAI.Tool.Wpf.views.RabbitMQ)),
+                            CreationControl("[ Netty ]", SymbolRegular.DesktopFlow24, typeof(YSAI.Tool.Wpf.views.NettyClient)),
                         }
                   },
                   new NavigationViewItem()
                   {
                         NavigationCacheMode=NavigationCacheMode.Required,
                         Content = "Relay ‹ Service ›",
-                        Icon = new SymbolIcon { Symbol = SymbolRegular.DeviceMeetingRoom32 },
+                        Icon = new SymbolIcon { Symbol = SymbolRegular.ServerSurfaceMultiple16 },
                         MenuItems = new object[]
                         {
 
-                            CreationControl("[ Mqtt ]", SymbolRegular.ServerSurfaceMultiple16, typeof(YSAI.Tool.Wpf.views.MqttService)),
-                            CreationControl("[ Mqtt WebSocket ]", SymbolRegular.ServerSurfaceMultiple16, typeof(YSAI.Tool.Wpf.views.MqttWsService)),
-                            CreationControl("[ 服务端 ]", SymbolRegular.ServerSurfaceMultiple16, typeof(YSAI.Tool.Wpf.views.NettyService)),
+                            CreationControl("[ Mqtt ]", SymbolRegular.CloudFlow24, typeof(YSAI.Tool.Wpf.views.MqttService)),
+                            CreationControl("[ Mqtt WebSocket ]", SymbolRegular.CloudFlow24, typeof(YSAI.Tool.Wpf.views.MqttWsService)),
+                            CreationControl("[ Netty ]", SymbolRegular.CloudFlow24, typeof(YSAI.Tool.Wpf.views.NettyService)),
                         }
                   },
                   new NavigationViewItem()
@@ -88,8 +88,8 @@ namespace YSAI.Tool.Wpf.controllers
                         Icon = new SymbolIcon { Symbol = SymbolRegular.DeviceMeetingRoom32  },
                         MenuItems = new object[]
                         {
-                            CreationControl(string.Format("{0,-10}{1}", "[ 客户端 ]", "Tcp"), SymbolRegular.ServerSurface16, typeof(YSAI.Tool.Wpf.views.TcpClient)),
-                            CreationControl(string.Format("{0,-10}{1}", "[ 服务端 ]", "Tcp"), SymbolRegular.ServerSurfaceMultiple16, typeof(YSAI.Tool.Wpf.views.TcpService)),
+                            CreationControl(string.Format("{0,-10}{1}", "[ 客户端 ]", "Tcp"), SymbolRegular.DesktopFlow24, typeof(YSAI.Tool.Wpf.views.TcpClient)),
+                            CreationControl(string.Format("{0,-10}{1}", "[ 服务端 ]", "Tcp"), SymbolRegular.CloudFlow24, typeof(YSAI.Tool.Wpf.views.TcpService)),
                             CreationControl("Udp", SymbolRegular.ServerMultiple20, typeof(YSAI.Tool.Wpf.views.Udp))
                         }
                   },
@@ -100,8 +100,8 @@ namespace YSAI.Tool.Wpf.controllers
                         Icon = new SymbolIcon { Symbol = SymbolRegular.DeviceMeetingRoom32 },
                         MenuItems = new object[]
                         {
-                            CreationControl("[ 客户端 ]", SymbolRegular.ServerSurface16, typeof(WsClient)),
-                            CreationControl("[ 服务端 ]", SymbolRegular.ServerSurfaceMultiple16, typeof(WsService)),
+                            CreationControl("[ 客户端 ]", SymbolRegular.DesktopFlow24, typeof(WsClient)),
+                            CreationControl("[ 服务端 ]", SymbolRegular.CloudFlow24, typeof(WsService)),
                         }
                   },
                   CreationControl("Serial",SymbolRegular.SerialPort24,typeof(YSAI.Tool.Wpf.views.Serial)),
@@ -110,7 +110,7 @@ namespace YSAI.Tool.Wpf.controllers
 
             FooterMenuItemsSource = new ObservableCollection<object>
             {
-                 CreationControl("关于", SymbolRegular.Info12, typeof(YSAI.Tool.Wpf.views.AboutUs))
+                 CreationControl("关于", SymbolRegular.Info28, typeof(YSAI.Tool.Wpf.views.AboutUs))
             };
         }
 

+ 10 - 9
src/YSAI.Tool.Wpf/template/DaqView.xaml

@@ -91,7 +91,7 @@
                                           BorderThickness="1,0,0,0" />
                         </StackPanel>
                         <!--属性表格-->
-                        <Grid Grid.Row="1" Panel.ZIndex="1">
+                        <Grid Grid.Row="1" Panel.ZIndex="1" >
                             <Grid.Resources>
                                 <ResourceDictionary>
                                     <Style TargetType="{x:Type Label}" >
@@ -128,7 +128,6 @@
 
                                     <Style TargetType="GroupBox" BasedOn="{StaticResource GroupBoxTab}"/>
 
-
                                     <DataTemplate x:Key="HeaderTemplate">
                                         <StackPanel Orientation="Horizontal">
                                             <Grid>
@@ -144,13 +143,15 @@
 
                                 </ResourceDictionary>
                             </Grid.Resources>
-                            <pt:PropertyGrid  Margin="1,-4,1,0" CategoryControlType="GroupBox"
-                                            SelectedObject="{Binding BasicsData}"
-                                            TabVisibility="VisibleIfMoreThanOne" 
-                                            TextBlock.Foreground="{DynamicResource Font.Content.Foreground}" 
-                                            Foreground="{DynamicResource Font.Content.Foreground}"
-                                            BorderBrush="{DynamicResource Control.Border.Color}"
-                                            CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
+                            <pt:PropertyGrid    Margin="1,-4,1,0" 
+                                                CategoryControlType="GroupBox" 
+                                                SelectedObject="{Binding BasicsData}"
+                                                TabVisibility="VisibleIfMoreThanOne" 
+                                                TextBlock.Foreground="{DynamicResource Font.Content.Foreground}" 
+                                                Foreground="{DynamicResource Font.Content.Foreground}"
+                                                BorderBrush="{DynamicResource Control.Border.Color}"
+                                                CategoryHeaderTemplate="{StaticResource HeaderTemplate}"
+                                                EnumAsRadioButtonsLimit="0"/>
                         </Grid>
                     </Grid>
 

+ 7 - 7
src/YSAI.Tool.Wpf/template/RelayView.xaml

@@ -145,13 +145,13 @@
                                 </ResourceDictionary>
                             </Grid.Resources>
                             <pt:PropertyGrid  Margin="1,-4,1,0"
-                                              
-SelectedObject="{Binding BasicsData}"
-TabVisibility="VisibleIfMoreThanOne" 
-TextBlock.Foreground="{DynamicResource Font.Content.Foreground}" 
-Foreground="{DynamicResource Font.Content.Foreground}"
-BorderBrush="{DynamicResource Control.Border.Color}"
-CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
+                                              SelectedObject="{Binding BasicsData}"
+                                              TabVisibility="VisibleIfMoreThanOne" 
+                                              TextBlock.Foreground="{DynamicResource Font.Content.Foreground}" 
+                                              Foreground="{DynamicResource Font.Content.Foreground}"
+                                              BorderBrush="{DynamicResource Control.Border.Color}"
+                                              CategoryHeaderTemplate="{StaticResource HeaderTemplate}"
+                                              EnumAsRadioButtonsLimit="0"/>
                         </Grid>
                     </Grid>
 

+ 79 - 78
src/YSAI.Tool.Wpf/views/DaHttp.xaml

@@ -1,10 +1,10 @@
 <UserControl x:Class="YSAI.Tool.Wpf.views.DaHttp"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
-             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
              xmlns:local="clr-namespace:YSAI.Tool.Wpf.views"
-                       xmlns:c="clr-namespace:YSAI.Tool.Wpf.controllers"
+             xmlns:c="clr-namespace:YSAI.Tool.Wpf.controllers"
              xmlns:txt="clr-namespace:YSAI.Core.Wpf.controls.textbox;assembly=YSAI.Core.Wpf"
              xmlns:btn="clr-namespace:YSAI.Core.Wpf.controls.button;assembly=YSAI.Core.Wpf"
              xmlns:pt="http://propertytools.org/wpf"
@@ -113,30 +113,30 @@
 
                     <!--导入导出-->
                     <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,0,-30" Panel.ZIndex="2">
-                        <btn:ButtonControl  
-                                          Width="80"
-                                          Command="{Binding IncBasics}" 
-                                          HorizontalAlignment="Center" 
-                                          VerticalAlignment="Center" 
-                                          IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                          BorderBrush="{DynamicResource Control.Border.Color}"
-                                          IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                          Foreground="{DynamicResource Font.Content.Foreground}"
-                                          Icon="{DynamicResource Inc}"
-                                          Content="导入"
-                                          BorderThickness="1,0,0,0" />
-                        <btn:ButtonControl  
-                                          Width="80"
-                                          Command="{Binding ExpBasics}" 
-                                          HorizontalAlignment="Center" 
-                                          VerticalAlignment="Center" 
-                                          IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                          BorderBrush="{DynamicResource Control.Border.Color}"
-                                          IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                          Foreground="{DynamicResource Font.Content.Foreground}"
-                                          Icon="{DynamicResource Exp}"
-                                          Content="导出"
-                                          BorderThickness="1,0,0,0" />
+                        <btn:ButtonControl
+                            Width="80"
+                            Command="{Binding IncBasics}"
+                            HorizontalAlignment="Center"
+                            VerticalAlignment="Center"
+                            IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                            BorderBrush="{DynamicResource Control.Border.Color}"
+                            IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                            Foreground="{DynamicResource Font.Content.Foreground}"
+                            Icon="{DynamicResource Inc}"
+                            Content="导入"
+                            BorderThickness="1,0,0,0" />
+                        <btn:ButtonControl
+                            Width="80"
+                            Command="{Binding ExpBasics}"
+                            HorizontalAlignment="Center"
+                            VerticalAlignment="Center"
+                            IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                            BorderBrush="{DynamicResource Control.Border.Color}"
+                            IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                            Foreground="{DynamicResource Font.Content.Foreground}"
+                            Icon="{DynamicResource Exp}"
+                            Content="导出"
+                            BorderThickness="1,0,0,0" />
                     </StackPanel>
                     <!--属性表格-->
                     <Grid Grid.Row="1" Panel.ZIndex="1">
@@ -193,12 +193,13 @@
                             </ResourceDictionary>
                         </Grid.Resources>
                         <pt:PropertyGrid  Margin="1,-4,1,0"
-SelectedObject="{Binding BasicsData}"
-TabVisibility="VisibleIfMoreThanOne" 
-TextBlock.Foreground="{DynamicResource Font.Content.Foreground}" 
-Foreground="{DynamicResource Font.Content.Foreground}"
-BorderBrush="{DynamicResource Control.Border.Color}"
-CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
+                                         SelectedObject="{Binding BasicsData}"
+                                         TabVisibility="VisibleIfMoreThanOne"
+                                         TextBlock.Foreground="{DynamicResource Font.Content.Foreground}"
+                                         Foreground="{DynamicResource Font.Content.Foreground}"
+                                         BorderBrush="{DynamicResource Control.Border.Color}"
+                                         CategoryHeaderTemplate="{StaticResource HeaderTemplate}"
+                                         EnumAsRadioButtonsLimit="0"/>
                     </Grid>
                 </Grid>
 
@@ -271,20 +272,20 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                             <Grid Grid.Row="0" Grid.Column="1"  Margin="0,-40,0,0">
                                 <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" >
                                     <btn:ButtonControl  Grid.Column="5"  Width="80"   Command="{Binding Request}" HorizontalAlignment="Right" VerticalAlignment="Center" BorderThickness="1,0,0,0"
-                                 IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                 BorderBrush="{DynamicResource Control.Border.Color}"
-                                 IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                 Foreground="{DynamicResource Font.Content.Foreground}"
-                                 Icon="{DynamicResource Request}"
-                                 Content="请求"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource Request}"
+                                                       Content="请求"/>
 
                                     <btn:ButtonControl  Grid.Column="6"  Width="80"  Command="{Binding AddNodes}" HorizontalAlignment="Right" VerticalAlignment="Center" BorderThickness="1,0,0,0"
-                                 IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                 BorderBrush="{DynamicResource Control.Border.Color}"
-                                 IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                 Foreground="{DynamicResource Font.Content.Foreground}"
-                                 Icon="{DynamicResource Add}"
-                                 Content="添加"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource Add}"
+                                                       Content="添加"/>
                                 </StackPanel>
                             </Grid>
                             <!--发送区域-->
@@ -301,18 +302,18 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                                     </Grid.ColumnDefinitions>
 
                                     <ComboBox Grid.ColumnSpan="2" Style="{StaticResource ComboBoxStyle}" Background="{DynamicResource WindowContentBackground}" VerticalAlignment="Center" Margin="0,0,0,10"
-                                                           ItemsSource="{Binding ComboBoxData}"
-                                                           DisplayMemberPath="Key"
-                                                           SelectedItem="{Binding ComboBoxSelectedData}"
-                                                           SelectedValue="Value"
-                                                           helpers:Style_ComboBox.CornerRadius="{DynamicResource WindowCornerRadius}" />
+                                              ItemsSource="{Binding ComboBoxData}"
+                                              DisplayMemberPath="Key"
+                                              SelectedItem="{Binding ComboBoxSelectedData}"
+                                              SelectedValue="Value"
+                                              helpers:Style_ComboBox.CornerRadius="{DynamicResource WindowCornerRadius}" />
 
                                     <ComboBox Grid.Column="0" Grid.Row="1" Style="{StaticResource ComboBoxStyle}" Background="{DynamicResource WindowContentBackground}" VerticalAlignment="Center"
-                                               ItemsSource="{Binding ComboBoxServerName}"
-                                               DisplayMemberPath="Key"
-                                               SelectedItem="{Binding ComboBoxSelectedServerName}"
-                                               SelectedValue="Value"
-                                               helpers:Style_ComboBox.CornerRadius="{DynamicResource WindowCornerRadius}" />        
+                                              ItemsSource="{Binding ComboBoxServerName}"
+                                              DisplayMemberPath="Key"
+                                              SelectedItem="{Binding ComboBoxSelectedServerName}"
+                                              SelectedValue="Value"
+                                              helpers:Style_ComboBox.CornerRadius="{DynamicResource WindowCornerRadius}" />
 
                                     <txt:TextBoxControl Grid.Column="0" Grid.Row="2" Margin="0,10,0,0" FontSize="13" HorizontalContentAlignment="Center" VerticalAlignment="Center" Text="{Binding DotAddress}"
                                                         SelectedColor="{DynamicResource Control.Border.Two.Color}"
@@ -326,24 +327,24 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
 
 
                                     <txt:TextBoxControl Grid.Column="1" Grid.Row="1" FontSize="13" Margin="10,0,0,0" HorizontalContentAlignment="Center" Text="{Binding GroupName}"
-                                       SelectedColor="{DynamicResource Control.Border.Two.Color}"
-                                       BorderBrush="{DynamicResource Control.Border.Color}"
-                                       Foreground="{DynamicResource Font.Content.Foreground}"
-                                       Icon="{DynamicResource GroupName}"
-                                       HintColor="{DynamicResource Control.Border.One.Color}"
-                                       ShowIcon="True"
-                                       Hint="组名"
-                                       CornerRadius="{DynamicResource WindowCornerRadius}" />
+                                                        SelectedColor="{DynamicResource Control.Border.Two.Color}"
+                                                        BorderBrush="{DynamicResource Control.Border.Color}"
+                                                        Foreground="{DynamicResource Font.Content.Foreground}"
+                                                        Icon="{DynamicResource GroupName}"
+                                                        HintColor="{DynamicResource Control.Border.One.Color}"
+                                                        ShowIcon="True"
+                                                        Hint="组名"
+                                                        CornerRadius="{DynamicResource WindowCornerRadius}" />
 
                                     <txt:TextBoxControl Grid.Column="1" Grid.Row="2" Margin="10,10,0,0" FontSize="13" HorizontalContentAlignment="Center" VerticalAlignment="Center" Text="{Binding WriteInData}"
-                                      SelectedColor="{DynamicResource Control.Border.Two.Color}"
-                                      BorderBrush="{DynamicResource Control.Border.Color}"
-                                      Foreground="{DynamicResource Font.Content.Foreground}"
-                                      Icon="{DynamicResource WriteIn}"
-                                      HintColor="{DynamicResource Control.Border.One.Color}"
-                                      ShowIcon="True"
-                                      Hint="写入数据"
-                                      CornerRadius="{DynamicResource WindowCornerRadius}" />
+                                                        SelectedColor="{DynamicResource Control.Border.Two.Color}"
+                                                        BorderBrush="{DynamicResource Control.Border.Color}"
+                                                        Foreground="{DynamicResource Font.Content.Foreground}"
+                                                        Icon="{DynamicResource WriteIn}"
+                                                        HintColor="{DynamicResource Control.Border.One.Color}"
+                                                        ShowIcon="True"
+                                                        Hint="写入数据"
+                                                        CornerRadius="{DynamicResource WindowCornerRadius}" />
                                 </Grid>
                             </Grid>
                         </Grid>
@@ -377,12 +378,12 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                                 <RadioButton ToolTip="显示方式" Margin="0,0,15,0"  Visibility="{Binding AsciiVisibility}" IsChecked="{Binding InfoFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=0}" Style="{StaticResource RadioButtonStyle}" Content="ASCII" VerticalAlignment="Center" HorizontalAlignment="Right" />
                                 <RadioButton ToolTip="显示方式" Margin="0,0,15,0" Visibility="{Binding HexVisibility}" IsChecked="{Binding InfoFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=1}"  Style="{StaticResource RadioButtonStyle}" Content="Hex"  VerticalAlignment="Center" HorizontalAlignment="Right" />
                                 <btn:ButtonControl  Width="80"  Command="{Binding Clear}" HorizontalAlignment="Right" VerticalAlignment="Center"  BorderThickness="1,0,0,0"
-IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-BorderBrush="{DynamicResource Control.Border.Color}"
-IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-Foreground="{DynamicResource Font.Content.Foreground}"
-Icon="{DynamicResource Clear}"
-Content="清空"/>
+                                                   IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                   BorderBrush="{DynamicResource Control.Border.Color}"
+                                                   IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                   Foreground="{DynamicResource Font.Content.Foreground}"
+                                                   Icon="{DynamicResource Clear}"
+                                                   Content="清空"/>
                             </StackPanel>
                             <TextBox Grid.Row="1" Padding="5" Grid.ColumnSpan="2" Style="{DynamicResource TextBoxStyle2}"  FontSize="13" VerticalContentAlignment="Top" HorizontalContentAlignment="Left" TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Visible"  Text="{Binding Info}" >
                                 <i:Interaction.Triggers>
@@ -454,7 +455,7 @@ Content="清空"/>
                             <DataGrid.Columns>
                                 <DataGridTextColumn Header="序号"  Width="50"  Binding="{Binding Index}" />
                                 <DataGridTextColumn Header="地址"  Width="*"  Binding="{Binding Address}" />
-                                <DataGridTextColumn Header="值"  Width="150"  Binding="{Binding Value}" />
+                                <DataGridTextColumn Header="值"  Width="300"  Binding="{Binding Value}" />
                             </DataGrid.Columns>
                         </DataGrid>
                     </GroupBox>

+ 52 - 51
src/YSAI.Tool.Wpf/views/MqttService.xaml

@@ -1,8 +1,8 @@
 <UserControl x:Class="YSAI.Tool.Wpf.views.MqttService"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
-             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
              xmlns:c="clr-namespace:YSAI.Tool.Wpf.controllers"
              xmlns:txt="clr-namespace:YSAI.Core.Wpf.controls.textbox;assembly=YSAI.Core.Wpf"
              xmlns:btn="clr-namespace:YSAI.Core.Wpf.controls.button;assembly=YSAI.Core.Wpf"
@@ -73,30 +73,30 @@
 
                     <!--导入导出-->
                     <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,0,-30" Panel.ZIndex="2">
-                        <btn:ButtonControl  
-                                          Width="80"
-                                          Command="{Binding IncBasics}" 
-                                          HorizontalAlignment="Center" 
-                                          VerticalAlignment="Center" 
-                                          IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                          BorderBrush="{DynamicResource Control.Border.Color}"
-                                          IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                          Foreground="{DynamicResource Font.Content.Foreground}"
-                                          Icon="{DynamicResource Inc}"
-                                          Content="导入"
-                                          BorderThickness="1,0,0,0" />
-                        <btn:ButtonControl  
-                                          Width="80"
-                                          Command="{Binding ExpBasics}" 
-                                          HorizontalAlignment="Center" 
-                                          VerticalAlignment="Center" 
-                                          IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                          BorderBrush="{DynamicResource Control.Border.Color}"
-                                          IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                          Foreground="{DynamicResource Font.Content.Foreground}"
-                                          Icon="{DynamicResource Exp}"
-                                          Content="导出"
-                                          BorderThickness="1,0,0,0" />
+                        <btn:ButtonControl
+                            Width="80"
+                            Command="{Binding IncBasics}"
+                            HorizontalAlignment="Center"
+                            VerticalAlignment="Center"
+                            IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                            BorderBrush="{DynamicResource Control.Border.Color}"
+                            IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                            Foreground="{DynamicResource Font.Content.Foreground}"
+                            Icon="{DynamicResource Inc}"
+                            Content="导入"
+                            BorderThickness="1,0,0,0" />
+                        <btn:ButtonControl
+                            Width="80"
+                            Command="{Binding ExpBasics}"
+                            HorizontalAlignment="Center"
+                            VerticalAlignment="Center"
+                            IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                            BorderBrush="{DynamicResource Control.Border.Color}"
+                            IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                            Foreground="{DynamicResource Font.Content.Foreground}"
+                            Icon="{DynamicResource Exp}"
+                            Content="导出"
+                            BorderThickness="1,0,0,0" />
                     </StackPanel>
                     <!--属性表格-->
                     <Grid Grid.Row="1" Panel.ZIndex="1">
@@ -152,13 +152,14 @@
 
                             </ResourceDictionary>
                         </Grid.Resources>
-                        <pt:PropertyGrid  Margin="1,-4,1,0"
-SelectedObject="{Binding BasicsData}"
-TabVisibility="VisibleIfMoreThanOne" 
-TextBlock.Foreground="{DynamicResource Font.Content.Foreground}" 
-Foreground="{DynamicResource Font.Content.Foreground}"
-BorderBrush="{DynamicResource Control.Border.Color}"
-CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
+                        <pt:PropertyGrid Margin="1,-4,1,0"
+                                         SelectedObject="{Binding BasicsData}"
+                                         TabVisibility="VisibleIfMoreThanOne"
+                                         TextBlock.Foreground="{DynamicResource Font.Content.Foreground}"
+                                         Foreground="{DynamicResource Font.Content.Foreground}"
+                                         BorderBrush="{DynamicResource Control.Border.Color}"
+                                         CategoryHeaderTemplate="{StaticResource HeaderTemplate}"
+                                         EnumAsRadioButtonsLimit="0"/>
                     </Grid>
                 </Grid>
 
@@ -236,20 +237,20 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                             <Grid  Margin="0,-40,0,0">
                                 <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" >
                                     <btn:ButtonControl  Grid.Column="5"  Width="80"   Command="{Binding Start}" HorizontalAlignment="Right" VerticalAlignment="Center" BorderThickness="1,0,0,0"
-                                           IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                           BorderBrush="{DynamicResource Control.Border.Color}"
-                                           IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                           Foreground="{DynamicResource Font.Content.Foreground}"
-                                           Icon="{DynamicResource Start}"
-                                           Content="启动"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource Start}"
+                                                       Content="启动"/>
 
                                     <btn:ButtonControl  Grid.Column="6"  Width="80"  Command="{Binding Stop}" HorizontalAlignment="Right" VerticalAlignment="Center" BorderThickness="1,0,0,0"
-                                           IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                           BorderBrush="{DynamicResource Control.Border.Color}"
-                                           IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                           Foreground="{DynamicResource Font.Content.Foreground}"
-                                           Icon="{DynamicResource Stop}"
-                                           Content="停止"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource Stop}"
+                                                       Content="停止"/>
                                 </StackPanel>
                             </Grid>
                         </Grid>
@@ -286,12 +287,12 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                                 <RadioButton ToolTip="显示方式" Margin="0,0,15,0"  Visibility="{Binding AsciiVisibility}" IsChecked="{Binding InfoFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=0}" Style="{StaticResource RadioButtonStyle}" Content="ASCII" VerticalAlignment="Center" HorizontalAlignment="Right" />
                                 <RadioButton ToolTip="显示方式" Margin="0,0,15,0" Visibility="{Binding HexVisibility}" IsChecked="{Binding InfoFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=1}"  Style="{StaticResource RadioButtonStyle}" Content="Hex"  VerticalAlignment="Center" HorizontalAlignment="Right" />
                                 <btn:ButtonControl  Width="80"  Command="{Binding Clear}" HorizontalAlignment="Right" VerticalAlignment="Center"  BorderThickness="1,0,0,0"
-IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-BorderBrush="{DynamicResource Control.Border.Color}"
-IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-Foreground="{DynamicResource Font.Content.Foreground}"
-Icon="{DynamicResource Clear}"
-Content="清空"/>
+                                                   IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                   BorderBrush="{DynamicResource Control.Border.Color}"
+                                                   IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                   Foreground="{DynamicResource Font.Content.Foreground}"
+                                                   Icon="{DynamicResource Clear}"
+                                                   Content="清空"/>
                             </StackPanel>
                             <TextBox Grid.Row="1" Padding="5" Grid.ColumnSpan="2" Style="{DynamicResource TextBoxStyle2}"  FontSize="13" VerticalContentAlignment="Top" HorizontalContentAlignment="Left" TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Visible"  Text="{Binding Info}" >
                                 <i:Interaction.Triggers>

+ 51 - 50
src/YSAI.Tool.Wpf/views/MqttWsService.xaml

@@ -1,8 +1,8 @@
 <UserControl x:Class="YSAI.Tool.Wpf.views.MqttWsService"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
-             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
              xmlns:local="clr-namespace:YSAI.Tool.Wpf.views"
              xmlns:c="clr-namespace:YSAI.Tool.Wpf.controllers"
              xmlns:txt="clr-namespace:YSAI.Core.Wpf.controls.textbox;assembly=YSAI.Core.Wpf"
@@ -74,30 +74,30 @@
 
                     <!--导入导出-->
                     <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,0,-30" Panel.ZIndex="2">
-                        <btn:ButtonControl  
-                                          Width="80"
-                                          Command="{Binding IncBasics}" 
-                                          HorizontalAlignment="Center" 
-                                          VerticalAlignment="Center" 
-                                          IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                          BorderBrush="{DynamicResource Control.Border.Color}"
-                                          IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                          Foreground="{DynamicResource Font.Content.Foreground}"
-                                          Icon="{DynamicResource Inc}"
-                                          Content="导入"
-                                          BorderThickness="1,0,0,0" />
-                        <btn:ButtonControl  
-                                          Width="80"
-                                          Command="{Binding ExpBasics}" 
-                                          HorizontalAlignment="Center" 
-                                          VerticalAlignment="Center" 
-                                          IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                          BorderBrush="{DynamicResource Control.Border.Color}"
-                                          IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                          Foreground="{DynamicResource Font.Content.Foreground}"
-                                          Icon="{DynamicResource Exp}"
-                                          Content="导出"
-                                          BorderThickness="1,0,0,0" />
+                        <btn:ButtonControl
+                            Width="80"
+                            Command="{Binding IncBasics}"
+                            HorizontalAlignment="Center"
+                            VerticalAlignment="Center"
+                            IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                            BorderBrush="{DynamicResource Control.Border.Color}"
+                            IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                            Foreground="{DynamicResource Font.Content.Foreground}"
+                            Icon="{DynamicResource Inc}"
+                            Content="导入"
+                            BorderThickness="1,0,0,0" />
+                        <btn:ButtonControl
+                            Width="80"
+                            Command="{Binding ExpBasics}"
+                            HorizontalAlignment="Center"
+                            VerticalAlignment="Center"
+                            IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                            BorderBrush="{DynamicResource Control.Border.Color}"
+                            IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                            Foreground="{DynamicResource Font.Content.Foreground}"
+                            Icon="{DynamicResource Exp}"
+                            Content="导出"
+                            BorderThickness="1,0,0,0" />
                     </StackPanel>
                     <!--属性表格-->
                     <Grid Grid.Row="1" Panel.ZIndex="1">
@@ -154,12 +154,13 @@
                             </ResourceDictionary>
                         </Grid.Resources>
                         <pt:PropertyGrid  Margin="1,-4,1,0"
-SelectedObject="{Binding BasicsData}"
-TabVisibility="VisibleIfMoreThanOne" 
-TextBlock.Foreground="{DynamicResource Font.Content.Foreground}" 
-Foreground="{DynamicResource Font.Content.Foreground}"
-BorderBrush="{DynamicResource Control.Border.Color}"
-CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
+                                         SelectedObject="{Binding BasicsData}"
+                                         TabVisibility="VisibleIfMoreThanOne"
+                                         TextBlock.Foreground="{DynamicResource Font.Content.Foreground}"
+                                         Foreground="{DynamicResource Font.Content.Foreground}"
+                                         BorderBrush="{DynamicResource Control.Border.Color}"
+                                         CategoryHeaderTemplate="{StaticResource HeaderTemplate}"
+                                         EnumAsRadioButtonsLimit="0"/>
                     </Grid>
                 </Grid>
 
@@ -237,20 +238,20 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                             <Grid  Margin="0,-40,0,0">
                                 <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" >
                                     <btn:ButtonControl  Grid.Column="5"  Width="80"   Command="{Binding Start}" HorizontalAlignment="Right" VerticalAlignment="Center" BorderThickness="1,0,0,0"
-                                           IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                           BorderBrush="{DynamicResource Control.Border.Color}"
-                                           IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                           Foreground="{DynamicResource Font.Content.Foreground}"
-                                           Icon="{DynamicResource Start}"
-                                           Content="启动"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource Start}"
+                                                       Content="启动"/>
 
                                     <btn:ButtonControl  Grid.Column="6"  Width="80"  Command="{Binding Stop}" HorizontalAlignment="Right" VerticalAlignment="Center" BorderThickness="1,0,0,0"
-                                           IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                           BorderBrush="{DynamicResource Control.Border.Color}"
-                                           IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                           Foreground="{DynamicResource Font.Content.Foreground}"
-                                           Icon="{DynamicResource Stop}"
-                                           Content="停止"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource Stop}"
+                                                       Content="停止"/>
                                 </StackPanel>
                             </Grid>
                         </Grid>
@@ -287,12 +288,12 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                                 <RadioButton ToolTip="显示方式" Margin="0,0,15,0"  Visibility="{Binding AsciiVisibility}" IsChecked="{Binding InfoFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=0}" Style="{StaticResource RadioButtonStyle}" Content="ASCII" VerticalAlignment="Center" HorizontalAlignment="Right" />
                                 <RadioButton ToolTip="显示方式" Margin="0,0,15,0" Visibility="{Binding HexVisibility}" IsChecked="{Binding InfoFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=1}"  Style="{StaticResource RadioButtonStyle}" Content="Hex"  VerticalAlignment="Center" HorizontalAlignment="Right" />
                                 <btn:ButtonControl  Width="80"  Command="{Binding Clear}" HorizontalAlignment="Right" VerticalAlignment="Center"  BorderThickness="1,0,0,0"
-IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-BorderBrush="{DynamicResource Control.Border.Color}"
-IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-Foreground="{DynamicResource Font.Content.Foreground}"
-Icon="{DynamicResource Clear}"
-Content="清空"/>
+                                                   IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                   BorderBrush="{DynamicResource Control.Border.Color}"
+                                                   IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                   Foreground="{DynamicResource Font.Content.Foreground}"
+                                                   Icon="{DynamicResource Clear}"
+                                                   Content="清空"/>
                             </StackPanel>
                             <TextBox Grid.Row="1" Padding="5" Grid.ColumnSpan="2" Style="{DynamicResource TextBoxStyle2}"  FontSize="13" VerticalContentAlignment="Top" HorizontalContentAlignment="Left" TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Visible"  Text="{Binding Info}" >
                                 <i:Interaction.Triggers>

+ 52 - 51
src/YSAI.Tool.Wpf/views/NettyService.xaml

@@ -1,9 +1,9 @@
 <UserControl x:Class="YSAI.Tool.Wpf.views.NettyService"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
-             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
-                          xmlns:c="clr-namespace:YSAI.Tool.Wpf.controllers"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+             xmlns:c="clr-namespace:YSAI.Tool.Wpf.controllers"
              xmlns:txt="clr-namespace:YSAI.Core.Wpf.controls.textbox;assembly=YSAI.Core.Wpf"
              xmlns:btn="clr-namespace:YSAI.Core.Wpf.controls.button;assembly=YSAI.Core.Wpf"
              xmlns:pt="http://propertytools.org/wpf"
@@ -73,30 +73,30 @@
 
                     <!--导入导出-->
                     <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,0,-30" Panel.ZIndex="2">
-                        <btn:ButtonControl  
-                                          Width="80"
-                                          Command="{Binding IncBasics}" 
-                                          HorizontalAlignment="Center" 
-                                          VerticalAlignment="Center" 
-                                          IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                          BorderBrush="{DynamicResource Control.Border.Color}"
-                                          IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                          Foreground="{DynamicResource Font.Content.Foreground}"
-                                          Icon="{DynamicResource Inc}"
-                                          Content="导入"
-                                          BorderThickness="1,0,0,0" />
-                        <btn:ButtonControl  
-                                          Width="80"
-                                          Command="{Binding ExpBasics}" 
-                                          HorizontalAlignment="Center" 
-                                          VerticalAlignment="Center" 
-                                          IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                          BorderBrush="{DynamicResource Control.Border.Color}"
-                                          IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                          Foreground="{DynamicResource Font.Content.Foreground}"
-                                          Icon="{DynamicResource Exp}"
-                                          Content="导出"
-                                          BorderThickness="1,0,0,0" />
+                        <btn:ButtonControl
+                            Width="80"
+                            Command="{Binding IncBasics}"
+                            HorizontalAlignment="Center"
+                            VerticalAlignment="Center"
+                            IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                            BorderBrush="{DynamicResource Control.Border.Color}"
+                            IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                            Foreground="{DynamicResource Font.Content.Foreground}"
+                            Icon="{DynamicResource Inc}"
+                            Content="导入"
+                            BorderThickness="1,0,0,0" />
+                        <btn:ButtonControl
+                            Width="80"
+                            Command="{Binding ExpBasics}"
+                            HorizontalAlignment="Center"
+                            VerticalAlignment="Center"
+                            IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                            BorderBrush="{DynamicResource Control.Border.Color}"
+                            IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                            Foreground="{DynamicResource Font.Content.Foreground}"
+                            Icon="{DynamicResource Exp}"
+                            Content="导出"
+                            BorderThickness="1,0,0,0" />
                     </StackPanel>
                     <!--属性表格-->
                     <Grid Grid.Row="1" Panel.ZIndex="1">
@@ -153,12 +153,13 @@
                             </ResourceDictionary>
                         </Grid.Resources>
                         <pt:PropertyGrid  Margin="1,-4,1,0"
-SelectedObject="{Binding BasicsData}"
-TabVisibility="VisibleIfMoreThanOne" 
-TextBlock.Foreground="{DynamicResource Font.Content.Foreground}" 
-Foreground="{DynamicResource Font.Content.Foreground}"
-BorderBrush="{DynamicResource Control.Border.Color}"
-CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
+                                         SelectedObject="{Binding BasicsData}"
+                                         TabVisibility="VisibleIfMoreThanOne"
+                                         TextBlock.Foreground="{DynamicResource Font.Content.Foreground}"
+                                         Foreground="{DynamicResource Font.Content.Foreground}"
+                                         BorderBrush="{DynamicResource Control.Border.Color}"
+                                         CategoryHeaderTemplate="{StaticResource HeaderTemplate}"
+                                         EnumAsRadioButtonsLimit="0"/>
                     </Grid>
                 </Grid>
 
@@ -236,20 +237,20 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                             <Grid  Margin="0,-40,0,0">
                                 <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" >
                                     <btn:ButtonControl  Grid.Column="5"  Width="80"   Command="{Binding Start}" HorizontalAlignment="Right" VerticalAlignment="Center" BorderThickness="1,0,0,0"
-                                           IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                           BorderBrush="{DynamicResource Control.Border.Color}"
-                                           IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                           Foreground="{DynamicResource Font.Content.Foreground}"
-                                           Icon="{DynamicResource Start}"
-                                           Content="启动"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource Start}"
+                                                       Content="启动"/>
 
                                     <btn:ButtonControl  Grid.Column="6"  Width="80"  Command="{Binding Stop}" HorizontalAlignment="Right" VerticalAlignment="Center" BorderThickness="1,0,0,0"
-                                           IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                           BorderBrush="{DynamicResource Control.Border.Color}"
-                                           IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                           Foreground="{DynamicResource Font.Content.Foreground}"
-                                           Icon="{DynamicResource Stop}"
-                                           Content="停止"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource Stop}"
+                                                       Content="停止"/>
                                 </StackPanel>
                             </Grid>
                         </Grid>
@@ -286,12 +287,12 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                                 <RadioButton ToolTip="显示方式" Margin="0,0,15,0"  Visibility="{Binding AsciiVisibility}" IsChecked="{Binding InfoFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=0}" Style="{StaticResource RadioButtonStyle}" Content="ASCII" VerticalAlignment="Center" HorizontalAlignment="Right" />
                                 <RadioButton ToolTip="显示方式" Margin="0,0,15,0" Visibility="{Binding HexVisibility}" IsChecked="{Binding InfoFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=1}"  Style="{StaticResource RadioButtonStyle}" Content="Hex"  VerticalAlignment="Center" HorizontalAlignment="Right" />
                                 <btn:ButtonControl  Width="80"  Command="{Binding Clear}" HorizontalAlignment="Right" VerticalAlignment="Center"  BorderThickness="1,0,0,0"
-IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-BorderBrush="{DynamicResource Control.Border.Color}"
-IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-Foreground="{DynamicResource Font.Content.Foreground}"
-Icon="{DynamicResource Clear}"
-Content="清空"/>
+                                                   IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                   BorderBrush="{DynamicResource Control.Border.Color}"
+                                                   IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                   Foreground="{DynamicResource Font.Content.Foreground}"
+                                                   Icon="{DynamicResource Clear}"
+                                                   Content="清空"/>
                             </StackPanel>
                             <TextBox Grid.Row="1" Padding="5" Grid.ColumnSpan="2" Style="{DynamicResource TextBoxStyle2}"  FontSize="13" VerticalContentAlignment="Top" HorizontalContentAlignment="Left" TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Visible"  Text="{Binding Info}" >
                                 <i:Interaction.Triggers>

+ 285 - 285
src/YSAI.Tool.Wpf/views/Serial.xaml

@@ -1,24 +1,24 @@
 <UserControl x:Class="YSAI.Tool.Wpf.views.Serial"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
-             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
              xmlns:c="clr-namespace:YSAI.Tool.Wpf.controllers"
              xmlns:cl="clr-namespace:YSAI.Core.Wpf.controls.ledgauge;assembly=YSAI.Core.Wpf"
              xmlns:lang="http://wpflocalizeextension.codeplex.com"
              lang:LocalizeDictionary.DesignCulture="zh"
              lang:ResxLocalizationProvider.DefaultAssembly="YSAI.Langs"
              lang:ResxLocalizationProvider.DefaultDictionary="Lang"
-             
+
              xmlns:btn="clr-namespace:YSAI.Core.Wpf.controls.button;assembly=YSAI.Core.Wpf"
              xmlns:pt="http://propertytools.org/wpf"
              xmlns:helpers="clr-namespace:YSAI.Core.Wpf.style;assembly=YSAI.Core.Wpf"
              xmlns:cs="clr-namespace:YSAI.Core.Wpf.converters;assembly=YSAI.Core.Wpf"
              xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
              xmlns:mvvm="clr-namespace:YSAI.Core.Wpf.mvvm;assembly=YSAI.Core.Wpf"
-             Background="{DynamicResource ContentBackgroundPicture}" 
-             > 
-    
+             Background="{DynamicResource ContentBackgroundPicture}"
+             >
+
     <!--加载控制器-->
     <UserControl.DataContext>
         <c:SerialController />
@@ -79,30 +79,30 @@
 
                     <!--导入导出-->
                     <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,0,-30" Panel.ZIndex="2">
-                        <btn:ButtonControl  
-                                          Width="80"
-                                          Command="{Binding IncBasics}" 
-                                          HorizontalAlignment="Center" 
-                                          VerticalAlignment="Center" 
-                                          IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                          BorderBrush="{DynamicResource Control.Border.Color}"
-                                          IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                          Foreground="{DynamicResource Font.Content.Foreground}"
-                                          Icon="{DynamicResource Inc}"
-                                          Content="导入"
-                                          BorderThickness="1,0,0,0" />
-                        <btn:ButtonControl  
-                                          Width="80"
-                                          Command="{Binding ExpBasics}" 
-                                          HorizontalAlignment="Center" 
-                                          VerticalAlignment="Center" 
-                                          IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                          BorderBrush="{DynamicResource Control.Border.Color}"
-                                          IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                          Foreground="{DynamicResource Font.Content.Foreground}"
-                                          Icon="{DynamicResource Exp}"
-                                          Content="导出"
-                                          BorderThickness="1,0,0,0" />
+                        <btn:ButtonControl
+                            Width="80"
+                            Command="{Binding IncBasics}"
+                            HorizontalAlignment="Center"
+                            VerticalAlignment="Center"
+                            IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                            BorderBrush="{DynamicResource Control.Border.Color}"
+                            IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                            Foreground="{DynamicResource Font.Content.Foreground}"
+                            Icon="{DynamicResource Inc}"
+                            Content="导入"
+                            BorderThickness="1,0,0,0" />
+                        <btn:ButtonControl
+                            Width="80"
+                            Command="{Binding ExpBasics}"
+                            HorizontalAlignment="Center"
+                            VerticalAlignment="Center"
+                            IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                            BorderBrush="{DynamicResource Control.Border.Color}"
+                            IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                            Foreground="{DynamicResource Font.Content.Foreground}"
+                            Icon="{DynamicResource Exp}"
+                            Content="导出"
+                            BorderThickness="1,0,0,0" />
                     </StackPanel>
                     <!--属性表格-->
                     <Grid Grid.Row="1" Panel.ZIndex="1">
@@ -159,12 +159,12 @@
                             </ResourceDictionary>
                         </Grid.Resources>
                         <pt:PropertyGrid  Margin="1,-4,1,0"
-SelectedObject="{Binding BasicsData}"
-TabVisibility="VisibleIfMoreThanOne" 
-TextBlock.Foreground="{DynamicResource Font.Content.Foreground}" 
-Foreground="{DynamicResource Font.Content.Foreground}"
-BorderBrush="{DynamicResource Control.Border.Color}"
-CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
+                                         SelectedObject="{Binding BasicsData}"
+                                         TabVisibility="VisibleIfMoreThanOne"
+                                         TextBlock.Foreground="{DynamicResource Font.Content.Foreground}"
+                                         Foreground="{DynamicResource Font.Content.Foreground}"
+                                         BorderBrush="{DynamicResource Control.Border.Color}"
+                                         CategoryHeaderTemplate="{StaticResource HeaderTemplate}" EnumAsRadioButtonsLimit="0"/>
                     </Grid>
                 </Grid>
 
@@ -240,20 +240,20 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                             <Grid Grid.Row="0" Grid.Column="1"  Margin="0,-40,0,0">
                                 <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" >
                                     <btn:ButtonControl  Grid.Column="5"  Width="80"   Command="{Binding Start}" HorizontalAlignment="Right" VerticalAlignment="Center" BorderThickness="1,0,0,0"
-                                           IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                           BorderBrush="{DynamicResource Control.Border.Color}"
-                                           IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                           Foreground="{DynamicResource Font.Content.Foreground}"
-                                           Icon="{DynamicResource Open}"
-                                           Content="打开"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource Open}"
+                                                       Content="打开"/>
 
                                     <btn:ButtonControl  Grid.Column="6"  Width="80"  Command="{Binding Stop}" HorizontalAlignment="Right" VerticalAlignment="Center" BorderThickness="1,0,0,0"
-                                           IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                           BorderBrush="{DynamicResource Control.Border.Color}"
-                                           IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                           Foreground="{DynamicResource Font.Content.Foreground}"
-                                           Icon="{DynamicResource CloseBase}"
-                                           Content="关闭"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource CloseBase}"
+                                                       Content="关闭"/>
                                 </StackPanel>
                             </Grid>
                             <!--发送区域-->
@@ -266,12 +266,12 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                                     <RadioButton ToolTip="发送方式" Margin="0,0,15,0"  Visibility="{Binding AsciiVisibility}" IsChecked="{Binding DataFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=0}" Style="{StaticResource RadioButtonStyle}" Content="ASCII" VerticalAlignment="Center" HorizontalAlignment="Right" />
                                     <RadioButton ToolTip="发送方式" Margin="0,0,15,0" Visibility="{Binding HexVisibility}" IsChecked="{Binding DataFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=1}"  Style="{StaticResource RadioButtonStyle}" Content="Hex"  VerticalAlignment="Center" HorizontalAlignment="Right" />
                                     <btn:ButtonControl  Grid.Column="3"  Width="80"  Command="{Binding Send}" HorizontalAlignment="Right" VerticalAlignment="Center"  BorderThickness="1,0,0,0"
-                                                            IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                                            BorderBrush="{DynamicResource Control.Border.Color}"
-                                                            IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                                            Foreground="{DynamicResource Font.Content.Foreground}"
-                                                            Icon="{DynamicResource Send}"
-                                                            Content="发送"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource Send}"
+                                                       Content="发送"/>
                                 </StackPanel>
                                 <GroupBox Style="{StaticResource GroupBoxTab}" Grid.Row="1" Grid.ColumnSpan="8" Width="auto" Margin="0,0,0,0">
                                     <GroupBox.Header>
@@ -323,12 +323,12 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                                 <RadioButton ToolTip="显示方式" Margin="0,0,15,0"  Visibility="{Binding AsciiVisibility}" IsChecked="{Binding InfoFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=0}" Style="{StaticResource RadioButtonStyle}" Content="ASCII" VerticalAlignment="Center" HorizontalAlignment="Right" />
                                 <RadioButton ToolTip="显示方式" Margin="0,0,15,0" Visibility="{Binding HexVisibility}" IsChecked="{Binding InfoFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=1}"  Style="{StaticResource RadioButtonStyle}" Content="Hex"  VerticalAlignment="Center" HorizontalAlignment="Right" />
                                 <btn:ButtonControl  Width="80"  Command="{Binding Clear}" HorizontalAlignment="Right" VerticalAlignment="Center"  BorderThickness="1,0,0,0"
-IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-BorderBrush="{DynamicResource Control.Border.Color}"
-IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-Foreground="{DynamicResource Font.Content.Foreground}"
-Icon="{DynamicResource Clear}"
-Content="清空"/>
+                                                   IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                   BorderBrush="{DynamicResource Control.Border.Color}"
+                                                   IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                   Foreground="{DynamicResource Font.Content.Foreground}"
+                                                   Icon="{DynamicResource Clear}"
+                                                   Content="清空"/>
                             </StackPanel>
                             <TextBox Grid.Row="1" Padding="5" Grid.ColumnSpan="2" Style="{DynamicResource TextBoxStyle2}"  FontSize="13" VerticalContentAlignment="Top" HorizontalContentAlignment="Left" TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Visible"  Text="{Binding Info}" >
                                 <i:Interaction.Triggers>
@@ -348,233 +348,233 @@ Content="清空"/>
 
     <!--#region 暂不使用 -->
     <!--<UserControl.Resources>
-        <ResourceDictionary>
-            <cs:CheckConverter x:Key="CheckConverter" />
-            <ResourceDictionary.MergedDictionaries>
-                <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_ComboBox.xaml" />
-                <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_Button.xaml" />
-                <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_DataGrid.xaml" />
-                <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_Border.xaml" />
-                <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_TbaControl.xaml" />
-                <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_ScrollViewer.xaml" />
-                <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_GroupBox.xaml" />
-                <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_TextBox.xaml" />
-                <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_TreeDataGrid.xaml" />
-                <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_CheckBox.xaml" />
-                <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_RadioButton.xaml" />
-            </ResourceDictionary.MergedDictionaries>
-        </ResourceDictionary>
+    <ResourceDictionary>
+    <cs:CheckConverter x:Key="CheckConverter" />
+    <ResourceDictionary.MergedDictionaries>
+    <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_ComboBox.xaml" />
+    <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_Button.xaml" />
+    <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_DataGrid.xaml" />
+    <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_Border.xaml" />
+    <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_TbaControl.xaml" />
+    <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_ScrollViewer.xaml" />
+    <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_GroupBox.xaml" />
+    <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_TextBox.xaml" />
+    <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_TreeDataGrid.xaml" />
+    <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_CheckBox.xaml" />
+    <ResourceDictionary Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_RadioButton.xaml" />
+    </ResourceDictionary.MergedDictionaries>
+    </ResourceDictionary>
     </UserControl.Resources>
     <Grid Height="830" Width="865">
-        <Border  CornerRadius="{DynamicResource WindowCornerRadius}"  Background="{DynamicResource WindowContentBackground}">
-            <Border.Effect>
-                <BlurEffect Radius="0" />
-            </Border.Effect>
-        </Border>
-        <GroupBox Style="{StaticResource GroupBoxTab}" Width="auto">
-            <GroupBox.Header>
-                <StackPanel Orientation="Horizontal">
-                    <Grid Background="transparent">
-                        <Grid.ColumnDefinitions>
-                            <ColumnDefinition Width="auto" />
-                            <ColumnDefinition Width="*" />
-                        </Grid.ColumnDefinitions>
-                        <Image Grid.Column="0" Margin="10,0,8,0" Source="{DynamicResource Communication}" Width="14" />
-                        <TextBlock Text="串口工具" FontSize="13"  Grid.Column="1" Foreground="{DynamicResource Font.Content.Foreground}" />
-                    </Grid>
-                </StackPanel>
-            </GroupBox.Header>
-            <Grid Grid.Row="0" Grid.Column="1">
-                <Grid.RowDefinitions>
-                    <RowDefinition Height="120" />
-                    <RowDefinition Height="260" />
-                    <RowDefinition Height="400" />
-                </Grid.RowDefinitions>
-                --><!--设置区域--><!--
-                <GroupBox Style="{StaticResource GroupBoxStyle}" Grid.Row="0" Grid.Column="0" Margin="5"  Width="835">
-                    <GroupBox.Header>
-                        <Border>
-                            <TextBlock Text="{lang:Loc SetRegion}" Foreground="{DynamicResource Font.Head.Foreground}" />
-                        </Border>
-                    </GroupBox.Header>
-                    --><!--设置区域--><!--
-                    <Grid>
-                        <Grid.RowDefinitions>
-                            <RowDefinition />
-                            <RowDefinition />
-                        </Grid.RowDefinitions>
-                        <Grid.ColumnDefinitions>
-                            <ColumnDefinition Width="auto" />
-                            <ColumnDefinition Width="180" />
-                            <ColumnDefinition Width="*" />
-                            <ColumnDefinition Width="180" />
-                            <ColumnDefinition Width="*" />
-                            <ColumnDefinition Width="180" />
-                        </Grid.ColumnDefinitions>
-
-                        <Label Grid.Row="0" Grid.Column="0" Content="{lang:Loc [Channel]}"  Foreground="{DynamicResource Font.Content.Foreground}" VerticalAlignment="Center" HorizontalAlignment="Right" />
-                        <ComboBox  Grid.Row="0" Grid.Column="1"  Height="30" Style="{StaticResource ComboBoxStyle}" Background="White" VerticalAlignment="Center"  Margin="0,0,10,0"
-                          ItemsSource="{Binding Channel_ComboBoxDataList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
-                          DisplayMemberPath="Key"
-                          SelectedItem="{Binding Channel_SelectedComboBoxData,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
-                          SelectedValue="Value" />
-
-                        <Label Grid.Row="0" Grid.Column="2" Content="{lang:Loc [BaudRate]}"  Foreground="{DynamicResource Font.Content.Foreground}" VerticalAlignment="Center"  HorizontalAlignment="Right" />
-                        <ComboBox Grid.Row="0" Grid.Column="3"  Height="30" Style="{StaticResource ComboBoxStyle}" Background="White" VerticalAlignment="Center" Margin="0,0,10,0"
-                          ItemsSource="{Binding BaudRate_ComboBoxDataList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
-                          DisplayMemberPath="Key"
-                          SelectedItem="{Binding BaudRate_SelectedComboBoxData,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
-                          SelectedValue="Value" />
-
-                        <Label Grid.Row="0" Grid.Column="4" Content="{lang:Loc [ParityBit]}"  Foreground="{DynamicResource Font.Content.Foreground}" VerticalAlignment="Center"  HorizontalAlignment="Right" />
-                        <ComboBox Grid.Row="0" Grid.Column="5"  Height="30" Style="{StaticResource ComboBoxStyle}" Background="White" VerticalAlignment="Center" Margin="0,0,10,0"
-                          ItemsSource="{Binding ParityBit_ComboBoxDataList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
-                          DisplayMemberPath="Key"
-                          SelectedItem="{Binding ParityBit_SelectedComboBoxData,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
-                          SelectedValue="Value" />
-
-                        <Label Grid.Row="1" Grid.Column="0" Content="{lang:Loc [StopBit]}"  Foreground="{DynamicResource Font.Content.Foreground}" VerticalAlignment="Center"  HorizontalAlignment="Right" />
-                        <ComboBox  Grid.Row="1"  Grid.Column="1"  Height="30" Style="{StaticResource ComboBoxStyle}" Background="White" VerticalAlignment="Center" Margin="0,0,10,0"
-                         ItemsSource="{Binding StopBit_ComboBoxDataList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
-                          DisplayMemberPath="Key"
-                          SelectedItem="{Binding StopBit_SelectedComboBoxData,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
-                          SelectedValue="Value" />
-
-                        <Label Grid.Row="1" Grid.Column="2" Content="{lang:Loc [DataBit]}"  Foreground="{DynamicResource Font.Content.Foreground}" VerticalAlignment="Center"  HorizontalAlignment="Right" />
-                        <ComboBox Grid.Row="1" Grid.Column="3"  Height="30" Style="{StaticResource ComboBoxStyle}" Background="White" VerticalAlignment="Center" Margin="0,0,10,0"
-                          ItemsSource="{Binding DataBit_ComboBoxDataList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
-                          DisplayMemberPath="Key"
-                          SelectedItem="{Binding DataBit_SelectedComboBoxData,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
-                          SelectedValue="Value" />
-
-                        <Grid Grid.Row="1" Grid.Column="4" HorizontalAlignment="Right">
-                            <Grid.ColumnDefinitions>
-                                <ColumnDefinition Width="auto" />
-                                <ColumnDefinition Width="auto" />
-                                <ColumnDefinition Width="auto" />
-                            </Grid.ColumnDefinitions>
-                            <Label Grid.Column="0" Content="[ "  Foreground="{DynamicResource Font.Content.Foreground}" VerticalAlignment="Center"  HorizontalAlignment="Right" />
-                            <cl:LedGaugeControl Grid.Column="1" Width="25" IsOn="{Binding LedIsOn}" IsFlashing="{Binding LedIsFlashing}" Color="{Binding LedColor}" HorizontalAlignment="Center" />
-                            <Label Grid.Column="2" Content=" ]"  Foreground="{DynamicResource Font.Content.Foreground}" VerticalAlignment="Center"  HorizontalAlignment="Left" />
-                        </Grid>
-
-                        <Grid Grid.Row="1" Grid.Column="5">
-                            <Grid.ColumnDefinitions>
-                                <ColumnDefinition Width="auto" />
-                                <ColumnDefinition Width="auto" />
-                            </Grid.ColumnDefinitions>
-
-                            <btn:ButtonControl  Grid.Column="0"  Width="80"  Margin="0,0,10,0" Command="{Binding Close}" HorizontalAlignment="Center" VerticalAlignment="Center"
-                                                IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                                BorderBrush="{DynamicResource Control.Border.Color}"
-                                                IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                                Foreground="{DynamicResource Font.Content.Foreground}"
-                                                Icon="{DynamicResource CloseBase}"
-                                                Content="{lang:Loc Close}"
-                                                CornerRadius="{DynamicResource WindowCornerRadius}" />
-
-                            <btn:ButtonControl  Grid.Column="1"  Width="80"  Margin="0,0,10,0" Command="{Binding Open}" HorizontalAlignment="Center" VerticalAlignment="Center"
-                                                IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                                BorderBrush="{DynamicResource Control.Border.Color}"
-                                                IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                                Foreground="{DynamicResource Font.Content.Foreground}"
-                                                Icon="{DynamicResource Open}"
-                                                Content="{lang:Loc Open}"
-                                                CornerRadius="{DynamicResource WindowCornerRadius}" />
-
-
-                        </Grid>
-                    </Grid>
-                </GroupBox>
-                --><!--发送区域--><!--
-                <GroupBox Style="{StaticResource GroupBoxStyle}" Grid.Row="1" Margin="5" Width="835">
-                    <GroupBox.Header>
-                        <Border>
-                            <TextBlock Text="{lang:Loc SendRegion}" Foreground="{DynamicResource Font.Head.Foreground}" />
-                        </Border>
-                    </GroupBox.Header>
-                    <Grid>
-                        <Grid.RowDefinitions>
-                            <RowDefinition Height="45" />
-                            <RowDefinition />
-                        </Grid.RowDefinitions>
-                        <Grid.ColumnDefinitions>
-                            <ColumnDefinition Width="auto" />
-                            <ColumnDefinition  Width="80" />
-                            <ColumnDefinition Width="auto" />
-                            <ColumnDefinition Width="80" />
-                            <ColumnDefinition Width="auto" />
-                            <ColumnDefinition Width="150" />
-                            <ColumnDefinition  Width="*" />
-                            <ColumnDefinition Width="55" />
-                            <ColumnDefinition  Width="55" />
-                            <ColumnDefinition  Width="90" />
-                        </Grid.ColumnDefinitions>
-
-                        <Label Content="{lang:Loc [SendMode]}" Grid.Column="6" Foreground="{DynamicResource Font.Content.Foreground}" VerticalAlignment="Center" HorizontalAlignment="Right"  Margin="0,0,10,0" />
-                        <RadioButton IsChecked="{Binding SendDataFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=0}" Grid.Column="7" Style="{StaticResource RadioButtonStyle}" Content="ASCII" VerticalAlignment="Center" HorizontalAlignment="Center" />
-                        <RadioButton IsChecked="{Binding SendDataFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=1}" Grid.Column="8"  Style="{StaticResource RadioButtonStyle}" Content="Hex"  VerticalAlignment="Center" HorizontalAlignment="Center" />
-
-                        <btn:ButtonControl  Grid.Column="9"  Width="80"  Margin="0,0,10,0" Command="{Binding Send}" HorizontalAlignment="Left" VerticalAlignment="Center"
-                                             IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                             BorderBrush="{DynamicResource Control.Border.Color}"
-                                             IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                             Foreground="{DynamicResource Font.Content.Foreground}"
-                                             Icon="{DynamicResource Send}"
-                                             Content="{lang:Loc Send}"
-                                             CornerRadius="{DynamicResource WindowCornerRadius}" />
-                        <GroupBox Style="{StaticResource GroupBoxStyle}" Grid.Row="1"  Grid.ColumnSpan="10">
-                            <GroupBox.Header>
-                                <Border>
-                                    <TextBlock Text="{lang:Loc DataRegion}" Foreground="{DynamicResource Font.Head.Foreground}" />
-                                </Border>
-                            </GroupBox.Header>
-                            <TextBox Style="{DynamicResource TextBoxStyle2}" VerticalContentAlignment="Top" HorizontalContentAlignment="Left" TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Visible" Margin="5" Text="{Binding SendData,UpdateSourceTrigger=PropertyChanged}" Height="auto" />
-                        </GroupBox>
-                    </Grid>
-                </GroupBox>
-                --><!--接收数据区域--><!--
-                <GroupBox Style="{StaticResource GroupBoxStyle}" Grid.Row="2" Margin="5" Width="835">
-                    <GroupBox.Header>
-                        <Border>
-                            <TextBlock Text="{lang:Loc ReceptionRegion}" Foreground="{DynamicResource Font.Head.Foreground}" />
-                        </Border>
-                    </GroupBox.Header>
-                    <Grid>
-                        <Grid.RowDefinitions>
-                            <RowDefinition Height="45" />
-                            <RowDefinition />
-                        </Grid.RowDefinitions>
-                        <Grid.ColumnDefinitions>
-                            <ColumnDefinition />
-                            <ColumnDefinition Width="55" />
-                            <ColumnDefinition  Width="55" />
-                            <ColumnDefinition  Width="90" />
-                        </Grid.ColumnDefinitions>
-                        <Label Content="{lang:Loc DisplayMode}" Grid.Column="0" Foreground="{DynamicResource Font.Content.Foreground}" VerticalAlignment="Center" HorizontalAlignment="Right"  Margin="0,0,10,0" />
-                        <RadioButton IsChecked="{Binding ReceiveDataFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=0}" Grid.Column="1" Style="{StaticResource RadioButtonStyle}" Content="ASCII" VerticalAlignment="Center" HorizontalAlignment="Center" />
-                        <RadioButton IsChecked="{Binding ReceiveDataFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=1}" Grid.Column="2"  Style="{StaticResource RadioButtonStyle}" Content="Hex"  VerticalAlignment="Center" HorizontalAlignment="Center" />
-
-                        <btn:ButtonControl  Grid.Column="3"  Width="80"  Margin="0,0,10,0" Command="{Binding Empty}" HorizontalAlignment="Left" VerticalAlignment="Center"
-                                             IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                             BorderBrush="{DynamicResource Control.Border.Color}"
-                                             IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                             Foreground="{DynamicResource Font.Content.Foreground}"
-                                             Icon="{DynamicResource Clear}"
-                                             Content="{lang:Loc Empty}"
-                                             CornerRadius="{DynamicResource WindowCornerRadius}" />
-                        <GroupBox Style="{StaticResource GroupBoxStyle}" Grid.Row="1"  Grid.ColumnSpan="7">
-                            <GroupBox.Header>
-                                <Border>
-                                    <TextBlock Text="{lang:Loc DataRegion}" Foreground="{DynamicResource Font.Head.Foreground}" />
-                                </Border>
-                            </GroupBox.Header>
-                            <TextBox Style="{DynamicResource TextBoxStyle2}" VerticalContentAlignment="Top" HorizontalContentAlignment="Left" TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Visible" Margin="5" Text="{Binding ReceiveData,UpdateSourceTrigger=PropertyChanged}" Height="auto" />
-                        </GroupBox>
-                    </Grid>
-                </GroupBox>
-            </Grid>
-        </GroupBox>
+    <Border  CornerRadius="{DynamicResource WindowCornerRadius}"  Background="{DynamicResource WindowContentBackground}">
+    <Border.Effect>
+    <BlurEffect Radius="0" />
+    </Border.Effect>
+    </Border>
+    <GroupBox Style="{StaticResource GroupBoxTab}" Width="auto">
+    <GroupBox.Header>
+    <StackPanel Orientation="Horizontal">
+    <Grid Background="transparent">
+    <Grid.ColumnDefinitions>
+    <ColumnDefinition Width="auto" />
+    <ColumnDefinition Width="*" />
+    </Grid.ColumnDefinitions>
+    <Image Grid.Column="0" Margin="10,0,8,0" Source="{DynamicResource Communication}" Width="14" />
+    <TextBlock Text="串口工具" FontSize="13"  Grid.Column="1" Foreground="{DynamicResource Font.Content.Foreground}" />
+    </Grid>
+    </StackPanel>
+    </GroupBox.Header>
+    <Grid Grid.Row="0" Grid.Column="1">
+    <Grid.RowDefinitions>
+    <RowDefinition Height="120" />
+    <RowDefinition Height="260" />
+    <RowDefinition Height="400" />
+    </Grid.RowDefinitions>
+    --><!--设置区域--><!--
+    <GroupBox Style="{StaticResource GroupBoxStyle}" Grid.Row="0" Grid.Column="0" Margin="5"  Width="835">
+    <GroupBox.Header>
+    <Border>
+    <TextBlock Text="{lang:Loc SetRegion}" Foreground="{DynamicResource Font.Head.Foreground}" />
+    </Border>
+    </GroupBox.Header>
+    --><!--设置区域--><!--
+    <Grid>
+    <Grid.RowDefinitions>
+    <RowDefinition />
+    <RowDefinition />
+    </Grid.RowDefinitions>
+    <Grid.ColumnDefinitions>
+    <ColumnDefinition Width="auto" />
+    <ColumnDefinition Width="180" />
+    <ColumnDefinition Width="*" />
+    <ColumnDefinition Width="180" />
+    <ColumnDefinition Width="*" />
+    <ColumnDefinition Width="180" />
+    </Grid.ColumnDefinitions>
+
+    <Label Grid.Row="0" Grid.Column="0" Content="{lang:Loc [Channel]}"  Foreground="{DynamicResource Font.Content.Foreground}" VerticalAlignment="Center" HorizontalAlignment="Right" />
+    <ComboBox  Grid.Row="0" Grid.Column="1"  Height="30" Style="{StaticResource ComboBoxStyle}" Background="White" VerticalAlignment="Center"  Margin="0,0,10,0"
+    ItemsSource="{Binding Channel_ComboBoxDataList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
+    DisplayMemberPath="Key"
+    SelectedItem="{Binding Channel_SelectedComboBoxData,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
+    SelectedValue="Value" />
+
+    <Label Grid.Row="0" Grid.Column="2" Content="{lang:Loc [BaudRate]}"  Foreground="{DynamicResource Font.Content.Foreground}" VerticalAlignment="Center"  HorizontalAlignment="Right" />
+    <ComboBox Grid.Row="0" Grid.Column="3"  Height="30" Style="{StaticResource ComboBoxStyle}" Background="White" VerticalAlignment="Center" Margin="0,0,10,0"
+    ItemsSource="{Binding BaudRate_ComboBoxDataList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
+    DisplayMemberPath="Key"
+    SelectedItem="{Binding BaudRate_SelectedComboBoxData,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
+    SelectedValue="Value" />
+
+    <Label Grid.Row="0" Grid.Column="4" Content="{lang:Loc [ParityBit]}"  Foreground="{DynamicResource Font.Content.Foreground}" VerticalAlignment="Center"  HorizontalAlignment="Right" />
+    <ComboBox Grid.Row="0" Grid.Column="5"  Height="30" Style="{StaticResource ComboBoxStyle}" Background="White" VerticalAlignment="Center" Margin="0,0,10,0"
+    ItemsSource="{Binding ParityBit_ComboBoxDataList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
+    DisplayMemberPath="Key"
+    SelectedItem="{Binding ParityBit_SelectedComboBoxData,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
+    SelectedValue="Value" />
+
+    <Label Grid.Row="1" Grid.Column="0" Content="{lang:Loc [StopBit]}"  Foreground="{DynamicResource Font.Content.Foreground}" VerticalAlignment="Center"  HorizontalAlignment="Right" />
+    <ComboBox  Grid.Row="1"  Grid.Column="1"  Height="30" Style="{StaticResource ComboBoxStyle}" Background="White" VerticalAlignment="Center" Margin="0,0,10,0"
+    ItemsSource="{Binding StopBit_ComboBoxDataList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
+    DisplayMemberPath="Key"
+    SelectedItem="{Binding StopBit_SelectedComboBoxData,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
+    SelectedValue="Value" />
+
+    <Label Grid.Row="1" Grid.Column="2" Content="{lang:Loc [DataBit]}"  Foreground="{DynamicResource Font.Content.Foreground}" VerticalAlignment="Center"  HorizontalAlignment="Right" />
+    <ComboBox Grid.Row="1" Grid.Column="3"  Height="30" Style="{StaticResource ComboBoxStyle}" Background="White" VerticalAlignment="Center" Margin="0,0,10,0"
+    ItemsSource="{Binding DataBit_ComboBoxDataList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
+    DisplayMemberPath="Key"
+    SelectedItem="{Binding DataBit_SelectedComboBoxData,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
+    SelectedValue="Value" />
+
+    <Grid Grid.Row="1" Grid.Column="4" HorizontalAlignment="Right">
+    <Grid.ColumnDefinitions>
+    <ColumnDefinition Width="auto" />
+    <ColumnDefinition Width="auto" />
+    <ColumnDefinition Width="auto" />
+    </Grid.ColumnDefinitions>
+    <Label Grid.Column="0" Content="[ "  Foreground="{DynamicResource Font.Content.Foreground}" VerticalAlignment="Center"  HorizontalAlignment="Right" />
+    <cl:LedGaugeControl Grid.Column="1" Width="25" IsOn="{Binding LedIsOn}" IsFlashing="{Binding LedIsFlashing}" Color="{Binding LedColor}" HorizontalAlignment="Center" />
+    <Label Grid.Column="2" Content=" ]"  Foreground="{DynamicResource Font.Content.Foreground}" VerticalAlignment="Center"  HorizontalAlignment="Left" />
+    </Grid>
+
+    <Grid Grid.Row="1" Grid.Column="5">
+    <Grid.ColumnDefinitions>
+    <ColumnDefinition Width="auto" />
+    <ColumnDefinition Width="auto" />
+    </Grid.ColumnDefinitions>
+
+    <btn:ButtonControl  Grid.Column="0"  Width="80"  Margin="0,0,10,0" Command="{Binding Close}" HorizontalAlignment="Center" VerticalAlignment="Center"
+    IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+    BorderBrush="{DynamicResource Control.Border.Color}"
+    IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+    Foreground="{DynamicResource Font.Content.Foreground}"
+    Icon="{DynamicResource CloseBase}"
+    Content="{lang:Loc Close}"
+    CornerRadius="{DynamicResource WindowCornerRadius}" />
+
+    <btn:ButtonControl  Grid.Column="1"  Width="80"  Margin="0,0,10,0" Command="{Binding Open}" HorizontalAlignment="Center" VerticalAlignment="Center"
+    IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+    BorderBrush="{DynamicResource Control.Border.Color}"
+    IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+    Foreground="{DynamicResource Font.Content.Foreground}"
+    Icon="{DynamicResource Open}"
+    Content="{lang:Loc Open}"
+    CornerRadius="{DynamicResource WindowCornerRadius}" />
+
+
+    </Grid>
+    </Grid>
+    </GroupBox>
+    --><!--发送区域--><!--
+    <GroupBox Style="{StaticResource GroupBoxStyle}" Grid.Row="1" Margin="5" Width="835">
+    <GroupBox.Header>
+    <Border>
+    <TextBlock Text="{lang:Loc SendRegion}" Foreground="{DynamicResource Font.Head.Foreground}" />
+    </Border>
+    </GroupBox.Header>
+    <Grid>
+    <Grid.RowDefinitions>
+    <RowDefinition Height="45" />
+    <RowDefinition />
+    </Grid.RowDefinitions>
+    <Grid.ColumnDefinitions>
+    <ColumnDefinition Width="auto" />
+    <ColumnDefinition  Width="80" />
+    <ColumnDefinition Width="auto" />
+    <ColumnDefinition Width="80" />
+    <ColumnDefinition Width="auto" />
+    <ColumnDefinition Width="150" />
+    <ColumnDefinition  Width="*" />
+    <ColumnDefinition Width="55" />
+    <ColumnDefinition  Width="55" />
+    <ColumnDefinition  Width="90" />
+    </Grid.ColumnDefinitions>
+
+    <Label Content="{lang:Loc [SendMode]}" Grid.Column="6" Foreground="{DynamicResource Font.Content.Foreground}" VerticalAlignment="Center" HorizontalAlignment="Right"  Margin="0,0,10,0" />
+    <RadioButton IsChecked="{Binding SendDataFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=0}" Grid.Column="7" Style="{StaticResource RadioButtonStyle}" Content="ASCII" VerticalAlignment="Center" HorizontalAlignment="Center" />
+    <RadioButton IsChecked="{Binding SendDataFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=1}" Grid.Column="8"  Style="{StaticResource RadioButtonStyle}" Content="Hex"  VerticalAlignment="Center" HorizontalAlignment="Center" />
+
+    <btn:ButtonControl  Grid.Column="9"  Width="80"  Margin="0,0,10,0" Command="{Binding Send}" HorizontalAlignment="Left" VerticalAlignment="Center"
+    IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+    BorderBrush="{DynamicResource Control.Border.Color}"
+    IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+    Foreground="{DynamicResource Font.Content.Foreground}"
+    Icon="{DynamicResource Send}"
+    Content="{lang:Loc Send}"
+    CornerRadius="{DynamicResource WindowCornerRadius}" />
+    <GroupBox Style="{StaticResource GroupBoxStyle}" Grid.Row="1"  Grid.ColumnSpan="10">
+    <GroupBox.Header>
+    <Border>
+    <TextBlock Text="{lang:Loc DataRegion}" Foreground="{DynamicResource Font.Head.Foreground}" />
+    </Border>
+    </GroupBox.Header>
+    <TextBox Style="{DynamicResource TextBoxStyle2}" VerticalContentAlignment="Top" HorizontalContentAlignment="Left" TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Visible" Margin="5" Text="{Binding SendData,UpdateSourceTrigger=PropertyChanged}" Height="auto" />
+    </GroupBox>
+    </Grid>
+    </GroupBox>
+    --><!--接收数据区域--><!--
+    <GroupBox Style="{StaticResource GroupBoxStyle}" Grid.Row="2" Margin="5" Width="835">
+    <GroupBox.Header>
+    <Border>
+    <TextBlock Text="{lang:Loc ReceptionRegion}" Foreground="{DynamicResource Font.Head.Foreground}" />
+    </Border>
+    </GroupBox.Header>
+    <Grid>
+    <Grid.RowDefinitions>
+    <RowDefinition Height="45" />
+    <RowDefinition />
+    </Grid.RowDefinitions>
+    <Grid.ColumnDefinitions>
+    <ColumnDefinition />
+    <ColumnDefinition Width="55" />
+    <ColumnDefinition  Width="55" />
+    <ColumnDefinition  Width="90" />
+    </Grid.ColumnDefinitions>
+    <Label Content="{lang:Loc DisplayMode}" Grid.Column="0" Foreground="{DynamicResource Font.Content.Foreground}" VerticalAlignment="Center" HorizontalAlignment="Right"  Margin="0,0,10,0" />
+    <RadioButton IsChecked="{Binding ReceiveDataFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=0}" Grid.Column="1" Style="{StaticResource RadioButtonStyle}" Content="ASCII" VerticalAlignment="Center" HorizontalAlignment="Center" />
+    <RadioButton IsChecked="{Binding ReceiveDataFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=1}" Grid.Column="2"  Style="{StaticResource RadioButtonStyle}" Content="Hex"  VerticalAlignment="Center" HorizontalAlignment="Center" />
+
+    <btn:ButtonControl  Grid.Column="3"  Width="80"  Margin="0,0,10,0" Command="{Binding Empty}" HorizontalAlignment="Left" VerticalAlignment="Center"
+    IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+    BorderBrush="{DynamicResource Control.Border.Color}"
+    IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+    Foreground="{DynamicResource Font.Content.Foreground}"
+    Icon="{DynamicResource Clear}"
+    Content="{lang:Loc Empty}"
+    CornerRadius="{DynamicResource WindowCornerRadius}" />
+    <GroupBox Style="{StaticResource GroupBoxStyle}" Grid.Row="1"  Grid.ColumnSpan="7">
+    <GroupBox.Header>
+    <Border>
+    <TextBlock Text="{lang:Loc DataRegion}" Foreground="{DynamicResource Font.Head.Foreground}" />
+    </Border>
+    </GroupBox.Header>
+    <TextBox Style="{DynamicResource TextBoxStyle2}" VerticalContentAlignment="Top" HorizontalContentAlignment="Left" TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Visible" Margin="5" Text="{Binding ReceiveData,UpdateSourceTrigger=PropertyChanged}" Height="auto" />
+    </GroupBox>
+    </Grid>
+    </GroupBox>
+    </Grid>
+    </GroupBox>
     </Grid>-->
     <!--#endregion-->
 </UserControl>

+ 68 - 68
src/YSAI.Tool.Wpf/views/TcpClient.xaml

@@ -1,22 +1,22 @@
 <UserControl x:Class="YSAI.Tool.Wpf.views.TcpClient"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
-             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
              xmlns:local="clr-namespace:YSAI.Tool.Wpf.views"
              xmlns:lang="http://wpflocalizeextension.codeplex.com"
-            lang:LocalizeDictionary.DesignCulture="zh"
-            lang:ResxLocalizationProvider.DefaultAssembly="YSAI.Langs"
-            lang:ResxLocalizationProvider.DefaultDictionary="Lang"
-             
-            xmlns:c="clr-namespace:YSAI.Tool.Wpf.controllers"
-            xmlns:btn="clr-namespace:YSAI.Core.Wpf.controls.button;assembly=YSAI.Core.Wpf"
-            xmlns:pt="http://propertytools.org/wpf"
-            xmlns:helpers="clr-namespace:YSAI.Core.Wpf.style;assembly=YSAI.Core.Wpf"
-            xmlns:cs="clr-namespace:YSAI.Core.Wpf.converters;assembly=YSAI.Core.Wpf"
-            xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
-            xmlns:mvvm="clr-namespace:YSAI.Core.Wpf.mvvm;assembly=YSAI.Core.Wpf"
-            Background="{DynamicResource ContentBackgroundPicture}">    
+             lang:LocalizeDictionary.DesignCulture="zh"
+             lang:ResxLocalizationProvider.DefaultAssembly="YSAI.Langs"
+             lang:ResxLocalizationProvider.DefaultDictionary="Lang"
+
+             xmlns:c="clr-namespace:YSAI.Tool.Wpf.controllers"
+             xmlns:btn="clr-namespace:YSAI.Core.Wpf.controls.button;assembly=YSAI.Core.Wpf"
+             xmlns:pt="http://propertytools.org/wpf"
+             xmlns:helpers="clr-namespace:YSAI.Core.Wpf.style;assembly=YSAI.Core.Wpf"
+             xmlns:cs="clr-namespace:YSAI.Core.Wpf.converters;assembly=YSAI.Core.Wpf"
+             xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
+             xmlns:mvvm="clr-namespace:YSAI.Core.Wpf.mvvm;assembly=YSAI.Core.Wpf"
+             Background="{DynamicResource ContentBackgroundPicture}">
     <UserControl.DataContext>
         <c:TcpClientController />
     </UserControl.DataContext>
@@ -77,30 +77,30 @@
 
                     <!--导入导出-->
                     <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,0,-30" Panel.ZIndex="2">
-                        <btn:ButtonControl  
-                                          Width="80"
-                                          Command="{Binding IncBasics}" 
-                                          HorizontalAlignment="Center" 
-                                          VerticalAlignment="Center" 
-                                          IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                          BorderBrush="{DynamicResource Control.Border.Color}"
-                                          IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                          Foreground="{DynamicResource Font.Content.Foreground}"
-                                          Icon="{DynamicResource Inc}"
-                                          Content="导入"
-                                          BorderThickness="1,0,0,0" />
-                        <btn:ButtonControl  
-                                          Width="80"
-                                          Command="{Binding ExpBasics}" 
-                                          HorizontalAlignment="Center" 
-                                          VerticalAlignment="Center" 
-                                          IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                          BorderBrush="{DynamicResource Control.Border.Color}"
-                                          IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                          Foreground="{DynamicResource Font.Content.Foreground}"
-                                          Icon="{DynamicResource Exp}"
-                                          Content="导出"
-                                          BorderThickness="1,0,0,0" />
+                        <btn:ButtonControl
+                            Width="80"
+                            Command="{Binding IncBasics}"
+                            HorizontalAlignment="Center"
+                            VerticalAlignment="Center"
+                            IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                            BorderBrush="{DynamicResource Control.Border.Color}"
+                            IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                            Foreground="{DynamicResource Font.Content.Foreground}"
+                            Icon="{DynamicResource Inc}"
+                            Content="导入"
+                            BorderThickness="1,0,0,0" />
+                        <btn:ButtonControl
+                            Width="80"
+                            Command="{Binding ExpBasics}"
+                            HorizontalAlignment="Center"
+                            VerticalAlignment="Center"
+                            IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                            BorderBrush="{DynamicResource Control.Border.Color}"
+                            IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                            Foreground="{DynamicResource Font.Content.Foreground}"
+                            Icon="{DynamicResource Exp}"
+                            Content="导出"
+                            BorderThickness="1,0,0,0" />
                     </StackPanel>
                     <!--属性表格-->
                     <Grid Grid.Row="1" Panel.ZIndex="1">
@@ -157,12 +157,12 @@
                             </ResourceDictionary>
                         </Grid.Resources>
                         <pt:PropertyGrid  Margin="1,-4,1,0"
-SelectedObject="{Binding BasicsData}"
-TabVisibility="VisibleIfMoreThanOne" 
-TextBlock.Foreground="{DynamicResource Font.Content.Foreground}" 
-Foreground="{DynamicResource Font.Content.Foreground}"
-BorderBrush="{DynamicResource Control.Border.Color}"
-CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
+                                         SelectedObject="{Binding BasicsData}"
+                                         TabVisibility="VisibleIfMoreThanOne"
+                                         TextBlock.Foreground="{DynamicResource Font.Content.Foreground}"
+                                         Foreground="{DynamicResource Font.Content.Foreground}"
+                                         BorderBrush="{DynamicResource Control.Border.Color}"
+                                         CategoryHeaderTemplate="{StaticResource HeaderTemplate}" EnumAsRadioButtonsLimit="0"/>
                     </Grid>
                 </Grid>
 
@@ -238,20 +238,20 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                             <Grid Grid.Row="0" Grid.Column="1"  Margin="0,-40,0,0">
                                 <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" >
                                     <btn:ButtonControl  Grid.Column="5"  Width="80"   Command="{Binding Start}" HorizontalAlignment="Right" VerticalAlignment="Center" BorderThickness="1,0,0,0"
-                                           IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                           BorderBrush="{DynamicResource Control.Border.Color}"
-                                           IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                           Foreground="{DynamicResource Font.Content.Foreground}"
-                                           Icon="{DynamicResource Open}"
-                                           Content="打开"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource Open}"
+                                                       Content="打开"/>
 
                                     <btn:ButtonControl  Grid.Column="6"  Width="80"  Command="{Binding Stop}" HorizontalAlignment="Right" VerticalAlignment="Center" BorderThickness="1,0,0,0"
-                                           IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                           BorderBrush="{DynamicResource Control.Border.Color}"
-                                           IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                           Foreground="{DynamicResource Font.Content.Foreground}"
-                                           Icon="{DynamicResource CloseBase}"
-                                           Content="关闭"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource CloseBase}"
+                                                       Content="关闭"/>
                                 </StackPanel>
                             </Grid>
                             <!--发送区域-->
@@ -264,12 +264,12 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                                     <RadioButton ToolTip="发送方式" Margin="0,0,15,0"  Visibility="{Binding AsciiVisibility}" IsChecked="{Binding DataFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=0}" Style="{StaticResource RadioButtonStyle}" Content="ASCII" VerticalAlignment="Center" HorizontalAlignment="Right" />
                                     <RadioButton ToolTip="发送方式" Margin="0,0,15,0" Visibility="{Binding HexVisibility}" IsChecked="{Binding DataFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=1}"  Style="{StaticResource RadioButtonStyle}" Content="Hex"  VerticalAlignment="Center" HorizontalAlignment="Right" />
                                     <btn:ButtonControl  Grid.Column="3"  Width="80"  Command="{Binding Send}" HorizontalAlignment="Right" VerticalAlignment="Center"  BorderThickness="1,0,0,0"
-                                                            IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                                            BorderBrush="{DynamicResource Control.Border.Color}"
-                                                            IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                                            Foreground="{DynamicResource Font.Content.Foreground}"
-                                                            Icon="{DynamicResource Send}"
-                                                            Content="发送"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource Send}"
+                                                       Content="发送"/>
                                 </StackPanel>
                                 <GroupBox Style="{StaticResource GroupBoxTab}" Grid.Row="1" Grid.ColumnSpan="8" Width="auto" Margin="0,0,0,0">
                                     <GroupBox.Header>
@@ -321,12 +321,12 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                                 <RadioButton ToolTip="显示方式" Margin="0,0,15,0"  Visibility="{Binding AsciiVisibility}" IsChecked="{Binding InfoFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=0}" Style="{StaticResource RadioButtonStyle}" Content="ASCII" VerticalAlignment="Center" HorizontalAlignment="Right" />
                                 <RadioButton ToolTip="显示方式" Margin="0,0,15,0" Visibility="{Binding HexVisibility}" IsChecked="{Binding InfoFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=1}"  Style="{StaticResource RadioButtonStyle}" Content="Hex"  VerticalAlignment="Center" HorizontalAlignment="Right" />
                                 <btn:ButtonControl  Width="80"  Command="{Binding Clear}" HorizontalAlignment="Right" VerticalAlignment="Center"  BorderThickness="1,0,0,0"
-IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-BorderBrush="{DynamicResource Control.Border.Color}"
-IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-Foreground="{DynamicResource Font.Content.Foreground}"
-Icon="{DynamicResource Clear}"
-Content="清空"/>
+                                                   IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                   BorderBrush="{DynamicResource Control.Border.Color}"
+                                                   IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                   Foreground="{DynamicResource Font.Content.Foreground}"
+                                                   Icon="{DynamicResource Clear}"
+                                                   Content="清空"/>
                             </StackPanel>
                             <TextBox Grid.Row="1" Padding="5" Grid.ColumnSpan="2" Style="{DynamicResource TextBoxStyle2}"  FontSize="13" VerticalContentAlignment="Top" HorizontalContentAlignment="Left" TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Visible"  Text="{Binding Info}" >
                                 <i:Interaction.Triggers>

+ 61 - 61
src/YSAI.Tool.Wpf/views/TcpService.xaml

@@ -1,15 +1,15 @@
 <UserControl x:Class="YSAI.Tool.Wpf.views.TcpService"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
-             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
              xmlns:local="clr-namespace:YSAI.Tool.Wpf.views"
              xmlns:lang="http://wpflocalizeextension.codeplex.com"
-            lang:LocalizeDictionary.DesignCulture="zh"
-            lang:ResxLocalizationProvider.DefaultAssembly="YSAI.Langs"
-            lang:ResxLocalizationProvider.DefaultDictionary="Lang"
-             
-              xmlns:c="clr-namespace:YSAI.Tool.Wpf.controllers"
+             lang:LocalizeDictionary.DesignCulture="zh"
+             lang:ResxLocalizationProvider.DefaultAssembly="YSAI.Langs"
+             lang:ResxLocalizationProvider.DefaultDictionary="Lang"
+
+             xmlns:c="clr-namespace:YSAI.Tool.Wpf.controllers"
              xmlns:txt="clr-namespace:YSAI.Core.Wpf.controls.textbox;assembly=YSAI.Core.Wpf"
              xmlns:btn="clr-namespace:YSAI.Core.Wpf.controls.button;assembly=YSAI.Core.Wpf"
              xmlns:pt="http://propertytools.org/wpf"
@@ -77,30 +77,30 @@
 
                     <!--导入导出-->
                     <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,0,-30" Panel.ZIndex="2">
-                        <btn:ButtonControl  
-                                          Width="80"
-                                          Command="{Binding IncBasics}" 
-                                          HorizontalAlignment="Center" 
-                                          VerticalAlignment="Center" 
-                                          IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                          BorderBrush="{DynamicResource Control.Border.Color}"
-                                          IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                          Foreground="{DynamicResource Font.Content.Foreground}"
-                                          Icon="{DynamicResource Inc}"
-                                          Content="导入"
-                                          BorderThickness="1,0,0,0" />
-                        <btn:ButtonControl  
-                                          Width="80"
-                                          Command="{Binding ExpBasics}" 
-                                          HorizontalAlignment="Center" 
-                                          VerticalAlignment="Center" 
-                                          IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                          BorderBrush="{DynamicResource Control.Border.Color}"
-                                          IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                          Foreground="{DynamicResource Font.Content.Foreground}"
-                                          Icon="{DynamicResource Exp}"
-                                          Content="导出"
-                                          BorderThickness="1,0,0,0" />
+                        <btn:ButtonControl
+                            Width="80"
+                            Command="{Binding IncBasics}"
+                            HorizontalAlignment="Center"
+                            VerticalAlignment="Center"
+                            IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                            BorderBrush="{DynamicResource Control.Border.Color}"
+                            IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                            Foreground="{DynamicResource Font.Content.Foreground}"
+                            Icon="{DynamicResource Inc}"
+                            Content="导入"
+                            BorderThickness="1,0,0,0" />
+                        <btn:ButtonControl
+                            Width="80"
+                            Command="{Binding ExpBasics}"
+                            HorizontalAlignment="Center"
+                            VerticalAlignment="Center"
+                            IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                            BorderBrush="{DynamicResource Control.Border.Color}"
+                            IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                            Foreground="{DynamicResource Font.Content.Foreground}"
+                            Icon="{DynamicResource Exp}"
+                            Content="导出"
+                            BorderThickness="1,0,0,0" />
                     </StackPanel>
                     <!--属性表格-->
                     <Grid Grid.Row="1" Panel.ZIndex="1">
@@ -157,12 +157,12 @@
                             </ResourceDictionary>
                         </Grid.Resources>
                         <pt:PropertyGrid  Margin="1,-4,1,0"
-SelectedObject="{Binding BasicsData}"
-TabVisibility="VisibleIfMoreThanOne" 
-TextBlock.Foreground="{DynamicResource Font.Content.Foreground}" 
-Foreground="{DynamicResource Font.Content.Foreground}"
-BorderBrush="{DynamicResource Control.Border.Color}"
-CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
+                                         SelectedObject="{Binding BasicsData}"
+                                         TabVisibility="VisibleIfMoreThanOne"
+                                         TextBlock.Foreground="{DynamicResource Font.Content.Foreground}"
+                                         Foreground="{DynamicResource Font.Content.Foreground}"
+                                         BorderBrush="{DynamicResource Control.Border.Color}"
+                                         CategoryHeaderTemplate="{StaticResource HeaderTemplate}" EnumAsRadioButtonsLimit="0"/>
                     </Grid>
                 </Grid>
 
@@ -242,20 +242,20 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                             <Grid Grid.Row="0" Grid.Column="1"  Margin="0,-40,0,0">
                                 <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" >
                                     <btn:ButtonControl  Grid.Column="5"  Width="80"   Command="{Binding Start}" HorizontalAlignment="Right" VerticalAlignment="Center" BorderThickness="1,0,0,0"
-                                           IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                           BorderBrush="{DynamicResource Control.Border.Color}"
-                                           IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                           Foreground="{DynamicResource Font.Content.Foreground}"
-                                           Icon="{DynamicResource Start}"
-                                           Content="启动"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource Start}"
+                                                       Content="启动"/>
 
                                     <btn:ButtonControl  Grid.Column="6"  Width="80"  Command="{Binding Stop}" HorizontalAlignment="Right" VerticalAlignment="Center" BorderThickness="1,0,0,0"
-                                           IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                           BorderBrush="{DynamicResource Control.Border.Color}"
-                                           IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                           Foreground="{DynamicResource Font.Content.Foreground}"
-                                           Icon="{DynamicResource Stop}"
-                                           Content="停止"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource Stop}"
+                                                       Content="停止"/>
                                 </StackPanel>
                             </Grid>
                             <!--发送区域-->
@@ -269,12 +269,12 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                                     <RadioButton ToolTip="发送方式" Margin="0,0,15,0"  Visibility="{Binding AsciiVisibility}" IsChecked="{Binding DataFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=0}" Style="{StaticResource RadioButtonStyle}" Content="ASCII" VerticalAlignment="Center" HorizontalAlignment="Right" />
                                     <RadioButton ToolTip="发送方式" Margin="0,0,15,0" Visibility="{Binding HexVisibility}" IsChecked="{Binding DataFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=1}"  Style="{StaticResource RadioButtonStyle}" Content="Hex"  VerticalAlignment="Center" HorizontalAlignment="Right" />
                                     <btn:ButtonControl  Grid.Column="3"  Width="80"  Command="{Binding Send}" HorizontalAlignment="Right" VerticalAlignment="Center"  BorderThickness="1,0,0,0"
-                                                            IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                                            BorderBrush="{DynamicResource Control.Border.Color}"
-                                                            IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                                            Foreground="{DynamicResource Font.Content.Foreground}"
-                                                            Icon="{DynamicResource Send}"
-                                                            Content="发送"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource Send}"
+                                                       Content="发送"/>
                                 </StackPanel>
                                 <GroupBox Style="{StaticResource GroupBoxTab}" Grid.Row="1" Grid.ColumnSpan="8" Width="auto" Margin="4,0,0,0">
                                     <GroupBox.Header>
@@ -355,12 +355,12 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                                 <RadioButton ToolTip="显示方式" Margin="0,0,15,0"  Visibility="{Binding AsciiVisibility}" IsChecked="{Binding InfoFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=0}" Style="{StaticResource RadioButtonStyle}" Content="ASCII" VerticalAlignment="Center" HorizontalAlignment="Right" />
                                 <RadioButton ToolTip="显示方式" Margin="0,0,15,0" Visibility="{Binding HexVisibility}" IsChecked="{Binding InfoFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=1}"  Style="{StaticResource RadioButtonStyle}" Content="Hex"  VerticalAlignment="Center" HorizontalAlignment="Right" />
                                 <btn:ButtonControl  Width="80"  Command="{Binding Clear}" HorizontalAlignment="Right" VerticalAlignment="Center"  BorderThickness="1,0,0,0"
-IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-BorderBrush="{DynamicResource Control.Border.Color}"
-IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-Foreground="{DynamicResource Font.Content.Foreground}"
-Icon="{DynamicResource Clear}"
-Content="清空"/>
+                                                   IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                   BorderBrush="{DynamicResource Control.Border.Color}"
+                                                   IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                   Foreground="{DynamicResource Font.Content.Foreground}"
+                                                   Icon="{DynamicResource Clear}"
+                                                   Content="清空"/>
                             </StackPanel>
                             <TextBox Grid.Row="1" Padding="5" Grid.ColumnSpan="2" Style="{DynamicResource TextBoxStyle2}"  FontSize="13" VerticalContentAlignment="Top" HorizontalContentAlignment="Left" TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Visible"  Text="{Binding Info}" >
                                 <i:Interaction.Triggers>

+ 94 - 94
src/YSAI.Tool.Wpf/views/UaClient.xaml

@@ -1,11 +1,11 @@
 <UserControl x:Class="YSAI.Tool.Wpf.views.UaClient"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
-             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
              xmlns:local="clr-namespace:YSAI.Tool.Wpf.views"
              xmlns:NodeStructuralBody="clr-namespace:YSAI.Tool.Wpf.data"
-             
+
              xmlns:c="clr-namespace:YSAI.Tool.Wpf.controllers"
              xmlns:txt="clr-namespace:YSAI.Core.Wpf.controls.textbox;assembly=YSAI.Core.Wpf"
              xmlns:btn="clr-namespace:YSAI.Core.Wpf.controls.button;assembly=YSAI.Core.Wpf"
@@ -105,7 +105,7 @@
                         </EventTrigger>
                     </ToggleButton.Triggers>
                 </ToggleButton>
-                
+
                 <!--基础数据-->
                 <Grid Grid.Column="0"  x:Name="propertyGrid" Margin="0,0,3,0" Width="550">
                     <Grid.RowDefinitions>
@@ -115,30 +115,30 @@
 
                     <!--导入导出-->
                     <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,0,-30" Panel.ZIndex="2">
-                        <btn:ButtonControl  
-                                          Width="80"
-                                          Command="{Binding IncBasics}" 
-                                          HorizontalAlignment="Center" 
-                                          VerticalAlignment="Center" 
-                                          IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                          BorderBrush="{DynamicResource Control.Border.Color}"
-                                          IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                          Foreground="{DynamicResource Font.Content.Foreground}"
-                                          Icon="{DynamicResource Inc}"
-                                          Content="导入"
-                                          BorderThickness="1,0,0,0" />
-                        <btn:ButtonControl  
-                                          Width="80"
-                                          Command="{Binding ExpBasics}" 
-                                          HorizontalAlignment="Center" 
-                                          VerticalAlignment="Center" 
-                                          IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                          BorderBrush="{DynamicResource Control.Border.Color}"
-                                          IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                          Foreground="{DynamicResource Font.Content.Foreground}"
-                                          Icon="{DynamicResource Exp}"
-                                          Content="导出"
-                                          BorderThickness="1,0,0,0" />
+                        <btn:ButtonControl
+                            Width="80"
+                            Command="{Binding IncBasics}"
+                            HorizontalAlignment="Center"
+                            VerticalAlignment="Center"
+                            IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                            BorderBrush="{DynamicResource Control.Border.Color}"
+                            IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                            Foreground="{DynamicResource Font.Content.Foreground}"
+                            Icon="{DynamicResource Inc}"
+                            Content="导入"
+                            BorderThickness="1,0,0,0" />
+                        <btn:ButtonControl
+                            Width="80"
+                            Command="{Binding ExpBasics}"
+                            HorizontalAlignment="Center"
+                            VerticalAlignment="Center"
+                            IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                            BorderBrush="{DynamicResource Control.Border.Color}"
+                            IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                            Foreground="{DynamicResource Font.Content.Foreground}"
+                            Icon="{DynamicResource Exp}"
+                            Content="导出"
+                            BorderThickness="1,0,0,0" />
                     </StackPanel>
                     <!--属性表格-->
                     <Grid Grid.Row="1" Panel.ZIndex="1">
@@ -195,12 +195,12 @@
                             </ResourceDictionary>
                         </Grid.Resources>
                         <pt:PropertyGrid  Margin="1,-4,1,0"
-SelectedObject="{Binding BasicsData}"
-TabVisibility="VisibleIfMoreThanOne" 
-TextBlock.Foreground="{DynamicResource Font.Content.Foreground}" 
-Foreground="{DynamicResource Font.Content.Foreground}"
-BorderBrush="{DynamicResource Control.Border.Color}"
-CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
+                                         SelectedObject="{Binding BasicsData}"
+                                         TabVisibility="VisibleIfMoreThanOne"
+                                         TextBlock.Foreground="{DynamicResource Font.Content.Foreground}"
+                                         Foreground="{DynamicResource Font.Content.Foreground}"
+                                         BorderBrush="{DynamicResource Control.Border.Color}"
+                                         CategoryHeaderTemplate="{StaticResource HeaderTemplate}" EnumAsRadioButtonsLimit="0"/>
                     </Grid>
                 </Grid>
 
@@ -210,7 +210,7 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                         <RowDefinition Height="auto"/>
                         <RowDefinition Height="*"/>
                     </Grid.RowDefinitions>
-                    
+
                     <ToggleButton Grid.Row="0" Grid.RowSpan="2" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="8,8,0,0" ToolTip="基础数据[隐藏/显示]" Panel.ZIndex="3" IsChecked="{Binding BasicsData_ToggleButtonIsChecked}">
                         <ToggleButton.Template>
                             <ControlTemplate TargetType="{x:Type ToggleButton}">
@@ -247,7 +247,7 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                             </EventTrigger>
                         </ToggleButton.Triggers>
                     </ToggleButton>
-                    
+
                     <!--功能模块-->
                     <GroupBox Style="{StaticResource GroupBoxTab}" Margin="0" Grid.Row="0">
                         <GroupBox.Header>
@@ -273,20 +273,20 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                             <Grid Grid.Row="0" Grid.Column="1"  Margin="0,-40,0,0">
                                 <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" >
                                     <btn:ButtonControl  Grid.Column="5"  Width="80"   Command="{Binding Start}" HorizontalAlignment="Right" VerticalAlignment="Center" BorderThickness="1,0,0,0"
-                                                        IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                                        BorderBrush="{DynamicResource Control.Border.Color}"
-                                                        IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                                        Foreground="{DynamicResource Font.Content.Foreground}"
-                                                        Icon="{DynamicResource ConnectBase}"
-                                                        Content="连接"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource ConnectBase}"
+                                                       Content="连接"/>
 
                                     <btn:ButtonControl  Grid.Column="6"  Width="80"  Command="{Binding Stop}" HorizontalAlignment="Right" VerticalAlignment="Center" BorderThickness="1,0,0,0"
-                                                        IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                                        BorderBrush="{DynamicResource Control.Border.Color}"
-                                                        IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                                        Foreground="{DynamicResource Font.Content.Foreground}"
-                                                        Icon="{DynamicResource OffConnect}"
-                                                        Content="断开"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource OffConnect}"
+                                                       Content="断开"/>
                                 </StackPanel>
                             </Grid>
                             <!--发送区域-->
@@ -333,56 +333,56 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                                     </GroupBox>
 
                                     <txt:TextBoxControl Grid.Column="0" Grid.Row="1" FontSize="13" HorizontalContentAlignment="Center" Text="{Binding DotAddress}"
-                                                              SelectedColor="{DynamicResource Control.Border.Two.Color}"
-                                                              BorderBrush="{DynamicResource Control.Border.Color}"
-                                                              Foreground="{DynamicResource Font.Content.Foreground}"
-                                                              Icon="{DynamicResource Dot}"
-                                                              HintColor="{DynamicResource Control.Border.One.Color}"
-                                                              ShowIcon="True"
-                                                              Hint="节点地址"
-                                                              CornerRadius="{DynamicResource WindowCornerRadius}" />
+                                                        SelectedColor="{DynamicResource Control.Border.Two.Color}"
+                                                        BorderBrush="{DynamicResource Control.Border.Color}"
+                                                        Foreground="{DynamicResource Font.Content.Foreground}"
+                                                        Icon="{DynamicResource Dot}"
+                                                        HintColor="{DynamicResource Control.Border.One.Color}"
+                                                        ShowIcon="True"
+                                                        Hint="节点地址"
+                                                        CornerRadius="{DynamicResource WindowCornerRadius}" />
 
                                     <txt:TextBoxControl Grid.Column="0" Grid.Row="2" Margin="0,10,0,0" FontSize="13" HorizontalContentAlignment="Center" VerticalAlignment="Center" Text="{Binding WriteInData}"
-                                                             SelectedColor="{DynamicResource Control.Border.Two.Color}"
-                                                             BorderBrush="{DynamicResource Control.Border.Color}"
-                                                             Foreground="{DynamicResource Font.Content.Foreground}"
-                                                             Icon="{DynamicResource WriteIn}"
-                                                             HintColor="{DynamicResource Control.Border.One.Color}"
-                                                             ShowIcon="True"
-                                                             Hint="写入数据"
-                                                             CornerRadius="{DynamicResource WindowCornerRadius}" />
+                                                        SelectedColor="{DynamicResource Control.Border.Two.Color}"
+                                                        BorderBrush="{DynamicResource Control.Border.Color}"
+                                                        Foreground="{DynamicResource Font.Content.Foreground}"
+                                                        Icon="{DynamicResource WriteIn}"
+                                                        HintColor="{DynamicResource Control.Border.One.Color}"
+                                                        ShowIcon="True"
+                                                        Hint="写入数据"
+                                                        CornerRadius="{DynamicResource WindowCornerRadius}" />
 
                                     <btn:ButtonControl  Width="100" Grid.Row="1" Grid.Column="1" Command="{Binding Read}" HorizontalAlignment="Center" VerticalAlignment="Center"  CornerRadius="{DynamicResource WindowCornerRadius}"  Margin="10,0,0,0"
-                                                              IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                                              BorderBrush="{DynamicResource Control.Border.Color}"
-                                                              IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                                              Foreground="{DynamicResource Font.Content.Foreground}"
-                                                              Icon="{DynamicResource Read}"
-                                                              Content="读取"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource Read}"
+                                                       Content="读取"/>
 
                                     <btn:ButtonControl  Width="100" Grid.Row="2" Grid.Column="1" Command="{Binding Write}" HorizontalAlignment="Center" VerticalAlignment="Center"   CornerRadius="{DynamicResource WindowCornerRadius}"  Margin="10,10,0,0"
-                                                              IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                                              BorderBrush="{DynamicResource Control.Border.Color}"
-                                                              IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                                              Foreground="{DynamicResource Font.Content.Foreground}"
-                                                              Icon="{DynamicResource Write}"
-                                                              Content="写入"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource Write}"
+                                                       Content="写入"/>
 
                                     <btn:ButtonControl  Width="100" Grid.Row="1" Grid.Column="2" Command="{Binding Subscribe}" HorizontalAlignment="Center" VerticalAlignment="Center"  CornerRadius="{DynamicResource WindowCornerRadius}"  Margin="10,0,0,0"
-                                                                IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                                                BorderBrush="{DynamicResource Control.Border.Color}"
-                                                                IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                                                Foreground="{DynamicResource Font.Content.Foreground}"
-                                                                Icon="{DynamicResource Subscribe}"
-                                                                Content="订阅"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource Subscribe}"
+                                                       Content="订阅"/>
 
                                     <btn:ButtonControl  Width="100" Grid.Row="2" Grid.Column="2" Command="{Binding UnSubscribe}" HorizontalAlignment="Center" VerticalAlignment="Center"   CornerRadius="{DynamicResource WindowCornerRadius}"  Margin="10,10,0,0"
-                                                                IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                                                BorderBrush="{DynamicResource Control.Border.Color}"
-                                                                IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                                                Foreground="{DynamicResource Font.Content.Foreground}"
-                                                                Icon="{DynamicResource UnSubscribe}"
-                                                                Content="取消订阅"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource UnSubscribe}"
+                                                       Content="取消订阅"/>
 
                                 </Grid>
                             </Grid>
@@ -420,12 +420,12 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                                 <RadioButton ToolTip="显示方式" Margin="0,0,15,0"  Visibility="{Binding AsciiVisibility}" IsChecked="{Binding InfoFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=0}" Style="{StaticResource RadioButtonStyle}" Content="ASCII" VerticalAlignment="Center" HorizontalAlignment="Right" />
                                 <RadioButton ToolTip="显示方式" Margin="0,0,15,0" Visibility="{Binding HexVisibility}" IsChecked="{Binding InfoFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=1}"  Style="{StaticResource RadioButtonStyle}" Content="Hex"  VerticalAlignment="Center" HorizontalAlignment="Right" />
                                 <btn:ButtonControl  Width="80"  Command="{Binding Clear}" HorizontalAlignment="Right" VerticalAlignment="Center"  BorderThickness="1,0,0,0"
-IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-BorderBrush="{DynamicResource Control.Border.Color}"
-IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-Foreground="{DynamicResource Font.Content.Foreground}"
-Icon="{DynamicResource Clear}"
-Content="清空"/>
+                                                   IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                   BorderBrush="{DynamicResource Control.Border.Color}"
+                                                   IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                   Foreground="{DynamicResource Font.Content.Foreground}"
+                                                   Icon="{DynamicResource Clear}"
+                                                   Content="清空"/>
                             </StackPanel>
                             <TextBox Grid.Row="1" Padding="5" Grid.ColumnSpan="2" Style="{DynamicResource TextBoxStyle2}"  FontSize="13" VerticalContentAlignment="Top" HorizontalContentAlignment="Left" TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Visible"  Text="{Binding Info}" >
                                 <i:Interaction.Triggers>

+ 50 - 50
src/YSAI.Tool.Wpf/views/UaService.xaml

@@ -1,8 +1,8 @@
 <UserControl x:Class="YSAI.Tool.Wpf.views.UaService"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
-             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
              xmlns:local="clr-namespace:YSAI.Tool.Wpf.views"
              xmlns:c="clr-namespace:YSAI.Tool.Wpf.controllers"
              xmlns:txt="clr-namespace:YSAI.Core.Wpf.controls.textbox;assembly=YSAI.Core.Wpf"
@@ -74,30 +74,30 @@
 
                     <!--导入导出-->
                     <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,0,-30" Panel.ZIndex="2">
-                        <btn:ButtonControl  
-                                          Width="80"
-                                          Command="{Binding IncBasics}" 
-                                          HorizontalAlignment="Center" 
-                                          VerticalAlignment="Center" 
-                                          IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                          BorderBrush="{DynamicResource Control.Border.Color}"
-                                          IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                          Foreground="{DynamicResource Font.Content.Foreground}"
-                                          Icon="{DynamicResource Inc}"
-                                          Content="导入"
-                                          BorderThickness="1,0,0,0" />
-                        <btn:ButtonControl  
-                                          Width="80"
-                                          Command="{Binding ExpBasics}" 
-                                          HorizontalAlignment="Center" 
-                                          VerticalAlignment="Center" 
-                                          IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                          BorderBrush="{DynamicResource Control.Border.Color}"
-                                          IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                          Foreground="{DynamicResource Font.Content.Foreground}"
-                                          Icon="{DynamicResource Exp}"
-                                          Content="导出"
-                                          BorderThickness="1,0,0,0" />
+                        <btn:ButtonControl
+                            Width="80"
+                            Command="{Binding IncBasics}"
+                            HorizontalAlignment="Center"
+                            VerticalAlignment="Center"
+                            IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                            BorderBrush="{DynamicResource Control.Border.Color}"
+                            IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                            Foreground="{DynamicResource Font.Content.Foreground}"
+                            Icon="{DynamicResource Inc}"
+                            Content="导入"
+                            BorderThickness="1,0,0,0" />
+                        <btn:ButtonControl
+                            Width="80"
+                            Command="{Binding ExpBasics}"
+                            HorizontalAlignment="Center"
+                            VerticalAlignment="Center"
+                            IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                            BorderBrush="{DynamicResource Control.Border.Color}"
+                            IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                            Foreground="{DynamicResource Font.Content.Foreground}"
+                            Icon="{DynamicResource Exp}"
+                            Content="导出"
+                            BorderThickness="1,0,0,0" />
                     </StackPanel>
                     <!--属性表格-->
                     <Grid Grid.Row="1" Panel.ZIndex="1">
@@ -154,12 +154,12 @@
                             </ResourceDictionary>
                         </Grid.Resources>
                         <pt:PropertyGrid  Margin="1,-4,1,0"
-SelectedObject="{Binding BasicsData}"
-TabVisibility="VisibleIfMoreThanOne" 
-TextBlock.Foreground="{DynamicResource Font.Content.Foreground}" 
-Foreground="{DynamicResource Font.Content.Foreground}"
-BorderBrush="{DynamicResource Control.Border.Color}"
-CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
+                                         SelectedObject="{Binding BasicsData}"
+                                         TabVisibility="VisibleIfMoreThanOne"
+                                         TextBlock.Foreground="{DynamicResource Font.Content.Foreground}"
+                                         Foreground="{DynamicResource Font.Content.Foreground}"
+                                         BorderBrush="{DynamicResource Control.Border.Color}"
+                                         CategoryHeaderTemplate="{StaticResource HeaderTemplate}" EnumAsRadioButtonsLimit="0"/>
                     </Grid>
                 </Grid>
 
@@ -237,20 +237,20 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                             <Grid  Margin="0,-40,0,0">
                                 <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" >
                                     <btn:ButtonControl  Grid.Column="5"  Width="80"   Command="{Binding Start}" HorizontalAlignment="Right" VerticalAlignment="Center" BorderThickness="1,0,0,0"
-                                           IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                           BorderBrush="{DynamicResource Control.Border.Color}"
-                                           IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                           Foreground="{DynamicResource Font.Content.Foreground}"
-                                           Icon="{DynamicResource Start}"
-                                           Content="启动"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource Start}"
+                                                       Content="启动"/>
 
                                     <btn:ButtonControl  Grid.Column="6"  Width="80"  Command="{Binding Stop}" HorizontalAlignment="Right" VerticalAlignment="Center" BorderThickness="1,0,0,0"
-                                           IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                           BorderBrush="{DynamicResource Control.Border.Color}"
-                                           IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                           Foreground="{DynamicResource Font.Content.Foreground}"
-                                           Icon="{DynamicResource Stop}"
-                                           Content="停止"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource Stop}"
+                                                       Content="停止"/>
                                 </StackPanel>
                             </Grid>
                         </Grid>
@@ -287,12 +287,12 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                                 <RadioButton ToolTip="显示方式" Margin="0,0,15,0"  Visibility="{Binding AsciiVisibility}" IsChecked="{Binding InfoFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=0}" Style="{StaticResource RadioButtonStyle}" Content="ASCII" VerticalAlignment="Center" HorizontalAlignment="Right" />
                                 <RadioButton ToolTip="显示方式" Margin="0,0,15,0" Visibility="{Binding HexVisibility}" IsChecked="{Binding InfoFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=1}"  Style="{StaticResource RadioButtonStyle}" Content="Hex"  VerticalAlignment="Center" HorizontalAlignment="Right" />
                                 <btn:ButtonControl  Width="80"  Command="{Binding Clear}" HorizontalAlignment="Right" VerticalAlignment="Center"  BorderThickness="1,0,0,0"
-IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-BorderBrush="{DynamicResource Control.Border.Color}"
-IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-Foreground="{DynamicResource Font.Content.Foreground}"
-Icon="{DynamicResource Clear}"
-Content="清空"/>
+                                                   IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                   BorderBrush="{DynamicResource Control.Border.Color}"
+                                                   IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                   Foreground="{DynamicResource Font.Content.Foreground}"
+                                                   Icon="{DynamicResource Clear}"
+                                                   Content="清空"/>
                             </StackPanel>
                             <TextBox Grid.Row="1" Padding="5" Grid.ColumnSpan="2" Style="{DynamicResource TextBoxStyle2}"  FontSize="13" VerticalContentAlignment="Top" HorizontalContentAlignment="Left" TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Visible"  Text="{Binding Info}" >
                                 <i:Interaction.Triggers>

+ 85 - 85
src/YSAI.Tool.Wpf/views/Udp.xaml

@@ -1,23 +1,23 @@
 <UserControl x:Class="YSAI.Tool.Wpf.views.Udp"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
-             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
              xmlns:local="clr-namespace:YSAI.Tool.Wpf.views"
              xmlns:lang="http://wpflocalizeextension.codeplex.com"
              lang:LocalizeDictionary.DesignCulture="zh"
              lang:ResxLocalizationProvider.DefaultAssembly="YSAI.Langs"
              lang:ResxLocalizationProvider.DefaultDictionary="Lang"
              xmlns:c="clr-namespace:YSAI.Tool.Wpf.controllers"
-             
-              xmlns:txt="clr-namespace:YSAI.Core.Wpf.controls.textbox;assembly=YSAI.Core.Wpf"
-              xmlns:btn="clr-namespace:YSAI.Core.Wpf.controls.button;assembly=YSAI.Core.Wpf"
-              xmlns:pt="http://propertytools.org/wpf"
-              xmlns:helpers="clr-namespace:YSAI.Core.Wpf.style;assembly=YSAI.Core.Wpf"
-              xmlns:cs="clr-namespace:YSAI.Core.Wpf.converters;assembly=YSAI.Core.Wpf"
-              xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
-              xmlns:mvvm="clr-namespace:YSAI.Core.Wpf.mvvm;assembly=YSAI.Core.Wpf"
-              Background="{DynamicResource ContentBackgroundPicture}">
+
+             xmlns:txt="clr-namespace:YSAI.Core.Wpf.controls.textbox;assembly=YSAI.Core.Wpf"
+             xmlns:btn="clr-namespace:YSAI.Core.Wpf.controls.button;assembly=YSAI.Core.Wpf"
+             xmlns:pt="http://propertytools.org/wpf"
+             xmlns:helpers="clr-namespace:YSAI.Core.Wpf.style;assembly=YSAI.Core.Wpf"
+             xmlns:cs="clr-namespace:YSAI.Core.Wpf.converters;assembly=YSAI.Core.Wpf"
+             xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
+             xmlns:mvvm="clr-namespace:YSAI.Core.Wpf.mvvm;assembly=YSAI.Core.Wpf"
+             Background="{DynamicResource ContentBackgroundPicture}">
     <UserControl.DataContext>
         <c:UdpController />
     </UserControl.DataContext>
@@ -77,30 +77,30 @@
 
                     <!--导入导出-->
                     <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,0,-30" Panel.ZIndex="2">
-                        <btn:ButtonControl  
-                                          Width="80"
-                                          Command="{Binding IncBasics}" 
-                                          HorizontalAlignment="Center" 
-                                          VerticalAlignment="Center" 
-                                          IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                          BorderBrush="{DynamicResource Control.Border.Color}"
-                                          IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                          Foreground="{DynamicResource Font.Content.Foreground}"
-                                          Icon="{DynamicResource Inc}"
-                                          Content="导入"
-                                          BorderThickness="1,0,0,0" />
-                        <btn:ButtonControl  
-                                          Width="80"
-                                          Command="{Binding ExpBasics}" 
-                                          HorizontalAlignment="Center" 
-                                          VerticalAlignment="Center" 
-                                          IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                          BorderBrush="{DynamicResource Control.Border.Color}"
-                                          IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                          Foreground="{DynamicResource Font.Content.Foreground}"
-                                          Icon="{DynamicResource Exp}"
-                                          Content="导出"
-                                          BorderThickness="1,0,0,0" />
+                        <btn:ButtonControl
+                            Width="80"
+                            Command="{Binding IncBasics}"
+                            HorizontalAlignment="Center"
+                            VerticalAlignment="Center"
+                            IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                            BorderBrush="{DynamicResource Control.Border.Color}"
+                            IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                            Foreground="{DynamicResource Font.Content.Foreground}"
+                            Icon="{DynamicResource Inc}"
+                            Content="导入"
+                            BorderThickness="1,0,0,0" />
+                        <btn:ButtonControl
+                            Width="80"
+                            Command="{Binding ExpBasics}"
+                            HorizontalAlignment="Center"
+                            VerticalAlignment="Center"
+                            IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                            BorderBrush="{DynamicResource Control.Border.Color}"
+                            IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                            Foreground="{DynamicResource Font.Content.Foreground}"
+                            Icon="{DynamicResource Exp}"
+                            Content="导出"
+                            BorderThickness="1,0,0,0" />
                     </StackPanel>
                     <!--属性表格-->
                     <Grid Grid.Row="1" Panel.ZIndex="1">
@@ -156,13 +156,13 @@
 
                             </ResourceDictionary>
                         </Grid.Resources>
-                        <pt:PropertyGrid  Margin="1,-4,1,0"
-SelectedObject="{Binding BasicsData}"
-TabVisibility="VisibleIfMoreThanOne" 
-TextBlock.Foreground="{DynamicResource Font.Content.Foreground}" 
-Foreground="{DynamicResource Font.Content.Foreground}"
-BorderBrush="{DynamicResource Control.Border.Color}"
-CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
+                        <pt:PropertyGrid Margin="1,-4,1,0"
+                                         SelectedObject="{Binding BasicsData}"
+                                         TabVisibility="VisibleIfMoreThanOne"
+                                         TextBlock.Foreground="{DynamicResource Font.Content.Foreground}"
+                                         Foreground="{DynamicResource Font.Content.Foreground}"
+                                         BorderBrush="{DynamicResource Control.Border.Color}"
+                                         CategoryHeaderTemplate="{StaticResource HeaderTemplate}" EnumAsRadioButtonsLimit="0"/>
                     </Grid>
                 </Grid>
 
@@ -173,7 +173,7 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                         <RowDefinition Height="*"/>
                     </Grid.RowDefinitions>
 
-                    <ToggleButton Grid.Row="0"  Grid.RowSpan="2" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="8,8,0,0" ToolTip="基础数据[隐藏/显示]" Panel.ZIndex="3" IsChecked="{Binding BasicsData_ToggleButtonIsChecked}"> 
+                    <ToggleButton Grid.Row="0"  Grid.RowSpan="2" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="8,8,0,0" ToolTip="基础数据[隐藏/显示]" Panel.ZIndex="3" IsChecked="{Binding BasicsData_ToggleButtonIsChecked}">
                         <ToggleButton.Template>
                             <ControlTemplate TargetType="{x:Type ToggleButton}">
                                 <Image x:Name="image" Source="{DynamicResource GoLeft_Two}" Stretch="Fill" Width="15" Height="15" />
@@ -238,20 +238,20 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                             <Grid Grid.Row="0" Margin="0,-40,0,0">
                                 <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
                                     <btn:ButtonControl  Grid.Column="5"  Width="80"   Command="{Binding Start}" HorizontalAlignment="Right" VerticalAlignment="Center" BorderThickness="1,0,0,0"
-                                           IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                           BorderBrush="{DynamicResource Control.Border.Color}"
-                                           IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                           Foreground="{DynamicResource Font.Content.Foreground}"
-                                           Icon="{DynamicResource Start}"
-                                           Content="{lang:Loc Start}"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource Start}"
+                                                       Content="{lang:Loc Start}"/>
 
                                     <btn:ButtonControl  Grid.Column="6"  Width="80"  Command="{Binding Stop}" HorizontalAlignment="Right" VerticalAlignment="Center" BorderThickness="1,0,0,0"
-                                           IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                           BorderBrush="{DynamicResource Control.Border.Color}"
-                                           IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                           Foreground="{DynamicResource Font.Content.Foreground}"
-                                           Icon="{DynamicResource Stop}"
-                                           Content="{lang:Loc Stop}"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource Stop}"
+                                                       Content="{lang:Loc Stop}"/>
                                 </StackPanel>
                             </Grid>
                             <!--发送区域-->
@@ -266,23 +266,23 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                                     <ColumnDefinition/>
                                 </Grid.ColumnDefinitions>
                                 <txt:TextBoxControl FontSize="13"  HorizontalContentAlignment="Center" Text="{Binding TerminalIP}" ToolTip="终端IP"  Grid.Column="0"  Margin="0,0,5,0"
-                                                         SelectedColor="{DynamicResource Control.Border.Two.Color}"
-                                                         BorderBrush="{DynamicResource Control.Border.Color}"
-                                                         Foreground="{DynamicResource Font.Content.Foreground}"
-                                                         Icon="{DynamicResource Address}"
-                                                         HintColor="{DynamicResource Control.Border.One.Color}"
-                                                         ShowIcon="True"
-                                                         Hint="终端IP"
-                                                         CornerRadius="{DynamicResource WindowCornerRadius}" />
+                                                    SelectedColor="{DynamicResource Control.Border.Two.Color}"
+                                                    BorderBrush="{DynamicResource Control.Border.Color}"
+                                                    Foreground="{DynamicResource Font.Content.Foreground}"
+                                                    Icon="{DynamicResource Address}"
+                                                    HintColor="{DynamicResource Control.Border.One.Color}"
+                                                    ShowIcon="True"
+                                                    Hint="终端IP"
+                                                    CornerRadius="{DynamicResource WindowCornerRadius}" />
                                 <txt:TextBoxControl FontSize="13"  HorizontalContentAlignment="Center" Text="{Binding TerminalPort}" ToolTip="终端端口" Grid.Column="1"  Margin="5,0,0,0"
-                                                         SelectedColor="{DynamicResource Control.Border.Two.Color}"
-                                                         BorderBrush="{DynamicResource Control.Border.Color}"
-                                                         Foreground="{DynamicResource Font.Content.Foreground}"
-                                                         Icon="{DynamicResource Port}"
-                                                         HintColor="{DynamicResource Control.Border.One.Color}"
-                                                         ShowIcon="True"
-                                                         Hint="终端端口"
-                                                         CornerRadius="{DynamicResource WindowCornerRadius}" />
+                                                    SelectedColor="{DynamicResource Control.Border.Two.Color}"
+                                                    BorderBrush="{DynamicResource Control.Border.Color}"
+                                                    Foreground="{DynamicResource Font.Content.Foreground}"
+                                                    Icon="{DynamicResource Port}"
+                                                    HintColor="{DynamicResource Control.Border.One.Color}"
+                                                    ShowIcon="True"
+                                                    Hint="终端端口"
+                                                    CornerRadius="{DynamicResource WindowCornerRadius}" />
 
 
 
@@ -290,16 +290,16 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                                     <RadioButton ToolTip="发送方式" Margin="0,0,15,0"  Visibility="{Binding AsciiVisibility}" IsChecked="{Binding DataFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=0}" Style="{StaticResource RadioButtonStyle}" Content="ASCII" VerticalAlignment="Center" HorizontalAlignment="Right" />
                                     <RadioButton ToolTip="发送方式" Margin="0,0,15,0" Visibility="{Binding HexVisibility}" IsChecked="{Binding DataFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=1}"  Style="{StaticResource RadioButtonStyle}" Content="Hex"  VerticalAlignment="Center" HorizontalAlignment="Right" />
                                     <btn:ButtonControl  Grid.Column="3"  Width="80"  Command="{Binding Send}" HorizontalAlignment="Right" VerticalAlignment="Center"  BorderThickness="1,0,0,0"
-IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-BorderBrush="{DynamicResource Control.Border.Color}"
-IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-Foreground="{DynamicResource Font.Content.Foreground}"
-Icon="{DynamicResource Send}"
-Content="发送"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource Send}"
+                                                       Content="发送"/>
                                 </StackPanel>
 
-                            
-                               
+
+
                                 <GroupBox Style="{StaticResource GroupBoxTab}" Margin="0,5,0,0"  Grid.Row="1" Grid.ColumnSpan="8" Width="auto">
                                     <GroupBox.Header>
                                         <StackPanel Orientation="Horizontal">
@@ -350,12 +350,12 @@ Content="发送"/>
                                 <RadioButton ToolTip="显示方式" Margin="0,0,15,0"  Visibility="{Binding AsciiVisibility}" IsChecked="{Binding InfoFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=0}" Style="{StaticResource RadioButtonStyle}" Content="ASCII" VerticalAlignment="Center" HorizontalAlignment="Right" />
                                 <RadioButton ToolTip="显示方式" Margin="0,0,15,0" Visibility="{Binding HexVisibility}" IsChecked="{Binding InfoFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=1}"  Style="{StaticResource RadioButtonStyle}" Content="Hex"  VerticalAlignment="Center" HorizontalAlignment="Right" />
                                 <btn:ButtonControl  Width="80"  Command="{Binding Clear}" HorizontalAlignment="Right" VerticalAlignment="Center"  BorderThickness="1,0,0,0"
-IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-BorderBrush="{DynamicResource Control.Border.Color}"
-IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-Foreground="{DynamicResource Font.Content.Foreground}"
-Icon="{DynamicResource Clear}"
-Content="清空"/>
+                                                   IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                   BorderBrush="{DynamicResource Control.Border.Color}"
+                                                   IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                   Foreground="{DynamicResource Font.Content.Foreground}"
+                                                   Icon="{DynamicResource Clear}"
+                                                   Content="清空"/>
                             </StackPanel>
                             <TextBox Grid.Row="1" Padding="5" Grid.ColumnSpan="2" Style="{DynamicResource TextBoxStyle2}"  FontSize="13" VerticalContentAlignment="Top" HorizontalContentAlignment="Left" TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Visible"  Text="{Binding Info}" >
                                 <i:Interaction.Triggers>

+ 56 - 56
src/YSAI.Tool.Wpf/views/WsClient.xaml

@@ -1,8 +1,8 @@
 <UserControl x:Class="YSAI.Tool.Wpf.views.WsClient"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
-             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
              xmlns:local="clr-namespace:YSAI.Tool.Wpf.views"
              xmlns:c="clr-namespace:YSAI.Tool.Wpf.controllers"
              xmlns:btn="clr-namespace:YSAI.Core.Wpf.controls.button;assembly=YSAI.Core.Wpf"
@@ -72,30 +72,30 @@
 
                     <!--导入导出-->
                     <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,0,-30" Panel.ZIndex="2">
-                        <btn:ButtonControl  
-                                          Width="80"
-                                          Command="{Binding IncBasics}" 
-                                          HorizontalAlignment="Center" 
-                                          VerticalAlignment="Center" 
-                                          IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                          BorderBrush="{DynamicResource Control.Border.Color}"
-                                          IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                          Foreground="{DynamicResource Font.Content.Foreground}"
-                                          Icon="{DynamicResource Inc}"
-                                          Content="导入"
-                                          BorderThickness="1,0,0,0" />
-                        <btn:ButtonControl  
-                                          Width="80"
-                                          Command="{Binding ExpBasics}" 
-                                          HorizontalAlignment="Center" 
-                                          VerticalAlignment="Center" 
-                                          IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                          BorderBrush="{DynamicResource Control.Border.Color}"
-                                          IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                          Foreground="{DynamicResource Font.Content.Foreground}"
-                                          Icon="{DynamicResource Exp}"
-                                          Content="导出"
-                                          BorderThickness="1,0,0,0" />
+                        <btn:ButtonControl
+                            Width="80"
+                            Command="{Binding IncBasics}"
+                            HorizontalAlignment="Center"
+                            VerticalAlignment="Center"
+                            IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                            BorderBrush="{DynamicResource Control.Border.Color}"
+                            IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                            Foreground="{DynamicResource Font.Content.Foreground}"
+                            Icon="{DynamicResource Inc}"
+                            Content="导入"
+                            BorderThickness="1,0,0,0" />
+                        <btn:ButtonControl
+                            Width="80"
+                            Command="{Binding ExpBasics}"
+                            HorizontalAlignment="Center"
+                            VerticalAlignment="Center"
+                            IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                            BorderBrush="{DynamicResource Control.Border.Color}"
+                            IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                            Foreground="{DynamicResource Font.Content.Foreground}"
+                            Icon="{DynamicResource Exp}"
+                            Content="导出"
+                            BorderThickness="1,0,0,0" />
                     </StackPanel>
                     <!--属性表格-->
                     <Grid Grid.Row="1" Panel.ZIndex="1">
@@ -152,12 +152,12 @@
                             </ResourceDictionary>
                         </Grid.Resources>
                         <pt:PropertyGrid  Margin="1,-4,1,0"
-SelectedObject="{Binding BasicsData}"
-TabVisibility="VisibleIfMoreThanOne" 
-TextBlock.Foreground="{DynamicResource Font.Content.Foreground}" 
-Foreground="{DynamicResource Font.Content.Foreground}"
-BorderBrush="{DynamicResource Control.Border.Color}"
-CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
+                                         SelectedObject="{Binding BasicsData}"
+                                         TabVisibility="VisibleIfMoreThanOne"
+                                         TextBlock.Foreground="{DynamicResource Font.Content.Foreground}"
+                                         Foreground="{DynamicResource Font.Content.Foreground}"
+                                         BorderBrush="{DynamicResource Control.Border.Color}"
+                                         CategoryHeaderTemplate="{StaticResource HeaderTemplate}" EnumAsRadioButtonsLimit="0"/>
                     </Grid>
                 </Grid>
 
@@ -233,20 +233,20 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                             <Grid Grid.Row="0" Grid.Column="1"  Margin="0,-40,0,0">
                                 <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" >
                                     <btn:ButtonControl  Grid.Column="5"  Width="80"   Command="{Binding Start}" HorizontalAlignment="Right" VerticalAlignment="Center" BorderThickness="1,0,0,0"
-                                           IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                           BorderBrush="{DynamicResource Control.Border.Color}"
-                                           IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                           Foreground="{DynamicResource Font.Content.Foreground}"
-                                           Icon="{DynamicResource Open}"
-                                           Content="打开"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource Open}"
+                                                       Content="打开"/>
 
                                     <btn:ButtonControl  Grid.Column="6"  Width="80"  Command="{Binding Stop}" HorizontalAlignment="Right" VerticalAlignment="Center" BorderThickness="1,0,0,0"
-                                           IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                           BorderBrush="{DynamicResource Control.Border.Color}"
-                                           IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                           Foreground="{DynamicResource Font.Content.Foreground}"
-                                           Icon="{DynamicResource CloseBase}"
-                                           Content="关闭"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource CloseBase}"
+                                                       Content="关闭"/>
                                 </StackPanel>
                             </Grid>
                             <!--发送区域-->
@@ -259,12 +259,12 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                                     <RadioButton ToolTip="发送方式" Margin="0,0,15,0"  Visibility="{Binding AsciiVisibility}" IsChecked="{Binding DataFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=0}" Style="{StaticResource RadioButtonStyle}" Content="ASCII" VerticalAlignment="Center" HorizontalAlignment="Right" />
                                     <RadioButton ToolTip="发送方式" Margin="0,0,15,0" Visibility="{Binding HexVisibility}" IsChecked="{Binding DataFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=1}"  Style="{StaticResource RadioButtonStyle}" Content="Hex"  VerticalAlignment="Center" HorizontalAlignment="Right" />
                                     <btn:ButtonControl  Grid.Column="3"  Width="80"  Command="{Binding Send}" HorizontalAlignment="Right" VerticalAlignment="Center"  BorderThickness="1,0,0,0"
-                                                            IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                                            BorderBrush="{DynamicResource Control.Border.Color}"
-                                                            IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                                            Foreground="{DynamicResource Font.Content.Foreground}"
-                                                            Icon="{DynamicResource Send}"
-                                                            Content="发送"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource Send}"
+                                                       Content="发送"/>
                                 </StackPanel>
                                 <GroupBox Style="{StaticResource GroupBoxTab}" Grid.Row="1" Grid.ColumnSpan="8" Width="auto" Margin="0,0,0,0">
                                     <GroupBox.Header>
@@ -316,12 +316,12 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                                 <RadioButton ToolTip="显示方式" Margin="0,0,15,0"  Visibility="{Binding AsciiVisibility}" IsChecked="{Binding InfoFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=0}" Style="{StaticResource RadioButtonStyle}" Content="ASCII" VerticalAlignment="Center" HorizontalAlignment="Right" />
                                 <RadioButton ToolTip="显示方式" Margin="0,0,15,0" Visibility="{Binding HexVisibility}" IsChecked="{Binding InfoFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=1}"  Style="{StaticResource RadioButtonStyle}" Content="Hex"  VerticalAlignment="Center" HorizontalAlignment="Right" />
                                 <btn:ButtonControl  Width="80"  Command="{Binding Clear}" HorizontalAlignment="Right" VerticalAlignment="Center"  BorderThickness="1,0,0,0"
-IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-BorderBrush="{DynamicResource Control.Border.Color}"
-IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-Foreground="{DynamicResource Font.Content.Foreground}"
-Icon="{DynamicResource Clear}"
-Content="清空"/>
+                                                   IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                   BorderBrush="{DynamicResource Control.Border.Color}"
+                                                   IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                   Foreground="{DynamicResource Font.Content.Foreground}"
+                                                   Icon="{DynamicResource Clear}"
+                                                   Content="清空"/>
                             </StackPanel>
                             <TextBox Grid.Row="1" Padding="5" Grid.ColumnSpan="2" Style="{DynamicResource TextBoxStyle2}"  FontSize="13" VerticalContentAlignment="Top" HorizontalContentAlignment="Left" TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Visible"  Text="{Binding Info}" >
                                 <i:Interaction.Triggers>

+ 67 - 67
src/YSAI.Tool.Wpf/views/WsService.xaml

@@ -1,19 +1,19 @@
 <UserControl x:Class="YSAI.Tool.Wpf.views.WsService"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
-             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
-             xmlns:local="clr-namespace:YSAI.Tool.Wpf.views"            
-             
-              xmlns:c="clr-namespace:YSAI.Tool.Wpf.controllers"
-                xmlns:txt="clr-namespace:YSAI.Core.Wpf.controls.textbox;assembly=YSAI.Core.Wpf"
-                xmlns:btn="clr-namespace:YSAI.Core.Wpf.controls.button;assembly=YSAI.Core.Wpf"
-                xmlns:pt="http://propertytools.org/wpf"
-                xmlns:helpers="clr-namespace:YSAI.Core.Wpf.style;assembly=YSAI.Core.Wpf"
-                xmlns:cs="clr-namespace:YSAI.Core.Wpf.converters;assembly=YSAI.Core.Wpf"
-                xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
-                xmlns:mvvm="clr-namespace:YSAI.Core.Wpf.mvvm;assembly=YSAI.Core.Wpf"
-                Background="{DynamicResource ContentBackgroundPicture}"> 
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+             xmlns:local="clr-namespace:YSAI.Tool.Wpf.views"
+
+             xmlns:c="clr-namespace:YSAI.Tool.Wpf.controllers"
+             xmlns:txt="clr-namespace:YSAI.Core.Wpf.controls.textbox;assembly=YSAI.Core.Wpf"
+             xmlns:btn="clr-namespace:YSAI.Core.Wpf.controls.button;assembly=YSAI.Core.Wpf"
+             xmlns:pt="http://propertytools.org/wpf"
+             xmlns:helpers="clr-namespace:YSAI.Core.Wpf.style;assembly=YSAI.Core.Wpf"
+             xmlns:cs="clr-namespace:YSAI.Core.Wpf.converters;assembly=YSAI.Core.Wpf"
+             xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
+             xmlns:mvvm="clr-namespace:YSAI.Core.Wpf.mvvm;assembly=YSAI.Core.Wpf"
+             Background="{DynamicResource ContentBackgroundPicture}">
     <UserControl.DataContext>
         <c:WsServiceController />
     </UserControl.DataContext>
@@ -73,30 +73,30 @@
 
                     <!--导入导出-->
                     <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,0,-30" Panel.ZIndex="2">
-                        <btn:ButtonControl  
-                                          Width="80"
-                                          Command="{Binding IncBasics}" 
-                                          HorizontalAlignment="Center" 
-                                          VerticalAlignment="Center" 
-                                          IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                          BorderBrush="{DynamicResource Control.Border.Color}"
-                                          IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                          Foreground="{DynamicResource Font.Content.Foreground}"
-                                          Icon="{DynamicResource Inc}"
-                                          Content="导入"
-                                          BorderThickness="1,0,0,0" />
-                        <btn:ButtonControl  
-                                          Width="80"
-                                          Command="{Binding ExpBasics}" 
-                                          HorizontalAlignment="Center" 
-                                          VerticalAlignment="Center" 
-                                          IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                          BorderBrush="{DynamicResource Control.Border.Color}"
-                                          IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                          Foreground="{DynamicResource Font.Content.Foreground}"
-                                          Icon="{DynamicResource Exp}"
-                                          Content="导出"
-                                          BorderThickness="1,0,0,0" />
+                        <btn:ButtonControl
+                            Width="80"
+                            Command="{Binding IncBasics}"
+                            HorizontalAlignment="Center"
+                            VerticalAlignment="Center"
+                            IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                            BorderBrush="{DynamicResource Control.Border.Color}"
+                            IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                            Foreground="{DynamicResource Font.Content.Foreground}"
+                            Icon="{DynamicResource Inc}"
+                            Content="导入"
+                            BorderThickness="1,0,0,0" />
+                        <btn:ButtonControl
+                            Width="80"
+                            Command="{Binding ExpBasics}"
+                            HorizontalAlignment="Center"
+                            VerticalAlignment="Center"
+                            IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                            BorderBrush="{DynamicResource Control.Border.Color}"
+                            IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                            Foreground="{DynamicResource Font.Content.Foreground}"
+                            Icon="{DynamicResource Exp}"
+                            Content="导出"
+                            BorderThickness="1,0,0,0" />
                     </StackPanel>
                     <!--属性表格-->
                     <Grid Grid.Row="1" Panel.ZIndex="1">
@@ -153,12 +153,12 @@
                             </ResourceDictionary>
                         </Grid.Resources>
                         <pt:PropertyGrid  Margin="1,-4,1,0"
-SelectedObject="{Binding BasicsData}"
-TabVisibility="VisibleIfMoreThanOne" 
-TextBlock.Foreground="{DynamicResource Font.Content.Foreground}" 
-Foreground="{DynamicResource Font.Content.Foreground}"
-BorderBrush="{DynamicResource Control.Border.Color}"
-CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
+                                         SelectedObject="{Binding BasicsData}"
+                                         TabVisibility="VisibleIfMoreThanOne"
+                                         TextBlock.Foreground="{DynamicResource Font.Content.Foreground}"
+                                         Foreground="{DynamicResource Font.Content.Foreground}"
+                                         BorderBrush="{DynamicResource Control.Border.Color}"
+                                         CategoryHeaderTemplate="{StaticResource HeaderTemplate}" EnumAsRadioButtonsLimit="0"/>
                     </Grid>
                 </Grid>
 
@@ -238,20 +238,20 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                             <Grid Grid.Row="0" Grid.Column="1"  Margin="0,-40,0,0">
                                 <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" >
                                     <btn:ButtonControl  Grid.Column="5"  Width="80"   Command="{Binding Start}" HorizontalAlignment="Right" VerticalAlignment="Center" BorderThickness="1,0,0,0"
-                                           IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                           BorderBrush="{DynamicResource Control.Border.Color}"
-                                           IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                           Foreground="{DynamicResource Font.Content.Foreground}"
-                                           Icon="{DynamicResource Start}"
-                                           Content="启动"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource Start}"
+                                                       Content="启动"/>
 
                                     <btn:ButtonControl  Grid.Column="6"  Width="80"  Command="{Binding Stop}" HorizontalAlignment="Right" VerticalAlignment="Center" BorderThickness="1,0,0,0"
-                                           IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                           BorderBrush="{DynamicResource Control.Border.Color}"
-                                           IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                           Foreground="{DynamicResource Font.Content.Foreground}"
-                                           Icon="{DynamicResource Stop}"
-                                           Content="停止"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource Stop}"
+                                                       Content="停止"/>
                                 </StackPanel>
                             </Grid>
                             <!--发送区域-->
@@ -265,12 +265,12 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                                     <RadioButton ToolTip="发送方式" Margin="0,0,15,0"  Visibility="{Binding AsciiVisibility}" IsChecked="{Binding DataFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=0}" Style="{StaticResource RadioButtonStyle}" Content="ASCII" VerticalAlignment="Center" HorizontalAlignment="Right" />
                                     <RadioButton ToolTip="发送方式" Margin="0,0,15,0" Visibility="{Binding HexVisibility}" IsChecked="{Binding DataFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=1}"  Style="{StaticResource RadioButtonStyle}" Content="Hex"  VerticalAlignment="Center" HorizontalAlignment="Right" />
                                     <btn:ButtonControl  Grid.Column="3"  Width="80"  Command="{Binding Send}" HorizontalAlignment="Right" VerticalAlignment="Center"  BorderThickness="1,0,0,0"
-                                                            IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-                                                            BorderBrush="{DynamicResource Control.Border.Color}"
-                                                            IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-                                                            Foreground="{DynamicResource Font.Content.Foreground}"
-                                                            Icon="{DynamicResource Send}"
-                                                            Content="发送"/>
+                                                       IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                       BorderBrush="{DynamicResource Control.Border.Color}"
+                                                       IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                       Foreground="{DynamicResource Font.Content.Foreground}"
+                                                       Icon="{DynamicResource Send}"
+                                                       Content="发送"/>
                                 </StackPanel>
                                 <GroupBox Style="{StaticResource GroupBoxTab}" Grid.Row="1" Grid.ColumnSpan="8" Width="auto" Margin="4,0,0,0">
                                     <GroupBox.Header>
@@ -351,12 +351,12 @@ CategoryHeaderTemplate="{StaticResource HeaderTemplate}"/>
                                 <RadioButton ToolTip="显示方式" Margin="0,0,15,0"  Visibility="{Binding AsciiVisibility}" IsChecked="{Binding InfoFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=0}" Style="{StaticResource RadioButtonStyle}" Content="ASCII" VerticalAlignment="Center" HorizontalAlignment="Right" />
                                 <RadioButton ToolTip="显示方式" Margin="0,0,15,0" Visibility="{Binding HexVisibility}" IsChecked="{Binding InfoFormat,Mode=TwoWay,Converter={StaticResource CheckConverter},ConverterParameter=1}"  Style="{StaticResource RadioButtonStyle}" Content="Hex"  VerticalAlignment="Center" HorizontalAlignment="Right" />
                                 <btn:ButtonControl  Width="80"  Command="{Binding Clear}" HorizontalAlignment="Right" VerticalAlignment="Center"  BorderThickness="1,0,0,0"
-IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
-BorderBrush="{DynamicResource Control.Border.Color}"
-IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
-Foreground="{DynamicResource Font.Content.Foreground}"
-Icon="{DynamicResource Clear}"
-Content="清空"/>
+                                                   IsMouseOverBorderBrushColor="{DynamicResource Control.Border.One.Color}"
+                                                   BorderBrush="{DynamicResource Control.Border.Color}"
+                                                   IsPressedBorderBrushColor="{DynamicResource Control.Border.Two.Color}"
+                                                   Foreground="{DynamicResource Font.Content.Foreground}"
+                                                   Icon="{DynamicResource Clear}"
+                                                   Content="清空"/>
                             </StackPanel>
                             <TextBox Grid.Row="1" Padding="5" Grid.ColumnSpan="2" Style="{DynamicResource TextBoxStyle2}"  FontSize="13" VerticalContentAlignment="Top" HorizontalContentAlignment="Left" TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Visible"  Text="{Binding Info}" >
                                 <i:Interaction.Triggers>