private void OnEnableStrobeCheckedStatusChanged(object sender, EventArgs e) { StrobeControl strobeControl; try { strobeControl = m_camera.GetStrobe(m_pinNumber); } catch (FC2Exception ex) { m_controlGroupBox.Enabled = false; Debug.WriteLine(string.Format( "Error getting strobe (Pin number: {0}): {1}", m_pinNumber, ex.Message)); ex.Dispose(); return; } if (strobeControl.onOff == m_enableStrobeCheckbox.Checked) { // Nothing to do here, because the strobe is already in the // proper mode return; } else { strobeControl.onOff = m_enableStrobeCheckbox.Checked; UpdateChildControls(); } try { m_camera.SetStrobe(strobeControl); } catch (FC2Exception ex) { m_controlGroupBox.Enabled = false; Debug.WriteLine(string.Format( "Error setting strobe (Pin number: {0}): {1}", m_pinNumber, ex.Message)); ex.Dispose(); return; } }