private void Initialize(uint controlJoinId) { ControlJoinId = controlJoinId; _devices = new List <BasicTriListWithSmartObject>(); ComponentMediator.ConfigureNumericEvent(controlJoinId, Joins.Numerics.SetSelectedCameraIndex, onSetSelectedCameraIndex); ComponentMediator.ConfigureNumericEvent(controlJoinId, Joins.Numerics.StateOfSelectedCamera, onStateOfSelectedCamera); ComponentMediator.ConfigureNumericEvent(controlJoinId, Joins.Numerics.ErrorCodeOfSelectedCamera, onErrorCodeOfSelectedCamera); ComponentMediator.ConfigureNumericEvent(controlJoinId, Joins.Numerics.RetryCountOfSelectedCamera, onRetryCountOfSelectedCamera); ComponentMediator.ConfigureNumericEvent(controlJoinId, Joins.Numerics.StatusOfSelectedCameraImage, onStatusOfSelectedCameraImage); ComponentMediator.ConfigureStringEvent(controlJoinId, Joins.Strings.ErrorMessageOfSelectedCamera, onErrorMessageOfSelectedCamera); ComponentMediator.ConfigureStringEvent(controlJoinId, Joins.Strings.ResolutionOfSelectedCamera, onResolutionOfSelectedCamera); ComponentMediator.ConfigureStringEvent(controlJoinId, Joins.Strings.LastUpdateTimeOfSelectedCameraImage, onLastUpdateTimeOfSelectedCameraImage); ComponentMediator.ConfigureStringEvent(controlJoinId, Joins.Strings.URLOfVideo, onURLOfVideo); ComponentMediator.ConfigureStringEvent(controlJoinId, Joins.Strings.SourceTypeOfSelectedCamara, onSourceTypeOfSelectedCamara); ComponentMediator.ConfigureStringEvent(controlJoinId, Joins.Strings.ImageURLOfSelectedCamera, onImageURLOfSelectedCamera); ComponentMediator.ConfigureStringEvent(controlJoinId, Joins.Strings.VideoURLOfSelectedCamera, onVideoURLOfSelectedCamera); List <uint> camerasList = CamerasSmartObjectIdMappings[controlJoinId]; Cameras = new Ch5_Sample_Contract.Video.ICamera[camerasList.Count]; for (int index = 0; index < camerasList.Count; index++) { Cameras[index] = new Ch5_Sample_Contract.Video.Camera(ComponentMediator, camerasList[index]); } }
private void Initialize(BasicTriListWithSmartObject[] devices, uint controlJoinId) { if (_devices == null) { ControlJoinId = controlJoinId; _devices = new List <BasicTriListWithSmartObject>(); ComponentMediator.Instance.ConfigureNumericEvent(controlJoinId, Joins.Numerics.CameraStatate, onCameraStatate); ComponentMediator.Instance.ConfigureNumericEvent(controlJoinId, Joins.Numerics.CameraErrorCode, onCameraErrorCode); ComponentMediator.Instance.ConfigureNumericEvent(controlJoinId, Joins.Numerics._CameraVideoRetryCount, on_CameraVideoRetryCount); ComponentMediator.Instance.ConfigureNumericEvent(controlJoinId, Joins.Numerics.SelectedCameraIndex, onSelectedCameraIndex); ComponentMediator.Instance.ConfigureNumericEvent(controlJoinId, Joins.Numerics.PlayingCameraIndex, onPlayingCameraIndex); ComponentMediator.Instance.ConfigureNumericEvent(controlJoinId, Joins.Numerics.PlayingCameraStillImageStatus, onPlayingCameraStillImageStatus); ComponentMediator.Instance.ConfigureStringEvent(controlJoinId, Joins.Strings.CameraErrorMessage, onCameraErrorMessage); ComponentMediator.Instance.ConfigureStringEvent(controlJoinId, Joins.Strings.CameraVideoResolution, onCameraVideoResolution); ComponentMediator.Instance.ConfigureStringEvent(controlJoinId, Joins.Strings.PlayingCameraSourceType, onPlayingCameraSourceType); ComponentMediator.Instance.ConfigureStringEvent(controlJoinId, Joins.Strings.PlayingCameraVideoURL, onPlayingCameraVideoURL); ComponentMediator.Instance.ConfigureStringEvent(controlJoinId, Joins.Strings.PlayingCameraStillImageLastUpdateTime, onPlayingCameraStillImageLastUpdateTime); ComponentMediator.Instance.ConfigureStringEvent(controlJoinId, Joins.Strings.PlayingCameraImageURL, onPlayingCameraImageURL); List <uint> cameraList = _cameraSmartObjectIdMappings[controlJoinId]; Camera = new Ch5_Sample_Contract.Video.ICamera[cameraList.Count]; for (int index = 0; index < cameraList.Count; index++) { Camera[index] = new Ch5_Sample_Contract.Video.Camera(devices, cameraList[index]); } ConfigureSmartObjectHandler(devices); } }