Bu unit program Kodak DC240 işleminde kullanılır.
Kod: Tümünü seç
unit ads_DC240Class;
interface
{
ads_DC240Class
This unit automates most of the features associated with the Kodak DC240 Digital Camera.
If you do not have the DC240 Digital Camera or its associated software then this unit
is of no value to you.
}
Uses Windows, ClipBrd, Forms, Classes, SysUtils, DC240Lib_TLB, ads_DlgLU, FileCtrl, ExtCtrls,
Graphics, Jpeg, Dialogs;
Type
TDC240_ads = class(TComponent)
Private
function GetOnOperationComplete: TNotifyEvent;
function GetOnOperationStart: TNotifyEvent;
function GetOnProgress: TDC240CameraProgress;
procedure SetOnOperationComplete(const Value: TNotifyEvent);
procedure SetOnOperationStart(const Value: TNotifyEvent);
procedure SetOnProgress(const Value: TDC240CameraProgress);
function Get_CaptureResolution: Integer;
function Get_ImportResolution: Integer;
procedure Set_CaptureResolution(const Value: Integer);
procedure Set_ImportResolution(const Value: Integer);
function Get_ContinuousCapture: Integer;
procedure Set_ContinuousCapture(const Value: Integer);
function Get_ContinuousSecDelay: Integer;
procedure Set_ContinuousSecDelay(const Value: Integer);
function Get_JpegQuality: Integer;
procedure Set_JpegQuality(const Value: Integer);
Private {simple property getters}
function Get_BatteryLevel : Integer;
function Get_BorderFileName : WideString;
function Get_CameraID : WideString;
function Get_CameraType : WideString;
function Get_CaptureDelayMaxSECs : Integer;
function Get_CaptureDelayMinSECs : Integer;
function Get_CaptureDelaySECs : Integer;
function Get_CaptureFileType : WideString;
function Get_ConnectionType : Integer;
function Get_CurCamera : Integer;
function Get_CurImageBorderFileName : WideString;
function Get_CurImageDateTimeStampMode : Integer;
function Get_CurImageExposureCompValue : Integer;
function Get_CurImageFileType : WideString;
function Get_CurImageFlashMode : Integer;
function Get_CurImageFlashUsed : Integer;
function Get_CurImageFocusMode : Integer;
function Get_CurImageFocusPositionMMs : Integer;
function Get_CurImageFStop : Extended;
function Get_CurImageImageEffectBorder : Integer;
function Get_CurImageImageEffectDocument : Integer;
function Get_CurImageImageEffectGrayscale : Integer;
function Get_CurImageImageEffectSepia : Integer;
function Get_CurImageLightValue : Extended;
function Get_CurImageManualExposure : Integer;
function Get_CurImageName : WideString;
function Get_CurImagePictureQuality : Integer;
function Get_CurImageSharpnessMode : Integer;
function Get_CurImageTimeStamp : TDateTime;
function Get_CurImageWhiteBalanceMode : Integer;
function Get_CurImageZoomPositionMMs : Integer;
function Get_CurrentImage : Integer;
function Get_DateTime : TDateTime;
function Get_DateTimeStampMode : Integer;
function Get_ExposureCompValue : Integer;
function Get_FirmwareVersionNumber : Integer;
function Get_FirmwareVersionString : WideString;
function Get_FlashIsCharged : Integer;
function Get_FlashMode : Integer;
function Get_FocusMode : Integer;
function Get_ImageEffectBorder : Integer;
function Get_ImageEffectDocument : Integer;
function Get_ImageEffectGrayscale : Integer;
function Get_ImageEffectSepia : Integer;
function Get_ImageHandle : Integer;
function Get_IsAbleToDeleteSingleImages : Integer;
function Get_IsACAdapterPresent : Integer;
function Get_IsPCCardPresent : Integer;
function Get_IsPCCardSupported : Integer;
function Get_IsPresent : Integer;
function Get_LastError : Integer;
function Get_ManualFocusDistanceCMs : Integer;
function Get_ManualFocusIsOn : Integer;
function Get_NumCamAvailable : Integer;
function Get_NumCameraAvailConnectionTypes: Integer;
function Get_NumCameraCaptureTimerDelays : Integer;
function Get_NumCameraFlashModes : Integer;
function Get_NumCameraFocusModes : Integer;
function Get_NumCameraPictureQualities : Integer;
function Get_NumCameraResolutions : Integer;
function Get_NumCameraWhiteBalanceModes : Integer;
function Get_NumCameraZoomPositions : Integer;
function Get_NumCurImageResolutions : Integer;
function Get_NumImagesOnPCCard : Integer;
function Get_NumImagesRemainingOnPCCard : Integer;
function Get_PCCardIsFormatted : Integer;
function Get_PCCardVolumeName : WideString;
function Get_PictureQuality : Integer;
function Get_SerialPortNumber : Integer;
function Get_SerialPortSpeed : Integer;
function Get_SharpnessMode : Integer;
function Get_TimeDisplayIn24HourMode : Integer;
function Get_TotalImages : Integer;
function Get_WhiteBalanceMode : Integer;
function Get_ZoomPositionMMs : Integer;
function GetIntegerProperty(PropName : String): Integer;OverLoad;
function GetIntegerProperty(PropName : String;Index : Integer): Integer;OverLoad;
function GetFloatProperty (PropName : String): Extended;
function GetStringProperty (PropName : String): WideString;OverLoad;
function GetStringProperty (PropName : String;Index : Integer): WideString;OverLoad;
Private {property setters}
procedure RunMethod (MethodName : String;Index : Integer; Str: String);
procedure Set_BorderFileName (const Value: WideString);
procedure Set_CameraID (const Value: WideString);
procedure Set_CaptureDelaySECs (Value: Integer);
procedure Set_CaptureFileType (const Value: WideString);
procedure Set_CurCamera (Value: Integer);
procedure Set_CurrentImage (Value: Integer);
procedure Set_DateTime (Value: TDateTime);
procedure Set_DateTimeStampMode (Value: Integer);
procedure Set_ExposureCompValue (Value: Integer);
procedure Set_FlashMode (Value: Integer);
procedure Set_FocusMode (Value: Integer);
procedure Set_ImageEffectBorder (Value: Integer);
procedure Set_ImageEffectDocument (Value: Integer);
procedure Set_ImageEffectGrayscale (Value: Integer);
procedure Set_ImageEffectSepia (Value: Integer);
procedure Set_ManualFocusDistanceCMs(Value: Integer);
procedure Set_ManualFocusIsOn (Value: Integer);
procedure Set_PictureQuality (Value: Integer);
procedure Set_SharpnessMode (Value: Integer);
procedure Set_WhiteBalanceMode (Value: Integer);
procedure Set_ZoomPositionMMs (Value: Integer);
procedure SetIntegerProperty (PropName : String; Value : Integer);
procedure SetStringProperty (PropName : String; Value : String);
protected
DC240 : TDC240Camera;
FCaptureResolution : Integer;
FContinuousCapture : Integer;
FContinuousSecDelay : Integer;
FContinuousTimer : TTimer;
FControlInitialized : Boolean;
FCurCameraInitialized : Boolean;
FExecutableName : String;
FExecutablePath : String;
FImportResolution : Integer;
FJpegQuality : Integer;
FPersistFile : String;
FPersistFileExt : String;
FPhotoDirectory : String;
FTakingPicture : Boolean;
Function LUMethods(MethodName,sgDefaultDisplay : String;out sgDisplay:String;ShowDialog:Boolean): Boolean;
procedure ContinuousTimerTriggered(Sender: TObject);
procedure CopyClipboardToPhotoDir;
procedure CopyPictureCompleted(Sender: TObject);
procedure CopyPictureProgress(Sender: TObject; sPercent: Smallint);
procedure CopyPictureStart(Sender: TObject);
Procedure PersistSettings;
Procedure RestoreSettings;
public {methods}
CurrentImageFile : String;
PriorImageFile : String;
Constructor Create(AOwner : TComponent); Override;
Destructor Destroy; Override;
function Get_CameraDescription (Index: Integer) : WideString;
function Get_CameraHorzResolution (Index: Integer) : Integer;
function Get_CameraVertResolution (Index: Integer) : Integer;
function Get_CurImageHorzResolution (Index: Integer) : Integer;
function Get_CurImageVertResolution (Index: Integer) : Integer;
function Get_IndexedCaptureTimerDelay(Index: Integer) : Integer;
function Get_IndexedConnectionType (Index: Integer) : Integer;
function Get_IndexedFlashMode (Index: Integer) : Integer;
function Get_IndexedFocusMode (Index: Integer) : Integer;
function Get_IndexedPictureQuality (Index: Integer) : Integer;
function Get_IndexedWhiteBalanceMode (Index: Integer) : Integer;
function Get_IndexedZoomPosition (Index: Integer) : Integer;
function Get_LastErrorString (Index: Integer) : WideString;
procedure CancelOperation;
Procedure ChangeSetting;
procedure CloseCurCamera;
procedure CopyCurImageToBMPFile (Index: Integer; const sFileName: WideString);
procedure CopyCurImageToClipboard (Index: Integer);
procedure CopyCurImageToHGLOBAL (Index: Integer);
procedure CopyCurImageToNativeFile (const sFileName: WideString);
procedure DeleteAllImages;
procedure DeleteCurrentImage;
procedure GetCiaObject (out ppUnk: IUnknown);
procedure InitControl;
procedure InitControlForSpecificCamera(PortNumber: Integer; PortSpeed: Integer;ConnectionType: Integer);
procedure InitCurCamera;
Procedure ShowStatus;
procedure TakePicture (Index: Integer);OverLoad;
procedure TakePicture;OverLoad;
procedure WriteFileToCamera(const SourceFilePath: WideString;const DestinationFilePath: WideString);
public {Read/Write properties}
Persistence : TStringList;
public {Read only properties}
property BatteryLevel : Integer read Get_BatteryLevel;
property CameraType : WideString read Get_CameraType;
property CaptureDelayMaxSECs : Integer read Get_CaptureDelayMaxSECs;
property CaptureDelayMinSECs : Integer read Get_CaptureDelayMinSECs;
property ConnectionType : Integer read Get_ConnectionType;
property CurImageBorderFileName : WideString read Get_CurImageBorderFileName;
property CurImageDateTimeStampMode : Integer read Get_CurImageDateTimeStampMode;
property CurImageExposureCompValue : Integer read Get_CurImageExposureCompValue;
property CurImageFileType : WideString read Get_CurImageFileType;
property CurImageFlashMode : Integer read Get_CurImageFlashMode;
property CurImageFlashUsed : Integer read Get_CurImageFlashUsed;
property CurImageFocusMode : Integer read Get_CurImageFocusMode;
property CurImageFocusPositionMMs : Integer read Get_CurImageFocusPositionMMs;
property CurImageFStop : Extended read Get_CurImageFStop;
property CurImageImageEffectBorder : Integer read Get_CurImageImageEffectBorder;
property CurImageImageEffectDocument : Integer read Get_CurImageImageEffectDocument;
property CurImageImageEffectGrayscale : Integer read Get_CurImageImageEffectGrayscale;
property CurImageImageEffectSepia : Integer read Get_CurImageImageEffectSepia;
property CurImageLightValue : Extended read Get_CurImageLightValue;
property CurImageManualExposure : Integer read Get_CurImageManualExposure;
property CurImageName : WideString read Get_CurImageName;
property CurImagePictureQuality : Integer read Get_CurImagePictureQuality;
property CurImageSharpnessMode : Integer read Get_CurImageSharpnessMode;
property CurImageTimeStamp : TDateTime read Get_CurImageTimeStamp;
property CurImageWhiteBalanceMode : Integer read Get_CurImageWhiteBalanceMode;
property CurImageZoomPositionMMs : Integer read Get_CurImageZoomPositionMMs;
property FirmwareVersionNumber : Integer read Get_FirmwareVersionNumber;
property FirmwareVersionString : WideString read Get_FirmwareVersionString;
property FlashIsCharged : Integer read Get_FlashIsCharged;
property ImageHandle : Integer read Get_ImageHandle;
property IsAbleToDeleteSingleImages : Integer read Get_IsAbleToDeleteSingleImages;
property IsACAdapterPresent : Integer read Get_IsACAdapterPresent;
property IsPCCardPresent : Integer read Get_IsPCCardPresent;
property IsPCCardSupported : Integer read Get_IsPCCardSupported;
property IsPresent : Integer read Get_IsPresent;
property LastError : Integer read Get_LastError;
property NumCamAvailable : Integer read Get_NumCamAvailable;
property NumCameraAvailConnectionTypes : Integer read Get_NumCameraAvailConnectionTypes;
property NumCameraCaptureTimerDelays : Integer read Get_NumCameraCaptureTimerDelays;
property NumCameraFlashModes : Integer read Get_NumCameraFlashModes;
property NumCameraFocusModes : Integer read Get_NumCameraFocusModes;
property NumCameraPictureQualities : Integer read Get_NumCameraPictureQualities;
property NumCameraResolutions : Integer read Get_NumCameraResolutions;
property NumCameraWhiteBalanceModes : Integer read Get_NumCameraWhiteBalanceModes;
property NumCameraZoomPositions : Integer read Get_NumCameraZoomPositions;
property NumCurImageResolutions : Integer read Get_NumCurImageResolutions;
property NumImagesOnPCCard : Integer read Get_NumImagesOnPCCard;
property NumImagesRemainingOnPCCard : Integer read Get_NumImagesRemainingOnPCCard;
property PCCardIsFormatted : Integer read Get_PCCardIsFormatted;
property PCCardVolumeName : WideString read Get_PCCardVolumeName;
property SerialPortNumber : Integer read Get_SerialPortNumber;
property SerialPortSpeed : Integer read Get_SerialPortSpeed;
property TimeDisplayIn24HourMode : Integer read Get_TimeDisplayIn24HourMode;
property TotalImages : Integer read Get_TotalImages;
published {Read/Write properties}
property BorderFileName : WideString read Get_BorderFileName write Set_BorderFileName;
property CameraID : WideString read Get_CameraID write Set_CameraID;
property CaptureDelaySECs : Integer read Get_CaptureDelaySECs write Set_CaptureDelaySECs;
property CaptureResolution : Integer read Get_CaptureResolution write Set_CaptureResolution;
property CaptureFileType : WideString read Get_CaptureFileType write Set_CaptureFileType;
property ContinuousCapture : Integer read Get_ContinuousCapture write Set_ContinuousCapture;
property ContinuousSecDelay : Integer read Get_ContinuousSecDelay write Set_ContinuousSecDelay;
property CurCamera : Integer read Get_CurCamera write Set_CurCamera;
property CurrentImage : Integer read Get_CurrentImage write Set_CurrentImage;
property DateTime : TDateTime read Get_DateTime write Set_DateTime;
property DateTimeStampMode : Integer read Get_DateTimeStampMode write Set_DateTimeStampMode;
property ExposureCompValue : Integer read Get_ExposureCompValue write Set_ExposureCompValue;
property FlashMode : Integer read Get_FlashMode write Set_FlashMode;
property FocusMode : Integer read Get_FocusMode write Set_FocusMode;
property ImageEffectBorder : Integer read Get_ImageEffectBorder write Set_ImageEffectBorder;
property ImageEffectDocument : Integer read Get_ImageEffectDocument write Set_ImageEffectDocument;
property ImageEffectGrayscale : Integer read Get_ImageEffectGrayscale write Set_ImageEffectGrayscale;
property ImageEffectSepia : Integer read Get_ImageEffectSepia write Set_ImageEffectSepia;
property ImportResolution : Integer read Get_ImportResolution write Set_ImportResolution;
property JpegQuality : Integer read Get_JpegQuality write Set_JpegQuality;
property ManualFocusDistanceCMs: Integer read Get_ManualFocusDistanceCMs write Set_ManualFocusDistanceCMs;
property ManualFocusIsOn : Integer read Get_ManualFocusIsOn write Set_ManualFocusIsOn;
property PictureQuality : Integer read Get_PictureQuality write Set_PictureQuality;
property SharpnessMode : Integer read Get_SharpnessMode write Set_SharpnessMode;
property WhiteBalanceMode : Integer read Get_WhiteBalanceMode write Set_WhiteBalanceMode;
property ZoomPositionMMs : Integer read Get_ZoomPositionMMs write Set_ZoomPositionMMs;
property OnProgress : TDC240CameraProgress read GetOnProgress write SetOnProgress;
property OnOperationStart : TNotifyEvent read GetOnOperationStart write SetOnOperationStart;
property OnOperationComplete : TNotifyEvent read GetOnOperationComplete write SetOnOperationComplete;
end;
procedure Register;
implementation
Uses ads_Exception;
{ TDC240_ads }
Var
UnitName : String = 'ads_DC240Class';
ProcName : String = 'Unknown';
procedure TDC240_ads.CancelOperation;
begin
ProcName := 'TDC240_ads.CancelOperation'; Try
RunMethod(
'CancelOperation', //MethodName : String;
0 , //Index : Integer;
'' );//Str: String);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.CloseCurCamera;
begin
ProcName := 'TDC240_ads.CloseCurCamera'; Try
RunMethod(
'CloseCurCamera' , //MethodName : String;
0 , //Index : Integer;
'' );//Str: String);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.CopyCurImageToBMPFile(Index: Integer;const sFileName: WideString);
begin
ProcName := 'TDC240_ads.CopyCurImageToBMPFile'; Try
RunMethod(
'CopyCurImageToBMPFile' , //MethodName : String;
Index , //Index : Integer;
sFileName );//Str: String);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.CopyCurImageToClipboard(Index: Integer);
begin
ProcName := 'TDC240_ads.CopyCurImageToClipboard'; Try
RunMethod(
'CopyCurImageToClipboard', //MethodName : String;
Index , //Index : Integer;
'' );//Str: String);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.CopyCurImageToHGLOBAL(Index: Integer);
begin
ProcName := 'TDC240_ads.CopyCurImageToHGLOBAL'; Try
RunMethod(
'CopyCurImageToHGLOBAL' , //MethodName : String;
Index , //Index : Integer;
'' );//Str: String);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.CopyCurImageToNativeFile(const sFileName: WideString);
begin
ProcName := 'TDC240_ads.CopyCurImageToNativeFile'; Try
RunMethod(
'CopyCurImageToNativeFile', //MethodName : String;
0 , //Index : Integer;
sFileName );//Str: String);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.DeleteAllImages;
begin
ProcName := 'TDC240_ads.DeleteAllImages'; Try
RunMethod(
'DeleteAllImages' , //MethodName : String;
0 , //Index : Integer;
'' );//Str: String);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.DeleteCurrentImage;
begin
ProcName := 'TDC240_ads.DeleteCurrentImage'; Try
RunMethod(
'DeleteCurrentImage', //MethodName : String;
0 , //Index : Integer;
'' );//Str: String);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_BatteryLevel: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_BatteryLevel'; Try
Result := GetIntegerProperty('BatteryLevel');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_BorderFileName: WideString;
begin
ProcName := 'TDC240_ads.Get_BorderFileName'; Try
Result := GetStringProperty('BorderFileName');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CameraDescription(Index: Integer): WideString;
begin
ProcName := 'TDC240_ads.Get_CameraDescription'; Try
Result := GetStringProperty('CameraDescription',Index);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CameraHorzResolution(Index: Integer): Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_CameraHorzResolution'; Try
Result := GetIntegerProperty('CameraHorzResolution',Index);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CameraID: WideString;
begin
ProcName := 'TDC240_ads.Get_CameraID'; Try
Result := GetStringProperty('CameraID');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CameraType: WideString;
begin
ProcName := 'TDC240_ads.Get_CameraType'; Try
Result := GetStringProperty('CameraType');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CameraVertResolution(Index: Integer): Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_CameraVertResolution'; Try
Result := GetIntegerProperty('CameraVertResolution',Index);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CaptureDelayMaxSECs: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_CaptureDelayMaxSECs'; Try
Result := GetIntegerProperty('CaptureDelayMaxSECs');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CaptureDelayMinSECs: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_CaptureDelayMinSECs'; Try
Result := GetIntegerProperty('CaptureDelayMinSECs');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CaptureDelaySECs: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_CaptureDelaySECs'; Try
Result := GetIntegerProperty('CaptureDelaySECs');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CaptureFileType: WideString;
begin
ProcName := 'TDC240_ads.Get_CaptureFileType'; Try
Result := GetStringProperty('CaptureFileType');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_ConnectionType: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_ConnectionType'; Try
Result := GetIntegerProperty('ConnectionType');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CurCamera: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_CurCamera'; Try
Result := GetIntegerProperty('CurCamera');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CurImageBorderFileName: WideString;
begin
ProcName := 'TDC240_ads.Get_CurImageBorderFileName'; Try
Result := GetStringProperty('CurImageBorderFileName');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CurImageDateTimeStampMode: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_CurImageDateTimeStampMode'; Try
Result := GetIntegerProperty('CurImageDateTimeStampMode');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CurImageExposureCompValue: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_CurImageExposureCompValue'; Try
Result := GetIntegerProperty('CurImageExposureCompValue');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CurImageFileType: WideString;
begin
ProcName := 'TDC240_ads.Get_CurImageFileType'; Try
Result := GetStringProperty('CurImageFileType');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CurImageFlashMode: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_CurImageFlashMode'; Try
Result := GetIntegerProperty('CurImageFlashMode');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CurImageFlashUsed: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_CurImageFlashUsed'; Try
Result := GetIntegerProperty('CurImageFlashUsed');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CurImageFocusMode: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_CurImageFocusMode'; Try
Result := GetIntegerProperty('CurImageFocusMode');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CurImageFocusPositionMMs: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_CurImageFocusPositionMMs'; Try
Result := GetIntegerProperty('CurImageFocusPositionMMs');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CurImageFStop: Extended;
begin
Result := -1.00;
ProcName := 'TDC240_ads.Get_CurImageFStop'; Try
Result := GetFloatProperty('CurImageFStop');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CurImageHorzResolution(Index: Integer): Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_CurImageHorzResolution'; Try
Result := GetIntegerProperty('CurImageHorzResolution',Index);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CurImageImageEffectBorder: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_CurImageImageEffectBorder'; Try
Result := GetIntegerProperty('CurImageImageEffectBorder');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CurImageImageEffectDocument: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_CurImageImageEffectDocument'; Try
Result := GetIntegerProperty('CurImageImageEffectDocument');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CurImageImageEffectGrayscale: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_CurImageImageEffectGrayscale'; Try
Result := GetIntegerProperty('CurImageImageEffectGrayscale');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CurImageImageEffectSepia: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_CurImageImageEffectSepia'; Try
Result := GetIntegerProperty('CurImageImageEffectSepia');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CurImageLightValue: Extended;
begin
Result := -1.00;
ProcName := 'TDC240_ads.Get_CurImageLightValue'; Try
Result := GetFloatProperty('CurImageLightValue');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CurImageManualExposure: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_CurImageManualExposure'; Try
Result := GetIntegerProperty('CurImageManualExposure');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CurImageName: WideString;
begin
ProcName := 'TDC240_ads.Get_CurImageName'; Try
Result := GetStringProperty('CurImageName');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CurImagePictureQuality: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_CurImagePictureQuality'; Try
Result := GetIntegerProperty('CurImagePictureQuality');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CurImageSharpnessMode: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_CurImageSharpnessMode'; Try
Result := GetIntegerProperty('CurImageSharpnessMode');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CurImageTimeStamp: TDateTime;
begin
Result := 0.00;
ProcName := 'TDC240_ads.Get_CurImageTimeStamp'; Try
Result := DC240.CurImageTimeStamp;
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CurImageVertResolution(Index: Integer): Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_CurImageVertResolution(Index: Integer)'; Try
Result := GetIntegerProperty('CurImageVertResolution',Index);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CurImageWhiteBalanceMode: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_CurImageWhiteBalanceMode'; Try
Result := GetIntegerProperty('CurImageWhiteBalanceMode');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CurImageZoomPositionMMs: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_CurImageZoomPositionMMs'; Try
Result := GetIntegerProperty('CurImageZoomPositionMMs');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_CurrentImage: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_CurrentImage'; Try
Result := GetIntegerProperty('CurrentImage');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_DateTime: TDateTime;
begin
Result := 0.00;
ProcName := 'TDC240_ads.Get_DateTime'; Try
Result := DC240.DateTime;
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_DateTimeStampMode: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_DateTimeStampMode'; Try
Result := GetIntegerProperty('DateTimeStampMode');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_ExposureCompValue: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_ExposureCompValue'; Try
Result := GetIntegerProperty('ExposureCompValue');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_FirmwareVersionNumber: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_FirmwareVersionNumber'; Try
Result := GetIntegerProperty('FirmwareVersionNumber');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_FirmwareVersionString: WideString;
begin
ProcName := 'TDC240_ads.Get_FirmwareVersionString'; Try
Result := GetStringProperty('FirmwareVersionString');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_FlashIsCharged: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_FlashIsCharged'; Try
Result := GetIntegerProperty('FlashIsCharged');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_FlashMode: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_FlashMode'; Try
Result := GetIntegerProperty('FlashMode');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_FocusMode: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_FocusMode'; Try
Result := GetIntegerProperty('FocusMode');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_ImageEffectBorder: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_ImageEffectBorder'; Try
Result := GetIntegerProperty('ImageEffectBorder');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_ImageEffectDocument: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_ImageEffectDocument'; Try
Result := GetIntegerProperty('ImageEffectDocument');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_ImageEffectGrayscale: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_ImageEffectGrayscale'; Try
Result := GetIntegerProperty('ImageEffectGrayscale');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_ImageEffectSepia: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_ImageEffectSepia'; Try
Result := GetIntegerProperty('ImageEffectSepia');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_ImageHandle: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_ImageHandle'; Try
Result := GetIntegerProperty('ImageHandle');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_IndexedCaptureTimerDelay(Index: Integer): Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_IndexedCaptureTimerDelay(Index: Integer)'; Try
Result := GetIntegerProperty('IndexedCaptureTimerDelay',Index);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_IndexedConnectionType(Index: Integer): Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_IndexedConnectionType'; Try
Result := GetIntegerProperty('IndexedConnectionType',Index);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_IndexedFlashMode(Index: Integer): Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_IndexedFlashMode'; Try
Result := GetIntegerProperty('IndexedFlashMode',Index);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_IndexedFocusMode(Index: Integer): Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_IndexedFocusMode'; Try
Result := GetIntegerProperty('IndexedFocusMode',Index);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_IndexedPictureQuality(Index: Integer): Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_IndexedPictureQuality'; Try
Result := GetIntegerProperty('IndexedPictureQuality',Index);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_IndexedWhiteBalanceMode(Index: Integer): Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_IndexedWhiteBalanceMode'; Try
Result := GetIntegerProperty('IndexedWhiteBalanceMode',Index);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_IndexedZoomPosition(Index: Integer): Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_IndexedZoomPosition'; Try
Result := GetIntegerProperty('IndexedZoomPosition',Index);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_IsAbleToDeleteSingleImages: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_IsAbleToDeleteSingleImages'; Try
Result := GetIntegerProperty('IsAbleToDeleteSingleImages');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_IsACAdapterPresent: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_IsACAdapterPresent'; Try
Result := GetIntegerProperty('IsACAdapterPresent');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_IsPCCardPresent: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_IsPCCardPresent'; Try
Result := GetIntegerProperty('IsPCCardPresent');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_IsPCCardSupported: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_IsPCCardSupported'; Try
Result := GetIntegerProperty('IsPCCardSupported');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_IsPresent: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_IsPresent'; Try
Result := GetIntegerProperty('IsPresent');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_LastError: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_LastError'; Try
Result := GetIntegerProperty('LastError');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_LastErrorString(Index: Integer): WideString;
begin
ProcName := 'TDC240_ads.Get_LastErrorString'; Try
Result := GetStringProperty('LastErrorString',Index);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_ManualFocusDistanceCMs: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_ManualFocusDistanceCMs'; Try
Result := GetIntegerProperty('ManualFocusDistanceCMs');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_ManualFocusIsOn: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_ManualFocusIsOn'; Try
Result := GetIntegerProperty('ManualFocusIsOn');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_NumCamAvailable: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_NumCamAvailable'; Try
Result := GetIntegerProperty('NumCamAvailable');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_NumCameraAvailConnectionTypes: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_NumCameraAvailConnectionTypes'; Try
Result := GetIntegerProperty('NumCameraAvailConnectionTypes');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_NumCameraCaptureTimerDelays: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_NumCameraCaptureTimerDelays'; Try
Result := GetIntegerProperty('NumCameraCaptureTimerDelays');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_NumCameraFlashModes: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_NumCameraFlashModes'; Try
Result := GetIntegerProperty('NumCameraFlashModes');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_NumCameraFocusModes: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_NumCameraFocusModes'; Try
Result := GetIntegerProperty('NumCameraFocusModes');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_NumCameraPictureQualities: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_NumCameraPictureQualities'; Try
Result := GetIntegerProperty('NumCameraPictureQualities');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_NumCameraResolutions: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_NumCameraResolutions'; Try
Result := GetIntegerProperty('NumCameraResolutions');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_NumCameraWhiteBalanceModes: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_NumCameraWhiteBalanceModes'; Try
Result := GetIntegerProperty('NumCameraWhiteBalanceModes');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_NumCameraZoomPositions: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_NumCameraZoomPositions'; Try
Result := GetIntegerProperty('NumCameraZoomPositions');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_NumCurImageResolutions: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_NumCurImageResolutions'; Try
Result := GetIntegerProperty('NumCurImageResolutions');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_NumImagesOnPCCard: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_NumImagesOnPCCard'; Try
Result := GetIntegerProperty('NumImagesOnPCCard');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_NumImagesRemainingOnPCCard: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_NumImagesRemainingOnPCCard'; Try
Result := GetIntegerProperty('NumImagesRemainingOnPCCard');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_PCCardIsFormatted: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_PCCardIsFormatted'; Try
Result := GetIntegerProperty('PCCardIsFormatted');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_PCCardVolumeName: WideString;
begin
ProcName := 'TDC240_ads.Get_PCCardVolumeName'; Try
Result := GetStringProperty('PCCardVolumeName');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_PictureQuality: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_PictureQuality'; Try
Result := GetIntegerProperty('PictureQuality');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_SerialPortNumber: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_SerialPortNumber'; Try
Result := GetIntegerProperty('SerialPortNumber');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_SerialPortSpeed: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_SerialPortSpeed'; Try
Result := GetIntegerProperty('SerialPortSpeed');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_SharpnessMode: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_SharpnessMode'; Try
Result := GetIntegerProperty('SharpnessMode');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_TimeDisplayIn24HourMode: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_TimeDisplayIn24HourMode'; Try
Result := GetIntegerProperty('TimeDisplayIn24HourMode');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_TotalImages: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_TotalImages'; Try
Result := GetIntegerProperty('TotalImages');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_WhiteBalanceMode: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_WhiteBalanceMode'; Try
Result := GetIntegerProperty('WhiteBalanceMode');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
function TDC240_ads.Get_ZoomPositionMMs: Integer;
begin
Result := -1;
ProcName := 'TDC240_ads.Get_ZoomPositionMMs'; Try
Result := GetIntegerProperty('ZoomPositionMMs');
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.GetCiaObject(out ppUnk: IUnknown);
begin
ProcName := 'TDC240_ads.GetCiaObject'; Try
DC240.GetCiaObject(ppUnk);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.InitControl;
begin
FControlInitialized := False;
ProcName := 'TDC240_ads.InitControl'; Try
RunMethod(
'InitControl' , //MethodName : String;
0 , //Index : Integer;
'' );//Str: String);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.InitControlForSpecificCamera(PortNumber: Integer;PortSpeed: Integer; ConnectionType: Integer);
begin
ProcName := 'TDC240_ads.InitControlForSpecificCamera'; Try
DC240.InitControlForSpecificCamera(PortNumber,PortSpeed,ConnectionType);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.InitCurCamera;
begin
FCurCameraInitialized := False;
ProcName := 'TDC240_ads.InitCurCamera'; Try
If Not FControlInitialized Then InitControl;
If Not FControlInitialized Then Exit;
RunMethod(
'InitCurCamera' , //MethodName : String;
0 , //Index : Integer;
'' );//Str: String);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.Set_BorderFileName(const Value: WideString);
begin
ProcName := 'TDC240_ads.Set_BorderFileName'; Try
SetStringProperty('BorderFileName',Value);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.Set_CameraID(const Value: WideString);
begin
ProcName := 'TDC240_ads.Set_CameraID'; Try
SetStringProperty('CameraID',Value);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.Set_CaptureDelaySECs(Value: Integer);
begin
ProcName := 'TDC240_ads.Set_CaptureDelaySECs'; Try
SetIntegerProperty('CaptureDelaySECs',Value);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.Set_CaptureFileType(const Value: WideString);
begin
ProcName := 'TDC240_ads.Set_CaptureFileType'; Try
SetStringProperty('CaptureFileType',Value);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.Set_CurCamera(Value: Integer);
begin
ProcName := 'TDC240_ads.Set_CurCamera'; Try
SetIntegerProperty('CurCamera',Value);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.Set_CurrentImage(Value: Integer);
begin
ProcName := 'TDC240_ads.Set_CurrentImage'; Try
SetIntegerProperty('CurrentImage',Value);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.Set_DateTime(Value: TDateTime);
begin
ProcName := 'TDC240_ads.Set_DateTime'; Try
If DC240.DateTime <> Value Then DC240.DateTime := Value;
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.Set_DateTimeStampMode(Value: Integer);
begin
ProcName := 'TDC240_ads.Set_DateTimeStampMode'; Try
SetIntegerProperty('DateTimeStampMode',Value);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.Set_ExposureCompValue(Value: Integer);
begin
ProcName := 'TDC240_ads.Set_ExposureCompValue'; Try
SetIntegerProperty('ExposureCompValue',Value);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.Set_FlashMode(Value: Integer);
begin
ProcName := 'TDC240_ads.Set_FlashMode'; Try
SetIntegerProperty('FlashMode',Value);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.Set_FocusMode(Value: Integer);
begin
ProcName := 'TDC240_ads.Set_FocusMode'; Try
SetIntegerProperty('FocusMode',Value);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.Set_ImageEffectBorder(Value: Integer);
begin
ProcName := 'TDC240_ads.Set_ImageEffectBorder'; Try
SetIntegerProperty('ImageEffectBorder',Value);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.Set_ImageEffectDocument(Value: Integer);
begin
ProcName := 'TDC240_ads.Set_ImageEffectDocument'; Try
SetIntegerProperty('ImageEffectDocument',Value);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.Set_ImageEffectGrayscale(Value: Integer);
begin
ProcName := 'TDC240_ads.Set_ImageEffectGrayscale'; Try
SetIntegerProperty('ImageEffectGrayscale',Value);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.Set_ImageEffectSepia(Value: Integer);
begin
ProcName := 'TDC240_ads.Set_ImageEffectSepia'; Try
SetIntegerProperty('ImageEffectSepia',Value);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.Set_ManualFocusDistanceCMs(Value: Integer);
begin
ProcName := 'TDC240_ads.Set_ManualFocusDistanceCMs'; Try
SetIntegerProperty('ManualFocusDistanceCMs',Value);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.Set_ManualFocusIsOn(Value: Integer);
begin
ProcName := 'TDC240_ads.Set_ManualFocusIsOn'; Try
SetIntegerProperty('ManualFocusIsOn',Value);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.Set_PictureQuality(Value: Integer);
begin
ProcName := 'TDC240_ads.Set_PictureQuality'; Try
SetIntegerProperty('PictureQuality',Value);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.Set_SharpnessMode(Value: Integer);
begin
ProcName := 'TDC240_ads.Set_SharpnessMode'; Try
SetIntegerProperty('SharpnessMode',Value);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.Set_WhiteBalanceMode(Value: Integer);
begin
ProcName := 'TDC240_ads.Set_WhiteBalanceMode'; Try
SetIntegerProperty('WhiteBalanceMode',Value);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.Set_ZoomPositionMMs(Value: Integer);
begin
ProcName := 'TDC240_ads.Set_ZoomPositionMMs'; Try
SetIntegerProperty('ZoomPositionMMs',Value);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.TakePicture(Index: Integer);
begin
ProcName := 'TDC240_ads.TakePicture'; Try
If ContinuousCapture = 1 Then
Begin
RunMethod(
'TakePictureContinuously' , //MethodName : String;
Index , //Index : Integer;
'' );//Str: String);
End
Else
Begin
CaptureResolution := index;
RunMethod(
'TakePicture' , //MethodName : String;
Index , //Index : Integer;
'' );//Str: String);
End;
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
procedure TDC240_ads.WriteFileToCamera(const SourceFilePath,DestinationFilePath: WideString);
begin
ProcName := 'TDC240_ads.WriteFileToCamera'; Try
DC240.WriteFileToCamera(SourceFilePath,DestinationFilePath);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
Function TDC240_ads.GetIntegerProperty(PropName : String): Integer;
Var
errNum : Integer;
errStr : String;
Begin
Result := -1;
errStr := '';
Try
If DC240 = nil Then Exit;
PropName := UpperCase(PropName);
If PropName = 'BATTERYLEVEL' Then Result := DC240.BatteryLevel;
If PropName = 'CAPTUREDELAYMAXSECS' Then Result := DC240.CaptureDelayMaxSECs;
If PropName = 'CAPTUREDELAYMINSECS' Then Result := DC240.CaptureDelayMinSECs;
If PropName = 'CAPTUREDELAYSECS' Then Result := DC240.CaptureDelaySECs;
If PropName = 'CONNECTIONTYPE' Then Result := DC240.ConnectionType;
If PropName = 'CURCAMERA' Then Result := DC240.CurCamera;
If PropName = 'CURIMAGEDATETIMESTAMPMODE' Then Result := DC240.CurImageDateTimeStampMode;
If PropName = 'CURIMAGEEXPOSURECOMPVALUE' Then Result := DC240.CurImageExposureCompValue;
If PropName = 'CURIMAGEFLASHMODE' Then Result := DC240.CurImageFlashMode;
If PropName = 'CURIMAGEFLASHUSED' Then Result := DC240.CurImageFlashUsed;
If PropName = 'CURIMAGEFOCUSMODE' Then Result := DC240.CurImageFocusMode;
If PropName = 'CURIMAGEFOCUSPOSITIONMMS' Then Result := DC240.CurImageFocusPositionMMs;
If PropName = 'CURIMAGEIMAGEEFFECTBORDER' Then Result := DC240.CurImageImageEffectBorder;
If PropName = 'CURIMAGEIMAGEEFFECTDOCUMENT' Then Result := DC240.CurImageImageEffectDocument;
If PropName = 'CURIMAGEIMAGEEFFECTGRAYSCALE' Then Result := DC240.CurImageImageEffectGrayscale;
If PropName = 'CURIMAGEIMAGEEFFECTSEPIA' Then Result := DC240.CurImageImageEffectSepia;
If PropName = 'CURIMAGEMANUALEXPOSURE' Then Result := DC240.CurImageManualExposure;
If PropName = 'CURIMAGEPICTUREQUALITY' Then Result := DC240.CurImagePictureQuality;
If PropName = 'CURIMAGESHARPNESSMODE' Then Result := DC240.CurImageSharpnessMode;
If PropName = 'CURIMAGEWHITEBALANCEMODE' Then Result := DC240.CurImageWhiteBalanceMode;
If PropName = 'CURIMAGEZOOMPOSITIONMMS' Then Result := DC240.CurImageZoomPositionMMs;
If PropName = 'CURRENTIMAGE' Then Result := DC240.CurrentImage;
If PropName = 'DATETIMESTAMPMODE' Then Result := DC240.DateTimeStampMode;
If PropName = 'EXPOSURECOMPVALUE' Then Result := DC240.ExposureCompValue;
If PropName = 'FIRMWAREVERSIONNUMBER' Then Result := DC240.FirmwareVersionNumber;
If PropName = 'FLASHISCHARGED' Then Result := DC240.FlashIsCharged;
If PropName = 'FLASHMODE' Then Result := DC240.FlashMode;
If PropName = 'FOCUSMODE' Then Result := DC240.FocusMode;
If PropName = 'IMAGEEFFECTBORDER' Then Result := DC240.ImageEffectBorder;
If PropName = 'IMAGEEFFECTDOCUMENT' Then Result := DC240.ImageEffectDocument;
If PropName = 'IMAGEEFFECTGRAYSCALE' Then Result := DC240.ImageEffectGrayscale;
If PropName = 'IMAGEEFFECTSEPIA' Then Result := DC240.ImageEffectSepia;
If PropName = 'IMAGEHANDLE' Then Result := DC240.ImageHandle;
If PropName = 'ISABLETODELETESINGLEIMAGES' Then Result := DC240.IsAbleToDeleteSingleImages;
If PropName = 'ISACADAPTERPRESENT' Then Result := DC240.IsACAdapterPresent;
If PropName = 'ISPCCARDPRESENT' Then Result := DC240.IsPCCardPresent;
If PropName = 'ISPCCARDSUPPORTED' Then Result := DC240.IsPCCardSupported;
If PropName = 'ISPRESENT' Then Result := DC240.IsPresent;
If PropName = 'LASTERROR' Then Result := DC240.LastError;
If PropName = 'MANUALFOCUSDISTANCECMS' Then Result := DC240.ManualFocusDistanceCMs;
If PropName = 'MANUALFOCUSISON' Then Result := DC240.ManualFocusIsOn;
If PropName = 'NUMCAMAVAILABLE' Then Result := DC240.NumCamAvailable;
If PropName = 'NUMCAMERAAVAILCONNECTIONTYPES' Then Result := DC240.NumCameraAvailConnectionTypes;
If PropName = 'NUMCAMERACAPTURETIMERDELAYS' Then Result := DC240.NumCameraCaptureTimerDelays;
If PropName = 'NUMCAMERAFLASHMODES' Then Result := DC240.NumCameraFlashModes;
If PropName = 'NUMCAMERAFOCUSMODES' Then Result := DC240.NumCameraFocusModes;
If PropName = 'NUMCAMERAPICTUREQUALITIES' Then Result := DC240.NumCameraPictureQualities;
If PropName = 'NUMCAMERARESOLUTIONS' Then Result := DC240.NumCameraResolutions;
If PropName = 'NUMCAMERAWHITEBALANCEMODES' Then Result := DC240.NumCameraWhiteBalanceModes;
If PropName = 'NUMCAMERAZOOMPOSITIONS' Then Result := DC240.NumCameraZoomPositions;
If PropName = 'NUMCURIMAGERESOLUTIONS' Then Result := DC240.NumCurImageResolutions;
If PropName = 'NUMIMAGESONPCCARD' Then Result := DC240.NumImagesOnPCCard;
If PropName = 'NUMIMAGESREMAININGONPCCARD' Then Result := DC240.NumImagesRemainingOnPCCard;
If PropName = 'PCCARDISFORMATTED' Then Result := DC240.PCCardIsFormatted;
If PropName = 'PICTUREQUALITY' The