示例#1
0
        public CameraInfo(ICamera aCamera) : this(aCamera.Id, aCamera.ProductName, aCamera.OwnerName)
        {
            _isoSpeeds      = IsoSpeed.GetListFrom(aCamera);
            _apertures      = Aperture.GetListFrom(aCamera);
            _exposals       = Exposal.GetListFrom(aCamera);
            _imageQualities = ImageQuality.GetListFrom(aCamera);

            _currentIsoSpeed     = IsoSpeed.With(aCamera.IsoSpeed);
            _currentAperture     = Aperture.With(aCamera.ApertureValue);
            _currentExposal      = Exposal.With(aCamera.ExposalValue);
            _currentImageQuality = ImageQuality.With(aCamera.ImageQualityValue);
        }
        public IShootParameters[] CreateExposalBracketing(int aStep, int aCount, IShootParameters anInitialParameters)
        {
            EnumValueCollection exposals = Exposal.GetListFrom(_camera);

            IShootParameters[] result = new IShootParameters[aCount];

            for (int i = 0; i < aCount; ++i)
            {
                result[i]         = anInitialParameters.Copy();
                result[i].Exposal = (Exposal)exposals.GetWithRelatedIndex(result[i].Exposal, (aStep * i) - ((aCount - 1) * aStep) / 2);
            }

            return(result);
        }
        public IShootParameters[] CreateApertureBracketing(IShootParameters anInitialiParameters, Aperture[] anApertures)
        {
            IShootParameters[]  result    = new IShootParameters[anApertures.Length];
            EnumValueCollection exposals  = Exposal.GetListFrom(_camera);
            EnumValueCollection apertures = Aperture.GetListFrom(_camera);

            for (int i = 0; i < result.Length; ++i)
            {
                ShootParameters newParameter = anInitialiParameters.Copy();
                newParameter.Aperture = anApertures[i];
                newParameter.Exposal  = (Exposal)exposals.GetWithRelatedIndex(newParameter.Exposal, apertures.GetIndexDifferenceBeetween(anInitialiParameters.Aperture, anApertures[i]));
                result[i]             = newParameter;
            }

            return(result);
        }