public void UpdateValue(CameraProperty gain, bool AEMode, CameraProperty exposure, int exposureTime) { Gain = gain; trackBarGain.Minimum = Gain.Min; trackBarGain.Maximum = Gain.Max; textBoxGain.Text = Gain.curValue.ToString(); trackBarGain.Value = Gain.curValue; AE = AEMode; if (AE) { checkBoxAE.Checked = true; } else { checkBoxAE.Checked = false; } Exposure = exposure; trackBarExposure.Minimum = Exposure.Min; trackBarExposure.Maximum = Exposure.Max; trackBarExposure.Value = Exposure.curValue; textBoxExposure.Text = trackBarExposure.Value.ToString(); ExpTime = exposureTime; txtBoxExpTime.Text = ExpTime.ToString(); }
public CameraPropWin() { InitializeComponent(); trackBarGain.Scroll += new System.EventHandler(this.trackBarGain_Scroll); trackBarExposure.Scroll += new System.EventHandler(this.trackBarExposure_Scroll); Gain = new CameraProperty(); Exposure = new CameraProperty(); }