Merge branch 'master' into release
[deb_libcec.git] / src / cec-config-gui / actions / ConnectToDevice.cs
index fedc31398e700c7721b9bb89f7f91ec77f51424a..8c198f4c60a20f86042aada349c0c0618ca81118 100644 (file)
@@ -22,7 +22,10 @@ namespace CecConfigGui.actions
       {
         DialogResult result = MessageBox.Show("Could not detect to any CEC adapter. Please check your configuration. Do you want to try again?", "Pulse-Eight USB-CEC Adapter", MessageBoxButtons.YesNo);
         if (result == DialogResult.No)
-          Application.Exit();
+        {
+          SendEvent(UpdateEventType.ExitApplication);
+          return;
+        }
         else
           adapters = Lib.FindAdapters(string.Empty);
       }
@@ -31,7 +34,10 @@ namespace CecConfigGui.actions
       {
         DialogResult result = MessageBox.Show("Could not connect to any CEC adapter. Please check your configuration. Do you want to try again?", "Pulse-Eight USB-CEC Adapter", MessageBoxButtons.YesNo);
         if (result == DialogResult.No)
-          Application.Exit();
+        {
+          SendEvent(UpdateEventType.ExitApplication);
+          return;
+        }
       }
 
       SendEvent(UpdateEventType.ProgressBar, 20);