private void OnFpsChanged(object sender, SelectionChangedEventArgs e) { if (!updating) { // this one we just update locally, this is not a "setting", instead it is the parameter to the request for // video stream which has to be passed to StartJpegStream. FpsItem fps = (FpsItem)ComboBoxFps.SelectedItem; this.FoscamDevice.CameraInfo.Fps = fps.Value; } }
FpsItem GetFpsItem(int fps) { FpsItem found = null; foreach (var item in FpsItems) { found = item; if (item.Value >= fps) { break; } } return(found); }