update 2014-07-31 2

This commit is contained in:
parallelbgls
2014-07-31 17:09:35 +08:00
parent 1f760b6802
commit d9ee83fb89
20 changed files with 2855 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{fa929e21-544c-444e-b18d-184e98b427c6}</ProjectGuid>
<ArchitectureToolsVersion>2.0.0.0</ArchitectureToolsVersion>
<Name>ModBus.Net.Modeling</Name>
<RootNamespace>ModBus.Net.Modeling</RootNamespace>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>bin\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath>
</PropertyGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(VSToolsPath)\ArchitectureTools\Microsoft.VisualStudio.TeamArchitect.ModelingProject.targets" Condition="'$(VSToolsPath)' != ''" />
<ItemGroup>
<Content Include="ModelDefinition\Package1_1514.uml">
<SubType>Content</SubType>
</Content>
<Content Include="ModelDefinition\Package2_1514.uml">
<SubType>Content</SubType>
</Content>
<Content Include="ModelDefinition\Package_1514.uml">
<SubType>Content</SubType>
</Content>
<Folder Include="ModelDefinition\" />
<Content Include="ModelDefinition\ModBus.Net.Modeling.uml">
<SubType>Content</SubType>
</Content>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<modelStoreModel xmlns:dm0="http://schemas.microsoft.com/VisualStudio/2008/DslTools/Core" xmlns:dm1="http://schemas.microsoft.com/dsltools/Kernel" xmlns:dm2="http://schemas.microsoft.com/dsltools/Component" xmlns:dm3="http://schemas.microsoft.com/dsltools/UseCase" xmlns:dm4="http://schemas.microsoft.com/dsltools/Activity" xmlns:dm5="http://schemas.microsoft.com/dsltools/Interaction" xmlns:dm6="http://schemas.microsoft.com/dsltools/UmlModelLibrary" xmlns:dm7="http://schemas.microsoft.com/dsltools/UmlDiagrams" xmlns:dm8="http://schemas.microsoft.com/dsltools/LogicalClassDesigner"
dslVersion="1.0.0.0"
Id="fd145486-0c29-495d-a330-60e368b0a72b"
name="ModBus.Net.Modeling" xmlns="http://schemas.microsoft.com/dsltools/ModelStore">
<profileInstances>
<packageHasProfileInstances
Id="0caec977-1f8c-4ba3-a7db-8cc9ad9cc73b">
<profileInstance
Id="e34d544e-0fea-4ed6-ac5e-1b74119ac791"
name="StandardProfileL2" />
</packageHasProfileInstances>
<packageHasProfileInstances
Id="29349502-908c-4fda-9054-c48619c59ed0">
<profileInstance
Id="532ea607-fb19-44b8-8502-3351b05452be"
name="StandardProfileL3" />
</packageHasProfileInstances>
<packageHasProfileInstances
Id="1487f277-beee-4eb6-960e-448622fa0c8d">
<profileInstance
Id="1c6134f1-8099-43e1-b7ee-8e71eb9375a8"
name="CSharpProfile" />
</packageHasProfileInstances>
</profileInstances>
<packagedElements>
<packageHasNamedElement>
<packageMoniker
Id="7e21a600-5ec3-4b66-9116-79de77e70eda"
LastKnownName="ModBus"
LastKnownLocation="Package_1514.uml" />
</packageHasNamedElement>
<packageHasNamedElement>
<packageMoniker
Id="9173fd98-70ed-48ee-9128-f08c92f0fd99"
LastKnownName="System"
LastKnownLocation="Package2_1514.uml" />
</packageHasNamedElement>
</packagedElements>
<primitiveType
Id="220a3521-e091-4221-bae9-3ef9018e845c"
name="Integer"
isAbstract="false"
isLeaf="false" />
<primitiveType
Id="8943dc84-709e-4f62-b15a-a3273aa6f165"
name="Boolean"
isAbstract="false"
isLeaf="false" />
<primitiveType
Id="59259974-6d55-42c6-b7bd-763d77ac8ef9"
name="String"
isAbstract="false"
isLeaf="false" />
<primitiveType
Id="3ab42e7d-4969-445a-b209-471f5cb8209c"
name="UnlimitedNatural"
isAbstract="false"
isLeaf="false" />
</modelStoreModel>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,176 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns:dm0="http://schemas.microsoft.com/VisualStudio/2008/DslTools/Core" xmlns:dm1="http://schemas.microsoft.com/dsltools/Kernel" xmlns:dm2="http://schemas.microsoft.com/dsltools/Component" xmlns:dm3="http://schemas.microsoft.com/dsltools/UseCase" xmlns:dm4="http://schemas.microsoft.com/dsltools/Activity" xmlns:dm5="http://schemas.microsoft.com/dsltools/Interaction" xmlns:dm6="http://schemas.microsoft.com/dsltools/UmlModelLibrary" xmlns:dm7="http://schemas.microsoft.com/dsltools/UmlDiagrams" xmlns:dm8="http://schemas.microsoft.com/dsltools/LogicalClassDesigner"
dslVersion="1.0.0.0"
Id="9173fd98-70ed-48ee-9128-f08c92f0fd99"
name="System"
visibility="Private" xmlns="http://schemas.microsoft.com/dsltools/ModelStore">
<referencesInternal>
<reference
Id="5c837964-238d-4fdf-b6d8-de7d2f2e0d50"
handle="viewcode://./CodeSchema_Namespace?Namespace%3DSystem"
tag="ViewCode" />
</referencesInternal>
<packagedElements>
<packageHasNamedElement>
<class
Id="ca4f5130-7cc4-4902-951f-434ffd76a2a8"
name="Byte"
visibility="Private"
isAbstract="false"
isLeaf="false"
isActiveClass="false">
<referencesInternal>
<reference
Id="ea406bc8-5323-4373-aa88-c6ee35c3c472"
handle="viewcode://./CodeSchema_Class?Assembly%3D&quot;file:%2F%2F%2FC:%2FProgram Files (x86)%2FReference Assemblies%2FMicrosoft%2FFramework%2F.NETFramework%2Fv4.5%2Fmscorlib.dll&quot; Namespace%3DSystem Type%3D(Name%3DByte ArrayRank%3D1 ParentType%3DByte)"
tag="ViewCode" />
</referencesInternal>
<appliedStereotypesInternal>
<stereotypeInstance
Id="7f7d933f-199c-4b42-af53-a3804c6bb8cf"
name="class"
profile="CSharpProfile">
<propertyInstances>
<stereotypeInstanceHasPropertyInstances
Id="e477a408-6d48-487b-9d97-2b9a1c29d6f9">
<propertyInstance
Id="e45098a6-4ae0-428c-b01a-da430130aedf"
name="ClrAttributes" />
</stereotypeInstanceHasPropertyInstances>
<stereotypeInstanceHasPropertyInstances
Id="13b0c98d-06aa-434b-9a9f-0f79a3d10bc3">
<propertyInstance
Id="806257b1-7263-445c-8195-9baa4e56342f"
name="IsPartial"
value="false" />
</stereotypeInstanceHasPropertyInstances>
<stereotypeInstanceHasPropertyInstances
Id="bb665dde-bffa-4b20-ab92-118cf67a1375">
<propertyInstance
Id="2a616a5e-4bc6-4912-bb3c-cd665ced818c"
name="IsStatic"
value="False" />
</stereotypeInstanceHasPropertyInstances>
<stereotypeInstanceHasPropertyInstances
Id="12f4d521-7ac9-4679-8c41-3afb99fed318">
<propertyInstance
Id="2a77fa36-84b2-4abd-ba58-28952f243af6"
name="IsUnsafe"
value="false" />
</stereotypeInstanceHasPropertyInstances>
<stereotypeInstanceHasPropertyInstances
Id="b9900524-60e3-42ff-9505-4853eb384312">
<propertyInstance
Id="389c1266-f859-4af4-ad11-06eb0b68c145"
name="PackageVisibility"
value="internal" />
</stereotypeInstanceHasPropertyInstances>
</propertyInstances>
</stereotypeInstance>
</appliedStereotypesInternal>
</class>
</packageHasNamedElement>
<packageHasNamedElement>
<Interface
Id="52fd4b9d-c56a-4e97-a30f-d2d07c7a8b08"
name="IDisposable"
isAbstract="false"
isLeaf="false">
<referencesInternal>
<reference
Id="9417e968-f68b-4c40-9bf7-4406ea04de30"
handle="viewcode://./CodeSchema_Interface?Assembly%3D&quot;file:%2F%2F%2FC:%2FProgram Files (x86)%2FReference Assemblies%2FMicrosoft%2FFramework%2F.NETFramework%2Fv4.5%2Fmscorlib.dll&quot; Namespace%3DSystem Type%3DIDisposable"
tag="ViewCode" />
</referencesInternal>
<appliedStereotypesInternal>
<stereotypeInstance
Id="1a268377-4d09-4bc0-9253-308e746837ee"
name="interface"
profile="CSharpProfile">
<propertyInstances>
<stereotypeInstanceHasPropertyInstances
Id="56b1f904-6fe2-4dab-8873-252afac1865a">
<propertyInstance
Id="23e5e6bc-9bb1-422a-9153-eb8955cb6264"
name="ClrAttributes" />
</stereotypeInstanceHasPropertyInstances>
<stereotypeInstanceHasPropertyInstances
Id="fc73498d-de92-4163-b97e-ab595f9facf8">
<propertyInstance
Id="ed39586b-832a-4536-984c-3f735846ba04"
name="IsPartial"
value="false" />
</stereotypeInstanceHasPropertyInstances>
<stereotypeInstanceHasPropertyInstances
Id="7f868e94-e848-4ed8-a2df-ee2ce844e526">
<propertyInstance
Id="3dac89c5-907c-4db0-ab1b-867b95b43c48"
name="IsUnsafe"
value="false" />
</stereotypeInstanceHasPropertyInstances>
<stereotypeInstanceHasPropertyInstances
Id="af04e12f-9dbd-49b5-bc66-59587be5e2d6">
<propertyInstance
Id="e56827bb-2e60-4ba6-b476-3ffcbb6c9cc4"
name="PackageVisibility"
value="internal" />
</stereotypeInstanceHasPropertyInstances>
</propertyInstances>
</stereotypeInstance>
</appliedStereotypesInternal>
</Interface>
</packageHasNamedElement>
<packageHasNamedElement>
<class
Id="aed0afd4-f3fe-429d-9ac1-1a477d7b9a0d"
name="Int16"
visibility="Private"
isAbstract="false"
isLeaf="false"
isActiveClass="false">
<referencesInternal>
<reference
Id="3a475c63-a7f4-4c2d-84ba-19e4247f8d28"
handle="viewcode://./CodeSchema_Struct?Assembly%3D&quot;file:%2F%2F%2FC:%2FProgram Files (x86)%2FReference Assemblies%2FMicrosoft%2FFramework%2F.NETFramework%2Fv4.5%2Fmscorlib.dll&quot; Namespace%3DSystem Type%3DInt16"
tag="ViewCode" />
</referencesInternal>
<appliedStereotypesInternal>
<stereotypeInstance
Id="c642f687-96f5-4550-bb21-f8fade3e0fe1"
name="struct"
profile="CSharpProfile">
<propertyInstances>
<stereotypeInstanceHasPropertyInstances
Id="068f7672-b034-4643-b2b6-8b4245aa24c7">
<propertyInstance
Id="d36ffc7d-83e2-418f-90c0-4611b782af00"
name="ClrAttributes" />
</stereotypeInstanceHasPropertyInstances>
<stereotypeInstanceHasPropertyInstances
Id="2decb316-3044-4ee7-ac16-84190c0612b2">
<propertyInstance
Id="c6856039-4fe9-414e-94f4-105b350c04ed"
name="IsPartial"
value="false" />
</stereotypeInstanceHasPropertyInstances>
<stereotypeInstanceHasPropertyInstances
Id="c9a7d158-03ec-4cde-ac85-4d5f843357f8">
<propertyInstance
Id="ac2bf06d-e59b-4219-bbf5-dc915f2d0823"
name="IsUnsafe"
value="false" />
</stereotypeInstanceHasPropertyInstances>
<stereotypeInstanceHasPropertyInstances
Id="27fcce12-a915-41fd-bbf0-57e74ca9498a">
<propertyInstance
Id="8c3a86ea-2cf3-42e4-bb29-f70fa565edbc"
name="PackageVisibility"
value="internal" />
</stereotypeInstanceHasPropertyInstances>
</propertyInstances>
</stereotypeInstance>
</appliedStereotypesInternal>
</class>
</packageHasNamedElement>
</packagedElements>
</package>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns:dm0="http://schemas.microsoft.com/VisualStudio/2008/DslTools/Core" xmlns:dm1="http://schemas.microsoft.com/dsltools/Kernel" xmlns:dm2="http://schemas.microsoft.com/dsltools/Component" xmlns:dm3="http://schemas.microsoft.com/dsltools/UseCase" xmlns:dm4="http://schemas.microsoft.com/dsltools/Activity" xmlns:dm5="http://schemas.microsoft.com/dsltools/Interaction" xmlns:dm6="http://schemas.microsoft.com/dsltools/UmlModelLibrary" xmlns:dm7="http://schemas.microsoft.com/dsltools/UmlDiagrams" xmlns:dm8="http://schemas.microsoft.com/dsltools/LogicalClassDesigner"
dslVersion="1.0.0.0"
Id="7e21a600-5ec3-4b66-9116-79de77e70eda"
name="ModBus"
visibility="Private" xmlns="http://schemas.microsoft.com/dsltools/ModelStore">
<referencesInternal>
<reference
Id="8b9c69f4-5916-45c1-9b7b-0f8da12bcda7"
handle="viewcode://./CodeSchema_Namespace?Namespace%3DModBus"
tag="ViewCode" />
</referencesInternal>
<packagedElements>
<packageHasNamedElement>
<packageMoniker
Id="4bf62f03-f5b2-4927-bb5e-ed26fcf882c2"
LastKnownName="Net"
LastKnownLocation="Package1_1514.uml" />
</packageHasNamedElement>
</packagedElements>
</package>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>

View File

@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D06F6A34-93F6-4139-B485-8F5686E4E2C9}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>NA200H.UI.ConsoleApp</RootNamespace>
<AssemblyName>NA200H.UI.ConsoleApp</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ModBus.Net\ModBus.Net.csproj">
<Project>{124ebef2-8960-4447-84cf-1d683b1ef7cc}</Project>
<Name>ModBus.Net</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的常规信息通过以下
// 特性集控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("NA200H.UI.Console")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NA200H.UI.Console")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 使此程序集中的类型
// 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
// 则将该类型上的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("5cd5ca28-45d0-4c5e-a488-0973d2d4fa51")]
// 程序集的版本信息由下面四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>

View File

@@ -0,0 +1,8 @@
<Application x:Class="NA200H.UI.WPF.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace NA200H.UI.WPF
{
/// <summary>
/// App.xaml 的交互逻辑
/// </summary>
public partial class App : Application
{
}
}

View File

@@ -0,0 +1,8 @@
<Window x:Class="NA200H.UI.WPF.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
</Grid>
</Window>

View File

@@ -0,0 +1,37 @@
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;
using ModBus.Net;
namespace NA200H.UI.WPF
{
/// <summary>
/// MainWindow.xaml 的交互逻辑
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
ModbusTCPProtocal wrapper = new ModbusTCPProtocal();
ReadCoilStatusTCPProtocal.ReadCoilStatusInputStruct readCoilStatusInputStruct = new ReadCoilStatusTCPProtocal.ReadCoilStatusInputStruct(11, "Q1", 3);
ReadCoilStatusTCPProtocal.ReadCoilStatusOutputStruct readCoilStatusOutputStruct = wrapper.Protocals[ReadCoilStatusTCPProtocal.GetType()].SendReceive(readCoilStatusInputStruct);
for (int i = 0; i < readCoilStatusOutputStruct.CoilStatus.Length; i++)
{
System.Console.WriteLine(readCoilStatusOutputStruct.CoilStatus[i]);
}
System.Console.Read();
}
}
}

View File

@@ -0,0 +1,110 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{78916B03-C910-468E-B593-667A3EFF68BE}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>NA200H.UI.WPF</RootNamespace>
<AssemblyName>NA200H.UI.WPF</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<AppDesigner Include="Properties\" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ModBus.Net\ModBus.Net.csproj">
<Project>{124ebef2-8960-4447-84cf-1d683b1ef7cc}</Project>
<Name>ModBus.Net</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -0,0 +1,55 @@
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// 有关程序集的常规信息通过以下
// 特性集控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("NA200H.UI.WPF")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NA200H.UI.WPF")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 使此程序集中的类型
// 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
// 则将该类型上的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
//若要开始生成可本地化的应用程序,请在
//<PropertyGroup> 中的 .csproj 文件中
//设置 <UICulture>CultureYouAreCodingWith</UICulture>。 例如,如果您在源文件中
//使用的是美国英语,请将 <UICulture> 设置为 en-US。 然后取消
//对以下 NeutralResourceLanguage 特性的注释。 更新
//以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //主题特定资源词典所处位置
//(在页面或应用程序资源词典中
// 未找到某个资源的情况下使用)
ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
//(在页面、应用程序或任何主题特定资源词典中
// 未找到某个资源的情况下使用)
)]
// 程序集的版本信息由下面四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,71 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本: 4.0.30319.34014
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace NA200H.UI.WPF.Properties
{
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// 返回此类使用的、缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("NA200H.UI.WPF.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 为所有资源查找重写当前线程的 CurrentUICulture 属性,
/// 方法是使用此强类型资源类。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

View File

@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34014
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace NA200H.UI.WPF.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}

View File

@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

40
NA200H/NA200H.sln Normal file
View File

@@ -0,0 +1,40 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30501.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NA200H.UI.ConsoleApp", "NA200H.UI.Console\NA200H.UI.ConsoleApp.csproj", "{D06F6A34-93F6-4139-B485-8F5686E4E2C9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModBus.Net", "ModBus.Net\ModBus.Net.csproj", "{124EBEF2-8960-4447-84CF-1D683B1EF7CC}"
EndProject
Project("{F088123C-0E9E-452A-89E6-6BA2F21D5CAC}") = "ModBus.Net.Modeling", "ModBus.Net.Modeling\ModBus.Net.Modeling.modelproj", "{FA929E21-544C-444E-B18D-184E98B427C6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NA200H.UI.WPF", "NA200H.UI.WPF\NA200H.UI.WPF.csproj", "{78916B03-C910-468E-B593-667A3EFF68BE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D06F6A34-93F6-4139-B485-8F5686E4E2C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D06F6A34-93F6-4139-B485-8F5686E4E2C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D06F6A34-93F6-4139-B485-8F5686E4E2C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D06F6A34-93F6-4139-B485-8F5686E4E2C9}.Release|Any CPU.Build.0 = Release|Any CPU
{124EBEF2-8960-4447-84CF-1D683B1EF7CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{124EBEF2-8960-4447-84CF-1D683B1EF7CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{124EBEF2-8960-4447-84CF-1D683B1EF7CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{124EBEF2-8960-4447-84CF-1D683B1EF7CC}.Release|Any CPU.Build.0 = Release|Any CPU
{FA929E21-544C-444E-B18D-184E98B427C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FA929E21-544C-444E-B18D-184E98B427C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FA929E21-544C-444E-B18D-184E98B427C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FA929E21-544C-444E-B18D-184E98B427C6}.Release|Any CPU.Build.0 = Release|Any CPU
{78916B03-C910-468E-B593-667A3EFF68BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{78916B03-C910-468E-B593-667A3EFF68BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{78916B03-C910-468E-B593-667A3EFF68BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{78916B03-C910-468E-B593-667A3EFF68BE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal