--- ibx/trunk/design/IBDBReg.pas 2018/12/06 15:48:55 262 +++ ibx/trunk/design/IBDBReg.pas 2018/12/06 15:55:01 263 @@ -63,11 +63,20 @@ type Property editor the DataBase Name property. Brings up the Open dialog } TIBFileNameProperty = class(TStringProperty) + protected + function GetFilter: string; virtual; public procedure Edit; override; function GetAttributes: TPropertyAttributes; override; end; + { TIBLibraryNameProperty } + + TIBLibraryNameProperty = class(TIBFileNameProperty) + protected + function GetFilter: string; override; + end; + { TIBNameProperty } TIBNameProperty = class(TStringProperty) @@ -438,6 +447,7 @@ const procedure Register; begin + AllowUseOfFBLIB := true; if not TryIBLoad then begin MessageDlg('IBX is unable to locate the Firebird Library - have you remembered to install it?',mtError,[mbOK],0); @@ -472,6 +482,8 @@ begin RegisterComponents(IBPalette3,[TIBLookupComboEditBox,TIBDynamicGrid,TIBTreeView,TDBControlGrid, TIBArrayGrid]); RegisterPropertyEditor(TypeInfo(TIBFileName), TIBDatabase, 'DatabaseName', TIBFileNameProperty); {do not localize} + RegisterPropertyEditor(TypeInfo(TIBFileName), TIBDatabase, 'FirebirdLibraryPathName', TIBLibraryNameProperty); {do not localize} + RegisterPropertyEditor(TypeInfo(TIBFileName), TIBXServicesConnection, 'FirebirdLibraryPathName', TIBLibraryNameProperty); {do not localize} RegisterPropertyEditor(TypeInfo(string), TIBStoredProc, 'StoredProcName', TIBStoredProcNameProperty); {do not localize} RegisterPropertyEditor(TypeInfo(string), TIBStoredProc, 'PackageName', TIBPackageNameProperty); {do not localize} RegisterPropertyEditor(TypeInfo(TParams), TIBStoredProc, 'Params', TIBStoredProcParamsProperty); @@ -547,6 +559,13 @@ begin end; end; +{ TIBLibraryNameProperty } + +function TIBLibraryNameProperty.GetFilter: string; +begin + Result := SLibraryNameFilter; {do not localise} +end; + { TIBXServiceEditor } procedure TIBXServiceEditor.ExecuteVerb(Index: Integer); @@ -763,13 +782,18 @@ begin Result := inherited GetVerbCount + 2; end; +function TIBFileNameProperty.GetFilter: string; +begin + Result := SDatabaseFilter; {do not localize} +end; + { TIBFileNameProperty } procedure TIBFileNameProperty.Edit; begin with TOpenDialog.Create(Application) do try InitialDir := ExtractFilePath(GetStrValue); - Filter := SDatabaseFilter; {do not localize} + Filter := GetFilter; if Execute then SetStrValue(FileName); finally