home *** CD-ROM | disk | FTP | other *** search
/ Delphi 5 for Professionals / DELPHI5.iso / AddOns / Components / DBISAM Database System / _SETUP.1 / dbisamip.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1998-09-25  |  2.7 KB  |  121 lines

  1. {*************************************************************************
  2. *
  3. *        TwwDBISAMTable source for Infopower Support
  4. *
  5. *        Version 1.0        Last Modified 4/6/98
  6. *
  7. *        Modified by Elevate Software for DBISAM Database System
  8. *        Copyrighted source provided by Woll2Woll Software
  9. *
  10. *************************************************************************}
  11.  
  12. unit DBISAMIp;
  13.  
  14. interface
  15.  
  16. uses SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  17.       Forms,  DB, dialogs, wwfilter, wwStr, wwSystem, wwTable, wwtypes,
  18.       DBISAMTb;
  19.  
  20. type
  21.  
  22.   TwwDBISAMTable = class(TDBISAMTable)
  23.     Private
  24.       FControlType    : TStrings;
  25.       FPictureMasks   : TStrings;
  26.       FUsePictureMask : boolean;
  27.       FOnInvalidValue : TwwInvalidValueEvent;
  28.  
  29.       Function GetControlType : TStrings;
  30.       Procedure SetControlType( sel : TStrings );
  31.       Function GetPictureMasks : TStrings;
  32.       Procedure SetPictureMasks( sel : TStrings );
  33.  
  34.     Protected
  35.       Procedure DoBeforePost; Override; { For picture support }
  36.  
  37.     Public
  38.       Constructor Create( AOwner : TComponent ); Override;
  39.       Destructor Destroy; Override;
  40.  
  41.     Published
  42.       Property ControlType : TStrings
  43.         Read  GetControlType
  44.         Write setControltype;
  45.       Property PictureMasks: TStrings
  46.         Read GetPictureMasks
  47.         Write SetPictureMasks;
  48.       Property ValidateWithMask : boolean
  49.         Read FUsePictureMask
  50.         Write FUsePictureMask;
  51.       Property OnInvalidValue: TwwInvalidValueEvent
  52.         Read FOnInvalidValue
  53.         Write FOnInvalidValue;
  54.       Property IndexDefs;
  55.   end;
  56.  
  57. Procedure Register;
  58.  
  59. implementation
  60. uses
  61.   wwcommon,
  62.   dbconsts;
  63.  
  64.  
  65. Constructor TwwDBISAMTable.create( AOwner : TComponent );
  66. begin
  67.   inherited Create( AOwner );
  68.   FControlType    := TStringList.create;
  69.   FPictureMasks   := TStringList.create;
  70.   FUsePictureMask := True;
  71. end;
  72.  
  73.  
  74. Destructor TwwDBISAMTable.Destroy;
  75. begin
  76.   FControlType.Free;
  77.   FPictureMasks.Free;
  78.   FPictureMasks:= NIL;
  79.   Inherited Destroy;
  80. end;
  81.  
  82.  
  83. Function TwwDBISAMTable.GetControltype : TStrings;
  84. begin
  85.   Result := FControlType;
  86. end;
  87.  
  88.  
  89. Procedure TwwDBISAMTable.SetControlType( sel : TStrings );
  90. begin
  91.   FControlType.Assign( sel );
  92. end;
  93.  
  94.  
  95. Function TwwDBISAMTable.GetPictureMasks : TStrings;
  96. begin
  97.   Result:= FPictureMasks
  98. end;
  99.  
  100.  
  101. Procedure TwwDBISAMTable.SetPictureMasks( sel : TStrings );
  102. begin
  103.   FPictureMasks.Assign( sel );
  104. end;
  105.  
  106. Procedure TwwDBISAMTable.DoBeforePost;
  107. begin
  108.   Inherited DoBeforePost;
  109.   if FUsePictureMask then
  110.     wwValidatePictureFields( self, FOnInvalidValue );
  111. end;
  112.  
  113.  
  114. Procedure Register;
  115. begin
  116.   RegisterComponents('InfoPower', [TwwDBISAMTable] );
  117. end;
  118.  
  119.  
  120. end.
  121.