uses
DsgnIntf;
{ TLOGDatabaseNameProperty }
type
TLOGDatabaseNameProperty = class(TStringProperty)
public
function GetAttributes: TPropertyAttributes; override;
procedure GetValueList(List: TStrings); virtual;
procedure GetValues(Proc: TGetStrProc); override;
end;
function TLOGDatabaseNameProperty.GetAttributes: TPropertyAttributes;
begin
Result := [paValueList, paSortList, paMultiSelect];
end;
procedure TLOGDatabaseNameProperty.GetValues(Proc: TGetStrProc);
var
I: Integer;
Values: TStringList;
begin
Values := TStringList.Create;
try
GetValueList(Values);
for I := 0 to Values.Count - 1 do Proc(Values);
finally
Values.Free;
end;
end;
procedure TLOGDatabaseNameProperty.GetValueList(List: TStrings);
begin
List.Add('dev');
List.Add('encrsnet');
end;
procedure Register;
begin
RegisterComponents('RSI', [TLog]);
RegisterPropertyEditor(TypeInfo(string), TLog, 'DatabaseName', TLOGDatabaseNameProperty);
end;