/// <summary> /// 读取并保存当前摄像头的设置 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnReadAndSave_Click(object sender, EventArgs e) { FrmVideoSetting settingView = new FrmVideoSetting(); if (settingView.ShowDialog() == DialogResult.OK) { DirectShow.Instance.SaveCurrentOriginSetting(settingView.SettingName, settingView.CbDefaultSetting); RefreshSetting(); } }
/// <summary> /// 保存设置 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnSaveSetting_Click(object sender, EventArgs e) { FrmVideoSetting settingView = new FrmVideoSetting(); if (settingView.ShowDialog() == DialogResult.OK) { VideoSetting setting = new VideoSetting() { Saturation = tbarSaturation.Value, ContrastRatio = tbarContrast.Value, Brightness = tbarLight.Value, DefaultSetting = settingView.CbDefaultSetting, VideoSettingName = settingView.SettingName }; VideoSettingUtils.Instance.SaveVideoSetting(setting); ReadSetting(); } }