组件移除,改为nuget安装模式,新增一个同步网络测试项目,可快速测试数据通信,v1.7.0
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.26430.16
|
||||
VisualStudioVersion = 15.0.27004.2005
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommonLibrary", "CommonLibrary\CommonLibrary.csproj", "{8C97F322-4306-40FC-AFCF-753384D80046}"
|
||||
EndProject
|
||||
@@ -15,6 +15,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClientsLibrary", "ClientsLi
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "软件系统浏览器模版", "软件系统浏览器模版\软件系统浏览器模版.csproj", "{9F528713-4869-4CD2-B76B-38AE5FEE6E7F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HslCommunicationNetTestTool", "HslCommunicationNetTestTool\HslCommunicationNetTestTool.csproj", "{1ACA04D4-BBC0-417D-B06C-14EE030239F2}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -45,8 +47,15 @@ Global
|
||||
{9F528713-4869-4CD2-B76B-38AE5FEE6E7F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9F528713-4869-4CD2-B76B-38AE5FEE6E7F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9F528713-4869-4CD2-B76B-38AE5FEE6E7F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1ACA04D4-BBC0-417D-B06C-14EE030239F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1ACA04D4-BBC0-417D-B06C-14EE030239F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1ACA04D4-BBC0-417D-B06C-14EE030239F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1ACA04D4-BBC0-417D-B06C-14EE030239F2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {EF185E57-0FE8-4992-A83A-1905262134CC}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
@@ -33,11 +33,11 @@
|
||||
<Reference Include="CommonLibrary">
|
||||
<HintPath>..\CommonLibrary\bin\Debug\CommonLibrary.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="HslCommunication">
|
||||
<HintPath>..\Public\HslCommunication.dll</HintPath>
|
||||
<Reference Include="HslCommunication, Version=3.17.10.20, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\HslCommunication.3.17.11\lib\HslCommunication.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>..\Public\Newtonsoft.Json.dll</HintPath>
|
||||
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net35\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
@@ -257,6 +257,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="img\ExtensionManager_vsix_OSReg_16x.png" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="img\Flagthread_7317.png" />
|
||||
|
||||
5
ClientsLibrary/packages.config
Normal file
5
ClientsLibrary/packages.config
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="HslCommunication" version="3.17.11" targetFramework="net35" />
|
||||
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net35" />
|
||||
</packages>
|
||||
@@ -30,9 +30,8 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="HslCommunication, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\Public\HslCommunication.dll</HintPath>
|
||||
<Reference Include="HslCommunication, Version=3.17.10.20, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\HslCommunication.3.17.11\lib\HslCommunication.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net35\Newtonsoft.Json.dll</HintPath>
|
||||
|
||||
@@ -39,11 +39,12 @@ namespace CommonLibrary
|
||||
* 时间:2017年9月19日 22:06:27 版本号:1.4.0
|
||||
* 时间:2017年10月1日 16:00:13 版本号:1.5.0
|
||||
* 时间:2017年10月6日 19:23:09 版本号:1.6.0
|
||||
* 时间:2017年10月21日 11:55:41 版本号:1.7.0
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
SoftBasic.FrameworkVersion = new SystemVersion("1.6.25");
|
||||
SoftBasic.FrameworkVersion = new SystemVersion("1.7.0");
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="HslCommunication" version="3.17.11" targetFramework="net35" />
|
||||
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net35" />
|
||||
</packages>
|
||||
16
HslCommunicationNetTestTool/ClassNetSettings.cs
Normal file
16
HslCommunicationNetTestTool/ClassNetSettings.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace HslCommunicationNetTestTool
|
||||
{
|
||||
public class ClassNetSettings
|
||||
{
|
||||
public string Guid { get; set; }
|
||||
public string IpAddress { get; set; }
|
||||
public string IpPort { get; set; }
|
||||
public string Token { get; set; }
|
||||
public string TimeOut { get; set; }
|
||||
}
|
||||
}
|
||||
5
HslCommunicationNetTestTool/Document/instruction.txt
Normal file
5
HslCommunicationNetTestTool/Document/instruction.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
|
||||
|
||||
本项目是一个测试项目,生成一个exe文件,可以用来测试远程的同步网络通信的功能,
|
||||
在你开发完成服务器的几个后台指令的时候,可以采用本测试项目来快速的查看并验证网络通信是否成功
|
||||
300
HslCommunicationNetTestTool/Form1.Designer.cs
generated
Normal file
300
HslCommunicationNetTestTool/Form1.Designer.cs
generated
Normal file
@@ -0,0 +1,300 @@
|
||||
namespace HslCommunicationNetTestTool
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("NetSimplifyClient");
|
||||
this.userButton1 = new HslCommunication.Controls.UserButton();
|
||||
this.userButton2 = new HslCommunication.Controls.UserButton();
|
||||
this.treeView1 = new System.Windows.Forms.TreeView();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.userButton4 = new HslCommunication.Controls.UserButton();
|
||||
this.label_timeSpend = new System.Windows.Forms.Label();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.textBox4 = new System.Windows.Forms.TextBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.textBox3 = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.userButton3 = new HslCommunication.Controls.UserButton();
|
||||
this.textBox2 = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.panel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// userButton1
|
||||
//
|
||||
this.userButton1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userButton1.CustomerInformation = "";
|
||||
this.userButton1.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
|
||||
this.userButton1.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||
this.userButton1.Location = new System.Drawing.Point(11, 10);
|
||||
this.userButton1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.userButton1.Name = "userButton1";
|
||||
this.userButton1.Size = new System.Drawing.Size(96, 33);
|
||||
this.userButton1.TabIndex = 0;
|
||||
this.userButton1.UIText = "新增";
|
||||
this.userButton1.Click += new System.EventHandler(this.userButton1_Click);
|
||||
//
|
||||
// userButton2
|
||||
//
|
||||
this.userButton2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userButton2.CustomerInformation = "";
|
||||
this.userButton2.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
|
||||
this.userButton2.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||
this.userButton2.Location = new System.Drawing.Point(113, 10);
|
||||
this.userButton2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.userButton2.Name = "userButton2";
|
||||
this.userButton2.Size = new System.Drawing.Size(96, 33);
|
||||
this.userButton2.TabIndex = 1;
|
||||
this.userButton2.UIText = "删除";
|
||||
this.userButton2.Click += new System.EventHandler(this.userButton2_Click);
|
||||
//
|
||||
// treeView1
|
||||
//
|
||||
this.treeView1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.treeView1.Location = new System.Drawing.Point(12, 56);
|
||||
this.treeView1.Name = "treeView1";
|
||||
treeNode1.Name = "节点1";
|
||||
treeNode1.Text = "NetSimplifyClient";
|
||||
this.treeView1.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
|
||||
treeNode1});
|
||||
this.treeView1.Size = new System.Drawing.Size(254, 614);
|
||||
this.treeView1.TabIndex = 2;
|
||||
this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect);
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.panel1.Controls.Add(this.userButton4);
|
||||
this.panel1.Controls.Add(this.label_timeSpend);
|
||||
this.panel1.Controls.Add(this.label6);
|
||||
this.panel1.Controls.Add(this.textBox4);
|
||||
this.panel1.Controls.Add(this.label5);
|
||||
this.panel1.Controls.Add(this.textBox3);
|
||||
this.panel1.Controls.Add(this.label4);
|
||||
this.panel1.Controls.Add(this.userButton3);
|
||||
this.panel1.Controls.Add(this.textBox2);
|
||||
this.panel1.Controls.Add(this.label3);
|
||||
this.panel1.Controls.Add(this.label2);
|
||||
this.panel1.Controls.Add(this.textBox1);
|
||||
this.panel1.Controls.Add(this.label1);
|
||||
this.panel1.Location = new System.Drawing.Point(280, 56);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(779, 613);
|
||||
this.panel1.TabIndex = 3;
|
||||
//
|
||||
// userButton4
|
||||
//
|
||||
this.userButton4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.userButton4.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userButton4.CustomerInformation = "";
|
||||
this.userButton4.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
|
||||
this.userButton4.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||
this.userButton4.Location = new System.Drawing.Point(668, 227);
|
||||
this.userButton4.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.userButton4.Name = "userButton4";
|
||||
this.userButton4.Size = new System.Drawing.Size(96, 33);
|
||||
this.userButton4.TabIndex = 12;
|
||||
this.userButton4.UIText = "clear";
|
||||
this.userButton4.Click += new System.EventHandler(this.userButton4_Click);
|
||||
//
|
||||
// label_timeSpend
|
||||
//
|
||||
this.label_timeSpend.AutoSize = true;
|
||||
this.label_timeSpend.Location = new System.Drawing.Point(368, 238);
|
||||
this.label_timeSpend.Name = "label_timeSpend";
|
||||
this.label_timeSpend.Size = new System.Drawing.Size(11, 12);
|
||||
this.label_timeSpend.TabIndex = 11;
|
||||
this.label_timeSpend.Text = "0";
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(321, 238);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(41, 12);
|
||||
this.label6.TabIndex = 10;
|
||||
this.label6.Text = "耗时:";
|
||||
//
|
||||
// textBox4
|
||||
//
|
||||
this.textBox4.Location = new System.Drawing.Point(223, 234);
|
||||
this.textBox4.Name = "textBox4";
|
||||
this.textBox4.Size = new System.Drawing.Size(76, 21);
|
||||
this.textBox4.TabIndex = 9;
|
||||
this.textBox4.Text = "1";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(164, 238);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(41, 12);
|
||||
this.label5.TabIndex = 8;
|
||||
this.label5.Text = "次数:";
|
||||
//
|
||||
// textBox3
|
||||
//
|
||||
this.textBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.textBox3.Location = new System.Drawing.Point(62, 273);
|
||||
this.textBox3.Multiline = true;
|
||||
this.textBox3.Name = "textBox3";
|
||||
this.textBox3.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
|
||||
this.textBox3.Size = new System.Drawing.Size(702, 327);
|
||||
this.textBox3.TabIndex = 7;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(3, 277);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(41, 12);
|
||||
this.label4.TabIndex = 6;
|
||||
this.label4.Text = "数据:";
|
||||
//
|
||||
// userButton3
|
||||
//
|
||||
this.userButton3.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userButton3.CustomerInformation = "";
|
||||
this.userButton3.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
|
||||
this.userButton3.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||
this.userButton3.Location = new System.Drawing.Point(62, 227);
|
||||
this.userButton3.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.userButton3.Name = "userButton3";
|
||||
this.userButton3.Size = new System.Drawing.Size(96, 33);
|
||||
this.userButton3.TabIndex = 5;
|
||||
this.userButton3.UIText = "发送";
|
||||
this.userButton3.Click += new System.EventHandler(this.userButton3_Click);
|
||||
//
|
||||
// textBox2
|
||||
//
|
||||
this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.textBox2.Location = new System.Drawing.Point(62, 41);
|
||||
this.textBox2.Multiline = true;
|
||||
this.textBox2.Name = "textBox2";
|
||||
this.textBox2.Size = new System.Drawing.Size(702, 179);
|
||||
this.textBox2.TabIndex = 4;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(3, 45);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(41, 12);
|
||||
this.label3.TabIndex = 3;
|
||||
this.label3.Text = "数据:";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(199, 12);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(113, 12);
|
||||
this.label2.TabIndex = 2;
|
||||
this.label2.Text = "12345 或者是 1.1.1";
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.Location = new System.Drawing.Point(62, 8);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.Size = new System.Drawing.Size(131, 21);
|
||||
this.textBox1.TabIndex = 1;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(3, 12);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(53, 12);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "指令头:";
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Location = new System.Drawing.Point(278, 31);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(65, 12);
|
||||
this.label7.TabIndex = 4;
|
||||
this.label7.Text = "选中连接:";
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1072, 683);
|
||||
this.Controls.Add(this.label7);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.treeView1);
|
||||
this.Controls.Add(this.userButton2);
|
||||
this.Controls.Add(this.userButton1);
|
||||
this.Name = "Form1";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "HslCommunication同步网络测试工具";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
|
||||
this.Load += new System.EventHandler(this.Form1_Load);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private HslCommunication.Controls.UserButton userButton1;
|
||||
private HslCommunication.Controls.UserButton userButton2;
|
||||
private System.Windows.Forms.TreeView treeView1;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Label label_timeSpend;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.TextBox textBox4;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.TextBox textBox3;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private HslCommunication.Controls.UserButton userButton3;
|
||||
private System.Windows.Forms.TextBox textBox2;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private HslCommunication.Controls.UserButton userButton4;
|
||||
}
|
||||
}
|
||||
169
HslCommunicationNetTestTool/Form1.cs
Normal file
169
HslCommunicationNetTestTool/Form1.cs
Normal file
@@ -0,0 +1,169 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using HslCommunication;
|
||||
|
||||
namespace HslCommunicationNetTestTool
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
|
||||
private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
|
||||
{
|
||||
if (treeView1.SelectedNode.Tag is HslCommunication.Enthernet.NetSimplifyClient client)
|
||||
{
|
||||
CurrentClient = client;
|
||||
label7.Text = "选择连接:" + treeView1.SelectedNode.Text;
|
||||
}
|
||||
}
|
||||
|
||||
private HslCommunication.Enthernet.NetSimplifyClient CurrentClient { get; set; }
|
||||
private List<ClassNetSettings> List { get; set; }
|
||||
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
// 加载配置,如果存在的话
|
||||
string saveStr = Settings1.Default.Connects;
|
||||
if (!string.IsNullOrEmpty(saveStr))
|
||||
{
|
||||
ClassNetSettings[] settings = JArray.Parse(saveStr).ToObject<ClassNetSettings[]>();
|
||||
|
||||
TreeNode root = treeView1.Nodes[0];
|
||||
|
||||
foreach (var m in settings)
|
||||
{
|
||||
string name = $"{m.IpAddress} [{m.IpPort}]";
|
||||
TreeNode node = new TreeNode(name);
|
||||
node.Tag = new HslCommunication.Enthernet.NetSimplifyClient(
|
||||
new System.Net.IPEndPoint(System.Net.IPAddress.Parse(m.IpAddress),
|
||||
int.Parse(m.IpPort)))
|
||||
{
|
||||
ConnectTimeout = int.Parse(m.TimeOut),
|
||||
KeyToken = new Guid(m.Token),
|
||||
};
|
||||
node.ToolTipText = m.Guid;
|
||||
|
||||
root.Nodes.Add(node);
|
||||
}
|
||||
|
||||
root.Expand();
|
||||
List = new List<ClassNetSettings>(settings);
|
||||
}
|
||||
|
||||
if (List == null) List = new List<ClassNetSettings>();
|
||||
}
|
||||
|
||||
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
Settings1.Default.Connects = JArray.FromObject(List).ToString();
|
||||
Settings1.Default.Save();
|
||||
|
||||
}
|
||||
|
||||
private void userButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (treeView1.Nodes[0].IsSelected)
|
||||
{
|
||||
// 新增端口操作
|
||||
using (FormCreateClient form = new FormCreateClient())
|
||||
{
|
||||
if (form.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
HslCommunication.Enthernet.NetSimplifyClient client = form.Client;
|
||||
|
||||
ClassNetSettings setting = new ClassNetSettings()
|
||||
{
|
||||
Guid = Guid.NewGuid().ToString(),
|
||||
IpAddress = form.IpAddress,
|
||||
IpPort = form.Port,
|
||||
Token = form.Token,
|
||||
TimeOut = form.ConnectTimeout,
|
||||
};
|
||||
|
||||
string name = $"{form.IpAddress} [{form.Port}]";
|
||||
TreeNode node = new TreeNode(name);
|
||||
node.Tag = client;
|
||||
treeView1.Nodes[0].Nodes.Add(node);
|
||||
|
||||
List.Add(setting);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void userButton2_Click(object sender, EventArgs e)
|
||||
{
|
||||
// 删除端口操作
|
||||
if (ReferenceEquals(treeView1.SelectedNode.Parent, treeView1.Nodes[0]))
|
||||
{
|
||||
if (treeView1.SelectedNode.Tag is HslCommunication.Enthernet.NetSimplifyClient client)
|
||||
{
|
||||
List.RemoveAll(match => match.Guid == treeView1.SelectedNode.ToolTipText);
|
||||
treeView1.SelectedNode.Parent.Nodes.Remove(treeView1.SelectedNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void userButton3_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (CurrentClient != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
NetHandle handle = 0;
|
||||
if (textBox1.Text.IndexOf(".") < 0)
|
||||
{
|
||||
// 纯数字
|
||||
handle = int.Parse(textBox1.Text);
|
||||
}
|
||||
else
|
||||
{
|
||||
string[] values = textBox1.Text.Split('.');
|
||||
handle = new NetHandle(byte.Parse(values[0]), byte.Parse(values[1]), ushort.Parse(values[2]));
|
||||
}
|
||||
|
||||
int count = int.Parse(textBox4.Text);
|
||||
|
||||
DateTime start = DateTime.Now;
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
|
||||
OperateResultString resultString = CurrentClient.ReadFromServer(handle, textBox2.Text);
|
||||
|
||||
if (resultString.IsSuccess)
|
||||
{
|
||||
textBox3.AppendText(resultString.Content + Environment.NewLine);
|
||||
}
|
||||
else
|
||||
{
|
||||
textBox3.AppendText("读取失败:" + resultString.Message + Environment.NewLine);
|
||||
}
|
||||
}
|
||||
|
||||
label_timeSpend.Text = (DateTime.Now - start).TotalSeconds.ToString("F3");
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void userButton4_Click(object sender, EventArgs e)
|
||||
{
|
||||
textBox3.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
120
HslCommunicationNetTestTool/Form1.resx
Normal file
120
HslCommunicationNetTestTool/Form1.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<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" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</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" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</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>
|
||||
160
HslCommunicationNetTestTool/FormCreateClient.Designer.cs
generated
Normal file
160
HslCommunicationNetTestTool/FormCreateClient.Designer.cs
generated
Normal file
@@ -0,0 +1,160 @@
|
||||
namespace HslCommunicationNetTestTool
|
||||
{
|
||||
partial class FormCreateClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.textBox2 = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.textBox3 = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.textBox4 = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.userButton1 = new HslCommunication.Controls.UserButton();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(21, 27);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(47, 12);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Ip 地址";
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.Location = new System.Drawing.Point(90, 24);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.Size = new System.Drawing.Size(284, 21);
|
||||
this.textBox1.TabIndex = 1;
|
||||
this.textBox1.Text = "127.0.0.1";
|
||||
//
|
||||
// textBox2
|
||||
//
|
||||
this.textBox2.Location = new System.Drawing.Point(90, 53);
|
||||
this.textBox2.Name = "textBox2";
|
||||
this.textBox2.Size = new System.Drawing.Size(284, 21);
|
||||
this.textBox2.TabIndex = 3;
|
||||
this.textBox2.Text = "10000";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(21, 56);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(41, 12);
|
||||
this.label2.TabIndex = 2;
|
||||
this.label2.Text = "端口号";
|
||||
//
|
||||
// textBox3
|
||||
//
|
||||
this.textBox3.Location = new System.Drawing.Point(90, 82);
|
||||
this.textBox3.Name = "textBox3";
|
||||
this.textBox3.Size = new System.Drawing.Size(284, 21);
|
||||
this.textBox3.TabIndex = 5;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(21, 85);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(29, 12);
|
||||
this.label3.TabIndex = 4;
|
||||
this.label3.Text = "令牌";
|
||||
//
|
||||
// textBox4
|
||||
//
|
||||
this.textBox4.Location = new System.Drawing.Point(90, 111);
|
||||
this.textBox4.Name = "textBox4";
|
||||
this.textBox4.Size = new System.Drawing.Size(284, 21);
|
||||
this.textBox4.TabIndex = 7;
|
||||
this.textBox4.Text = "5000";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(21, 114);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(65, 12);
|
||||
this.label4.TabIndex = 6;
|
||||
this.label4.Text = "超时(毫秒)";
|
||||
//
|
||||
// userButton1
|
||||
//
|
||||
this.userButton1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userButton1.CustomerInformation = "";
|
||||
this.userButton1.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
|
||||
this.userButton1.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||
this.userButton1.Location = new System.Drawing.Point(166, 147);
|
||||
this.userButton1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.userButton1.Name = "userButton1";
|
||||
this.userButton1.Size = new System.Drawing.Size(78, 25);
|
||||
this.userButton1.TabIndex = 8;
|
||||
this.userButton1.UIText = "确定";
|
||||
this.userButton1.Click += new System.EventHandler(this.userButton1_Click);
|
||||
//
|
||||
// FormCreateClient
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(412, 185);
|
||||
this.Controls.Add(this.userButton1);
|
||||
this.Controls.Add(this.textBox4);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.textBox3);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.textBox2);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.textBox1);
|
||||
this.Controls.Add(this.label1);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "FormCreateClient";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "FormCreateClient";
|
||||
this.Load += new System.EventHandler(this.FormCreateClient_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
private System.Windows.Forms.TextBox textBox2;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox textBox3;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.TextBox textBox4;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private HslCommunication.Controls.UserButton userButton1;
|
||||
}
|
||||
}
|
||||
59
HslCommunicationNetTestTool/FormCreateClient.cs
Normal file
59
HslCommunicationNetTestTool/FormCreateClient.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace HslCommunicationNetTestTool
|
||||
{
|
||||
public partial class FormCreateClient : Form
|
||||
{
|
||||
public FormCreateClient()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void FormCreateClient_Load(object sender, EventArgs e)
|
||||
{
|
||||
textBox3.Text = Guid.Empty.ToString();
|
||||
}
|
||||
|
||||
private void userButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
Client = new HslCommunication.Enthernet.NetSimplifyClient(
|
||||
new System.Net.IPEndPoint(System.Net.IPAddress.Parse(textBox1.Text), int.Parse(textBox2.Text)))
|
||||
{
|
||||
KeyToken = new Guid(textBox3.Text),
|
||||
ConnectTimeout = int.Parse(textBox4.Text),
|
||||
};
|
||||
|
||||
IpAddress = textBox1.Text;
|
||||
Port = textBox2.Text;
|
||||
Token = textBox3.Text;
|
||||
ConnectTimeout = textBox4.Text;
|
||||
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public string IpAddress { get; private set; }
|
||||
public string Port { get; private set; }
|
||||
public string Token { get; private set; }
|
||||
public string ConnectTimeout { get; private set; }
|
||||
|
||||
|
||||
|
||||
public HslCommunication.Enthernet.NetSimplifyClient Client { get; private set; }
|
||||
}
|
||||
}
|
||||
120
HslCommunicationNetTestTool/FormCreateClient.resx
Normal file
120
HslCommunicationNetTestTool/FormCreateClient.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<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" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</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" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</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>
|
||||
106
HslCommunicationNetTestTool/HslCommunicationNetTestTool.csproj
Normal file
106
HslCommunicationNetTestTool/HslCommunicationNetTestTool.csproj
Normal file
@@ -0,0 +1,106 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" 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>{1ACA04D4-BBC0-417D-B06C-14EE030239F2}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>HslCommunicationNetTestTool</RootNamespace>
|
||||
<AssemblyName>HslCommunicationNetTestTool</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.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="HslCommunication, Version=3.17.10.20, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\HslCommunication.3.17.11\lib\HslCommunication.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net35\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ClassNetSettings.cs" />
|
||||
<Compile Include="Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FormCreateClient.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FormCreateClient.designer.cs">
|
||||
<DependentUpon>FormCreateClient.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Settings1.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<DependentUpon>Settings1.settings</DependentUpon>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FormCreateClient.resx">
|
||||
<DependentUpon>FormCreateClient.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<None Include="Settings1.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings1.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Document\instruction.txt" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
21
HslCommunicationNetTestTool/Program.cs
Normal file
21
HslCommunicationNetTestTool/Program.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace HslCommunicationNetTestTool
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// 应用程序的主入口点。
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new Form1());
|
||||
}
|
||||
}
|
||||
}
|
||||
36
HslCommunicationNetTestTool/Properties/AssemblyInfo.cs
Normal file
36
HslCommunicationNetTestTool/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("HslCommunicationNetTestTool")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("HslCommunicationNetTestTool")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2017")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("1aca04d4-bbc0-417d-b06c-14ee030239f2")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
||||
// 方法是按如下所示使用“*”: :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
71
HslCommunicationNetTestTool/Properties/Resources.Designer.cs
generated
Normal file
71
HslCommunicationNetTestTool/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,71 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本: 4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace HslCommunicationNetTestTool.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("HslCommunicationNetTestTool.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
117
HslCommunicationNetTestTool/Properties/Resources.resx
Normal file
117
HslCommunicationNetTestTool/Properties/Resources.resx
Normal 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>
|
||||
30
HslCommunicationNetTestTool/Properties/Settings.Designer.cs
generated
Normal file
30
HslCommunicationNetTestTool/Properties/Settings.Designer.cs
generated
Normal file
@@ -0,0 +1,30 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace HslCommunicationNetTestTool.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
7
HslCommunicationNetTestTool/Properties/Settings.settings
Normal file
7
HslCommunicationNetTestTool/Properties/Settings.settings
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
38
HslCommunicationNetTestTool/Settings1.Designer.cs
generated
Normal file
38
HslCommunicationNetTestTool/Settings1.Designer.cs
generated
Normal file
@@ -0,0 +1,38 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace HslCommunicationNetTestTool {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.3.0.0")]
|
||||
internal sealed partial class Settings1 : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings1 defaultInstance = ((Settings1)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings1())));
|
||||
|
||||
public static Settings1 Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("[]")]
|
||||
public string Connects {
|
||||
get {
|
||||
return ((string)(this["Connects"]));
|
||||
}
|
||||
set {
|
||||
this["Connects"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
9
HslCommunicationNetTestTool/Settings1.settings
Normal file
9
HslCommunicationNetTestTool/Settings1.settings
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="HslCommunicationNetTestTool" GeneratedClassName="Settings1">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="Connects" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">[]</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
15
HslCommunicationNetTestTool/app.config
Normal file
15
HslCommunicationNetTestTool/app.config
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="HslCommunicationNetTestTool.Settings1" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<userSettings>
|
||||
<HslCommunicationNetTestTool.Settings1>
|
||||
<setting name="Connects" serializeAs="String">
|
||||
<value>[]</value>
|
||||
</setting>
|
||||
</HslCommunicationNetTestTool.Settings1>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
5
HslCommunicationNetTestTool/packages.config
Normal file
5
HslCommunicationNetTestTool/packages.config
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="HslCommunication" version="3.17.11" targetFramework="net35" />
|
||||
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net35" />
|
||||
</packages>
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
15
README.md
15
README.md
@@ -97,10 +97,9 @@
|
||||
以下就是该库的部分子功能说明,您也可以只使用其中一部分的功能类,比如日志功能!完整的功能手册将在近期放出,方便理解整个系统的底层机制。</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/dathlin/ClientServerProject/blob/master/files/LogReadme.md">简单强大的日志记录功能使用</a></li>
|
||||
<li><a href="https://github.com/dathlin/ClientServerProject/blob/master/files/SimplifyNet.md">同步网络数据交互功能使用</a></li>
|
||||
<li><a href="https://github.com/dathlin/ClientServerProject/blob/master/files/MelsecReadMe.md">三菱PLC数据读写介绍</a></li>
|
||||
<li><a href="https://github.com/dathlin/ClientServerProject/blob/master/files/SiemensReadMe.md">西门子PLC数据读写手册</a></li>
|
||||
<li><a href="http://www.cnblogs.com/dathlin/p/7691693.html">简单强大的日志记录功能使用</a></li>
|
||||
<li><a href="http://www.cnblogs.com/dathlin/p/7697782.html">同步网络数据交互功能使用</a></li>
|
||||
<li><a href="http://www.cnblogs.com/dathlin/p/7469679.html">三菱和西门子的PLC数据读写介绍</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -113,9 +112,13 @@ using HslCommunication;
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
下载地址:<a href="https://github.com/dathlin/ClientServerProject/raw/master/Public/HslCommunication.dll">单独的组件dll文件</a>
|
||||
文档地址:<a href="https://github.com/dathlin/ClientServerProject/raw/master/Public/HslCommunication.xml">单独的组件xml注释文件</a>
|
||||
在Nuget控制台输入下面的指令即可安装,或者使用VS2017的Nuget包管理器来方便的下载组件,如果不清楚怎么使用Nuget可以参考网上教程。
|
||||
|
||||
<pre>
|
||||
<code>
|
||||
Install-Package HslCommunication
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
# 整个系统的架构设计如下
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="HslCommunication" version="3.17.11" targetFramework="net45" />
|
||||
<package id="MaterialDesignColors" version="1.1.3" targetFramework="net45" />
|
||||
<package id="MaterialDesignThemes" version="2.3.1.953" targetFramework="net45" />
|
||||
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net45" />
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
<Reference Include="CommonLibrary">
|
||||
<HintPath>..\CommonLibrary\bin\Debug\CommonLibrary.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="HslCommunication">
|
||||
<HintPath>..\Public\HslCommunication.dll</HintPath>
|
||||
<Reference Include="HslCommunication, Version=3.17.10.20, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\HslCommunication.3.17.11\lib\HslCommunication.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MaterialDesignColors, Version=1.1.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MaterialDesignColors.1.1.3\lib\net45\MaterialDesignColors.dll</HintPath>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="HslCommunication" version="3.17.11" targetFramework="net35" />
|
||||
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net35" />
|
||||
</packages>
|
||||
@@ -39,9 +39,8 @@
|
||||
<Reference Include="CommonLibrary">
|
||||
<HintPath>..\CommonLibrary\bin\Debug\CommonLibrary.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="HslCommunication, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\Public\HslCommunication.dll</HintPath>
|
||||
<Reference Include="HslCommunication, Version=3.17.10.20, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\HslCommunication.3.17.11\lib\HslCommunication.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net35\Newtonsoft.Json.dll</HintPath>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="HslCommunication" version="3.17.11" targetFramework="net35" />
|
||||
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net35" />
|
||||
</packages>
|
||||
@@ -35,9 +35,8 @@
|
||||
<Reference Include="CommonLibrary">
|
||||
<HintPath>..\CommonLibrary\bin\Debug\CommonLibrary.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="HslCommunication, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\Public\HslCommunication.dll</HintPath>
|
||||
<Reference Include="HslCommunication, Version=3.17.10.20, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\HslCommunication.3.17.11\lib\HslCommunication.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net35\Newtonsoft.Json.dll</HintPath>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<packages>
|
||||
<package id="Antlr" version="3.5.0.2" targetFramework="net45" />
|
||||
<package id="bootstrap" version="3.3.7" targetFramework="net45" />
|
||||
<package id="HslCommunication" version="3.17.11" targetFramework="net45" />
|
||||
<package id="jQuery" version="1.10.2" targetFramework="net45" />
|
||||
<package id="jQuery.Validation" version="1.16.0" targetFramework="net45" />
|
||||
<package id="Microsoft.ApplicationInsights" version="2.4.0" targetFramework="net45" />
|
||||
|
||||
@@ -57,8 +57,8 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\CommonLibrary\bin\Debug\CommonLibrary.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="HslCommunication">
|
||||
<HintPath>..\Public\HslCommunication.dll</HintPath>
|
||||
<Reference Include="HslCommunication, Version=3.17.10.20, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\HslCommunication.3.17.11\lib\HslCommunication.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AI.Agent.Intercept, Version=2.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ApplicationInsights.Agent.Intercept.2.4.0\lib\net45\Microsoft.AI.Agent.Intercept.dll</HintPath>
|
||||
|
||||
Reference in New Issue
Block a user