private void UpdateControls(Tube.Status status, bool interlock, bool on, double kV, double uA) { if (!IsDisposed && !Disposing && Visible) { Invoke((MethodInvoker) delegate { numkV.Value = (decimal)kV; numuA.Value = (decimal)uA; numkV.Enabled = numuA.Enabled = btnPower.Enabled = interlock; }); } }
private void UpdateControls(Tube.Status status, bool interlock, bool on, double kV, double uA) { if (!IsDisposed && !Disposing && Visible) { Invoke((MethodInvoker) delegate { cmbStatus.SelectedItem = status.ToString(); btnPower.BackgroundImage = on ? Resources.powerON : Resources.powerOFF; numSetkV.Value = (decimal)kV; numSetuA.Value = (decimal)uA; numSetkV.Enabled = numSetuA.Enabled = btnPower.Enabled = interlock; }); } }