Пример #1
0
        private bool getApertures()
        {
            uint err = 0;

            EDSDK.EdsPropertyDesc apertures;

            err = EDSDK.EdsGetPropertyDesc(camObj, EDSDK.PropID_Av, out apertures);
            if (err != EDSDK.EDS_ERR_OK)
            {
                if (errorEvent != null)
                {
                    errorEvent("Failed to get camera aperture values");
                }

                return(false);
            }

            //ADD THE ISO VALUES TO THE PROPERTY LIST
            //isoValues.AddRange((IEnumerable<ISOSpeeds>)ISOS.PropDesc.Take(ISOS.NumElements));
            foreach (int tmpAperture in apertures.PropDesc.Take(apertures.NumElements))
            {
                apertureValues.Add((Apertures)tmpAperture);
            }

            return(true);
        }
Пример #2
0
        private bool getBrackets()
        {
            uint err = 0;

            EDSDK.EdsPropertyDesc EXP;

            err = EDSDK.EdsGetPropertyDesc(camObj, EDSDK.PropID_ExposureCompensation, out EXP);
            if (err != EDSDK.EDS_ERR_OK)
            {
                if (errorEvent != null)
                {
                    errorEvent("Failed to get camera exposure compensation values");
                }

                return(false);
            }

            //ADD THE VALUES RETRIEVED TO THE PROPERTY LIST
            //exposureValues.AddRange((IEnumerable<ExposureCompensations>)EXP.PropDesc.Take(EXP.NumElements));
            foreach (int tmpExp in EXP.PropDesc.Take(EXP.NumElements))
            {
                exposureValues.Add((ExposureCompensations)tmpExp);
            }

            return(true);
        }
Пример #3
0
        private bool getShutterSpeeds()
        {
            uint err = 0;

            EDSDK.EdsPropertyDesc Shutters;

            err = EDSDK.EdsGetPropertyDesc(camObj, EDSDK.PropID_Tv, out Shutters);
            if (err != EDSDK.EDS_ERR_OK)
            {
                if (errorEvent != null)
                {
                    errorEvent("Failed to get camera iso speeds");
                }

                return(false);
            }

            //ADD THE ISO VALUES TO THE PROPERTY LIST
            //isoValues.AddRange((IEnumerable<ISOSpeeds>)ISOS.PropDesc.Take(ISOS.NumElements));
            foreach (int tmpISO in Shutters.PropDesc.Take(Shutters.NumElements))
            {
                shutterSpeeds.Add((ShutterSpeeds)tmpISO);
            }

            return(true);
        }
Пример #4
0
 /// <summary>
 /// Holt die Tabelle der verfügbaren ISO-Werte von der Kamera und speichert sie in den Klassemember
 /// </summary>
 public void getPropertyDescIsoSpeed()
 {
     if ((Error = EDSDK.EdsGetPropertyDesc(this.Ptr, EDSDK.PropID_ISOSpeed, out this.availableISOSpeeds)) != 0)
     {
         publicError(Error);
     }
 }
Пример #5
0
 /// <summary>
 /// Holt die Tabelle der verfügbaren Autofokusmodi von der Kamera und speichert sie in den Klassemember
 /// </summary>
 public void getPropertyDescAFModes()
 {
     if ((Error = EDSDK.EdsGetPropertyDesc(this.Ptr, EDSDK.PropID_AFMode, out this.availableAFModes)) != 0)
     {
         publicError(Error);
     }
 }
Пример #6
0
 /// <summary>
 /// Holt die Tabelle der verfügbaren EBV von der Kamera und speichert sie in den Klassemember
 /// </summary>
 public void getpropertyDescExposureCompensation()
 {
     if ((Error = EDSDK.EdsGetPropertyDesc(this.Ptr, EDSDK.PropID_ExposureCompensation, out this.availableExposureCompensation)) != 0)
     {
         publicError(Error);
     }
 }
Пример #7
0
 /// <summary>
 /// Holt die Tabelle der verfügbaren Belichtungszeiten von der Kamera und speichert sie in den Klassemember
 /// </summary>
 public void getpropertyDescShutterTimes()
 {
     if ((Error = EDSDK.EdsGetPropertyDesc(this.Ptr, EDSDK.PropID_Tv, out this.availableShutterspeeds)) != 0)
     {
         publicError(Error);
     }
 }
Пример #8
0
 /// <summary>
 /// Holt die Tabelle der verfügbaren Blendenwerte von der Kamera und speichert sie in den Klassemember
 /// </summary>
 public void getpropertyDescApertureValues()
 {
     if ((Error = EDSDK.EdsGetPropertyDesc(this.Ptr, EDSDK.PropID_Av, out this.availableApertureValues)) != 0)
     {
         publicError(Error);
     }
 }
Пример #9
0
        /// <summary>
        /// </summary>
        /// <param name="propertyId">The property id.</param>
        /// <returns>property values</returns>
        /// <remarks></remarks>
        protected IEnumerable <UInt32> GetSupportedProperties(PropertyId propertyId)
        {
            EDSDK.EdsPropertyDesc propertyDescription;

            UInt32 returnValue = EDSDK.EdsGetPropertyDesc(this.Handle, (UInt32)propertyId, out propertyDescription);

            ReturnValueManager.HandleFunctionReturnValue(returnValue);

            for (int i = 0; i < propertyDescription.PropDesc.Length; i++)
            {
                yield return((UInt32)propertyDescription.PropDesc[i]);
            }
        }
Пример #10
0
 public uint[] GetAvailableValues(uint aPropertyType)
 {
     CameraAlreadyDisposedException.ThrowIf(_disposed);
     EDSDK.EdsPropertyDesc propertyDesc;
     try
     {
         SDKHelper.CheckError(EDSDK.EdsGetPropertyDesc(_pointer, aPropertyType, out propertyDesc));
         int[] result = new int[propertyDesc.NumElements];
         Array.Copy(propertyDesc.PropDesc, result, result.Length);
         return(Array.ConvertAll(result, new Converter <int, uint>(int32 => Convert.ToUInt32(int32))));
     }
     catch (SDKInvalidParameterExeption)
     {
         return(new uint[0]);
     }
 }