X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcec-config-gui%2FAsyncForm.cs;h=5898ce54be44112ecfc4da1341c7f930bd2fb6a6;hb=cec99a5b6baac7c4c6cf8699abd87ad068db6bd1;hp=ab9afdd3ce7557b732a1827fe5845bf050345252;hpb=5b8c27619d881cf9f7f83123e8ded59b137d4e5d;p=deb_libcec.git diff --git a/src/cec-config-gui/AsyncForm.cs b/src/cec-config-gui/AsyncForm.cs index ab9afdd..5898ce5 100644 --- a/src/cec-config-gui/AsyncForm.cs +++ b/src/cec-config-gui/AsyncForm.cs @@ -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) {