unit Unit8;

interface

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

type
  TForm8 = class(TForm)
    Memo1: TMemo;
    sPanel1: TsPanel;
    Label1: TLabel;
    Button2: TButton;
    Button3: TButton;
    Edit1: TEdit;
    Edit2: TEdit;
    procedure Button3Click(Sender: TObject);
    procedure FormActivate(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure FormResize(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form8: TForm8;

implementation

{$R *.dfm}

procedure TForm8.Button3Click(Sender: TObject);
begin
 if edit1.text=edit2.text
 then begin
       Memo1.Text:=Edit1.Text;
       Memo1.Lines.SaveToFile('pas.log');
       Edit2.Text:=edit1.Text;
      end
  else begin ShowMessage('Пароль введен не верно');
         edit1.Clear;Edit2.Clear;
       end;
end;

procedure TForm8.FormActivate(Sender: TObject);
begin
 Memo1.Lines.LoadFromFile('pas.log');
end;

procedure TForm8.Button2Click(Sender: TObject);
begin
WinExec('Тест\EditMenu.exe', SW_SHOW);
end;

procedure TForm8.FormResize(Sender: TObject);
begin
Height:=196;
Width:=282;
end;

end.
