unit Nomj;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls;

type
  TForm2 = class(TForm)
    GroupBox1: TGroupBox;
    Edit1: TEdit;
    GroupBox2: TGroupBox;
    Edit2: TEdit;
    GroupBox3: TGroupBox;
    Edit3: TEdit;
    GroupBox4: TGroupBox;
    Edit4: TEdit;
    Button1: TButton;
    Button2: TButton;
    procedure FormCreate(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Déclarations privées }
  public
    { Déclarations publiques }
  end;

var
  Form2: TForm2;
  Nf : TextFile;
  E1,E2,E3 : String;
implementation

uses Unit1;

{$R *.DFM}

procedure TForm2.FormCreate(Sender: TObject);
begin
assignFile(Nf,'NomJ.dll');
Reset(Nf);
ReadLn(Nf,E1);
ReadLn(Nf,E2);
ReadLn(Nf,E3);
closeFile(Nf);
Edit1.Text:=E1;
Edit2.Text:=E2;
Edit3.Text:=E3;


   Form1.GroupBox2.Caption:=Edit1.Text;
   Form1.GroupBox3.Caption:=Edit2.Text;
   Form1.GroupBox4.Caption:=Edit3.Text;
   Form1.GroupBox5.Caption:=Edit4.Text;
   Form1.GroupBox7.Caption:=Edit1.Text;
   Form1.GroupBox8.Caption:=Edit2.Text;
   Form1.GroupBox9.Caption:=Edit3.Text;
   Form1.GroupBox10.Caption:=Edit4.Text;
end;

procedure TForm2.Button1Click(Sender: TObject);
begin
  E1:=Edit1.Text;
  E2:=Edit2.Text;
  E3:=Edit3.Text;

  assignFile(Nf,'NomJ.dll');
  Rewrite(Nf);
  WriteLn(Nf,E1);
  WriteLn(Nf,E2);
  WriteLn(Nf,E3);
  closeFile(Nf);

  Form2.Visible:=False;
  Form1.GroupBox2.Caption:=Edit1.Text;
  Form1.GroupBox3.Caption:=Edit2.Text;
  Form1.GroupBox4.Caption:=Edit3.Text;
  Form1.GroupBox5.Caption:=Edit4.Text;
  Form1.GroupBox7.Caption:=Edit1.Text;
  Form1.GroupBox8.Caption:=Edit2.Text;
  Form1.GroupBox9.Caption:=Edit3.Text;
  Form1.GroupBox10.Caption:=Edit4.Text;

end;

procedure TForm2.Button2Click(Sender: TObject);
begin
  Form2.Visible:=false;
end;

end.
