private void setSelectionLength(int val) { if (this.InvokeRequired) { // this is worker thread SelectionLengthDelegat del = new SelectionLengthDelegat(setSelectionLength); this.Invoke(del, new object[] { val }); } else { // this is UI thread this.SelectionLength = val; } }
private void setSelectionLength(int val) { if (this.InvokeRequired) { // this is worker thread SelectionLengthDelegat del = new SelectionLengthDelegat(setSelectionLength); this.Invoke(del, new object[] { val }); } else { // this is UI thread this.SelectionLength = val; } }