public void GetCameraFilters(EventHandler <AsyncWorkerCallbackEventArgs <IList <CameraFilter> > > callback) { try { AsyncWorkerHandle <IList <CameraFilter> > handle = AsyncWorkerHelper.DoWork <IList <CameraFilter> >( delegate(object sender, DoWorkEventArgs e) { List <CameraFilter> filters = new List <CameraFilter>(); GetCameraFiltersRequest request = new GetCameraFiltersRequest(); GetCameraFiltersResponse response = ServiceProvider.GetService <IDeviceConnectorService, IDeviceConnectorCallbackService>( ViewModelLocator.ServiceClient, ViewModelLocator.SelectedService.HostName, ViewModelLocator.SelectedService.Uri.ToString() ).GetCameraFilters(request); if (response.Filters != null) { foreach (var item in response.Filters) { CameraFilter filter = new CameraFilter(item.Name, item.Uri); filters.Add(filter); } } e.Result = filters; }, null, callback); } catch (Exception ex) { ExceptionHandler.Handle(ex); } }
internal static CameraFilterData Translate(CameraFilter filter) { CameraFilterData data = new CameraFilterData(); data.Name = filter.Name; data.Uri = filter.Uri; return(data); }
// Use this for initialization void Start() { instance = this; Debug.Log("Starting GameController"); timeOfDay = timeOfDawn; sunAngles = sun.transform.eulerAngles; cameraFilterControl = Camera.main.GetComponent <CameraFilter>(); // initial state areaAwakened = new bool[numAreas]; for (int a = 0; a < numAreas; a++) { areaAwakened[a] = false; } // TESTING areaAwakened[2] = true; }
public IList <CameraFilter> GetCameraFilters() { List <CameraFilter> filters = new List <CameraFilter>(); try { FilterInfoCollection localFilters = new FilterInfoCollection(FilterCategory.VideoInputDevice); for (int i = 0; i < localFilters.Count; i++) { CameraFilter filter = new CameraFilter(localFilters[i].MonikerString) { Name = localFilters[i].Name }; filters.Add(filter); } } catch (ApplicationException ex) { ExceptionHandler.Handle(ex); } return(filters); }