cec-config-gui: added implementations for "wake devices" and "standby devices"
[deb_libcec.git] / src / cec-config-gui / AsyncForm.cs
index ab9afdd3ce7557b732a1827fe5845bf050345252..5898ce54be44112ecfc4da1341c7f930bd2fb6a6 100644 (file)
@@ -59,6 +59,24 @@ namespace CecConfigGui
       }
     }
 
+    delegate void SetCheckboxItemCheckedCallback(CheckedListBox control, int index, bool val);
+    public void SetCheckboxItemChecked(CheckedListBox control, int index, bool val)
+    {
+      if (control.InvokeRequired)
+      {
+        SetCheckboxItemCheckedCallback d = new SetCheckboxItemCheckedCallback(SetCheckboxItemChecked);
+        try
+        {
+          this.Invoke(d, new object[] { control, index, val });
+        }
+        catch (Exception) { }
+      }
+      else
+      {
+        control.SetItemChecked(index, val);
+      }
+    }
+
     delegate void SetProgressValueCallback(ProgressBar control, int val);
     public void SetProgressValue(ProgressBar control, int val)
     {