private void tbSaturation_Scroll(object sender, EventArgs e) { IVFVideoEffectSaturation saturation; var effect = VideoCapture1.Video_Effects_Get("Saturation"); if (effect == null) { saturation = new VFVideoEffectSaturation(tbSaturation.Value); VideoCapture1.Video_Effects_Add(saturation); } else { saturation = effect as IVFVideoEffectSaturation; if (saturation != null) { saturation.Value = tbSaturation.Value; } } }
private void tbSaturation_Scroll(object sender, RoutedPropertyChangedEventArgs <double> e) { if (VideoCapture1 != null) { IVFVideoEffectSaturation saturation; var effect = VideoCapture1.Video_Effects_Get("Saturation"); if (effect == null) { saturation = new VFVideoEffectSaturation((int)tbSaturation.Value); VideoCapture1.Video_Effects_Add(saturation); } else { saturation = effect as IVFVideoEffectSaturation; if (saturation != null) { saturation.Value = (int)tbSaturation.Value; } } } }