void updateCameraData() { try { NikonEnum aperture = device.GetEnum(eNkMAIDCapability.kNkMAIDCapability_Aperture); float exposure = (float)device.GetFloat(eNkMAIDCapability.kNkMAIDCapability_ExposureStatus); NikonEnum shutterspeed = device.GetEnum(eNkMAIDCapability.kNkMAIDCapability_ShutterSpeed); int batterylevel = (int)device.GetInteger(eNkMAIDCapability.kNkMAIDCapability_BatteryLevel); progressBar1.Value = Convert.ToInt32(batterylevel); labelBatteryLevel.Text = batterylevel.ToString() + "%"; textBoxShutterSpeed.Text = shutterspeed.ToString(); textBoxAperature.Text = aperture.ToString(); textBoxEV.Text = exposure.ToString(); } catch { // MessageBox.Show("Unable to get data"); } }