public override void onMetronomeEvent(object sender, metronomeEventArgs e)
 {
     // InvokeRequired required compares the thread ID of the
     // calling thread to the thread ID of the creating thread.
     // If these threads are different, it returns true.
     if (this.spinBox.InvokeRequired)
     {
         FormControlDelegate updateControl = new FormControlDelegate(increaseSpinBox);
         spinBox.Invoke(updateControl, new object[] { e });
     }
     else
     {
         increaseSpinBox(e);
     }
 }
 public override void onMetronomeEvent(object sender, metronomeEventArgs e)
 {
     // InvokeRequired required compares the thread ID of the
     // calling thread to the thread ID of the creating thread.
     // If these threads are different, it returns true.
     if (this.spinBox.InvokeRequired)
     {
         FormControlDelegate updateControl = new FormControlDelegate(increaseSpinBox);
         spinBox.Invoke(updateControl, new object[] { e });
     }
     else
     {
         increaseSpinBox(e);
     }
 }