private void CavLockVoltageTrackBar_Scroll(object sender, EventArgs e) { double value = ((double)CavLockVoltageTrackBar.Value) / 100; SetSummedVoltageTextBox(value); // Check its a UI event! if (CavLockVoltageTrackBar.Focused) { controller.VoltageToMasterLaserChanged(CavityName, value); } }