//
{Copyright(c)2000 Advanced Delphi Systems
Richard Maley
Advanced Delphi Systems
12613 Maidens Bower Drive
Potomac, MD 20854 USA
phone 301-840-1554
maley@advdelphisys.com
The code herein can be used or modified by anyone. Please retain references
to Richard Maley at Advanced Delphi Systems. If you make improvements to the
code please send your improvements to maley@advdelphisys.com so that the
entire Delphi community can benefit. All comments are welcome.
Please note if you are viewing this Delphi unit as a web page all you have to
do to turn it into a Delphi unit is save it with a ".pas" extension. The
html in the unit should not affect its performance.
}
unit ads_DC240Class;
(*UnitIndex Master Index Implementation Section Download UnitsDescription: ads_DC240Class.pas This unit contains the following routines.
Register TDC240_ads.CancelOperation TDC240_ads.ChangeSetting TDC240_ads.CloseCurCamera TDC240_ads.ContinuousTimerTriggered TDC240_ads.CopyClipboardToPhotoDir TDC240_ads.CopyCurImageToBMPFile TDC240_ads.CopyCurImageToClipboard TDC240_ads.CopyCurImageToHGLOBAL TDC240_ads.CopyCurImageToNativeFile TDC240_ads.CopyPictureCompleted TDC240_ads.CopyPictureProgress TDC240_ads.CopyPictureStart TDC240_ads.DeleteAllImages TDC240_ads.DeleteCurrentImage TDC240_ads.Get_BatteryLevel TDC240_ads.Get_BorderFileName TDC240_ads.Get_CameraDescription TDC240_ads.Get_CameraHorzResolution TDC240_ads.Get_CameraID TDC240_ads.Get_CameraType TDC240_ads.Get_CameraVertResolution TDC240_ads.Get_CaptureDelayMaxSECs TDC240_ads.Get_CaptureDelayMinSECs TDC240_ads.Get_CaptureDelaySECs TDC240_ads.Get_CaptureFileType TDC240_ads.Get_CaptureResolution TDC240_ads.Get_ConnectionType TDC240_ads.Get_ContinuousCapture TDC240_ads.Get_ContinuousSecDelay TDC240_ads.Get_CurCamera TDC240_ads.Get_CurImageBorderFileName TDC240_ads.Get_CurImageDateTimeStampMode TDC240_ads.Get_CurImageExposureCompValue TDC240_ads.Get_CurImageFileType TDC240_ads.Get_CurImageFlashMode TDC240_ads.Get_CurImageFlashUsed TDC240_ads.Get_CurImageFocusMode TDC240_ads.Get_CurImageFocusPositionMMs TDC240_ads.Get_CurImageFStop TDC240_ads.Get_CurImageHorzResolution TDC240_ads.Get_CurImageImageEffectBorder TDC240_ads.Get_CurImageImageEffectDocument TDC240_ads.Get_CurImageImageEffectGrayscale TDC240_ads.Get_CurImageImageEffectSepia TDC240_ads.Get_CurImageLightValue TDC240_ads.Get_CurImageManualExposure TDC240_ads.Get_CurImageName TDC240_ads.Get_CurImagePictureQuality TDC240_ads.Get_CurImageSharpnessMode TDC240_ads.Get_CurImageTimeStamp TDC240_ads.Get_CurImageVertResolution TDC240_ads.Get_CurImageWhiteBalanceMode TDC240_ads.Get_CurImageZoomPositionMMs TDC240_ads.Get_CurrentImage TDC240_ads.Get_DateTime TDC240_ads.Get_DateTimeStampMode TDC240_ads.Get_ExposureCompValue TDC240_ads.Get_FirmwareVersionNumber TDC240_ads.Get_FirmwareVersionString TDC240_ads.Get_FlashIsCharged TDC240_ads.Get_FlashMode TDC240_ads.Get_FocusMode TDC240_ads.Get_ImageEffectBorder TDC240_ads.Get_ImageEffectDocument TDC240_ads.Get_ImageEffectGrayscale TDC240_ads.Get_ImageEffectSepia TDC240_ads.Get_ImageHandle TDC240_ads.Get_ImportResolution TDC240_ads.Get_IndexedCaptureTimerDelay TDC240_ads.Get_IndexedConnectionType TDC240_ads.Get_IndexedFlashMode TDC240_ads.Get_IndexedFocusMode TDC240_ads.Get_IndexedPictureQuality TDC240_ads.Get_IndexedWhiteBalanceMode TDC240_ads.Get_IndexedZoomPosition TDC240_ads.Get_IsAbleToDeleteSingleImages TDC240_ads.Get_IsACAdapterPresent TDC240_ads.Get_IsPCCardPresent TDC240_ads.Get_IsPCCardSupported TDC240_ads.Get_IsPresent TDC240_ads.Get_JpegQuality TDC240_ads.Get_LastError TDC240_ads.Get_LastErrorString TDC240_ads.Get_ManualFocusDistanceCMs TDC240_ads.Get_ManualFocusIsOn TDC240_ads.Get_NumCamAvailable TDC240_ads.Get_NumCameraAvailConnectionTypes TDC240_ads.Get_NumCameraCaptureTimerDelays TDC240_ads.Get_NumCameraFlashModes TDC240_ads.Get_NumCameraFocusModes TDC240_ads.Get_NumCameraPictureQualities TDC240_ads.Get_NumCameraResolutions TDC240_ads.Get_NumCameraWhiteBalanceModes TDC240_ads.Get_NumCameraZoomPositions TDC240_ads.Get_NumCurImageResolutions TDC240_ads.Get_NumImagesOnPCCard TDC240_ads.Get_NumImagesRemainingOnPCCard TDC240_ads.Get_PCCardIsFormatted TDC240_ads.Get_PCCardVolumeName TDC240_ads.Get_PictureQuality TDC240_ads.Get_SerialPortNumber TDC240_ads.Get_SerialPortSpeed TDC240_ads.Get_SharpnessMode TDC240_ads.Get_TimeDisplayIn24HourMode TDC240_ads.Get_TotalImages TDC240_ads.Get_WhiteBalanceMode TDC240_ads.Get_ZoomPositionMMs TDC240_ads.GetCiaObject TDC240_ads.GetFloatProperty TDC240_ads.GetIntegerProperty_1 TDC240_ads.GetIntegerProperty_2 TDC240_ads.GetOnOperationComplete TDC240_ads.GetOnOperationStart TDC240_ads.GetOnProgress TDC240_ads.GetStringProperty_1 TDC240_ads.GetStringProperty_2 TDC240_ads.InitControl TDC240_ads.InitControlForSpecificCamera TDC240_ads.InitCurCamera TDC240_ads.LUMethods TDC240_ads.PersistSettings TDC240_ads.RestoreSettings TDC240_ads.RunMethod TDC240_ads.Set_BorderFileName TDC240_ads.Set_CameraID TDC240_ads.Set_CaptureDelaySECs TDC240_ads.Set_CaptureFileType TDC240_ads.Set_CaptureResolution TDC240_ads.Set_ContinuousCapture TDC240_ads.Set_ContinuousSecDelay TDC240_ads.Set_CurCamera TDC240_ads.Set_CurrentImage TDC240_ads.Set_DateTime TDC240_ads.Set_DateTimeStampMode TDC240_ads.Set_ExposureCompValue TDC240_ads.Set_FlashMode TDC240_ads.Set_FocusMode TDC240_ads.Set_ImageEffectBorder TDC240_ads.Set_ImageEffectDocument TDC240_ads.Set_ImageEffectGrayscale TDC240_ads.Set_ImageEffectSepia TDC240_ads.Set_ImportResolution TDC240_ads.Set_JpegQuality TDC240_ads.Set_ManualFocusDistanceCMs TDC240_ads.Set_ManualFocusIsOn TDC240_ads.Set_PictureQuality TDC240_ads.Set_SharpnessMode TDC240_ads.Set_WhiteBalanceMode TDC240_ads.Set_ZoomPositionMMs TDC240_ads.SetIntegerProperty TDC240_ads.SetOnOperationComplete TDC240_ads.SetOnOperationStart TDC240_ads.SetOnProgress TDC240_ads.SetStringProperty TDC240_ads.ShowStatus TDC240_ads.TakePicture_1 TDC240_ads.TakePicture_2 TDC240_ads.WriteFileToCamera
*)
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';
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Indexfunction 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; //Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Indexfunction 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; //Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Indexprocedure 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; //Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Indexprocedure 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; //Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Indexprocedure 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; //Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Index
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;
//Unit Description UnitIndex Master Indexprocedure 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; //Unit Description UnitIndex Master Index
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' Then Result := DC240.PictureQuality;
If PropName = 'SERIALPORTNUMBER' Then Result := DC240.SerialPortNumber;
If PropName = 'SERIALPORTSPEED' Then Result := DC240.SerialPortSpeed;
If PropName = 'SHARPNESSMODE' Then Result := DC240.SharpnessMode;
If PropName = 'TIMEDISPLAYIN24HOURMODE' Then Result := DC240.TimeDisplayIn24HourMode;
If PropName = 'TOTALIMAGES' Then Result := DC240.TotalImages;
If PropName = 'WHITEBALANCEMODE' Then Result := DC240.WhiteBalanceMode;
If PropName = 'ZOOMPOSITIONMMS' Then Result := DC240.ZoomPositionMMs;
Except
errNum := DC240.LastError;
errStr := DC240.LastErrorString[errNum];
raise Exception.Create('DC240 error: '+PropName+': '+ IntToStr(errNum)+': '+errStr);
End;
End;
//Unit Description UnitIndex Master Index
procedure TDC240_ads.SetIntegerProperty(PropName : String; Value : Integer);
Var
errNum : Integer;
errStr : String;
Begin
errStr := '';
Try
If DC240 = nil Then Exit;
PropName := UpperCase(PropName);
If PropName = 'CAPTUREDELAYSECS' Then
Begin
If DC240.CaptureDelaySECs <> Value Then
DC240.CaptureDelaySECs := Value;
Exit;
End;
If PropName = 'CURCAMERA' Then
Begin
If DC240.CurCamera <> Value Then
DC240.CurCamera := Value;
Exit;
End;
If PropName = 'CURRENTIMAGE' Then
Begin
If DC240.CurrentImage <> Value Then
DC240.CurrentImage := Value;
Exit;
End;
If PropName = 'DATETIMESTAMPMODE' Then
Begin
If DC240.DateTimeStampMode <> Value Then
DC240.DateTimeStampMode := Value;
Exit;
End;
If PropName = 'EXPOSURECOMPVALUE' Then
Begin
If DC240.ExposureCompValue <> Value Then
DC240.ExposureCompValue := Value;
Exit;
End;
If PropName = 'FLASHMODE' Then
Begin
If DC240.FlashMode <> Value Then
DC240.FlashMode := Value;
Exit;
End;
If PropName = 'FOCUSMODE' Then
Begin
If DC240.FocusMode <> Value Then
DC240.FocusMode := Value;
Exit;
End;
If PropName = 'IMAGEEFFECTBORDER' Then
Begin
If DC240.ImageEffectBorder <> Value Then
DC240.ImageEffectBorder := Value;
Exit;
End;
If PropName = 'IMAGEEFFECTDOCUMENT' Then
Begin
If DC240.ImageEffectDocument <> Value Then
DC240.ImageEffectDocument := Value;
Exit;
End;
If PropName = 'IMAGEEFFECTGRAYSCALE' Then
Begin
If DC240.ImageEffectGrayscale <> Value Then
DC240.ImageEffectGrayscale := Value;
Exit;
End;
If PropName = 'IMAGEEFFECTSEPIA' Then
Begin
If DC240.ImageEffectSepia <> Value Then
DC240.ImageEffectSepia := Value;
Exit;
End;
If PropName = 'MANUALFOCUSDISTANCECMS' Then
Begin
If DC240.ManualFocusDistanceCMs <> Value Then
DC240.ManualFocusDistanceCMs := Value;
Exit;
End;
If PropName = 'MANUALFOCUSISON' Then
Begin
If DC240.ManualFocusIsOn <> Value Then
DC240.ManualFocusIsOn := Value;
Exit;
End;
If PropName = 'PICTUREQUALITY' Then
Begin
If DC240.PictureQuality <> Value Then
DC240.PictureQuality := Value;
Exit;
End;
If PropName = 'SHARPNESSMODE' Then
Begin
If DC240.SharpnessMode <> Value Then
DC240.SharpnessMode := Value;
Exit;
End;
If PropName = 'WHITEBALANCEMODE' Then
Begin
If DC240.WhiteBalanceMode <> Value Then
DC240.WhiteBalanceMode := Value;
Exit;
End;
If PropName = 'ZOOMPOSITIONMMS' Then
Begin
If DC240.ZoomPositionMMs <> Value Then
DC240.ZoomPositionMMs := Value;
Exit;
End;
Except
errNum := DC240.LastError;
errStr := DC240.LastErrorString[errNum];
raise Exception.Create('DC240 error: '+PropName+': '+ IntToStr(errNum)+': '+errStr);
End;
End;
//Unit Description UnitIndex Master Index
Function TDC240_ads.GetFloatProperty(PropName : String): Extended;
Var
errNum : Integer;
errStr : String;
Begin
Result := -1.00;
errStr := '';
Try
PropName := UpperCase(PropName);
If PropName = 'CURIMAGEFSTOP' Then Result := DC240.CurImageFStop;
If PropName = 'CURIMAGELIGHTVALUE' Then Result := DC240.CurImageLightValue;
Except
errNum := DC240.LastError;
errStr := DC240.LastErrorString[errNum];
raise Exception.Create('DC240 error: '+PropName+': '+ IntToStr(errNum)+': '+errStr);
End;
End;
//Unit Description UnitIndex Master Index
Function TDC240_ads.GetStringProperty(PropName : String): WideString;
Var
errNum : Integer;
errStr : String;
Begin
Result := '';
errStr := '';
Try
PropName := UpperCase(PropName);
If PropName = 'BORDERFILENAME' Then Result := DC240.BorderFileName;
If PropName = 'CAMERAID' Then Result := DC240.CameraID;
If PropName = 'CAMERATYPE' Then Result := DC240.CameraType;
If PropName = 'CAPTUREFILETYPE' Then Result := DC240.CaptureFileType;
If PropName = 'CURIMAGEBORDERFILENAME' Then Result := DC240.CurImageBorderFileName;
If PropName = 'CURIMAGEFILETYPE' Then Result := DC240.CurImageFileType;
If PropName = 'CURIMAGENAME' Then Result := DC240.CurImageName;
If PropName = 'FIRMWAREVERSIONSTRING' Then Result := DC240.FirmwareVersionString;
If PropName = 'PCCARDVOLUMENAME' Then Result := DC240.PCCardVolumeName;
Except
errNum := DC240.LastError;
errStr := DC240.LastErrorString[errNum];
raise Exception.Create('DC240 error: '+PropName+': '+ IntToStr(errNum)+': '+errStr);
End;
End;
//Unit Description UnitIndex Master Index
Procedure TDC240_ads.SetStringProperty(PropName : String; Value : String);
Var
errNum : Integer;
errStr : String;
Begin
errStr := '';
Try
PropName := UpperCase(PropName);
If PropName = 'BORDERFILENAME' Then
Begin
If Value <> DC240.BorderFileName Then
DC240.BorderFileName := Value;
Exit;
End;
If PropName = 'CAMERAID' Then
Begin
If Value <> DC240.CameraID Then
DC240.CameraID := Value;
Exit;
End;
If PropName = 'CAPTUREFILETYPE' Then
Begin
If Value <> DC240.CaptureFileType Then
DC240.CaptureFileType := Value;
Exit;
End;
Except
errNum := DC240.LastError;
errStr := DC240.LastErrorString[errNum];
raise Exception.Create('DC240 error: '+PropName+': '+ IntToStr(errNum)+': '+errStr);
End;
End;
//Unit Description UnitIndex Master Index
function TDC240_ads.GetIntegerProperty(PropName : String;Index : Integer): Integer;
Var
errNum : Integer;
errStr : String;
Begin
Result := -1;
errStr := '';
Try
PropName := UpperCase(PropName);
If PropName = 'CAMERAHORZRESOLUTION' Then Result := DC240.CameraHorzResolution[Index];
If PropName = 'CAMERAVERTRESOLUTION' Then Result := DC240.CameraVertResolution[Index];
If PropName = 'CURIMAGEHORZRESOLUTION' Then Result := DC240.CurImageHorzResolution[Index];
If PropName = 'CURIMAGEVERTRESOLUTION' Then Result := DC240.CurImageVertResolution[Index];
If PropName = 'INDEXEDCAPTURETIMERDELAY' Then Result := DC240.IndexedCaptureTimerDelay[Index];
If PropName = 'INDEXEDCONNECTIONTYPE' Then Result := DC240.IndexedConnectionType[Index];
If PropName = 'INDEXEDFLASHMODE' Then Result := DC240.IndexedFlashMode[Index];
If PropName = 'INDEXEDFOCUSMODE' Then Result := DC240.IndexedFocusMode[Index];
If PropName = 'INDEXEDPICTUREQUALITY' Then Result := DC240.IndexedPictureQuality[Index];
If PropName = 'INDEXEDWHITEBALANCEMODE' Then Result := DC240.IndexedWhiteBalanceMode[Index];
If PropName = 'INDEXEDZOOMPOSITION' Then Result := DC240.IndexedZoomPosition[Index];
Except
errNum := DC240.LastError;
errStr := DC240.LastErrorString[errNum];
raise Exception.Create('DC240 error: '+PropName+': '+ IntToStr(errNum)+': '+errStr);
End;
End;
//Unit Description UnitIndex Master Index
function TDC240_ads.GetStringProperty (PropName : String;Index : Integer): WideString;
Var
errNum : Integer;
errStr : String;
Begin
Result := '';
errStr := '';
Try
PropName := UpperCase(PropName);
If PropName = 'CameraDescription' Then Result := DC240.CameraDescription[Index];
If PropName = 'LastErrorString' Then Result := DC240.LastErrorString[Index];
Except
errNum := DC240.LastError;
errStr := DC240.LastErrorString[errNum];
raise Exception.Create('DC240 error: '+PropName+': '+ IntToStr(errNum)+': '+errStr);
End;
End;
//Unit Description UnitIndex Master Index
procedure TDC240_ads.RunMethod(MethodName : String;Index : Integer; Str: String);
Var
errNum : Integer;
errStr : String;
Begin
errStr := '';
Try
MethodName := UpperCase(MethodName);
If MethodName = 'CANCELOPERATION' Then
Begin
DC240.CancelOperation;
Exit;
End;
//CloseCurCamera
If MethodName = 'CLOSECURCAMERA' Then
Begin
DC240.CloseCurCamera;
Exit;
End;
//CopyCurImageToBMPFile
If MethodName = 'COPYCURIMAGETOBMPFILE' Then
Begin
DC240.CopyCurImageToBMPFile(Index,Str);
Exit;
End;
//CopyCurImageToClipboard
If MethodName = 'COPYCURIMAGETOCLIPBOARD' Then
Begin
DC240.CopyCurImageToClipboard(Index);
Exit;
End;
//CopyCurImageToHGLOBAL
If MethodName = 'COPYCURIMAGETOHGLOBAL' Then
Begin
DC240.CopyCurImageToHGLOBAL(Index);
Exit;
End;
//CopyCurImageToNativeFile
If MethodName = 'COPYCURIMAGETONATIVEFILE' Then
Begin
DC240.CopyCurImageToNativeFile(Str);
Exit;
End;
//DeleteAllImages
If MethodName = 'DELETEALLIMAGES' Then
Begin
CurrentImage := -1;
DC240.DeleteAllImages;
Exit;
End;
//DeleteCurrentImage
If MethodName = 'DELETECURRENTIMAGE' Then
Begin
DC240.DeleteCurrentImage;
Exit;
End;
//InitControl
If MethodName = 'INITCONTROL' Then
Begin
DC240.InitControl;
FControlInitialized := True;
Exit;
End;
//InitCurCamera
If MethodName = 'INITCURCAMERA' Then
Begin
DC240.InitCurCamera;
FCurCameraInitialized := True;
Exit;
End;
//TakePicture
If MethodName = 'TAKEPICTURE' Then
Begin
DC240.TakePicture(Index);
Exit;
End;
//TakePictureContinuously
If MethodName = 'TAKEPICTURECONTINUOUSLY' Then
Begin
If Not FTakingPicture Then FContinuousTimer.Enabled := True;
Exit;
End;
Except
errNum := DC240.LastError;
errStr := DC240.LastErrorString[errNum];
raise Exception.Create('DC240 error: '+MethodName+': '+ IntToStr(errNum)+': '+errStr);
End;
End;
//Unit Description UnitIndex Master Indexfunction TDC240_ads.GetOnOperationComplete: TNotifyEvent; begin ProcName := 'TDC240_ads.GetOnOperationComplete'; Try Result := DC240.OnOperationComplete; Except On E : Exception Do RaiseError(UnitName,ProcName,E); End; end; //Unit Description UnitIndex Master Index
function TDC240_ads.GetOnOperationStart: TNotifyEvent; begin ProcName := 'TDC240_ads.GetOnOperationStart'; Try Result := DC240.OnOperationStart; Except On E : Exception Do RaiseError(UnitName,ProcName,E); End; end; //Unit Description UnitIndex Master Index
function TDC240_ads.GetOnProgress: TDC240CameraProgress; begin ProcName := 'TDC240_ads.GetOnProgress'; Try Result := DC240.OnProgress; Except On E : Exception Do RaiseError(UnitName,ProcName,E); End; end; //Unit Description UnitIndex Master Index
procedure TDC240_ads.SetOnOperationComplete(const Value: TNotifyEvent); begin ProcName := 'TDC240_ads.SetOnOperationComplete'; Try DC240.OnOperationComplete := Value; Except On E : Exception Do RaiseError(UnitName,ProcName,E); End; end; //Unit Description UnitIndex Master Index
procedure TDC240_ads.SetOnOperationStart(const Value: TNotifyEvent); begin ProcName := 'TDC240_ads.SetOnOperationStart'; Try DC240.OnOperationStart := Value; Except On E : Exception Do RaiseError(UnitName,ProcName,E); End; end; //Unit Description UnitIndex Master Index
procedure TDC240_ads.SetOnProgress(const Value: TDC240CameraProgress);
begin
ProcName := 'TDC240_ads.SetOnProgress'; Try
DC240.OnProgress := Value;
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
constructor TDC240_ads.Create(AOwner: TComponent);
Var
inPos : Integer;
begin
ProcName := 'TDC240_ads.Create'; Try
inherited Create(AOwner);
FJpegQuality := 50;
CurrentImageFile := '';
PriorImageFile := '';
FTakingPicture := False;
FContinuousTimer := TTimer.Create(nil);
FContinuousTimer.Enabled := False;
FContinuousTimer.Interval := 20000;
FContinuousTimer.OnTimer := ContinuousTimerTriggered;
FImportResolution := 2;
FCaptureResolution := 2;
FContinuousCapture := 0;
FContinuousSecDelay := 20000;
Persistence := TStringList.Create();
FExecutableName := ExtractFileName(ParamStr(0));
inPos := Pos('.',FExecutableName);
If inPos > 0 Then FExecutableName := Copy(FExecutableName,1,inPos-1);
FExecutablePath := ExtractFileDir(ParamStr(0));
If Copy(FExecutablePath,Length(FExecutablePath),1) <> '\' Then
FExecutablePath := FExecutablePath + '\';
FPersistFileExt := '.240';
FPersistFile := FExecutablePath+FExecutableName+FPersistFileExt;
FPhotoDirectory := FExecutablePath+'\Photos\';
If Not DirectoryExists(FPhotoDirectory) Then
ForceDirectories(FPhotoDirectory);
If FileExists(FPersistFile) Then Persistence.LoadFromFile(FPersistFile);
FControlInitialized := False;
FCurCameraInitialized := False;
DC240 := TDC240Camera.Create(AOwner);
InitControl;
If NumCamAvailable >= 1 Then
Begin
CurCamera := 1;
InitCurCamera;
RestoreSettings;
End;
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
destructor TDC240_ads.Destroy;
begin
ProcName := 'TDC240_ads.Destroy'; Try
DC240 := nil;
Persistence.Free;
inherited;
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
//Unit Description UnitIndex Master Index
Function TDC240_ads.LUMethods(
MethodName : String;
sgDefaultDisplay : String;
out sgDisplay : String;
ShowDialog : Boolean
): Boolean;
Var
R : TStringList;
D : TStringList;
sgCaption : String;
inIndex : Integer;
sgStore : String;
CurValue : Integer;
inCounter : Integer;
Begin
Result := False;
ProcName := 'TDC240_ads.LUMethods'; Try
R := TStringList.Create();
D := TStringList.Create();
Try
R.Clear;
D.Clear;
MethodName := UpperCase(MethodName);
If MethodName = 'BATTERYLEVEL' Then
Begin
//BatteryLevel
R.Add('0'); D.Add('OK / AC Adapter in use');
R.Add('1'); D.Add('Weak');
R.Add('2'); D.Add('Empty');
inIndex := R.IndexOf(IntToStr(BatteryLevel));
If inIndex <> -1 Then
Begin
sgDisplay := D[inIndex];
Result := True;
End
Else
Begin
sgDisplay := 'Unknown';
End;
Exit;
End;
If MethodName = 'CONNECTIONTYPE' Then
Begin
//ConnectionType
R.Add('1'); D.Add('Serial');
R.add('3'); D.Add('USB');
inIndex := R.IndexOf(IntToStr(ConnectionType));
If inIndex <> -1 Then
Begin
sgDisplay := D[inIndex];
Result := True;
End
Else
Begin
sgDisplay := 'Unknown';
End;
Exit;
End;
If MethodName = 'CURIMAGEDATETIMESTAMPMODE' Then
Begin
//CurImageDateTimeStampMode
R.Add('0'); D.Add('Off');
R.Add('1'); D.Add('YY/MM/DD');
R.Add('2'); D.Add('DD/MM/YY');
R.Add('3'); D.Add('MM/DD/YY');
R.Add('4'); D.Add('YY/MM/DD HH:MM');
R.Add('5'); D.Add('DD/MM/YY HH:MM');
R.Add('6'); D.Add('MM/DD/YY HH:MM');
inIndex := R.IndexOf(IntToStr(CurImageDateTimeStampMode));
If inIndex <> -1 Then
Begin
sgDisplay := D[inIndex];
Result := True;
End
Else
Begin
sgDisplay := 'Unknown';
End;
Exit;
End;
If MethodName = 'CURIMAGEEXPOSURECOMPVALUE' Then
Begin
//CurImageExposureCompValue
R.Add('-200'); D.Add('Darkest');
R.Add('-150'); D.Add('Not Darkest');
R.Add('-100'); D.Add('Darker');
R.Add('-50'); D.Add('Slightly Darker');
R.Add('0'); D.Add('Normal');
R.Add('50'); D.Add('Slightly Brighter');
R.Add('100'); D.Add('Brighter');
R.Add('150'); D.Add('Not Brightest');
R.Add('200'); D.Add('Brightest');
inIndex := R.IndexOf(IntToStr(CurImageExposureCompValue));
If inIndex <> -1 Then
Begin
sgDisplay := D[inIndex];
Result := True;
End
Else
Begin
sgDisplay := 'Unknown';
End;
Exit;
End;
If MethodName = 'CURIMAGEFLASHMODE' Then
Begin
//CurImageFlashMode
R.Add('0'); D.Add('Auto');
R.Add('1'); D.Add('On');
R.Add('2'); D.Add('Off');
R.Add('4'); D.Add('Red Eye Auto');
inIndex := R.IndexOf(IntToStr(CurImageFlashMode));
If inIndex <> -1 Then
Begin
sgDisplay := D[inIndex];
Result := True;
End
Else
Begin
sgDisplay := 'Unknown';
End;
Exit;
End;
If MethodName = 'CURIMAGEFOCUSMODE' Then
Begin
//CurImageFocusMode
R.Add('1'); D.Add('Center');
R.Add('2'); D.Add('Close-Up');
R.Add('4'); D.Add('Manual');
R.Add('5'); D.Add('Infinity');
inIndex := R.IndexOf(IntToStr(CurImageFocusMode));
If inIndex <> -1 Then
Begin
sgDisplay := D[inIndex];
Result := True;
End
Else
Begin
sgDisplay := 'Unknown';
End;
Exit;
End;
If MethodName = 'CURIMAGEPICTUREQUALITY' Then
Begin
//CurImagePictureQuality
R.Add('1'); D.Add('"best" quality');
R.Add('2'); D.Add('"better" quality');
R.Add('3'); D.Add('"good" quality');
inIndex := R.IndexOf(IntToStr(CurImagePictureQuality));
If inIndex <> -1 Then
Begin
sgDisplay := D[inIndex];
Result := True;
End
Else
Begin
sgDisplay := 'Unknown';
End;
Exit;
End;
If MethodName = 'CURIMAGESHARPNESSMODE' Then
Begin
//CurImageSharpnessMode
R.Add('-1'); D.Add('Soft');
R.Add('0'); D.Add('Standard');
R.Add('1'); D.Add('Sharp');
inIndex := R.IndexOf(IntToStr(CurImageSharpnessMode));
If inIndex <> -1 Then
Begin
sgDisplay := D[inIndex];
Result := True;
End
Else
Begin
sgDisplay := 'Unknown';
End;
Exit;
End;
If MethodName = 'CURIMAGEWHITEBALANCEMODE' Then
Begin
//CurImageWhiteBalanceMode
R.Add('1'); D.Add('Daylight');
R.Add('2'); D.Add('Tungsten');
R.Add('3'); D.Add('Fluorescent');
R.Add('7'); D.Add('Auto');
inIndex := R.IndexOf(IntToStr(CurImageWhiteBalanceMode));
If inIndex <> -1 Then
Begin
sgDisplay := D[inIndex];
Result := True;
End
Else
Begin
sgDisplay := 'Unknown';
End;
Exit;
End;
If MethodName = 'CURIMAGEZOOMPOSITIONMMS' Then
Begin
//CurImageZoomPositionMMs
sgDisplay := IntToStr(CurImageZoomPositionMMs)+' mm.';
Result := True;
Exit;
End;
If MethodName = 'CURIMAGELIGHTVALUE' Then
Begin
//CurImageLightValue
sgDisplay := FormatFloat('#.000',CurImageLightValue)+ ' Cds.';
Result := True;
Exit;
End;
If MethodName = 'CAPTUREDELAYSECS' Then //zzz
Begin
// CaptureDelaySECs //zzz
CurValue := CaptureDelaySECs; //zzz
sgCaption := 'CaptureDelaySECs Dialog'; //zzz
R.Add('0'); D.Add('0');
R.Add('10'); D.Add('10');
inIndex := R.IndexOf(IntToStr(CurValue));
If inIndex <> -1 Then
Begin
sgDisplay := D[inIndex];
Result := True;
End
Else
Begin
sgDisplay := 'Unknown';
End;
If Not ShowDialog Then Exit;
If DlgLookup_ads(
sgStore ,//out sgStore : String;
sgDisplay ,//out sgDisplay : String;
sgCaption ,//sgCaption : String;
D.Text ,//sgDisplayList : String;
R.Text ,//sgStoreList : String;
sgDisplay //sgDefaultDisplay : String
)//): Boolean; Overload;
Then
Begin
DC240.
CaptureDelaySECs //zzz
:= StrToInt(sgStore);
Result := True;
End;
Exit;
End;
If MethodName = 'CAPTUREFILETYPE' Then //zzz
Begin
// CaptureFileType //zzz
sgCaption := 'CaptureFileType Dialog'; //zzz
R.Add(CaptureFileType); D.Add(CaptureFileType);
sgDisplay := CaptureFileType;
If Not ShowDialog Then Exit;
If DlgLookup_ads(
sgStore ,//out sgStore : String;
sgDisplay ,//out sgDisplay : String;
sgCaption ,//sgCaption : String;
D.Text ,//sgDisplayList : String;
R.Text ,//sgStoreList : String;
sgDisplay //sgDefaultDisplay : String
)//): Boolean; Overload;
Then
Begin
DC240.
CaptureFileType //zzz
:= sgStore;
Result := True;
End;
Exit;
End;
If MethodName = 'CURCAMERA' Then //zzz
Begin
// CurCamera //zzz
CurValue := CurCamera; //zzz
sgCaption := 'Current Camera Dialog'; //zzz
For inCounter := 1 To NumCamAvailable Do
Begin
R.Add(IntToStr(inCounter));
D.Add(IntToStr(inCounter));
End;
sgDisplay := IntToStr(CurValue);
If Not ShowDialog Then Exit;
If DlgLookup_ads(
sgStore ,//out sgStore : String;
sgDisplay ,//out sgDisplay : String;
sgCaption ,//sgCaption : String;
D.Text ,//sgDisplayList : String;
R.Text ,//sgStoreList : String;
sgDisplay //sgDefaultDisplay : String
)//): Boolean; Overload;
Then
Begin
DC240.
CurCamera //zzz
:= StrToInt(sgStore);
Result := True;
End;
Exit;
End;
If MethodName = 'IMAGEEFFECTGRAYSCALE' Then //zzz
Begin
// ImageEffectGrayscale //zzz
CurValue := ImageEffectGrayscale; //zzz
sgCaption := 'Grayscale Active Dialog'; //zzz
R.Add('0'); D.Add('False');
R.Add('1'); D.Add('True');
inIndex := R.IndexOf(IntToStr(CurValue));
If inIndex <> -1 Then
Begin
sgDisplay := D[inIndex];
Result := True;
End
Else
Begin
sgDisplay := 'Unknown';
End;
If Not ShowDialog Then Exit;
If DlgLookup_ads(
sgStore ,//out sgStore : String;
sgDisplay ,//out sgDisplay : String;
sgCaption ,//sgCaption : String;
D.Text ,//sgDisplayList : String;
R.Text ,//sgStoreList : String;
sgDisplay //sgDefaultDisplay : String
)//): Boolean; Overload;
Then
Begin
DC240.
ImageEffectGrayscale //zzz
:= StrToInt(sgStore);
Result := True;
End;
Exit;
End;
If MethodName = 'IMAGEEFFECTSEPIA' Then //zzz
Begin
// ImageEffectSepia //zzz
CurValue := ImageEffectSepia; //zzz
sgCaption := 'Sepia Active Dialog'; //zzz
R.Add('0'); D.Add('False');
R.Add('1'); D.Add('True');
inIndex := R.IndexOf(IntToStr(CurValue));
If inIndex <> -1 Then
Begin
sgDisplay := D[inIndex];
Result := True;
End
Else
Begin
sgDisplay := 'Unknown';
End;
If Not ShowDialog Then Exit;
If DlgLookup_ads(
sgStore ,//out sgStore : String;
sgDisplay ,//out sgDisplay : String;
sgCaption ,//sgCaption : String;
D.Text ,//sgDisplayList : String;
R.Text ,//sgStoreList : String;
sgDisplay //sgDefaultDisplay : String
)//): Boolean; Overload;
Then
Begin
DC240.
ImageEffectSepia //zzz
:= StrToInt(sgStore);
Result := True;
End;
Exit;
End;
If MethodName = 'IMAGEEFFECTDOCUMENT' Then //zzz
Begin
// ImageEffectDocument //zzz
CurValue := ImageEffectDocument; //zzz
sgCaption := 'Document Effect Active Dialog'; //zzz
R.Add('0'); D.Add('False');
R.Add('1'); D.Add('True');
inIndex := R.IndexOf(IntToStr(CurValue));
If inIndex <> -1 Then
Begin
sgDisplay := D[inIndex];
Result := True;
End
Else
Begin
sgDisplay := 'Unknown';
End;
If Not ShowDialog Then Exit;
If DlgLookup_ads(
sgStore ,//out sgStore : String;
sgDisplay ,//out sgDisplay : String;
sgCaption ,//sgCaption : String;
D.Text ,//sgDisplayList : String;
R.Text ,//sgStoreList : String;
sgDisplay //sgDefaultDisplay : String
)//): Boolean; Overload;
Then
Begin
DC240.
ImageEffectDocument //zzz
:= StrToInt(sgStore);
Result := True;
End;
Exit;
End;
If MethodName = 'CAPTURERESOLUTION' Then //zzz
Begin
// CaptureResolution //zzz
CurValue := CaptureResolution; //zzz
sgCaption := 'CaptureResolution Dialog'; //zzz
R.Add('1'); D.Add('640x480');
R.Add('2'); D.Add('1280x960');
sgDisplay := D[CurValue-1];
If Not ShowDialog Then Exit;
If DlgLookup_ads(
sgStore ,//out sgStore : String;
sgDisplay ,//out sgDisplay : String;
sgCaption ,//sgCaption : String;
D.Text ,//sgDisplayList : String;
R.Text ,//sgStoreList : String;
sgDisplay //sgDefaultDisplay : String
)//): Boolean; Overload;
Then
Begin
If sgStore <> '' Then
Begin
inIndex := StrToInt(sgStore);
If inIndex <> CurValue Then CaptureResolution := inIndex;
Result := True;
End;
End;
Exit;
End;
If MethodName = 'CONTINUOUSCAPTURE' Then //zzz
Begin
// ContinuousCapture //zzz
CurValue := ContinuousCapture; //zzz
sgCaption := 'ContinuousCapture Dialog'; //zzz
R.Add('0'); D.Add('False');
R.Add('1'); D.Add('True');
sgDisplay := D[CurValue];
If Not ShowDialog Then Exit;
If DlgLookup_ads(
sgStore ,//out sgStore : String;
sgDisplay ,//out sgDisplay : String;
sgCaption ,//sgCaption : String;
D.Text ,//sgDisplayList : String;
R.Text ,//sgStoreList : String;
sgDisplay //sgDefaultDisplay : String
)//): Boolean; Overload;
Then
Begin
If sgStore <> '' Then
Begin
inIndex := StrToInt(sgStore);
If inIndex <> CurValue Then ContinuousCapture := inIndex;
Result := True;
End;
End;
Exit;
End;
If MethodName = 'CONTINUOUSSECDELAY' Then //zzz
Begin
// ContinuousSecDelay //zzz
CurValue := ContinuousSecDelay; //zzz
sgCaption := 'ContinuousSecDelay Dialog'; //zzz
R.Add( '1000'); D.Add(' 1 sec');
R.Add( '2000'); D.Add(' 2 sec');
R.Add( '3000'); D.Add(' 3 sec');
R.Add( '4000'); D.Add(' 4 sec');
R.Add( '5000'); D.Add(' 5 sec');
R.Add( '6000'); D.Add(' 6 sec');
R.Add( '7000'); D.Add(' 7 sec');
R.Add( '8000'); D.Add(' 8 sec');
R.Add( '9000'); D.Add(' 9 sec');
R.Add( '10000'); D.Add(' 10 sec');
R.Add( '14000'); D.Add(' 14 sec');
R.Add( '16000'); D.Add(' 16 sec');
R.Add( '18000'); D.Add(' 18 sec');
R.Add( '20000'); D.Add(' 20 sec');
R.Add( '25000'); D.Add(' 25 sec');
R.Add( '30000'); D.Add(' 30 sec');
R.Add( '40000'); D.Add(' 40 sec');
R.Add( '50000'); D.Add(' 50 sec');
R.Add( '60000'); D.Add(' 1 min');
R.Add( '120000'); D.Add(' 2 min');
R.Add( '180000'); D.Add(' 3 min');
R.Add( '240000'); D.Add(' 4 min');
R.Add( '300000'); D.Add(' 5 min');
R.Add( '600000'); D.Add(' 10 min');
R.Add( '900000'); D.Add(' 15 min');
R.Add( '1800000'); D.Add(' 30 min');
R.Add( '3600000'); D.Add(' 1 hr ');
R.Add( '7200000'); D.Add(' 2 hr ');
R.Add('10800000'); D.Add(' 3 hr ');
R.Add('14400000'); D.Add(' 4 hr ');
R.Add('18000000'); D.Add(' 5 hr ');
R.Add('28800000'); D.Add(' 8 hr ');
R.Add('43200000'); D.Add(' 12 hr ');
R.Add('86400000'); D.Add(' 1 day');
inIndex := R.IndexOf(IntToStr(CurValue));
If inIndex <> -1 Then
Begin
sgDisplay := D[inIndex];
Result := True;
End
Else
Begin
sgDisplay := 'Unknown';
End;
If Not ShowDialog Then Exit;
If DlgLookup_ads(
sgStore ,//out sgStore : String;
sgDisplay ,//out sgDisplay : String;
sgCaption ,//sgCaption : String;
D.Text ,//sgDisplayList : String;
R.Text ,//sgStoreList : String;
sgDisplay //sgDefaultDisplay : String
)//): Boolean; Overload;
Then
Begin
If sgStore <> '' Then
Begin
inIndex := StrToInt(sgStore);
If inIndex <> CurValue Then ContinuousSecDelay := inIndex;
Result := True;
End;
End;
Exit;
End;
If MethodName = 'CURRENTIMAGE' Then //zzz
Begin
// CurrentImage //zzz
CurValue := CurrentImage; //zzz
sgCaption := 'CurrentImage Dialog'; //zzz
For inCounter := 1 To TotalImages Do
Begin
R.Add(IntToStr(inCounter));
D.Add(IntToStr(inCounter));
End;
sgDisplay := IntToStr(CurValue);
If Not ShowDialog Then Exit;
If DlgLookup_ads(
sgStore ,//out sgStore : String;
sgDisplay ,//out sgDisplay : String;
sgCaption ,//sgCaption : String;
D.Text ,//sgDisplayList : String;
R.Text ,//sgStoreList : String;
sgDisplay //sgDefaultDisplay : String
)//): Boolean; Overload;
Then
Begin
DC240.
CurrentImage //zzz
:= StrToInt(sgStore);
Result := True;
End;
Exit;
End;
If MethodName = 'DATETIMESTAMPMODE' Then //zzz
Begin
// DateTimeStampMode //zzz
CurValue := DateTimeStampMode; //zzz
sgCaption := 'DateTimeStampMode Dialog'; //zzz
R.Add('0'); D.Add('Off');
R.Add('1'); D.Add('YY/MM/DD');
R.Add('2'); D.Add('DD/MM/YY');
R.Add('3'); D.Add('MM/DD/YY');
R.Add('4'); D.Add('YY/MM/DD HH:MM');
R.Add('5'); D.Add('DD/MM/YY HH:MM');
R.Add('6'); D.Add('MM/DD/YY HH:MM');
inIndex := R.IndexOf(IntToStr(CurValue));
If inIndex <> -1 Then
Begin
sgDisplay := D[inIndex];
Result := True;
End
Else
Begin
sgDisplay := 'Unknown';
End;
If Not ShowDialog Then Exit;
If DlgLookup_ads(
sgStore ,//out sgStore : String;
sgDisplay ,//out sgDisplay : String;
sgCaption ,//sgCaption : String;
D.Text ,//sgDisplayList : String;
R.Text ,//sgStoreList : String;
sgDisplay //sgDefaultDisplay : String
)//): Boolean; Overload;
Then
Begin
DC240.
DateTimeStampMode //zzz
:= StrToInt(sgStore);
Result := True;
End;
Exit;
End;
If MethodName = 'EXPOSURECOMPVALUE' Then //zzz
Begin
// ExposureCompValue //zzz
CurValue := ExposureCompValue; //zzz
sgCaption := 'ExposureCompValue Dialog'; //zzz
R.Add('-200'); D.Add('Darkest');
R.Add('-150'); D.Add('Not Darkest');
R.Add('-100'); D.Add('Darker');
R.Add('-50'); D.Add('Slightly Darker');
R.Add('0'); D.Add('Normal');
R.Add('50'); D.Add('Slightly Brighter');
R.Add('100'); D.Add('Brighter');
R.Add('150'); D.Add('Not Brightest');
R.Add('200'); D.Add('Brightest');
inIndex := R.IndexOf(IntToStr(CurValue));
If inIndex <> -1 Then
Begin
sgDisplay := D[inIndex];
Result := True;
End
Else
Begin
sgDisplay := 'Unknown';
End;
If Not ShowDialog Then Exit;
If DlgLookup_ads(
sgStore ,//out sgStore : String;
sgDisplay ,//out sgDisplay : String;
sgCaption ,//sgCaption : String;
D.Text ,//sgDisplayList : String;
R.Text ,//sgStoreList : String;
sgDisplay //sgDefaultDisplay : String
)//): Boolean; Overload;
Then
Begin
DC240.
ExposureCompValue //zzz
:= StrToInt(sgStore);
Result := True;
End;
Exit;
End;
If MethodName = 'FLASHMODE' Then //zzz
Begin
// FlashMode //zzz
CurValue := FlashMode; //zzz
sgCaption := 'FlashMode Dialog'; //zzz
R.Add('0'); D.Add('Auto');
R.Add('1'); D.Add('On');
R.Add('2'); D.Add('Off');
R.Add('4'); D.Add('Red Eye Auto');
inIndex := R.IndexOf(IntToStr(CurValue));
If inIndex <> -1 Then
Begin
sgDisplay := D[inIndex];
Result := True;
End
Else
Begin
sgDisplay := 'Unknown';
End;
If Not ShowDialog Then Exit;
If DlgLookup_ads(
sgStore ,//out sgStore : String;
sgDisplay ,//out sgDisplay : String;
sgCaption ,//sgCaption : String;
D.Text ,//sgDisplayList : String;
R.Text ,//sgStoreList : String;
sgDisplay //sgDefaultDisplay : String
)//): Boolean; Overload;
Then
Begin
DC240.
FlashMode //zzz
:= StrToInt(sgStore);
Result := True;
End;
Exit;
End;
If MethodName = 'FOCUSMODE' Then //zzz
Begin
// FocusMode //zzz
CurValue := FocusMode; //zzz
sgCaption := 'FocusMode Dialog'; //zzz
R.Add('1'); D.Add('Center');
R.Add('2'); D.Add('Close-Up');
R.Add('4'); D.Add('Manual');
R.Add('5'); D.Add('Infinity');
inIndex := R.IndexOf(IntToStr(CurValue));
If inIndex <> -1 Then
Begin
sgDisplay := D[inIndex];
Result := True;
End
Else
Begin
sgDisplay := 'Unknown';
End;
If Not ShowDialog Then Exit;
If DlgLookup_ads(
sgStore ,//out sgStore : String;
sgDisplay ,//out sgDisplay : String;
sgCaption ,//sgCaption : String;
D.Text ,//sgDisplayList : String;
R.Text ,//sgStoreList : String;
sgDisplay //sgDefaultDisplay : String
)//): Boolean; Overload;
Then
Begin
DC240.
FocusMode //zzz
:= StrToInt(sgStore);
Result := True;
End;
Exit;
End;
If MethodName = 'IMPORTRESOLUTION' Then //zzz
Begin
// ImportResolution //zzz
CurValue := ImportResolution ; //zzz
sgCaption := 'ImportResolution Dialog'; //zzz
R.Add('1'); D.Add('160x120');
If CaptureResolution = 1 Then
Begin
R.Add('2'); D.Add('640x480');
End
Else
Begin
R.Add('2'); D.Add('1280x960');
End;
sgDisplay := D[CurValue-1];
If Not ShowDialog Then Exit;
If DlgLookup_ads(
sgStore ,//out sgStore : String;
sgDisplay ,//out sgDisplay : String;
sgCaption ,//sgCaption : String;
D.Text ,//sgDisplayList : String;
R.Text ,//sgStoreList : String;
sgDisplay //sgDefaultDisplay : String
)//): Boolean; Overload;
Then
Begin
If sgStore <> '' Then
Begin
inIndex := StrToInt(sgStore);
If inIndex <> CurValue Then ImportResolution := inIndex;
Result := True;
End;
End;
Exit;
End;
If MethodName = 'JPEGQUALITY' Then //zzz
Begin
// JpegQuality //zzz
CurValue := JpegQuality; //zzz
sgCaption := 'Jpeg Quality Dialog'; //zzz
R.Add( '5'); D.Add(' 5');
R.Add( '6'); D.Add(' 6');
R.Add( '7'); D.Add(' 7');
R.Add( '8'); D.Add(' 8');
R.Add( '9'); D.Add(' 9');
R.Add( '10'); D.Add(' 10');
R.Add( '11'); D.Add(' 11');
R.Add( '12'); D.Add(' 12');
R.Add( '13'); D.Add(' 13');
R.Add( '14'); D.Add(' 14');
R.Add( '15'); D.Add(' 15');
R.Add( '16'); D.Add(' 16');
R.Add( '17'); D.Add(' 17');
R.Add( '18'); D.Add(' 18');
R.Add( '19'); D.Add(' 19');
R.Add( '20'); D.Add(' 20');
R.Add( '21'); D.Add(' 21');
R.Add( '22'); D.Add(' 22');
R.Add( '23'); D.Add(' 23');
R.Add( '24'); D.Add(' 24');
R.Add( '25'); D.Add(' 25');
R.Add( '28'); D.Add(' 28');
R.Add( '30'); D.Add(' 30');
R.Add( '33'); D.Add(' 33');
R.Add( '36'); D.Add(' 36');
R.Add( '40'); D.Add(' 40');
R.Add( '50'); D.Add(' 50');
R.Add( '60'); D.Add(' 60');
R.Add( '70'); D.Add(' 70');
R.Add( '80'); D.Add(' 80');
R.Add( '90'); D.Add(' 90');
R.Add('100'); D.Add('100');
inIndex := R.IndexOf(IntToStr(CurValue));
If inIndex <> -1 Then
Begin
sgDisplay := D[inIndex];
Result := True;
End
Else
Begin
sgDisplay := 'Unknown';
End;
If Not ShowDialog Then Exit;
If DlgLookup_ads(
sgStore ,//out sgStore : String;
sgDisplay ,//out sgDisplay : String;
sgCaption ,//sgCaption : String;
D.Text ,//sgDisplayList : String;
R.Text ,//sgStoreList : String;
sgDisplay //sgDefaultDisplay : String
)//): Boolean; Overload;
Then
Begin
If sgStore <> '' Then
Begin
inIndex := StrToInt(sgStore);
If inIndex <> CurValue Then JpegQuality := inIndex;
Result := True;
End;
End;
Exit;
End;
If MethodName = 'MANUALFOCUSDISTANCECMS' Then //zzz
Begin
// ManualFocusDistanceCMs //zzz
CurValue := ManualFocusDistanceCMs; //zzz
sgCaption := 'Manual Focus Distance in centimeters'; //zzz
R.add('50'); D.Add(' 50 cm.');
R.add('60'); D.Add(' 60 cm.');
R.add('80'); D.Add(' 80 cm.');
R.add('100'); D.Add(' 100 cm.');
R.add('130'); D.Add(' 130 cm.');
R.add('170'); D.Add(' 170 cm.');
R.add('210'); D.Add(' 210 cm.');
R.add('300'); D.Add(' 300 cm.');
R.add('500'); D.Add(' 500 cm.');
R.add('1300'); D.Add(' 1300 cm.');
R.add('65535');D.Add('65535 cm.');
inIndex := R.IndexOf(IntToStr(CurValue));
If inIndex <> -1 Then
Begin
sgDisplay := D[inIndex];
Result := True;
End
Else
Begin
sgDisplay := 'Unknown';
End;
If Not ShowDialog Then Exit;
If DlgLookup_ads(
sgStore ,//out sgStore : String;
sgDisplay ,//out sgDisplay : String;
sgCaption ,//sgCaption : String;
D.Text ,//sgDisplayList : String;
R.Text ,//sgStoreList : String;
sgDisplay //sgDefaultDisplay : String
)//): Boolean; Overload;
Then
Begin
DC240.
ManualFocusDistanceCMs //zzz
:= StrToInt(sgStore);
Result := True;
End;
Exit;
End;
If MethodName = 'MANUALFOCUSISON' Then //zzz
Begin
// ManualFocusIsOn //zzz
CurValue := ManualFocusIsOn; //zzz
sgCaption := 'Manual Focus Active Dialog'; //zzz
R.Add('0'); D.Add('False');
R.Add('1'); D.Add('True');
inIndex := R.IndexOf(IntToStr(CurValue));
If inIndex <> -1 Then
Begin
sgDisplay := D[inIndex];
Result := True;
End
Else
Begin
sgDisplay := 'Unknown';
End;
If Not ShowDialog Then Exit;
If DlgLookup_ads(
sgStore ,//out sgStore : String;
sgDisplay ,//out sgDisplay : String;
sgCaption ,//sgCaption : String;
D.Text ,//sgDisplayList : String;
R.Text ,//sgStoreList : String;
sgDisplay //sgDefaultDisplay : String
)//): Boolean; Overload;
Then
Begin
DC240.
ManualFocusIsOn //zzz
:= StrToInt(sgStore);
Result := True;
End;
Exit;
End;
If MethodName = 'PICTUREQUALITY' Then //zzz
Begin
// PictureQuality //zzz
CurValue := PictureQuality; //zzz
sgCaption := 'PictureQuality Dialog'; //zzz
R.Add('1'); D.Add('"best" quality');
R.Add('2'); D.Add('"better" quality');
R.Add('3'); D.Add('"good" quality');
inIndex := R.IndexOf(IntToStr(CurValue));
If inIndex <> -1 Then
Begin
sgDisplay := D[inIndex];
Result := True;
End
Else
Begin
sgDisplay := 'Unknown';
End;
If Not ShowDialog Then Exit;
If DlgLookup_ads(
sgStore ,//out sgStore : String;
sgDisplay ,//out sgDisplay : String;
sgCaption ,//sgCaption : String;
D.Text ,//sgDisplayList : String;
R.Text ,//sgStoreList : String;
sgDisplay //sgDefaultDisplay : String
)//): Boolean; Overload;
Then
Begin
DC240.
PictureQuality //zzz
:= StrToInt(sgStore);
Result := True;
End;
Exit;
End;
If MethodName = 'SHARPNESSMODE' Then //zzz
Begin
// SharpnessMode //zzz
CurValue := SharpnessMode; //zzz
sgCaption := 'SharpnessMode Dialog'; //zzz
R.Add('-1'); D.Add('Soft');
R.Add('0'); D.Add('Standard');
R.Add('1'); D.Add('Sharp');
inIndex := R.IndexOf(IntToStr(CurValue));
If inIndex <> -1 Then
Begin
sgDisplay := D[inIndex];
Result := True;
End
Else
Begin
sgDisplay := 'Unknown';
End;
If Not ShowDialog Then Exit;
If DlgLookup_ads(
sgStore ,//out sgStore : String;
sgDisplay ,//out sgDisplay : String;
sgCaption ,//sgCaption : String;
D.Text ,//sgDisplayList : String;
R.Text ,//sgStoreList : String;
sgDisplay //sgDefaultDisplay : String
)//): Boolean; Overload;
Then
Begin
DC240.
SharpnessMode //zzz
:= StrToInt(sgStore);
Result := True;
End;
Exit;
End;
If MethodName = 'WHITEBALANCEMODE' Then //zzz
Begin
// WhiteBalanceMode //zzz
CurValue := WhiteBalanceMode; //zzz
sgCaption := 'WhiteBalanceMode Dialog'; //zzz
R.Add('1'); D.Add('Daylight');
R.Add('2'); D.Add('Tungsten');
R.Add('3'); D.Add('Fluorescent');
R.Add('7'); D.Add('Auto');
inIndex := R.IndexOf(IntToStr(CurValue));
If inIndex <> -1 Then
Begin
sgDisplay := D[inIndex];
Result := True;
End
Else
Begin
sgDisplay := 'Unknown';
End;
If Not ShowDialog Then Exit;
If DlgLookup_ads(
sgStore ,//out sgStore : String;
sgDisplay ,//out sgDisplay : String;
sgCaption ,//sgCaption : String;
D.Text ,//sgDisplayList : String;
R.Text ,//sgStoreList : String;
sgDisplay //sgDefaultDisplay : String
)//): Boolean; Overload;
Then
Begin
DC240.
WhiteBalanceMode //zzz
:= StrToInt(sgStore);
Result := True;
End;
Exit;
End;
If MethodName = 'ZOOMPOSITIONMMS' Then //zzz
Begin
// ZoomPositionMMs //zzz
CurValue := ZoomPositionMMs; //zzz
sgCaption := 'ZoomPositionMMs Dialog'; //zzz
R.Add(' 39'); D.Add(' 39');
R.Add(' 52'); D.Add(' 52');
R.Add(' 64'); D.Add(' 64');
R.Add(' 77'); D.Add(' 77');
R.Add(' 90'); D.Add(' 90');
R.Add('104'); D.Add('104');
R.Add('117'); D.Add('117');
inIndex := R.IndexOf(IntToStr(CurValue));
If inIndex <> -1 Then
Begin
sgDisplay := D[inIndex];
Result := True;
End
Else
Begin
sgDisplay := 'Unknown';
End;
If Not ShowDialog Then Exit;
If DlgLookup_ads(
sgStore ,//out sgStore : String;
sgDisplay ,//out sgDisplay : String;
sgCaption ,//sgCaption : String;
D.Text ,//sgDisplayList : String;
R.Text ,//sgStoreList : String;
sgDisplay //sgDefaultDisplay : String
)//): Boolean; Overload;
Then
Begin
DC240.
ZoomPositionMMs //zzz
:= StrToInt(sgStore);
Result := True;
End;
Exit;
End;
Finally
R.Free;
D.Free;
End;
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
End;
//Unit Description UnitIndex Master Index
Procedure TDC240_ads.ShowStatus;
Var
D : TStringList;
R : TStringList;
sgDefaultDisplay : String;
sgCaption : String;
sgDisplay : String;
sgStore : String;
Begin
ProcName := 'TDC240_ads.ShowStatus'; Try
R := TStringList.Create();
D := TStringList.Create();
Try
R.Clear;
D.Clear;
{} LUMethods('BatteryLevel','',sgDisplay,False);
{} D.Add('BatteryLevel = '+sgDisplay);
D.Add('BorderFileName = '+String(BorderFileName));
If CurCamera > 0 Then
Begin
D.Add('CameraDescription = '+String(Get_CameraDescription(CurCamera)));
End;
D.Add('CameraID = '+String(CameraID));
D.Add('CameraType = '+String(CameraType));
D.Add('CaptureDelayMaxSECs = '+IntToStr(CaptureDelayMaxSECs));
D.Add('CaptureDelayMinSECs = '+IntToStr(CaptureDelayMinSECs));
D.Add('CaptureDelaySECs = '+IntToStr(CaptureDelaySECs));
{} LUMethods('CaptureDelaySECs','',sgDisplay,False);
{} D.Add('CaptureDelaySECs = '+sgDisplay);
{} LUMethods('CaptureFileType','',sgDisplay,False);
{} D.Add('CaptureFileType = '+sgDisplay);
{} LUMethods('CaptureResolution','',sgDisplay,False);
{} D.Add('CaptureResolution = '+sgDisplay);
{} LUMethods('ConnectionType','',sgDisplay,False);
{} D.Add('ConnectionType = '+sgDisplay);
{} LUMethods('ContinuousCapture','',sgDisplay,False);
{} D.Add('ContinuousCapture = '+sgDisplay);
{} LUMethods('ContinuousSecDelay','',sgDisplay,False);
{} D.Add('ContinuousSecDelay = '+sgDisplay);
{} LUMethods('CurCamera','',sgDisplay,False);
{} D.Add('CurCamera = '+sgDisplay);
D.Add('CurImageBorderFileName = '+String(CurImageBorderFileName));
{} LUMethods('CurImageDateTimeStampMode','',sgDisplay,False);
{} D.Add('CurImageDateTimeStampMode = '+sgDisplay);
{} LUMethods('CurImageExposureCompValue','',sgDisplay,False);
{} D.Add('CurImageExposureCompValue = '+sgDisplay);
D.Add('CurImageFileType = '+String(CurImageFileType));
{} LUMethods('CurImageFlashMode','',sgDisplay,False);
{} D.Add('CurImageFlashMode = '+sgDisplay);
D.Add('CurImageFlashUsed = '+IntToStr(CurImageFlashUsed));
{} LUMethods('CurImageFocusMode','',sgDisplay,False);
{} D.Add('CurImageFocusMode = '+sgDisplay);
D.Add('CurImageFocusPositionMMs = '+IntToStr(CurImageFocusPositionMMs));
D.Add('CurImageFStop = '+FormatFloat('#.000',CurImageFStop));
D.Add('CurImageImageEffectBorder = '+IntToStr(CurImageImageEffectBorder));
D.Add('CurImageImageEffectDocument = '+IntToStr(CurImageImageEffectDocument));
D.Add('CurImageImageEffectGrayscale = '+IntToStr(CurImageImageEffectGrayscale));
D.Add('CurImageImageEffectSepia = '+IntToStr(CurImageImageEffectSepia));
{} LUMethods('CurImageLightValue','',sgDisplay,False);
{} D.Add('CurImageLightValue = '+sgDisplay);
D.Add('CurImageManualExposure = '+IntToStr(CurImageManualExposure));
D.Add('CurImageName = '+String(CurImageName));
{} LUMethods('CurImagePictureQuality','',sgDisplay,False);
{} D.Add('CurImagePictureQuality = '+sgDisplay);
{} LUMethods('CurImageSharpnessMode','',sgDisplay,False);
{} D.Add('CurImageSharpnessMode = '+sgDisplay);
D.Add('CurImageTimeStamp = '+FormatDateTime('mm/dd/yyyy hh:nn',CurImageTimeStamp));
{} LUMethods('CurImageWhiteBalanceMode','',sgDisplay,False);
{} D.Add('CurImageWhiteBalanceMode = '+sgDisplay);
{} LUMethods('CurImageZoomPositionMMs','',sgDisplay,False);
{} D.Add('CurImageZoomPositionMMs = '+sgDisplay);
{} LUMethods('CurrentImage','',sgDisplay,False);
{} D.Add('CurrentImage = '+sgDisplay);
D.Add('DateTime = '+FormatDateTime('mm/dd/yyyy hh:nn',DateTime));
{} LUMethods('DateTimeStampMode','',sgDisplay,False);
{} D.Add('DateTimeStampMode = '+sgDisplay);
{} LUMethods('ExposureCompValue','',sgDisplay,False);
{} D.Add('ExposureCompValue = '+sgDisplay);
D.Add('FirmwareVersionNumber = '+IntToStr(FirmwareVersionNumber));
D.Add('FirmwareVersionString = '+String(FirmwareVersionString));
D.Add('FlashIsCharged = '+IntToStr(FlashIsCharged));
{} LUMethods('FlashMode','',sgDisplay,False);
{} D.Add('FlashMode = '+sgDisplay);
{} LUMethods('FocusMode','',sgDisplay,False);
{} D.Add('FocusMode = '+sgDisplay);
D.Add('ImageEffectBorder = '+IntToStr(ImageEffectBorder));
{} LUMethods('ImageEffectDocument','',sgDisplay,False);
{} D.Add('ImageEffectDocument = '+sgDisplay);
{} LUMethods('ImageEffectGrayscale','',sgDisplay,False);
{} D.Add('ImageEffectGrayscale = '+sgDisplay);
{} LUMethods('ImageEffectSepia','',sgDisplay,False);
{} D.Add('ImageEffectSepia = '+sgDisplay);
D.Add('ImageHandle = '+IntToStr(ImageHandle));
{} LUMethods('ImportResolution','',sgDisplay,False);
{} D.Add('ImportResolution = '+sgDisplay);
D.Add('IsAbleToDeleteSingleImages = '+IntToStr(IsAbleToDeleteSingleImages));
D.Add('IsACAdapterPresent = '+IntToStr(IsACAdapterPresent));
D.Add('IsPCCardPresent = '+IntToStr(IsPCCardPresent));
D.Add('IsPCCardSupported = '+IntToStr(IsPCCardSupported));
D.Add('IsPresent = '+IntToStr(IsPresent));
{} LUMethods('JpegQuality','',sgDisplay,False);
{} D.Add('JpegQuality = '+sgDisplay);
D.Add('LastError = '+IntToStr(LastError));
D.Add('LastErrorString = '+Get_LastErrorString(LastError));
{} LUMethods('ManualFocusDistanceCMs','',sgDisplay,False);
{} D.Add('ManualFocusDistanceCMs = '+sgDisplay);
{} LUMethods('ManualFocusIsOn','',sgDisplay,False);
{} D.Add('ManualFocusIsOn = '+sgDisplay);
D.Add('NumCamAvailable = '+IntToStr(NumCamAvailable));
D.Add('NumCameraAvailConnectionTypes= '+IntToStr(NumCameraAvailConnectionTypes));
D.Add('NumCameraCaptureTimerDelays = '+IntToStr(NumCameraCaptureTimerDelays));
D.Add('NumCameraFlashModes = '+IntToStr(NumCameraFlashModes));
D.Add('NumCameraFocusModes = '+IntToStr(NumCameraFocusModes));
D.Add('NumCameraPictureQualities = '+IntToStr(NumCameraPictureQualities));
D.Add('NumCameraResolutions = '+IntToStr(NumCameraResolutions));
D.Add('NumCameraWhiteBalanceModes = '+IntToStr(NumCameraWhiteBalanceModes));
D.Add('NumCameraZoomPositions = '+IntToStr(NumCameraZoomPositions));
D.Add('NumCurImageResolutions = '+IntToStr(NumCurImageResolutions));
D.Add('NumImagesOnPCCard = '+IntToStr(NumImagesOnPCCard));
D.Add('NumImagesRemainingOnPCCard = '+IntToStr(NumImagesRemainingOnPCCard));
D.Add('PCCardIsFormatted = '+IntToStr(PCCardIsFormatted));
D.Add('PCCardVolumeName = '+String(PCCardVolumeName));
{} LUMethods('PictureQuality','',sgDisplay,False);
{} D.Add('PictureQuality = '+sgDisplay);
D.Add('SerialPortNumber = '+IntToStr(SerialPortNumber));
D.Add('SerialPortSpeed = '+IntToStr(SerialPortSpeed));
{} LUMethods('SharpnessMode','',sgDisplay,False);
{} D.Add('SharpnessMode = '+sgDisplay);
D.Add('TimeDisplayIn24HourMode = '+IntToStr(TimeDisplayIn24HourMode));
D.Add('TotalImages = '+IntToStr(TotalImages));
{} LUMethods('WhiteBalanceMode','',sgDisplay,False);
{} D.Add('WhiteBalanceMode = '+sgDisplay);
{} LUMethods('ZoomPositionMMs','',sgDisplay,False);
{} D.Add('ZoomPositionMMs = '+sgDisplay);
R.SetText(PChar(D.Text));
sgCaption := 'DC240 Status Summary';
sgDefaultDisplay := '';
DlgLookup_ads(
sgStore , //out sgStore : String;
sgDisplay , //out sgDisplay : String;
sgCaption , //sgCaption : String;
D.Text , //sgDisplayList : String;
R.Text , //sgStoreList : String;
sgDefaultDisplay //sgDefaultDisplay : String
);//): Boolean; Overload;
Finally
R.Free;
D.Free;
End;
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
//Unit Description UnitIndex Master Index
Procedure TDC240_ads.ChangeSetting;
Var
D : TStringList;
R : TStringList;
sgDefaultDisplay : String;
sgCaption : String;
sgDisplay : String;
sgStore : String;
boRetval : Boolean;
inCounter : Integer;
sgTemp : String;
sgSpaces : String;
//inIndex : Integer;
inSelected : Integer;
Begin
ProcName := 'TDC240_ads.ChangeSetting'; Try
R := TStringList.Create();
D := TStringList.Create();
Try
inSelected := -1;
boRetval := True;
While boRetval Do
Begin
sgSpaces := ' ';
R.Clear;
D.Clear;
//D.Add('BorderFileName = '+String(BorderFileName));
//D.Add('CameraID = '+String(CameraID));
{} LUMethods('CaptureDelaySECs','',sgDisplay,False);
{} D.Add('CaptureDelaySECs = '+sgDisplay);
{} LUMethods('CaptureFileType','',sgDisplay,False);
{} D.Add('CaptureFileType = '+sgDisplay);
{} LUMethods('CaptureResolution','',sgDisplay,False);
{} D.Add('CaptureResolution = '+sgDisplay);
{} LUMethods('ContinuousCapture','',sgDisplay,False);
{} D.Add('ContinuousCapture = '+sgDisplay);
{} LUMethods('ContinuousSecDelay','',sgDisplay,False);
{} D.Add('ContinuousSecDelay = '+sgDisplay);
{} LUMethods('CurCamera','',sgDisplay,False);
{} D.Add('CurCamera = '+sgDisplay);
{} LUMethods('CurrentImage','',sgDisplay,False);
{} D.Add('CurrentImage = '+sgDisplay);
//D.Add('DateTime = '+FormatDateTime('mm/dd/yyyy hh:nn',DateTime));
{} LUMethods('DateTimeStampMode','',sgDisplay,False);
{} D.Add('DateTimeStampMode = '+sgDisplay);
{} LUMethods('ExposureCompValue','',sgDisplay,False);
{} D.Add('ExposureCompValue = '+sgDisplay);
{} LUMethods('FlashMode','',sgDisplay,False);
{} D.Add('FlashMode = '+sgDisplay);
{} LUMethods('FocusMode','',sgDisplay,False);
{} D.Add('FocusMode = '+sgDisplay);
//D.Add('ImageEffectBorder = '+IntToStr(ImageEffectBorder));
{} LUMethods('ImageEffectDocument','',sgDisplay,False);
{} D.Add('ImageEffectDocument = '+sgDisplay);
{} LUMethods('ImageEffectGrayscale','',sgDisplay,False);
{} D.Add('ImageEffectGrayscale = '+sgDisplay);
{} LUMethods('ImageEffectSepia','',sgDisplay,False);
{} D.Add('ImageEffectSepia = '+sgDisplay);
{} LUMethods('ImportResolution','',sgDisplay,False);
{} D.Add('ImportResolution = '+sgDisplay);
{} LUMethods('JpegQuality','',sgDisplay,False);
{} D.Add('JpegQuality = '+sgDisplay);
{} LUMethods('ManualFocusDistanceCMs','',sgDisplay,False);
{} D.Add('ManualFocusDistanceCMs = '+sgDisplay);
{} LUMethods('ManualFocusIsOn','',sgDisplay,False);
{} D.Add('ManualFocusIsOn = '+sgDisplay);
{} LUMethods('PictureQuality','',sgDisplay,False);
{} D.Add('PictureQuality = '+sgDisplay);
{} LUMethods('SharpnessMode','',sgDisplay,False);
{} D.Add('SharpnessMode = '+sgDisplay);
{} LUMethods('WhiteBalanceMode','',sgDisplay,False);
{} D.Add('WhiteBalanceMode = '+sgDisplay);
{} LUMethods('ZoomPositionMMs','',sgDisplay,False);
{} D.Add('ZoomPositionMMs = '+sgDisplay);
R.SetText(PChar(D.Text));
For inCounter := 0 To R.Count - 1 Do
Begin
R[inCounter] := Trim(Copy(R[inCounter],1,29));
End;
sgCaption := 'Select a Setting to Change';
If inSelected = -1 Then
Begin
sgDefaultDisplay := '';
End
Else
Begin
sgDefaultDisplay := D[inSelected];
End;
boRetval :=
DlgLookup_ads(
sgStore , //out sgStore : String;
sgDisplay , //out sgDisplay : String;
sgCaption , //sgCaption : String;
D.Text , //sgDisplayList : String;
R.Text , //sgStoreList : String;
sgDefaultDisplay //sgDefaultDisplay : String
);//): Boolean; Overload;
If boRetval Then
Begin
sgDisplay := TrimRight(Copy(sgDisplay,32,255));
sgTemp := sgStore+sgSpaces;
sgTemp := Copy(sgTemp,1,29)+'= ';
LUMethods(sgStore,'',sgDisplay,True);
If sgDisplay <> '' Then
Begin
//sgDefaultDisplay := sgTemp+sgDisplay;
//inIndex := R.IndexOf(sgStore);
//If inIndex <> -1 Then D[inIndex] := sgDefaultDisplay;
inSelected := R.IndexOf(sgStore);
End;
End;
End;
Finally
R.Free;
D.Free;
PersistSettings;
End;
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
//Unit Description UnitIndex Master IndexProcedure TDC240_ads.PersistSettings; Var inTemp : Integer; sgNameTemp : String; sgValueTemp : String; Begin ProcName := 'TDC240_ads.PersistSettings'; Try Persistence.Clear; sgNameTemp := 'CurCamera'; inTemp := CurCamera; sgValueTemp := IntToStr(inTemp); Persistence.Values[sgNameTemp] := sgValueTemp; sgNameTemp := 'CaptureFileType'; sgValueTemp := CaptureFileType; Persistence.Values[sgNameTemp] := sgValueTemp; sgNameTemp := 'CaptureDelaySECs'; inTemp := CaptureDelaySECs; sgValueTemp := IntToStr(inTemp); Persistence.Values[sgNameTemp] := sgValueTemp; sgNameTemp := 'CaptureResolution'; inTemp := CaptureResolution; sgValueTemp := IntToStr(inTemp); Persistence.Values[sgNameTemp] := sgValueTemp; sgNameTemp := 'ContinuousCapture'; inTemp := ContinuousCapture; sgValueTemp := IntToStr(inTemp); Persistence.Values[sgNameTemp] := sgValueTemp; sgNameTemp := 'ContinuousSecDelay'; inTemp := ContinuousSecDelay; sgValueTemp := IntToStr(inTemp); Persistence.Values[sgNameTemp] := sgValueTemp; sgNameTemp := 'CurrentImage'; inTemp := CurrentImage; sgValueTemp := IntToStr(inTemp); Persistence.Values[sgNameTemp] := sgValueTemp; sgNameTemp := 'DateTimeStampMode'; inTemp := DateTimeStampMode; sgValueTemp := IntToStr(inTemp); Persistence.Values[sgNameTemp] := sgValueTemp; sgNameTemp := 'ExposureCompValue'; inTemp := ExposureCompValue; sgValueTemp := IntToStr(inTemp); Persistence.Values[sgNameTemp] := sgValueTemp; sgNameTemp := 'FlashMode'; inTemp := FlashMode; sgValueTemp := IntToStr(inTemp); Persistence.Values[sgNameTemp] := sgValueTemp; sgNameTemp := 'FocusMode'; inTemp := FocusMode; sgValueTemp := IntToStr(inTemp); Persistence.Values[sgNameTemp] := sgValueTemp; sgNameTemp := 'ImageEffectDocument'; inTemp := ImageEffectDocument; sgValueTemp := IntToStr(inTemp); Persistence.Values[sgNameTemp] := sgValueTemp; sgNameTemp := 'ImageEffectGrayscale'; inTemp := ImageEffectGrayscale; sgValueTemp := IntToStr(inTemp); Persistence.Values[sgNameTemp] := sgValueTemp; sgNameTemp := 'ImageEffectSepia'; inTemp := ImageEffectSepia; sgValueTemp := IntToStr(inTemp); Persistence.Values[sgNameTemp] := sgValueTemp; sgNameTemp := 'ImportResolution'; inTemp := ImportResolution; sgValueTemp := IntToStr(inTemp); Persistence.Values[sgNameTemp] := sgValueTemp; sgNameTemp := 'JpegQuality'; inTemp := JpegQuality; sgValueTemp := IntToStr(inTemp); Persistence.Values[sgNameTemp] := sgValueTemp; sgNameTemp := 'ManualFocusIsOn'; inTemp := ManualFocusIsOn; sgValueTemp := IntToStr(inTemp); Persistence.Values[sgNameTemp] := sgValueTemp; sgNameTemp := 'ManualFocusDistanceCMs'; inTemp := ManualFocusDistanceCMs; sgValueTemp := IntToStr(inTemp); Persistence.Values[sgNameTemp] := sgValueTemp; sgNameTemp := 'ZoomPositionMMs'; inTemp := ZoomPositionMMs; sgValueTemp := IntToStr(inTemp); Persistence.Values[sgNameTemp] := sgValueTemp; sgNameTemp := 'PictureQuality'; inTemp := PictureQuality; sgValueTemp := IntToStr(inTemp); Persistence.Values[sgNameTemp] := sgValueTemp; sgNameTemp := 'SharpnessMode'; inTemp := SharpnessMode; sgValueTemp := IntToStr(inTemp); Persistence.Values[sgNameTemp] := sgValueTemp; sgNameTemp := 'WhiteBalanceMode'; inTemp := WhiteBalanceMode; sgValueTemp := IntToStr(inTemp); Persistence.Values[sgNameTemp] := sgValueTemp; Persistence.SaveToFile(FPersistFile); Except On E : Exception Do RaiseError(UnitName,ProcName,E); End; end; //Unit Description UnitIndex Master Index
Procedure TDC240_ads.RestoreSettings;
Var
inTemp : Integer;
sgNameTemp : String;
sgValueTemp : String;
inCurValue : Integer;
Begin
ProcName := 'TDC240_ads.RestoreSettings'; Try
If Persistence.Text = '' Then Exit;
sgNameTemp := 'CurCamera';
inCurValue := CurCamera;
sgValueTemp := Persistence.Values[sgNameTemp];
If sgValueTemp <> '' Then
Begin
inTemp := StrToInt(sgValueTemp);
If inTemp <> inCurValue Then
Begin
If (inTemp <= NumCamAvailable) And (NumCamAvailable <> 0) Then
Begin
CurCamera := inTemp;
InitCurCamera;
End;
End;
End;
sgNameTemp := 'CaptureFileType';
sgValueTemp := Persistence.Values[sgNameTemp];
If sgValueTemp <> '' Then
Begin
If CaptureFileType <> sgValueTemp Then
CaptureFileType := sgValueTemp;
End;
sgNameTemp := 'CaptureDelaySECs';
inCurValue := CaptureDelaySECs;
sgValueTemp := Persistence.Values[sgNameTemp];
If sgValueTemp <> '' Then
Begin
inTemp := StrToInt(sgValueTemp);
If inTemp <> inCurValue Then
CaptureDelaySECs
:= inTemp;
End;
sgNameTemp := 'CaptureResolution';
inCurValue := CaptureResolution;
sgValueTemp := Persistence.Values[sgNameTemp];
If sgValueTemp <> '' Then
Begin
inTemp := StrToInt(sgValueTemp);
If inTemp <> inCurValue Then
CaptureResolution
:= inTemp;
End;
sgNameTemp := 'ContinuousCapture';
inCurValue := ContinuousCapture;
sgValueTemp := Persistence.Values[sgNameTemp];
If sgValueTemp <> '' Then
Begin
inTemp := StrToInt(sgValueTemp);
If inTemp <> inCurValue Then
ContinuousCapture
:= inTemp;
End;
sgNameTemp := 'ContinuousSecDelay';
inCurValue := ContinuousSecDelay;
sgValueTemp := Persistence.Values[sgNameTemp];
If sgValueTemp <> '' Then
Begin
inTemp := StrToInt(sgValueTemp);
If inTemp <> inCurValue Then
ContinuousSecDelay
:= inTemp;
End;
sgNameTemp := 'CurrentImage';
inCurValue := CurrentImage;
sgValueTemp := Persistence.Values[sgNameTemp];
If sgValueTemp <> '' Then
Begin
inTemp := StrToInt(sgValueTemp);
If inTemp <> inCurValue Then
CurrentImage
:= inTemp;
End;
sgNameTemp := 'DateTimeStampMode';
inCurValue := DateTimeStampMode;
sgValueTemp := Persistence.Values[sgNameTemp];
If sgValueTemp <> '' Then
Begin
inTemp := StrToInt(sgValueTemp);
If inTemp <> inCurValue Then
DateTimeStampMode
:= inTemp;
End;
sgNameTemp := 'ExposureCompValue';
inCurValue := ExposureCompValue;
sgValueTemp := Persistence.Values[sgNameTemp];
If sgValueTemp <> '' Then
Begin
inTemp := StrToInt(sgValueTemp);
If inTemp <> inCurValue Then
ExposureCompValue
:= inTemp;
End;
sgNameTemp := 'FlashMode';
inCurValue := FlashMode;
sgValueTemp := Persistence.Values[sgNameTemp];
If sgValueTemp <> '' Then
Begin
inTemp := StrToInt(sgValueTemp);
If inTemp <> inCurValue Then
FlashMode
:= inTemp;
End;
sgNameTemp := 'FocusMode';
inCurValue := FocusMode;
sgValueTemp := Persistence.Values[sgNameTemp];
If sgValueTemp <> '' Then
Begin
inTemp := StrToInt(sgValueTemp);
If inTemp <> inCurValue Then
FocusMode
:= inTemp;
End;
sgNameTemp := 'ImageEffectDocument';
inCurValue := ImageEffectDocument;
sgValueTemp := Persistence.Values[sgNameTemp];
If sgValueTemp <> '' Then
Begin
inTemp := StrToInt(sgValueTemp);
If inTemp <> inCurValue Then
ImageEffectDocument
:= inTemp;
End;
sgNameTemp := 'ImageEffectGrayscale';
inCurValue := ImageEffectGrayscale;
sgValueTemp := Persistence.Values[sgNameTemp];
If sgValueTemp <> '' Then
Begin
inTemp := StrToInt(sgValueTemp);
If inTemp <> inCurValue Then
ImageEffectGrayscale
:= inTemp;
End;
sgNameTemp := 'ImageEffectSepia';
inCurValue := ImageEffectSepia;
sgValueTemp := Persistence.Values[sgNameTemp];
If sgValueTemp <> '' Then
Begin
inTemp := StrToInt(sgValueTemp);
If inTemp <> inCurValue Then
ImageEffectSepia
:= inTemp;
End;
sgNameTemp := 'ImportResolution';
inCurValue := ImportResolution;
sgValueTemp := Persistence.Values[sgNameTemp];
If sgValueTemp <> '' Then
Begin
inTemp := StrToInt(sgValueTemp);
If inTemp <> inCurValue Then
ImportResolution
:= inTemp;
End;
sgNameTemp := 'JpegQuality';
inCurValue := JpegQuality;
sgValueTemp := Persistence.Values[sgNameTemp];
If sgValueTemp <> '' Then
Begin
inTemp := StrToInt(sgValueTemp);
If inTemp <> inCurValue Then
JpegQuality
:= inTemp;
End;
sgNameTemp := 'ManualFocusIsOn';
inCurValue := ManualFocusIsOn;
sgValueTemp := Persistence.Values[sgNameTemp];
If sgValueTemp <> '' Then
Begin
inTemp := StrToInt(sgValueTemp);
If inTemp <> inCurValue Then
ManualFocusIsOn
:= inTemp;
End;
sgNameTemp := 'ManualFocusDistanceCMs';
inCurValue := ManualFocusDistanceCMs;
sgValueTemp := Persistence.Values[sgNameTemp];
If sgValueTemp <> '' Then
Begin
inTemp := StrToInt(sgValueTemp);
If inTemp <> inCurValue Then
ManualFocusDistanceCMs
:= inTemp;
End;
sgNameTemp := 'ZoomPositionMMs';
inCurValue := ZoomPositionMMs;
sgValueTemp := Persistence.Values[sgNameTemp];
If sgValueTemp <> '' Then
Begin
inTemp := StrToInt(sgValueTemp);
If inTemp <> inCurValue Then
ZoomPositionMMs
:= inTemp;
End;
sgNameTemp := 'PictureQuality';
inCurValue := PictureQuality;
sgValueTemp := Persistence.Values[sgNameTemp];
If sgValueTemp <> '' Then
Begin
inTemp := StrToInt(sgValueTemp);
If inTemp <> inCurValue Then
PictureQuality
:= inTemp;
End;
sgNameTemp := 'SharpnessMode';
inCurValue := SharpnessMode;
sgValueTemp := Persistence.Values[sgNameTemp];
If sgValueTemp <> '' Then
Begin
inTemp := StrToInt(sgValueTemp);
If inTemp <> inCurValue Then
SharpnessMode
:= inTemp;
End;
sgNameTemp := 'WhiteBalanceMode';
inCurValue := WhiteBalanceMode;
sgValueTemp := Persistence.Values[sgNameTemp];
If sgValueTemp <> '' Then
Begin
inTemp := StrToInt(sgValueTemp);
If inTemp <> inCurValue Then
WhiteBalanceMode
:= inTemp;
End;
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
//Unit Description UnitIndex Master Index
procedure Register;
begin
RegisterComponents('DC240',[TDC240_ads]);
end;
//Unit Description UnitIndex Master Indexfunction TDC240_ads.Get_CaptureResolution: Integer; begin Result := 2; ProcName := 'TDC240_ads.Get_CaptureResolution'; Try Result := FCaptureResolution; Except On E : Exception Do RaiseError(UnitName,ProcName,E); End; end; //Unit Description UnitIndex Master Index
function TDC240_ads.Get_ImportResolution: Integer; begin Result := 2; ProcName := 'TDC240_ads.Get_ImportResolution'; Try Result := FImportResolution; Except On E : Exception Do RaiseError(UnitName,ProcName,E); End; end; //Unit Description UnitIndex Master Index
procedure TDC240_ads.Set_CaptureResolution(const Value: Integer);
begin
ProcName := 'TDC240_ads.Set_CaptureResolution'; Try
If (Value >= 1) And (Value <= 2) Then
Begin
If FCaptureResolution <> Value Then
Begin
FCaptureResolution := Value;
End;
End;
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
//Unit Description UnitIndex Master Index
procedure TDC240_ads.Set_ImportResolution(const Value: Integer);
begin
ProcName := 'TDC240_ads.Set_ImportResolution'; Try
If (Value >= 1) And (Value <= 2) Then
Begin
If FImportResolution <> Value Then
Begin
FImportResolution := Value;
End;
End;
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
//Unit Description UnitIndex Master Indexprocedure TDC240_ads.TakePicture; begin ProcName := 'TDC240_ads.TakePicture2'; Try TakePicture(CaptureResolution); Except On E : Exception Do RaiseError(UnitName,ProcName,E); End; end; //Unit Description UnitIndex Master Index
function TDC240_ads.Get_ContinuousCapture: Integer; begin Result := 0; ProcName := 'TDC240_ads.Get_ContinuousCapture'; Try Result := FContinuousCapture; Except On E : Exception Do RaiseError(UnitName,ProcName,E); End; end; //Unit Description UnitIndex Master Index
procedure TDC240_ads.Set_ContinuousCapture(const Value: Integer);
begin
ProcName := 'TDC240_ads.Set_ContinuousCapture'; Try
If FContinuousCapture <> Value Then
FContinuousCapture := Value;
If FContinuousCapture = 0 Then FContinuousTimer.Enabled := False;
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
//Unit Description UnitIndex Master Indexfunction TDC240_ads.Get_ContinuousSecDelay: Integer; begin Result := 20000; ProcName := 'TDC240_ads.Get_ContinuousSecDelay'; Try Result := FContinuousSecDelay; Except On E : Exception Do RaiseError(UnitName,ProcName,E); End; end; //Unit Description UnitIndex Master Index
procedure TDC240_ads.Set_ContinuousSecDelay(const Value: Integer);
begin
ProcName := 'TDC240_ads.Set_ContinuousSecDelay'; Try
If FContinuousSecDelay <> Value Then
Begin
FContinuousSecDelay := Value;
FContinuousTimer.Interval := Value;
End;
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
//Unit Description UnitIndex Master Index
procedure TDC240_ads.ContinuousTimerTriggered(Sender: TObject);
Var
FileName : String;
begin
ProcName := 'TDC240_ads.ContinuousTimerTriggered'; Try
FContinuousTimer.Enabled := False;
FTakingPicture := True;
Application.ProcessMessages;
RunMethod(
'TakePicture' , //MethodName : String;
CaptureResolution , //Index : Integer;
'' );//Str: String);
Application.ProcessMessages;
FileName := FPhotoDirectory+FormatDateTime('yyyymmddhhnnss',Now())+'.'+CaptureFileType;
DC240.OnOperationStart := CopyPictureStart;
DC240.OnOperationComplete := CopyPictureCompleted;
DC240.OnProgress := CopyPictureProgress;
CurrentImage := TotalImages;
DC240.CopyCurImageToClipboard(ImportResolution);
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
//Unit Description UnitIndex Master Index
procedure TDC240_ads.CopyPictureCompleted(Sender: TObject);
Var
NImages : Integer;
inCounter : Integer;
begin
ProcName := 'TDC240_ads.CopyPictureCompleted'; Try
CopyClipboardToPhotoDir;
NImages := TotalImages;
For inCounter := NImages DownTo 1 Do
Begin
CurrentImage := inCounter;
DeleteCurrentImage;
End;
FTakingPicture := False;
If ContinuousCapture = 1 Then FContinuousTimer.Enabled := True;
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
//Unit Description UnitIndex Master Indexprocedure TDC240_ads.CopyPictureStart(Sender: TObject); begin ProcName := 'TDC240_ads.CopyPictureStart'; Try FTakingPicture := True; Except On E : Exception Do RaiseError(UnitName,ProcName,E); End; end; //Unit Description UnitIndex Master Index
procedure TDC240_ads.CopyPictureProgress(Sender: TObject; sPercent: Smallint); begin ProcName := 'TDC240_ads.CopyPictureProgress'; Try //Beep; Except On E : Exception Do RaiseError(UnitName,ProcName,E); End; end; //Unit Description UnitIndex Master Index
procedure TDC240_ads.CopyClipboardToPhotoDir;
Var
Bitmap : TBitmap;
Jpeg : TJpegImage;
FileName : String;
begin
ProcName := 'CopyClipboardToPhotoDir'; Try
FileName := FPhotoDirectory+FormatDateTime('yyyymmddhhnnss',Now())+'.'+CaptureFileType;
Bitmap := TBitmap.Create;
Jpeg := TJpegImage.Create;
Try
Try
Bitmap.LoadFromClipboardFormat(cf_BitMap,ClipBoard.GetAsHandle(cf_Bitmap),0);
Jpeg.Assign(Bitmap);
Jpeg.CompressionQuality := JpegQuality;
Jpeg.SaveToFile(FileName);
If CurrentImageFile <> '' Then PriorImageFile := CurrentImageFile;
CurrentImageFile := FileName;
If PriorImageFile = '' Then PriorImageFile := FileName;
Except
End;
Finally
Bitmap.Free;
Jpeg.Free;
End;
Application.ProcessMessages;
Except On E : Exception Do RaiseError(UnitName,ProcName,E); End;
end;
//Unit Description UnitIndex Master Indexfunction TDC240_ads.Get_JpegQuality: Integer; begin Result := 50; ProcName := 'TDC240_ads.Get_JpegQuality'; Try Result := FJpegQuality; Except On E : Exception Do RaiseError(UnitName,ProcName,E); End; end; //Unit Description UnitIndex Master Index
procedure TDC240_ads.Set_JpegQuality(const Value: Integer); begin ProcName := 'TDC240_ads.Set_JpegQuality'; Try If FJpegQuality <> Value Then FJpegQuality := Value; Except On E : Exception Do RaiseError(UnitName,ProcName,E); End; end; end. //