Browse Source

新增AllenBradley、Beckhoff、Mewtocol、Mitsubishi、Omron、Siemens 工具

Shun 2 năm trước cách đây
mục cha
commit
b675ae9ea3
29 tập tin đã thay đổi với 475 bổ sung577 xóa
  1. 6 0
      README.md
  2. 1 1
      src/YSAI.DAQ.Samples/YSAI.DAQ.Samples.csproj
  3. 1 1
      src/YSAI.Relay.Samples/YSAI.Relay.Samples.csproj
  4. 1 2
      src/YSAI.Siemens/SiemensOperate.cs
  5. 1 1
      src/YSAI.Siemens/YSAI.Siemens.csproj
  6. 0 343
      src/YSAI.Tool.Wpf/Test.xaml
  7. 0 201
      src/YSAI.Tool.Wpf/TestController.cs
  8. 1 1
      src/YSAI.Tool.Wpf/YSAI.Tool.Wpf.csproj
  9. 29 0
      src/YSAI.Tool.Wpf/controllers/AllenBradleyController.cs
  10. 27 0
      src/YSAI.Tool.Wpf/controllers/BeckhoffController.cs
  11. 34 21
      src/YSAI.Tool.Wpf/controllers/MainController.cs
  12. 27 0
      src/YSAI.Tool.Wpf/controllers/MewtocolController.cs
  13. 27 0
      src/YSAI.Tool.Wpf/controllers/MitsubishiController.cs
  14. 27 0
      src/YSAI.Tool.Wpf/controllers/OmronController.cs
  15. 27 0
      src/YSAI.Tool.Wpf/controllers/SiemensController.cs
  16. 1 1
      src/YSAI.Tool.Wpf/views/AboutUs.xaml.cs
  17. 20 0
      src/YSAI.Tool.Wpf/views/AllenBradley.xaml
  18. 28 0
      src/YSAI.Tool.Wpf/views/AllenBradley.xaml.cs
  19. 20 0
      src/YSAI.Tool.Wpf/views/Beckhoff.xaml
  20. 28 0
      src/YSAI.Tool.Wpf/views/Beckhoff.xaml.cs
  21. 20 0
      src/YSAI.Tool.Wpf/views/Mewtocol.xaml
  22. 28 0
      src/YSAI.Tool.Wpf/views/Mewtocol.xaml.cs
  23. 20 0
      src/YSAI.Tool.Wpf/views/Mitsubishi.xaml
  24. 28 0
      src/YSAI.Tool.Wpf/views/Mitsubishi.xaml.cs
  25. 20 0
      src/YSAI.Tool.Wpf/views/Omron.xaml
  26. 4 4
      src/YSAI.Tool.Wpf/Test.xaml.cs
  27. 20 0
      src/YSAI.Tool.Wpf/views/Siemens.xaml
  28. 28 0
      src/YSAI.Tool.Wpf/views/Siemens.xaml.cs
  29. 1 1
      src/YSAI.Ver.Manage.Tool/Program.cs

+ 6 - 0
README.md

@@ -571,3 +571,9 @@ while(true)
 2. 删除OPCUA服务端 匿名登录机制
 3. OPCDAHTTP 工具改造完成
 
+#### 2023-12-26
+1. mqtt 服务端问题修改
+2. mqtt 客户端新增断开事件
+3. mqtt 客户端服务端工具改造完成
+4. 新增采集、转发工具模版,更快的集成新的驱动
+

+ 1 - 1
src/YSAI.DAQ.Samples/YSAI.DAQ.Samples.csproj

@@ -98,7 +98,7 @@
   </ItemGroup>
 
   <ItemGroup>
-    <PackageReference Include="YSAI.Mqtt" Version="23.360.22275" />
+    <PackageReference Include="YSAI.Mqtt" Version="23.360.30183" />
     <PackageReference Include="YSAI.Opc" Version="23.360.7834" />
   </ItemGroup>
 

+ 1 - 1
src/YSAI.Relay.Samples/YSAI.Relay.Samples.csproj

@@ -8,7 +8,7 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <PackageReference Include="YSAI.Mqtt" Version="23.360.22275" />
+    <PackageReference Include="YSAI.Mqtt" Version="23.360.30183" />
   </ItemGroup>
 
 </Project>

+ 1 - 2
src/YSAI.Siemens/SiemensOperate.cs

@@ -111,7 +111,6 @@ namespace YSAI.Siemens
             string SN = Depart("On");
             try
             {
-
                 if (PlcS7 != null && PlcS7.IsConnected)
                 {
                     return Break(SN, false, "已连接");
@@ -145,7 +144,7 @@ namespace YSAI.Siemens
             string SN = Depart("Off");
             try
             {
-                if (PlcS7 != null)
+                if (PlcS7 != null && PlcS7.IsConnected)
                 {
                     if (tokenSource != null)
                     {

+ 1 - 1
src/YSAI.Siemens/YSAI.Siemens.csproj

@@ -3,7 +3,7 @@
     <TargetFrameworks>net6.0;net8.0</TargetFrameworks>
     <ImplicitUsings>enable</ImplicitUsings>
     <Nullable>enable</Nullable>
-    <Version>23.360.5691</Version>
+    <Version>23.360.35650</Version>
     <PackageOutputPath Condition="'$(Configuration)' == 'Release'">../YSAI.Publish/Release</PackageOutputPath>
     <PackageOutputPath Condition="'$(Configuration)' == 'Debug'">../YSAI.Publish/Debug</PackageOutputPath>
     <Authors>Shun</Authors>

+ 0 - 343
src/YSAI.Tool.Wpf/Test.xaml

@@ -1,343 +0,0 @@
-<UserControl x:Class="YSAI.Tool.Wpf.Test"
-             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"
-                                     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>
-
-
-
-    <!--资源加载-->
-    <UserControl.Resources>
-        <ResourceDictionary>
-            <Style TargetType="ToolTip">
-                <Setter Property="Foreground" Value="{DynamicResource Font.Content.Foreground}"/>
-                <Setter Property="BorderBrush" Value="{DynamicResource Control.Border.Color}"/>
-            </Style>
-            <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 Source="pack://application:,,,/YSAI.Core.Wpf;component/resources/style/Style_ContextMenu.xaml" />
-            </ResourceDictionary.MergedDictionaries>
-        </ResourceDictionary>
-    </UserControl.Resources>
-
-    <Border Background="#F0F2F0" Width="auto" Height="auto" CornerRadius="{DynamicResource WindowCornerRadius}" Margin="50">
-        <GroupBox Style="{StaticResource GroupBoxTab}" Margin="0"  >
-            <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 Tool}" Width="14" />
-                        <TextBlock Text="{Binding ToolTitle}" FontSize="13"  Grid.Column="1" Foreground="{DynamicResource Font.Content.Foreground}" />
-                    </Grid>
-                </StackPanel>
-            </GroupBox.Header>
-            <!--基础数据与功能区域-->
-            <Grid >
-                <Grid.ColumnDefinitions>
-                    <ColumnDefinition Width="auto"/>
-                    <ColumnDefinition Width="*"/>
-                </Grid.ColumnDefinitions>
-                <!--基础数据-->
-                <Grid Grid.Column="0"  x:Name="propertyGrid" Margin="0,0,3,0" Width="550">
-                    <Grid.RowDefinitions>
-                        <RowDefinition Height="auto"/>
-                        <RowDefinition Height="auto"/>
-                    </Grid.RowDefinitions>
-                   
-                    <!--导入导出-->
-                    <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" />  
-                    </StackPanel>
-                    <!--属性表格-->
-                    <Grid Grid.Row="1" Panel.ZIndex="1">
-                        <Grid.Resources>
-                            <ResourceDictionary>
-                                <Style TargetType="{x:Type Label}" >
-                                    <Setter Property="FontSize" Value="13"/>
-                                    <Setter Property="Foreground" Value="{DynamicResource Font.Content.Foreground}"/>
-                                    <Setter Property="HorizontalAlignment" Value="Left"/>
-                                </Style>
-                                <Style TargetType="{x:Type ComboBox}" BasedOn="{StaticResource DefaultComboBox}" >
-                                    <Setter Property="Height" Value="25"/>
-                                    <Setter Property="Background" Value="White"/>
-                                    <Setter Property="VerticalAlignment" Value="Center"/>
-                                    <Setter Property="helpers:Style_ComboBox.CornerRadius" Value="{DynamicResource WindowCornerRadius}"/>
-                                </Style>
-                                <Style TargetType="{x:Type pt:TextBoxEx}" BasedOn="{StaticResource TextBoxStyle2}">
-                                    <Setter Property="FontSize" Value="13"/>
-                                    <Setter Property="Foreground" Value="{DynamicResource Font.Content.Foreground}"/>
-                                    <Setter Property="BorderBrush" Value="{DynamicResource Control.Border.Color}"/>
-                                    <Setter Property="HorizontalContentAlignment" Value="Center"/>
-                                    <Setter Property="VerticalContentAlignment" Value="Center"/>
-                                </Style>
-
-                                <Style TargetType="CheckBox" BasedOn="{StaticResource CheckBoxStyle}"/>
-
-                                <Style TargetType="ContentControl" >
-                                    <Setter Property="Foreground" Value="{DynamicResource Font.Content.Foreground}"/>
-                                </Style>
-
-                                <Style TargetType="Expander">
-                                    <Setter Property="Foreground" Value="{DynamicResource Font.Content.Foreground}"/>
-                                </Style>
-
-                                <Style TargetType="RadioButton" BasedOn="{StaticResource RadioButtonStyle}"/>
-
-
-                                <Style TargetType="GroupBox" BasedOn="{StaticResource GroupBoxTab}"/>
-
-
-                                <DataTemplate x:Key="HeaderTemplate">
-                                    <StackPanel Orientation="Horizontal">
-                                        <Grid>
-                                            <Grid.ColumnDefinitions>
-                                                <ColumnDefinition Width="auto" />
-                                                <ColumnDefinition Width="*" />
-                                            </Grid.ColumnDefinitions>
-                                            <Image Grid.Column="0" Margin="10,0,8,0" Source="{DynamicResource ConfigBase}" Width="14" />
-                                            <TextBlock Text="{Binding}" FontSize="13"  Grid.Column="1" Foreground="{DynamicResource Font.Content.Foreground}" />
-                                        </Grid>
-                                    </StackPanel>
-                                </DataTemplate>
-
-                            </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}"/>
-                    </Grid>
-                </Grid>
-
-                <!--功能模块与信息-->
-                <Grid Grid.Column="1" MinWidth="600">
-                    <Grid.RowDefinitions>
-                        <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}">
-                                <Image x:Name="image" Source="{DynamicResource GoLeft_Two}" Stretch="Fill" Width="15" Height="15" />
-                                <ControlTemplate.Triggers>
-                                    <Trigger Property="IsChecked" Value="True">
-                                        <Setter Property="Source" TargetName="image" Value="{DynamicResource GoRight_Two}"/>
-                                    </Trigger>
-                                </ControlTemplate.Triggers>
-                            </ControlTemplate>
-                        </ToggleButton.Template>
-                        <ToggleButton.Triggers>
-                            <EventTrigger RoutedEvent="ToggleButton.Unchecked">
-                                <BeginStoryboard>
-                                    <Storyboard>
-                                        <DoubleAnimation Storyboard.TargetName="propertyGrid" Storyboard.TargetProperty="Width" From="0" To="550" Duration="0:0:0.7"/>
-                                        <ThicknessAnimationUsingKeyFrames Storyboard.TargetName="propertyGrid" Storyboard.TargetProperty="Margin" BeginTime="00:00:00">
-                                            <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0" />
-                                            <SplineThicknessKeyFrame KeyTime="00:00:0.7" Value="0,0,3,0" />
-                                        </ThicknessAnimationUsingKeyFrames>
-                                    </Storyboard>
-                                </BeginStoryboard>
-                            </EventTrigger>
-                            <EventTrigger RoutedEvent="ToggleButton.Checked">
-                                <BeginStoryboard>
-                                    <Storyboard>
-                                        <DoubleAnimation Storyboard.TargetName="propertyGrid" Storyboard.TargetProperty="Width" From="550" To="0" Duration="0:0:0.7"/>
-                                        <ThicknessAnimationUsingKeyFrames Storyboard.TargetName="propertyGrid" Storyboard.TargetProperty="Margin" BeginTime="00:00:00">
-                                            <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0,0,3,0" />
-                                            <SplineThicknessKeyFrame KeyTime="00:00:0.7" Value="0" />
-                                        </ThicknessAnimationUsingKeyFrames>
-                                    </Storyboard>
-                                </BeginStoryboard>
-                            </EventTrigger>
-                        </ToggleButton.Triggers>
-                    </ToggleButton>
-                    <!--功能模块-->
-                    <GroupBox Style="{StaticResource GroupBoxTab}" Margin="0" Grid.Row="0">
-                        <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 Function}" Width="14" />
-                                    <TextBlock Text="功能" FontSize="13" Margin="0,0,10,0"  Grid.Column="1" Foreground="{DynamicResource Font.Content.Foreground}" />
-                                </Grid>
-                            </StackPanel>
-                        </GroupBox.Header>
-
-                       
-
-                        <!--■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■-->
-
-
-
-
-
-                        <Grid>
-                            <Grid.RowDefinitions>
-                                <RowDefinition Height="auto"/>
-                                <RowDefinition Height="*"/>
-                            </Grid.RowDefinitions>
-                            <!--Start / Stop-->
-                            <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="打开"/>
-
-                                    <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="关闭"/>
-                                </StackPanel>
-                            </Grid>
-                            <!--发送区域-->
-                            <Grid Grid.Row="1" Grid.Column="1">
-                                <Grid.RowDefinitions>
-                                    <RowDefinition/>
-                                    <RowDefinition/>
-                                </Grid.RowDefinitions>
-                                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,0,-30">
-                                    <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="发送"/>
-                                </StackPanel>
-                                <GroupBox Style="{StaticResource GroupBoxTab}" Grid.Row="1" Grid.ColumnSpan="8" Width="auto" Margin="0,0,0,0">
-                                    <GroupBox.Header>
-                                        <StackPanel Orientation="Horizontal">
-                                            <Grid>
-                                                <Grid.ColumnDefinitions>
-                                                    <ColumnDefinition Width="auto"/>
-                                                    <ColumnDefinition Width="*"/>
-                                                </Grid.ColumnDefinitions>
-                                                <Image Grid.Column="0" Margin="10,0,8,0" Source="{DynamicResource Data}" Width="14" />
-                                                <TextBlock Text="数据" FontSize="13" Margin="0,0,10,0"  Grid.Column="1" Foreground="{DynamicResource Font.Content.Foreground}" VerticalAlignment="Center"/>
-                                            </Grid>
-                                        </StackPanel>
-                                    </GroupBox.Header>
-                                    <TextBox  Padding="5" Style="{DynamicResource TextBoxStyle2}" Height="230" VerticalContentAlignment="Top" HorizontalContentAlignment="Left" TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Visible" Text="{Binding SendData}" />
-                                </GroupBox>
-                            </Grid>
-                        </Grid>
-
-
-
-
-                        <!--■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■-->
-                    </GroupBox>
-                    <!--信息-->
-                    <GroupBox Style="{StaticResource GroupBoxTab}" Margin="0,5,0,0"  Grid.Row="1">
-                        <GroupBox.Header>
-                            <StackPanel Orientation="Horizontal">
-                                <Grid>
-                                    <Grid.ColumnDefinitions>
-                                        <ColumnDefinition Width="auto"/>
-                                        <ColumnDefinition Width="*"/>
-                                    </Grid.ColumnDefinitions>
-                                    <Image Grid.Column="0" Margin="10,0,8,0" Source="{DynamicResource Info}" Width="14" />
-                                    <TextBlock Text="信息" FontSize="13" Margin="0,0,10,0"  Grid.Column="1" Foreground="{DynamicResource Font.Content.Foreground}" VerticalAlignment="Center"/>
-                                </Grid>
-                            </StackPanel>
-                        </GroupBox.Header>
-                        <Grid>
-                            <Grid.RowDefinitions>
-                                <RowDefinition Height="auto" />
-                                <RowDefinition />
-                            </Grid.RowDefinitions>
-                            <Grid.ColumnDefinitions>
-                                <ColumnDefinition />
-                                <ColumnDefinition Width="auto" />
-                            </Grid.ColumnDefinitions>
-                            <StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Right" Margin="0,-40,0,0">
-                                <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="清空"/>
-                            </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>
-                                    <i:EventTrigger EventName="TextChanged">
-                                        <mvvm:EventCommand  Command="{Binding Info_TextChanged}" />
-                                    </i:EventTrigger>
-                                </i:Interaction.Triggers>
-                            </TextBox>
-                        </Grid>
-                    </GroupBox>
-                </Grid>
-            </Grid>
-        </GroupBox>
-    </Border>
-</UserControl>
-

+ 0 - 201
src/YSAI.Tool.Wpf/TestController.cs

@@ -1,201 +0,0 @@
-using CommunityToolkit.Mvvm.Input;
-using System.IO;
-using System.Windows;
-using System.Windows.Input;
-using YSAI.Core.communication.net.ws.client;
-using YSAI.Core.Wpf.mvvm;
-using YSAI.Unility;
-using static YSAI.Core.communication.net.ws.client.WsClientData;
-
-
-namespace YSAI.Tool.Wpf
-{
-    public class TestController : NotifyObject
-    {
-        public TestController()
-        {
-            //初始化基础数据
-            BasicsData = new Basics();
-            //工具标题
-            ToolTitle = "Ws 服务端工具";
-            //配置文件名
-            FileName = typeof(WsClientData).Name;
-            //Ascii是否显示
-            AsciiVisibility = Visibility.Visible;
-            //Hex是否显示
-            HexVisibility = Visibility.Visible;
-            //信息格式;  0 ASCII ; 1 HEX
-            InfoFormat = 0;
-        }
-
-        #region 统一需要的数据
-        /// <summary>
-        /// 导出的文件名
-        /// </summary>
-        private string FileName { get; set; }
-        /// <summary>
-        /// 工具标题
-        /// </summary>
-        public string ToolTitle
-        {
-            get => GetProperty(() => ToolTitle);
-            set => SetProperty(() => ToolTitle, value);
-        }
-        /// <summary>
-        /// 数据源
-        /// </summary>
-        public Basics BasicsData
-        {
-            get => GetProperty(() => BasicsData);
-            set => SetProperty(() => BasicsData, value);
-        }
-
-        /// <summary>
-        /// 导入基础数据命令
-        /// </summary>
-        public ICommand IncBasics { get => new RelayCommand(OnIncBasics); }
-
-        /// <summary>
-        /// 导入基础数据
-        /// </summary>
-        public void OnIncBasics()
-        {
-            (string RetFilePath, string RetFileName) Data = Unility.Windows.FileTool.SelectFiles("json");
-            if (!string.IsNullOrEmpty(Data.RetFilePath))
-            {
-                Basics? basics = FileTool.FileToString(Data.RetFilePath).ToJsonEntity<Basics>();
-                if (basics == null)
-                {
-                    Output("导入失败");
-                }
-                else
-                {
-                    Output("导入成功");
-                    BasicsData = basics;
-                }
-            }
-        }
-
-        /// <summary>
-        /// 导出基础数据命令
-        /// </summary>
-        public ICommand ExpBasics { get => new RelayCommand(OnExpBasics); }
-
-        /// <summary>
-        /// 导出基础数据
-        /// </summary>
-        public void OnExpBasics()
-        {
-            string path = Unility.Windows.FileTool.SelectFolder();
-            if (!string.IsNullOrEmpty(path))
-            {
-                FileTool.StringToFile(Path.Combine(path, $"{FileName}[{DateTime.Now.ToString("yyyyMMddHHmmss")}].json"), BasicsData.ToJson());
-                Output("导出成功");
-            }
-        }
-
-        /// <summary>
-        /// 信息
-        /// </summary>
-        public string Info
-        {
-            get => GetProperty(() => Info);
-            set => SetProperty(() => Info, value);
-        }
-
-        /// <summary>
-        /// 信息框事件
-        /// </summary>
-        public ICommand Info_TextChanged { get => new RelayCommand<System.Windows.Controls.TextChangedEventArgs>(OnInfo_TextChanged); }
-
-        /// <summary>
-        /// 信息框事件
-        /// 让滚动条一直处在最下方
-        /// </summary>
-        public void OnInfo_TextChanged(System.Windows.Controls.TextChangedEventArgs e)
-        {
-            System.Windows.Controls.TextBox textBox = (System.Windows.Controls.TextBox)e.Source;
-            textBox.SelectionStart = textBox.Text.Length;
-            textBox.SelectionLength = 0;
-            textBox.ScrollToEnd();
-        }
-
-        /// <summary>
-        /// 输出标准消息
-        /// </summary>
-        /// <param name="Data">数据</param>
-        /// <param name="IsDate">需要时间</param>
-        private Task Output(string Data, bool IsDate = true)
-        {
-            return Task.Run(() =>
-            {
-                System.Windows.Application.Current?.Dispatcher.Invoke(delegate ()
-                {
-                    if (Info?.Length > 10000)
-                    {
-                        Info = string.Empty;
-                    }
-                    if (IsDate)
-                    {
-                        Info += $" {DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff")} : {Data}\r\n";
-                    }
-                    else
-                    {
-                        Info += $"{Data}\r\n";
-                    }
-                });
-            });
-        }
-        /// <summary>
-        /// ascii
-        /// </summary>
-        public Visibility AsciiVisibility
-        {
-            get => GetProperty(() => AsciiVisibility);
-            set => SetProperty(() => AsciiVisibility, value);
-        }
-        /// <summary>
-        /// hex
-        /// </summary>
-        public Visibility HexVisibility
-        {
-            get => GetProperty(() => HexVisibility);
-            set => SetProperty(() => HexVisibility, value);
-        }
-
-        /// <summary>
-        /// 接收数据格式
-        /// 0 ASCII
-        /// 1 HEX
-        /// </summary>
-        public int InfoFormat
-        {
-            get => GetProperty(() => InfoFormat);
-            set => SetProperty(() => InfoFormat, value);
-        }
-
-        /// <summary>
-        /// 清空信息命令
-        /// </summary>
-        public ICommand Clear { get => new RelayCommand(OnClear); }
-
-        /// <summary>
-        /// 清空信息
-        /// </summary>
-        public void OnClear()
-        {
-            Info = string.Empty;
-        }
-
-        /// <summary>
-        /// 基础数据的显示隐藏
-        /// </summary>
-        public bool BasicsData_ToggleButtonIsChecked
-        {
-            get => GetProperty(() => BasicsData_ToggleButtonIsChecked);
-            set => SetProperty(() => BasicsData_ToggleButtonIsChecked, value);
-        }
-
-        #endregion 统一需要的数据
-    }
-}

+ 1 - 1
src/YSAI.Tool.Wpf/YSAI.Tool.Wpf.csproj

@@ -25,7 +25,7 @@
 		<PackageReference Include="YSAI.Mewtocol" Version="23.360.5691" />
 		<PackageReference Include="YSAI.Mitsubishi" Version="23.360.5691" />
 		<PackageReference Include="YSAI.Modbus" Version="23.360.5691" />
-		<PackageReference Include="YSAI.Mqtt" Version="23.360.26748" />
+		<PackageReference Include="YSAI.Mqtt" Version="23.360.30183" />
 		<PackageReference Include="YSAI.NetMQ" Version="23.352.38022" />
 		<PackageReference Include="YSAI.Netty" Version="23.352.38022" />
 		<PackageReference Include="YSAI.Omron" Version="23.360.5691" />

+ 29 - 0
src/YSAI.Tool.Wpf/controllers/AllenBradleyController.cs

@@ -0,0 +1,29 @@
+using System.Windows;
+using YSAI.AllenBradley;
+using YSAI.Tool.Wpf.template;
+using static YSAI.AllenBradley.AllenBradleyData;
+
+namespace YSAI.Tool.Wpf.controllers
+{
+    public class AllenBradleyController : DaqController<Basics>
+    {
+        public AllenBradleyController()
+        {
+            //初始化基础数据
+            BasicsData = new Basics();
+            //工具标题
+            ToolTitle = "罗克韦尔PLC 工具";
+            //配置文件名
+            FileName = typeof(AllenBradleyData).Name;
+            //Ascii是否显示
+            AsciiVisibility = Visibility.Collapsed;
+            //Hex是否显示
+            HexVisibility = Visibility.Collapsed;
+            //信息格式;  0 ASCII ; 1 HEX
+            InfoFormat = 0;
+            //设置采集对象
+            Daq = new AllenBradleyOperate();
+        }
+    }
+}
+

+ 27 - 0
src/YSAI.Tool.Wpf/controllers/BeckhoffController.cs

@@ -0,0 +1,27 @@
+using System.Windows;
+using YSAI.Beckhoff;
+using YSAI.Tool.Wpf.template;
+using static YSAI.Beckhoff.BeckhoffData;
+namespace YSAI.Tool.Wpf.controllers
+{
+    public class BeckhoffController : DaqController<Basics>
+    {
+        public BeckhoffController()
+        {
+            //初始化基础数据
+            BasicsData = new Basics();
+            //工具标题
+            ToolTitle = "倍福PLC 工具";
+            //配置文件名
+            FileName = typeof(BeckhoffData).Name;
+            //Ascii是否显示
+            AsciiVisibility = Visibility.Collapsed;
+            //Hex是否显示
+            HexVisibility = Visibility.Collapsed;
+            //信息格式;  0 ASCII ; 1 HEX
+            InfoFormat = 0;
+            //设置采集对象
+            Daq = new BeckhoffOperate();
+        }
+    }
+}

+ 34 - 21
src/YSAI.Tool.Wpf/controllers/MainController.cs

@@ -24,63 +24,76 @@ namespace YSAI.Tool.Wpf.controllers
         {
             MenuItemsSource = new ObservableCollection<object>
             {
-
+                 new NavigationViewItem()
+                  {
+                        NavigationCacheMode=NavigationCacheMode.Required,
+                        Content = "PLC",
+                        Icon = new SymbolIcon { Symbol = SymbolRegular.DeviceMeetingRoom32  },
+                        MenuItems = new object[]
+                        {
+                            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)),
+                        }
+                  },
                   new NavigationViewItem()
                   {
                         NavigationCacheMode=NavigationCacheMode.Required,
                         Content = "Opc",
-                        Icon = new SymbolIcon { Symbol = SymbolRegular.Toolbox12 , Filled = true },
+                        Icon = new SymbolIcon { Symbol = SymbolRegular.DeviceMeetingRoom32  },
                         MenuItems = new object[]
                         {
-                            CreationControl(string.Format("{0,-8}{1}", "[ 客户端 ]", "UA"), SymbolRegular.DocumentTextToolbox24, typeof(UaClient)),
-                            CreationControl(string.Format("{0,-8}{1}", "[ 服务端 ]", "UA"), SymbolRegular.DesktopToolbox24, typeof(UaService)),
-                            CreationControl(string.Format("{0,-8}{1}", "[ 客户端 ]", "DA ( x86 run )"), SymbolRegular.ClockToolbox24, typeof(DaClient)),
-                            CreationControl(string.Format("{0,-8}{1}", "[ HTTP ]", "DA"), SymbolRegular.BookToolbox24, typeof(DaHttp))
+                            CreationControl(string.Format("{0,-8}{1}", "[ 客户端 ]", "UA"), SymbolRegular.ServerSurface16, typeof(UaClient)),
+                            CreationControl(string.Format("{0,-8}{1}", "[ 服务端 ]", "UA"), SymbolRegular.ServerSurfaceMultiple16, typeof(UaService)),
+                            CreationControl(string.Format("{0,-8}{1}", "[ 客户端 ]", "DA"), SymbolRegular.ServerSurface16, typeof(DaClient)),
+                            CreationControl(string.Format("{0,-8}{1}", "[ HTTP ]", "DA"), SymbolRegular.Server20, typeof(DaHttp))
                         }
                   },
                   new NavigationViewItem()
                   {
                         NavigationCacheMode=NavigationCacheMode.Required,
                         Content = "Mqtt",
-                        Icon = new SymbolIcon { Symbol = SymbolRegular.Toolbox12 , Filled = true },
+                        Icon = new SymbolIcon { Symbol = SymbolRegular.DeviceMeetingRoom32 },
                         MenuItems = new object[]
                         {
-                            CreationControl("[ 客户端 ]", SymbolRegular.DocumentTextToolbox24, typeof(MqttClient)),
-                            CreationControl("[ 服务端 ]", SymbolRegular.DesktopToolbox24, typeof(MqttService)),
-                            CreationControl(string.Format("{0,-8}{1}", "[ 服务端 ]", "WebSocket"), SymbolRegular.ClockToolbox24, typeof(MqttWsService))
+                            CreationControl("[ 客户端 ]", SymbolRegular.ServerSurface16, typeof(MqttClient)),
+                            CreationControl("[ 服务端 ]", SymbolRegular.ServerSurfaceMultiple16, typeof(MqttService)),
+                            CreationControl(string.Format("{0,-8}{1}", "[ 服务端 ]", "WebSocket"), SymbolRegular.ServerSurfaceMultiple16, typeof(MqttWsService))
                         }
                   },
                   new NavigationViewItem()
                   {
                         NavigationCacheMode=NavigationCacheMode.Required,
                         Content = "Scoket",
-                        Icon = new SymbolIcon { Symbol = SymbolRegular.Toolbox12 , Filled = true },
+                        Icon = new SymbolIcon { Symbol = SymbolRegular.DeviceMeetingRoom32  },
                         MenuItems = new object[]
                         {
-                            CreationControl(string.Format("{0,-8}{1}", "[ 客户端 ]", "Tcp"), SymbolRegular.DocumentTextToolbox24, typeof(TcpClient)),
-                            CreationControl(string.Format("{0,-8}{1}", "[ 服务端 ]", "Tcp"), SymbolRegular.DesktopToolbox24, typeof(TcpService)),
-                            CreationControl("Udp", SymbolRegular.ClockToolbox24, typeof(Udp))
+                            CreationControl(string.Format("{0,-8}{1}", "[ 客户端 ]", "Tcp"), SymbolRegular.ServerSurface16, typeof(TcpClient)),
+                            CreationControl(string.Format("{0,-8}{1}", "[ 服务端 ]", "Tcp"), SymbolRegular.ServerSurfaceMultiple16, typeof(TcpService)),
+                            CreationControl("Udp", SymbolRegular.ServerMultiple20, typeof(Udp))
                         }
                   },
                    new NavigationViewItem()
                   {
                         NavigationCacheMode=NavigationCacheMode.Required,
                         Content = "WebScoket",
-                        Icon = new SymbolIcon { Symbol = SymbolRegular.Toolbox12 , Filled = true },
+                        Icon = new SymbolIcon { Symbol = SymbolRegular.DeviceMeetingRoom32 },
                         MenuItems = new object[]
                         {
-                            CreationControl("[ 客户端 ]", SymbolRegular.DocumentTextToolbox24, typeof(WsClient)),
-                            CreationControl("[ 服务端 ]", SymbolRegular.DesktopToolbox24, typeof(WsService)),
+                            CreationControl("[ 客户端 ]", SymbolRegular.ServerSurface16, typeof(WsClient)),
+                            CreationControl("[ 服务端 ]", SymbolRegular.ServerSurfaceMultiple16, typeof(WsService)),
                         }
                   },
-                  CreationControl("Serial",SymbolRegular.Toolbox12,typeof(Serial)),
-                  CreationControl("Svg",SymbolRegular.Toolbox12,typeof(Svg)),
-                  CreationControl("Test",SymbolRegular.Toolbox12,typeof(Test)),
+                  CreationControl("Serial",SymbolRegular.SerialPort24,typeof(Serial)),
+                  CreationControl("Svg",SymbolRegular.Image24,typeof(Svg)),
             };
 
             FooterMenuItemsSource = new ObservableCollection<object>
             {
-                 CreationControl("关于", SymbolRegular.TableMoveAbove24, typeof(AboutUs))
+                 CreationControl("关于", SymbolRegular.Info12, typeof(AboutUs))
             };
         }
 

+ 27 - 0
src/YSAI.Tool.Wpf/controllers/MewtocolController.cs

@@ -0,0 +1,27 @@
+using System.Windows;
+using YSAI.Mewtocol;
+using YSAI.Tool.Wpf.template;
+using static YSAI.Mewtocol.MewtocolData;
+namespace YSAI.Tool.Wpf.controllers
+{
+    public class MewtocolController : DaqController<Basics>
+    {
+        public MewtocolController()
+        {
+            //初始化基础数据
+            BasicsData = new Basics();
+            //工具标题
+            ToolTitle = "松下PLC 工具";
+            //配置文件名
+            FileName = typeof(MewtocolData).Name;
+            //Ascii是否显示
+            AsciiVisibility = Visibility.Collapsed;
+            //Hex是否显示
+            HexVisibility = Visibility.Collapsed;
+            //信息格式;  0 ASCII ; 1 HEX
+            InfoFormat = 0;
+            //设置采集对象
+            Daq = new MewtocolOperate();
+        }
+    }
+}

+ 27 - 0
src/YSAI.Tool.Wpf/controllers/MitsubishiController.cs

@@ -0,0 +1,27 @@
+using System.Windows;
+using YSAI.Mitsubishi;
+using YSAI.Tool.Wpf.template;
+using static YSAI.Mitsubishi.MitsubishiData;
+namespace YSAI.Tool.Wpf.controllers
+{
+    public class MitsubishiController : DaqController<Basics>
+    {
+        public MitsubishiController()
+        {
+            //初始化基础数据
+            BasicsData = new Basics();
+            //工具标题
+            ToolTitle = "三菱PLC 工具";
+            //配置文件名
+            FileName = typeof(MitsubishiData).Name;
+            //Ascii是否显示
+            AsciiVisibility = Visibility.Collapsed;
+            //Hex是否显示
+            HexVisibility = Visibility.Collapsed;
+            //信息格式;  0 ASCII ; 1 HEX
+            InfoFormat = 0;
+            //设置采集对象
+            Daq = new MitsubishiOperate();
+        }
+    }
+}

+ 27 - 0
src/YSAI.Tool.Wpf/controllers/OmronController.cs

@@ -0,0 +1,27 @@
+using System.Windows;
+using YSAI.Omron;
+using YSAI.Tool.Wpf.template;
+using static YSAI.Omron.OmronData;
+namespace YSAI.Tool.Wpf.controllers
+{
+    public class OmronController : DaqController<Basics>
+    {
+        public OmronController()
+        {
+            //初始化基础数据
+            BasicsData = new Basics();
+            //工具标题
+            ToolTitle = "欧姆龙PLC 工具";
+            //配置文件名
+            FileName = typeof(OmronData).Name;
+            //Ascii是否显示
+            AsciiVisibility = Visibility.Collapsed;
+            //Hex是否显示
+            HexVisibility = Visibility.Collapsed;
+            //信息格式;  0 ASCII ; 1 HEX
+            InfoFormat = 0;
+            //设置采集对象
+            Daq = new OmronOperate();
+        }
+    }
+}

+ 27 - 0
src/YSAI.Tool.Wpf/controllers/SiemensController.cs

@@ -0,0 +1,27 @@
+using System.Windows;
+using YSAI.Siemens;
+using YSAI.Tool.Wpf.template;
+using static YSAI.Siemens.SiemensData;
+namespace YSAI.Tool.Wpf.controllers
+{
+    public class SiemensController : DaqController<Basics>
+    {
+        public SiemensController()
+        {
+            //初始化基础数据
+            BasicsData = new Basics();
+            //工具标题
+            ToolTitle = "西门子PLC 工具";
+            //配置文件名
+            FileName = typeof(SiemensData).Name;
+            //Ascii是否显示
+            AsciiVisibility = Visibility.Collapsed;
+            //Hex是否显示
+            HexVisibility = Visibility.Collapsed;
+            //信息格式;  0 ASCII ; 1 HEX
+            InfoFormat = 0;
+            //设置采集对象
+            Daq = new SiemensOperate();
+        }
+    }
+}

+ 1 - 1
src/YSAI.Tool.Wpf/views/AboutUs.xaml.cs

@@ -14,7 +14,7 @@ namespace YSAI.Tool.Wpf.views
             //设置缓存目录
             webView.EnsureCoreWebView2Async(CoreWebView2Environment.CreateAsync(null, "cache").Result);
             //设置地址
-            webView.Source = new Uri("http://www.yuanshan-ai.com/");
+            webView.Source = new Uri("http://www.yuanshan-ai.com/list/45.html");
         }
     }
 }

+ 20 - 0
src/YSAI.Tool.Wpf/views/AllenBradley.xaml

@@ -0,0 +1,20 @@
+<UserControl x:Class="YSAI.Tool.Wpf.views.AllenBradley"
+             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"
+             Background="{DynamicResource ContentBackgroundPicture}">
+
+    <!--资源加载-->
+    <UserControl.Resources>
+        <ResourceDictionary Source="pack://application:,,,/YSAI.Tool.Wpf;component/template/DaqView.xaml" />
+    </UserControl.Resources>
+    <!--控制器绑定-->
+    <UserControl.DataContext>
+        <c:AllenBradleyController />
+    </UserControl.DataContext>
+    <!--内容控件加载-->
+    <ContentControl Content="{Binding}" ContentTemplate="{DynamicResource DAQ}"/>
+</UserControl>

+ 28 - 0
src/YSAI.Tool.Wpf/views/AllenBradley.xaml.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace YSAI.Tool.Wpf.views
+{
+    /// <summary>
+    /// AllenBradley.xaml 的交互逻辑
+    /// </summary>
+    public partial class AllenBradley : UserControl
+    {
+        public AllenBradley()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 20 - 0
src/YSAI.Tool.Wpf/views/Beckhoff.xaml

@@ -0,0 +1,20 @@
+<UserControl x:Class="YSAI.Tool.Wpf.views.Beckhoff"
+             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"
+             Background="{DynamicResource ContentBackgroundPicture}">
+
+    <!--资源加载-->
+    <UserControl.Resources>
+        <ResourceDictionary Source="pack://application:,,,/YSAI.Tool.Wpf;component/template/DaqView.xaml" />
+    </UserControl.Resources>
+    <!--控制器绑定-->
+    <UserControl.DataContext>
+        <c:BeckhoffController />
+    </UserControl.DataContext>
+    <!--内容控件加载-->
+    <ContentControl Content="{Binding}" ContentTemplate="{DynamicResource DAQ}"/>
+</UserControl>

+ 28 - 0
src/YSAI.Tool.Wpf/views/Beckhoff.xaml.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace YSAI.Tool.Wpf.views
+{
+    /// <summary>
+    /// Beckhoff.xaml 的交互逻辑
+    /// </summary>
+    public partial class Beckhoff : UserControl
+    {
+        public Beckhoff()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 20 - 0
src/YSAI.Tool.Wpf/views/Mewtocol.xaml

@@ -0,0 +1,20 @@
+<UserControl x:Class="YSAI.Tool.Wpf.views.Mewtocol"
+             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"
+             Background="{DynamicResource ContentBackgroundPicture}">
+
+    <!--资源加载-->
+    <UserControl.Resources>
+        <ResourceDictionary Source="pack://application:,,,/YSAI.Tool.Wpf;component/template/DaqView.xaml" />
+    </UserControl.Resources>
+    <!--控制器绑定-->
+    <UserControl.DataContext>
+        <c:MewtocolController />
+    </UserControl.DataContext>
+    <!--内容控件加载-->
+    <ContentControl Content="{Binding}" ContentTemplate="{DynamicResource DAQ}"/>
+</UserControl>

+ 28 - 0
src/YSAI.Tool.Wpf/views/Mewtocol.xaml.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace YSAI.Tool.Wpf.views
+{
+    /// <summary>
+    /// Mewtocol.xaml 的交互逻辑
+    /// </summary>
+    public partial class Mewtocol : UserControl
+    {
+        public Mewtocol()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 20 - 0
src/YSAI.Tool.Wpf/views/Mitsubishi.xaml

@@ -0,0 +1,20 @@
+<UserControl x:Class="YSAI.Tool.Wpf.views.Mitsubishi"
+             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"
+             Background="{DynamicResource ContentBackgroundPicture}">
+
+    <!--资源加载-->
+    <UserControl.Resources>
+        <ResourceDictionary Source="pack://application:,,,/YSAI.Tool.Wpf;component/template/DaqView.xaml" />
+    </UserControl.Resources>
+    <!--控制器绑定-->
+    <UserControl.DataContext>
+        <c:MitsubishiController />
+    </UserControl.DataContext>
+    <!--内容控件加载-->
+    <ContentControl Content="{Binding}" ContentTemplate="{DynamicResource DAQ}"/>
+</UserControl>

+ 28 - 0
src/YSAI.Tool.Wpf/views/Mitsubishi.xaml.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace YSAI.Tool.Wpf.views
+{
+    /// <summary>
+    /// Mitsubishi.xaml 的交互逻辑
+    /// </summary>
+    public partial class Mitsubishi : UserControl
+    {
+        public Mitsubishi()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 20 - 0
src/YSAI.Tool.Wpf/views/Omron.xaml

@@ -0,0 +1,20 @@
+<UserControl x:Class="YSAI.Tool.Wpf.views.Omron"
+             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"
+             Background="{DynamicResource ContentBackgroundPicture}">
+
+    <!--资源加载-->
+    <UserControl.Resources>
+        <ResourceDictionary Source="pack://application:,,,/YSAI.Tool.Wpf;component/template/DaqView.xaml" />
+    </UserControl.Resources>
+    <!--控制器绑定-->
+    <UserControl.DataContext>
+        <c:OmronController />
+    </UserControl.DataContext>
+    <!--内容控件加载-->
+    <ContentControl Content="{Binding}" ContentTemplate="{DynamicResource DAQ}"/>
+</UserControl>

+ 4 - 4
src/YSAI.Tool.Wpf/Test.xaml.cs

@@ -13,14 +13,14 @@ using System.Windows.Media.Imaging;
 using System.Windows.Navigation;
 using System.Windows.Shapes;
 
-namespace YSAI.Tool.Wpf
+namespace YSAI.Tool.Wpf.views
 {
     /// <summary>
-    /// Test.xaml 的交互逻辑
+    /// Omron.xaml 的交互逻辑
     /// </summary>
-    public partial class Test : UserControl
+    public partial class Omron : UserControl
     {
-        public Test()
+        public Omron()
         {
             InitializeComponent();
         }

+ 20 - 0
src/YSAI.Tool.Wpf/views/Siemens.xaml

@@ -0,0 +1,20 @@
+<UserControl x:Class="YSAI.Tool.Wpf.views.Siemens"
+             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"
+             Background="{DynamicResource ContentBackgroundPicture}">
+
+    <!--资源加载-->
+    <UserControl.Resources>
+        <ResourceDictionary Source="pack://application:,,,/YSAI.Tool.Wpf;component/template/DaqView.xaml" />
+    </UserControl.Resources>
+    <!--控制器绑定-->
+    <UserControl.DataContext>
+        <c:SiemensController />
+    </UserControl.DataContext>
+    <!--内容控件加载-->
+    <ContentControl Content="{Binding}" ContentTemplate="{DynamicResource DAQ}"/>
+</UserControl>

+ 28 - 0
src/YSAI.Tool.Wpf/views/Siemens.xaml.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace YSAI.Tool.Wpf.views
+{
+    /// <summary>
+    /// Siemens.xaml 的交互逻辑
+    /// </summary>
+    public partial class Siemens : UserControl
+    {
+        public Siemens()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 1 - 1
src/YSAI.Ver.Manage.Tool/Program.cs

@@ -34,7 +34,7 @@ List<string> strings = new List<string>
     //"YSAI.Redis",
 
     //"YSAI.Kafka",
-    "YSAI.Mqtt",
+    //"YSAI.Mqtt",
     //"YSAI.NetMQ",
     //"YSAI.Netty",
     //"YSAI.RabbitMQ",