⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 regvar.pas

📁 注册表可视化读取DELPHI控件
💻 PAS
📖 第 1 页 / 共 4 页
字号:
	until NumeroItem = V_RegistryKeys.Count;

	ExistVariable := Reg.ValueExists(aField.RegField);
end;

{ TRegistryKeys }

constructor TRegistryKeys.Create(AOwner: TRegVar);
begin
	inherited Create(TRegistryKey);
	V_Owner := AOwner;
end;


function TRegistryKeys.GetItem(Index: Integer): TRegistryKey;
begin
	Result := TRegistryKey(inherited GetItem(Index));
end;
procedure TRegistryKeys.SetItem(Index: Integer; Value: TRegistryKey);
begin
	inherited SetItem(Index, Value);
end;


function TRegistryKeys.GetOwner: TPersistent;
begin
	Result := V_Owner;
end;

function TRegistryKeys.Add: TRegistryKey;
begin
	Result := TRegistryKey(inherited Add);
end;

procedure TRegistryKeys.Update(Item: TCollectionItem);
begin
//
end;



{ TRegistryKey }

constructor TRegistryKey.Create(Collection: TCollection);
begin
	inherited Create(Collection);
	V_CreateKey := True;

end;

destructor TRegistryKey.Destroy;
begin
	inherited Destroy;
end;

procedure TRegistryKey.Assign(Source: TPersistent);
begin
	inherited Assign(Source);
end;

procedure TRegistryKey.DefineProperties(Filer: TFiler);
begin
	inherited DefineProperties(Filer);
end;


function TRegistryKey.GetDisplayName: string;
begin
	if V_RegistryKey = '' then
		begin
			GetDisplayName := inherited GetDisplayName;
		end
	else
		begin
			GetDisplayName := V_RegistryKey;
		end;

end;

procedure TRegistryKey.PSetV_RegistryKey(const Value: string);
begin
	if Value <> V_RegistryKey then
		begin
			V_RegistryKey := Value;
		end;
end;

procedure TRegistryKey.PSetV_CreateKey(const Value: boolean);
begin
	if Value <> V_CreateKey then
		begin
			V_CreateKey := Value;
		end;
end;

///////////////////////////////////////////////////////////
constructor TRegFields.Create(AOwner: TRegVar);
begin
	inherited Create(TRegField);
	V_Owner := AOwner;
end;


function TRegFields.GetItem(Index: Integer): TRegField;
begin
	Result := TRegField(inherited GetItem(Index));
end;
procedure TRegFields.SetItem(Index: Integer; Value: TRegField);
begin
	inherited SetItem(Index, Value);
end;


function TRegFields.GetOwner: TPersistent;
begin
	Result := V_Owner;
end;

function TRegFields.Add: TRegField;
begin
	Result := TRegField(inherited Add);
end;

function TRegFields.GetRegValue(aField:String):Variant;
var num:Integer;
begin
     for num:=0 to Count-1 do
       if  AnsiCompareText(aField,Items[num].RegField)=0 then
         begin
              Result:=Items[Num].RegValue;
              exit;
         end;
end;
Procedure TRegFields.SetRegValue(aField:String;Value:Variant);
var num:Integer;
begin
     for num:=0 to Count-1 do
       if  AnsiCompareText(aField,Items[num].RegField)=0 then
         begin
              Items[Num].RegValue:=Value;
              exit;
         end;
end;

procedure TRegFields.Update(Item: TCollectionItem);
begin
//
end;



{ TRegField }

constructor TRegField.Create(Collection: TCollection);
begin
	inherited Create(Collection);

end;

destructor TRegField.Destroy;
begin
	inherited Destroy;
end;

procedure TRegField.Assign(Source: TPersistent);
begin
	inherited Assign(Source);
end;

procedure TRegField.DefineProperties(Filer: TFiler);
begin
	inherited DefineProperties(Filer);
end;


function TRegField.GetDisplayName: string;
begin
	if V_RegField = '' then
		begin
			GetDisplayName := inherited GetDisplayName;
		end
	else
		begin
			GetDisplayName := V_RegField;
		end;

end;

procedure TRegField.PSetV_RegField(const Value: string);
begin
	if Value <> V_RegField then
		begin
			V_RegField := Value;
		end;
end;

//Set V_VarType
procedure TRegField.PSetV_VarType(const Value: TVariableType);
begin
	if Value <> V_VarType then
		begin
			V_VarType := Value;
		end;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -