private void btnSave_Click(object sender, EventArgs e) { if (info != null) { //相机曝光与增益设置 int shutterValue = this.trackBarShutter.Value; int gainValue = this.trackBarGain.Value; CameraManger.SetShutter(info.UserID, shutterValue.ToString()); CameraManger.SetGain(info.UserID, gainValue.ToString()); //相机图像格式与延时设置 if (ImageFormatCombox.SelectedItem != null) { ImageFormat format = (ImageFormat)ImageFormatCombox.SelectedItem; CameraManger.SetImageFormat(info.UserID, format); this.info.Format = format; } int heartBeatime = this.trackBarHeartBeatTime.Value; CameraManger.SetHearBeatTime(info.UserID, heartBeatime.ToString()); //更新Info数据 this.info.CurExposureTime = shutterValue.ToString(); this.info.CurGain = gainValue.ToString(); this.info.HeartbeatTime = heartBeatime.ToString(); } CameraManger.SaveDoc(); }
private void AdjustGainValue(int value) { if (info != null) { this.UpDownGain.Value = Convert.ToDecimal(value); this.trackBarGain.Value = value; info.CurGain = value.ToString(); CameraManger.SetGain(info.UserID, info.CurGain); } }