[chronojump] checking if port exists on change mode (when wizard has been used)



commit 815945b5b5f6e2f3f67e76a04d9f5526d0439b6f
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon Sep 19 18:17:54 2016 +0200

    checking if port exists on change mode (when wizard has been used)

 src/gui/chronojump.cs |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 14fb35e..3d32f28 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -3004,11 +3004,13 @@ public partial class ChronoJumpWindow
                main_menu.Visible = true;
 
 
-               //if wizard has been used, mark Chronopic as connected
+               //if wizard has been used mark Chronopic as connected or disconnected depending if port exists
                if(Constants.Menuitem_mode_IsContacts(m) && wizardPortContacts != "")
-                       chronopicWin.Connected = true;
+                       chronopicWin.Connected =
+                               Util.FoundInStringArray(ChronopicPorts.GetPorts(), wizardPortContacts);
                else if(! Constants.Menuitem_mode_IsContacts(m) && wizardPortEncoder != "")
-                       chronopicWin.Connected = true;
+                       chronopicWin.Connected =
+                               Util.FoundInStringArray(ChronopicPorts.GetPorts(), wizardPortEncoder);
 
 
                //change multitest firmware or autoDetectChronopic


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]