private void MainCamera_LiveViewUpdated(EOSDigital.API.Camera sender, Stream img) { var Evf_Bmp = new Bitmap(img); if (_lvInitialized) { var expComp = MainCamera.GetUInt32Setting(PropertyID.ExposureCompensation); if (Iso > 0 && Iso <= MaxIso) { MainCamera.SetSetting(PropertyID.ExposureCompensation, ExpCompValues.Values[ExpCompValues.Values.Count() - Iso - 1].IntValue); } if (LiveViewImageReady != null && _lvCapture) { LiveViewImageReady(this, new LiveViewImageReadyEventArgs(Evf_Bmp)); _lvCapture = false; } } else { MainCamera.SetSetting(PropertyID.Evf_Zoom, (UInt32)LiveViewZoom); var currentZoom = MainCamera.GetUInt32Setting(PropertyID.Evf_Zoom); if (currentZoom == (int)LiveViewZoom) { _lvInitialized = true; if (LvFrameHeight == 0 || LvFrameWidth == 0) { LvFrameWidth = Evf_Bmp.Width; LvFrameHeight = Evf_Bmp.Height; } } } }
public override CameraModel ScanCameras() { ScanForCameras(); _mainCamera = CamList.First(); var cameraModel = GetCameraModel(_mainCamera.DeviceName); return(cameraModel); }
public override CameraModel ScanCameras() { ScanForCameras(); _mainCamera = CamList.First(); // TODO: handle exceptions here, this can fail! var cameraModel = GetCameraModel(_mainCamera.DeviceName); return(cameraModel); }
public override CameraModel ScanCameras() { CamList = APIHandler.GetCameraList(); if (!CamList.Any()) { throw new NotConnectedException(ErrorMessages.NotConnected); } _mainCamera = CamList.First(); var cameraModel = GetCameraModel(_mainCamera.DeviceName); return(cameraModel); }
private void MainCamera_DownloadReady(EOSDigital.API.Camera sender, DownloadInfo Info) { if (!Directory.Exists(StorePath)) { Directory.CreateDirectory(StorePath); } sender.DownloadFile(Info, StorePath); string downloadedFilePath = Path.Combine(StorePath, Info.FileName); SensorTemperature = GetSensorTemperature(downloadedFilePath); string newFilePath = RenameFile(downloadedFilePath, _duration, _startTime); ImageReady?.Invoke(this, new ImageReadyEventArgs(newFilePath)); }
private void MainCamera_StateChanged(EOSDigital.API.Camera sender, StateEventID eventID, int parameter) { }