From af45ef52314f2be704bc9fb239f9d098f1ea4888 Mon Sep 17 00:00:00 2001 From: "parallelbgls@outlook.com" Date: Tue, 12 Jan 2016 17:18:12 +0800 Subject: [PATCH] 2016-01-12 update 3 --- .../ModBus.Net/ConfigurationManager.Designer.cs | 11 ++++++++++- Modbus.Net/ModBus.Net/ConfigurationManager.resx | 3 +++ Modbus.Net/ModBus.Net/TcpProtocalLinker.cs | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Modbus.Net/ModBus.Net/ConfigurationManager.Designer.cs b/Modbus.Net/ModBus.Net/ConfigurationManager.Designer.cs index b505169..a8ecd42 100644 --- a/Modbus.Net/ModBus.Net/ConfigurationManager.Designer.cs +++ b/Modbus.Net/ModBus.Net/ConfigurationManager.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // 此代码由工具生成。 -// 运行时版本:4.0.30319.34014 +// 运行时版本:4.0.30319.42000 // // 对此文件的更改可能会导致不正确的行为,并且如果 // 重新生成代码,这些更改将会丢失。 @@ -78,6 +78,15 @@ namespace ModBus.Net { } } + /// + /// 查找类似 5000 的本地化字符串。 + /// + internal static string IPConnectionTimeout { + get { + return ResourceManager.GetString("IPConnectionTimeout", resourceCulture); + } + } + /// /// 查找类似 502 的本地化字符串。 /// diff --git a/Modbus.Net/ModBus.Net/ConfigurationManager.resx b/Modbus.Net/ModBus.Net/ConfigurationManager.resx index 2564898..0c3084d 100644 --- a/Modbus.Net/ModBus.Net/ConfigurationManager.resx +++ b/Modbus.Net/ModBus.Net/ConfigurationManager.resx @@ -123,6 +123,9 @@ 192.168.3.247 + + 5000 + 502 diff --git a/Modbus.Net/ModBus.Net/TcpProtocalLinker.cs b/Modbus.Net/ModBus.Net/TcpProtocalLinker.cs index ce6b4d5..ec14b45 100644 --- a/Modbus.Net/ModBus.Net/TcpProtocalLinker.cs +++ b/Modbus.Net/ModBus.Net/TcpProtocalLinker.cs @@ -15,7 +15,7 @@ namespace ModBus.Net protected TcpProtocalLinker(string ip, int port) { - _baseConnector = new TcpConnector(ip, port, 2000); + _baseConnector = new TcpConnector(ip, port, int.Parse(ConfigurationManager.IPConnectionTimeout)); } } } \ No newline at end of file