private void setSelectionColor(Color val)
 {
     if (this.InvokeRequired)
     {
         // this is worker thread
         SelectionColorDelegat del = new SelectionColorDelegat(setSelectionColor);
         this.Invoke(del, new object[] { val });
     }
     else
     {
         // this is UI thread
         this.SelectionColor = val;
     }
 }
 private void setSelectionColor(Color val)
 {
     if (this.InvokeRequired)
     {
         // this is worker thread
         SelectionColorDelegat del = new SelectionColorDelegat(setSelectionColor);
         this.Invoke(del, new object[] { val });
     }
     else
     {
         // this is UI thread
         this.SelectionColor = val;
     }
 }