unit LogViewer;

interface

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

type
  TLogViewerForm = class(TForm)
    memo: TRichEdit;
    Button1: TButton;
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  LogViewerForm: TLogViewerForm;


  procedure ShowLog(fname: string);

implementation

{$R *.dfm}

procedure ShowLog(fname: string);
begin
  LogViewerForm := TLogViewerForm.Create(nil);
  try
    LogViewerForm.Caption := 'Просмотр - ' + fname;
    LogViewerForm.memo.Lines.LoadFromFile(fname);
    LogViewerForm.ShowModal;
  finally
    LogViewerForm.Free;
  end;

end;

end.
