From 9ecba98b4cb2a629770aacf8c152c5e040d95d4d Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Thu, 19 Aug 2021 13:49:25 +0200 Subject: [PATCH] Changes in iPerlCommunicationForm : CheckboxEditMode bug fixes, ver. 2.26.1725 --- .../iPerlCommunication/iPerlCommunicationForm.cs | 13 ++++++++----- TBF/Properties/AssemblyInfo.cs | 4 ++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs b/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs index 74f3c6ec0..30f05e220 100644 --- a/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs +++ b/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs @@ -653,7 +653,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication TBF.LocalSettings ls = Program.LocalSettings; Left = (ls.iPerlCommunicationsFormLeft != 0) ? ls.iPerlCommunicationsFormLeft : 150; Top = (ls.iPerlCommunicationsFormTop != 0) ? ls.iPerlCommunicationsFormTop : 150; - if (ls.OptoHeadsEnabled != 0) SetCheckBoxStates(ls.OptoHeadsEnabled); + SetCheckBoxStates(ls.OptoHeadsEnabled); if (!checkBoxesEditMode) { @@ -2887,9 +2887,10 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication long result = 0; for (int i = 0; i < 48; i++) { - if (ckbIndex[i] >= 0 && ckbState[ckbIndex[i]]) + int wmNr0 = ckbIndex[i]; + if (wmNr0 >= 0 && ckbState[wmNr0]) { - result += (1L << i); + result += (1L << wmNr0); } } return result; @@ -2915,9 +2916,10 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication }; for (int i = 0; i < 48; i++) { - if (ckbIndex[i] >= 0) + int wmNr0 = ckbIndex[i]; + if (wmNr0 >= 0) { - chkBoxes[i].Checked = ckbState[ckbIndex[i]] = ((state & (1L << i)) != 0); + chkBoxes[i].Checked = ckbState[wmNr0] = ((state & (1L << wmNr0)) != 0); } } } @@ -2925,6 +2927,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication private void saveButton_Click(object sender, EventArgs e) { Program.LocalSettings.OptoHeadsEnabled = GetCheckBoxStates(); + Program.LocalSettings.Save(); DialogResult = DialogResult.OK; Close(); } diff --git a/TBF/Properties/AssemblyInfo.cs b/TBF/Properties/AssemblyInfo.cs index a622cade4..302d8021b 100644 --- a/TBF/Properties/AssemblyInfo.cs +++ b/TBF/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.26.1724.0")] -[assembly: AssemblyFileVersion("2.26.1724.0")] +[assembly: AssemblyVersion("2.26.1725.0")] +[assembly: AssemblyFileVersion("2.26.1725.0")]