unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    RadioGroup1: TRadioGroup;
    RadioGroup2: TRadioGroup;
    Label1: TLabel;
    Memo1: TMemo;
    Memo2: TMemo;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
Memo1.Visible:=True;
Memo2.Visible:=True;
if RadioGroup1.ItemIndex=0 then Memo1.Lines.LoadFromFile('M.txt');
if RadioGroup1.ItemIndex=1 then Memo1.Lines.LoadFromFile('X.txt');
if RadioGroup1.ItemIndex=2 then Memo1.Lines.LoadFromFile('S.txt');
if RadioGroup1.ItemIndex=3 then Memo1.Lines.LoadFromFile('P.txt');
if RadioGroup2.ItemIndex=0 then Memo2.Lines.LoadFromFile('1.txt');
if RadioGroup2.ItemIndex=1 then Memo2.Lines.LoadFromFile('2.txt');
if RadioGroup2.ItemIndex=2 then Memo2.Lines.LoadFromFile('3.txt');
if RadioGroup2.ItemIndex=3 then Memo2.Lines.LoadFromFile('4.txt');
end;

end.
