--- ibx/trunk/design/IBDBReg.pas 2018/04/16 09:24:55 208 +++ ibx/trunk/design/IBDBReg.pas 2018/03/14 12:48:51 209 @@ -203,6 +203,15 @@ type function GetVerbCount: Integer; override; end; + { TIBXServiceEditor } + + TIBXServiceEditor = class(TComponentEditor) + public + procedure ExecuteVerb(Index: Integer); override; + function GetVerb(Index: Integer): string; override; + function GetVerbCount: Integer; override; + end; + TIBStoredProcParamsProperty = class(TCollectionPropertyEditor) end; @@ -401,19 +410,20 @@ implementation uses IB, IBQuery, IBStoredProc, IBCustomDataSet, FBMessages, IBSQL, IBSQLMonitor, IBDatabaseInfo, IBEvents, IBTypes, - IBServices, IBDatabaseEdit, IBTransactionEdit, + IBServices, IBXServices, IBDatabaseEdit, IBTransactionEdit, IBBatchMove, IBExtract,LResources, IBSelectSQLEditor, IBModifySQLEditor,IBDeleteSQLEditor,IBRefreshSQLEditor, IBInsertSQLEditor, IBGeneratorEditor, IBUpdateSQLEditor, IBDataSetEditor, IBSQLEditor, ibserviceeditor, LCLVersion, IBDynamicGrid, IBLookupComboEditBox, IBTreeView, DBControlGrid, ibxscript, IBLocalDBSupport, IBDSDialogs, - IBArrayGrid, IBVersion, IBDataOutput; + IBArrayGrid, IBVersion, IBDataOutput, IBXServiceEditor; const IBPalette1 = 'Firebird'; {do not localize} - IBPalette2 = 'Firebird Admin'; {do not localize} + IBPalette2 = 'Firebird Legacy Admin'; {do not localize} IBPalette3 = 'Firebird Data Controls'; {do not localize} - + IBPalette4 = 'Firebird Admin'; {do not localize} + resourcestring SInterbaseExpressVersion = 'Firebird Express for Lazarus ' + IBX_VERSION; SEditSQL = 'Edit SQL'; @@ -446,12 +456,21 @@ begin TIBStoredProc,TIBBatchMove, TIBTable,TIBExtract, TIBXScript, TIBLocalDBSupport, TIBBlockFormatOut,TIBCSVDataOut,TIBInsertStmtsOut]); if FirebirdAPI.HasServiceAPI then + begin + RegisterComponents(IBPalette4, [TIBXServicesConnection, TIBXConfigService, + TIBXClientSideBackupService, TIBXServerSideBackupService, + TIBXClientSideRestoreService, TIBXServerSideRestoreService, + TIBXValidationService, TIBXOnlineValidationService, TIBXStatisticalService, + TIBXLogService, TIBXSecurityService, TIBXServerProperties, + TIBXLimboTransactionResolutionService,TIBXServicesUserList, TIBXServicesLimboTransactionsList]); RegisterComponents(IBPalette2, [TIBConfigService, TIBBackupService, - TIBRestoreService, TIBValidationService, TIBOnlineValidationService, TIBStatisticalService, + TIBRestoreService, TIBValidationService, + TIBOnlineValidationService, TIBStatisticalService, TIBLogService, TIBSecurityService, TIBServerProperties]); - + end; RegisterComponents(IBPalette3,[TIBLookupComboEditBox,TIBDynamicGrid,TIBTreeView,TDBControlGrid, TIBArrayGrid]); + RegisterPropertyEditor(TypeInfo(TIBFileName), TIBDatabase, 'DatabaseName', TIBFileNameProperty); {do not localize} RegisterPropertyEditor(TypeInfo(string), TIBStoredProc, 'StoredProcName', TIBStoredProcNameProperty); {do not localize} RegisterPropertyEditor(TypeInfo(string), TIBStoredProc, 'PackageName', TIBPackageNameProperty); {do not localize} @@ -488,6 +507,7 @@ begin RegisterComponentEditor(TIBSQL, TIBSQLEditor); RegisterComponentEditor(TIBCustomService, TIBServiceEditor); RegisterComponentEditor(TIBArrayGrid, TIBArrayGridEditor); + RegisterComponentEditor(TIBXServicesConnection, TIBXServiceEditor); {Firebird Data Access Controls} @@ -527,6 +547,38 @@ begin end; end; +{ TIBXServiceEditor } + +procedure TIBXServiceEditor.ExecuteVerb(Index: Integer); +begin + if Index < inherited GetVerbCount then + inherited ExecuteVerb(Index) else + begin + Dec(Index, inherited GetVerbCount); + case Index of + 0 : if IBXServiceEditor.EditIBXService(TIBXServicesConnection(Component)) then Designer.Modified; + end; + end; +end; + +function TIBXServiceEditor.GetVerb(Index: Integer): string; +begin + if Index < inherited GetVerbCount then + Result := inherited GetVerb(Index) else + begin + Dec(Index, inherited GetVerbCount); + case Index of + 0: Result := SIBServiceEditor; + 1 : Result := SInterbaseExpressVersion; + end; + end; +end; + +function TIBXServiceEditor.GetVerbCount: Integer; +begin + Result := inherited GetVerbCount + 2; +end; + { TIBUpdateRefreshSQLProperty } function TIBUpdateRefreshSQLProperty.GetObjects: boolean;