diff --git a/CommonControls/Modbus.Common.csproj b/CommonControls/Modbus.Common.csproj
index a34c6be..5336f76 100644
--- a/CommonControls/Modbus.Common.csproj
+++ b/CommonControls/Modbus.Common.csproj
@@ -10,7 +10,7 @@
Properties
Modbus.Common
Modbus.Common
- v4.5.2
+ v4.8
512
diff --git a/CommonControls/Properties/AssemblyInfo.cs b/CommonControls/Properties/AssemblyInfo.cs
index 3da88bb..5eb70da 100644
--- a/CommonControls/Properties/AssemblyInfo.cs
+++ b/CommonControls/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.1.0.0")]
-[assembly: AssemblyFileVersion("2.1.0.0")]
+[assembly: AssemblyVersion("2.1.3.0")]
+[assembly: AssemblyFileVersion("2.1.3.0")]
diff --git a/CommonControls/app.config b/CommonControls/app.config
index 6964f9d..178bf47 100644
--- a/CommonControls/app.config
+++ b/CommonControls/app.config
@@ -51,4 +51,4 @@
-
+
diff --git a/ModbusLib/ModbusLib.csproj b/ModbusLib/ModbusLib.csproj
index b148ce1..a65ced9 100644
--- a/ModbusLib/ModbusLib.csproj
+++ b/ModbusLib/ModbusLib.csproj
@@ -10,7 +10,7 @@
Properties
ModbusLib
ModbusLib
- v4.5.2
+ v4.8
512
diff --git a/ModbusLib/Properties/AssemblyInfo.cs b/ModbusLib/Properties/AssemblyInfo.cs
index 3a8e3c8..00794fb 100644
--- a/ModbusLib/Properties/AssemblyInfo.cs
+++ b/ModbusLib/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.1.0.0")]
-[assembly: AssemblyFileVersion("2.1.0.0")]
+[assembly: AssemblyVersion("2.1.3.0")]
+[assembly: AssemblyFileVersion("2.1.3.0")]
diff --git a/ModbusMaster/MasterForm.Designer.cs b/ModbusMaster/MasterForm.Designer.cs
index cfa0871..6c6f6c7 100644
--- a/ModbusMaster/MasterForm.Designer.cs
+++ b/ModbusMaster/MasterForm.Designer.cs
@@ -63,6 +63,10 @@ private void InitializeComponent()
this.radioButtonInteger.Location = new System.Drawing.Point(86, 20);
this.radioButtonInteger.Size = new System.Drawing.Size(64, 21);
//
+ // grpStart
+ //
+ this.grpStart.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)));
+ //
// label1
//
this.label1.Visible = false;
@@ -214,6 +218,7 @@ private void InitializeComponent()
// MasterForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScroll = true;
this.ClientSize = new System.Drawing.Size(869, 917);
this.Controls.Add(this.buttonDisconnect);
this.Controls.Add(this.btnConnect);
diff --git a/ModbusMaster/MasterForm.cs b/ModbusMaster/MasterForm.cs
index 40489f8..3e8ba39 100644
--- a/ModbusMaster/MasterForm.cs
+++ b/ModbusMaster/MasterForm.cs
@@ -272,6 +272,10 @@ private void cbPoll_CheckStateChanged(object sender, EventArgs e)
private void pollTimer_Tick(object sender, EventArgs e)
{
+ // disconnected state, skip
+ if (groupBoxFunctions.Enabled == false)
+ return;
+
if (_lastReadCommand != 0)
ExecuteReadCommand(_lastReadCommand);
}
diff --git a/ModbusMaster/ModbusMaster.csproj b/ModbusMaster/ModbusMaster.csproj
index f8ff13c..3ee2845 100644
--- a/ModbusMaster/ModbusMaster.csproj
+++ b/ModbusMaster/ModbusMaster.csproj
@@ -10,7 +10,7 @@
Properties
ModbusMaster
ModbusMaster
- v4.5.2
+ v4.8
512
diff --git a/ModbusMaster/Properties/AssemblyInfo.cs b/ModbusMaster/Properties/AssemblyInfo.cs
index 4b27d03..a9cfb85 100644
--- a/ModbusMaster/Properties/AssemblyInfo.cs
+++ b/ModbusMaster/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.1.0.0")]
-[assembly: AssemblyFileVersion("2.1.0.0")]
+[assembly: AssemblyVersion("2.1.3.0")]
+[assembly: AssemblyFileVersion("2.1.3.0")]
diff --git a/ModbusMaster/app.config b/ModbusMaster/app.config
index 8f346d7..a77c5e4 100644
--- a/ModbusMaster/app.config
+++ b/ModbusMaster/app.config
@@ -1,6 +1,6 @@
-
+
diff --git a/ModbusSlave/ModbusSlave.csproj b/ModbusSlave/ModbusSlave.csproj
index 1c0a2c5..822fd31 100644
--- a/ModbusSlave/ModbusSlave.csproj
+++ b/ModbusSlave/ModbusSlave.csproj
@@ -10,7 +10,7 @@
Properties
ModbusSlave
ModbusSlave
- v4.5.2
+ v4.8
512
@@ -180,4 +180,4 @@
-->
-
\ No newline at end of file
+
diff --git a/ModbusSlave/Properties/AssemblyInfo.cs b/ModbusSlave/Properties/AssemblyInfo.cs
index 88259f5..5b0e8db 100644
--- a/ModbusSlave/Properties/AssemblyInfo.cs
+++ b/ModbusSlave/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.1.0.0")]
-[assembly: AssemblyFileVersion("2.1.0.0")]
\ No newline at end of file
+[assembly: AssemblyVersion("2.1.3.0")]
+[assembly: AssemblyFileVersion("2.1.3.0")]
\ No newline at end of file
diff --git a/ModbusSlave/SlaveForm.Designer.cs b/ModbusSlave/SlaveForm.Designer.cs
index a8a173c..c669006 100644
--- a/ModbusSlave/SlaveForm.Designer.cs
+++ b/ModbusSlave/SlaveForm.Designer.cs
@@ -36,6 +36,10 @@ private void InitializeComponent()
this.grpExchange.SuspendLayout();
this.SuspendLayout();
//
+ // grpStart
+ //
+ this.grpStart.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)));
+ //
// label8
//
this.label8.Visible = false;
@@ -65,7 +69,8 @@ private void InitializeComponent()
// SlaveForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.ClientSize = new System.Drawing.Size(869, 887);
+ this.AutoScroll = true;
+ this.ClientSize = new System.Drawing.Size(869, 896);
this.Controls.Add(this.buttonDisconnect);
this.Controls.Add(this.btnConnect);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
diff --git a/ModbusSlave/SlaveForm.cs b/ModbusSlave/SlaveForm.cs
index 7542ff2..4873e66 100644
--- a/ModbusSlave/SlaveForm.cs
+++ b/ModbusSlave/SlaveForm.cs
@@ -154,6 +154,13 @@ private void DoDisconnect()
_uart.Dispose();
_uart = null;
}
+
+ if (_socket != null)
+ {
+ _socket.Dispose();
+ _socket = null;
+ }
+
if (_thread != null && _thread.IsAlive)
{
if (_thread.Join(2000) == false)
@@ -162,11 +169,6 @@ private void DoDisconnect()
_thread = null;
}
}
- if (_socket != null)
- {
- _socket.Dispose();
- _socket = null;
- }
}
#endregion
diff --git a/ModbusSlave/app.config b/ModbusSlave/app.config
index de82893..786a845 100644
--- a/ModbusSlave/app.config
+++ b/ModbusSlave/app.config
@@ -1,3 +1,3 @@
-
+