unit MotohrMessage;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  Buttons, StdCtrls, ComCtrls, ExtCtrls, ImgList, Menus;

type

  TMotohrMessageForm = class(TForm)
    memo: TMemo;
    ed: TEdit;
    btOk: TButton;
    btCancel: TButton;
    Label1: TLabel;
    Label2: TLabel;
    procedure btOkClick(Sender: TObject);
  end;

function showMotohrMessage(var text: string; var fio: string): boolean;


implementation

uses
  hyperstr,
  main;

{$R *.DFM}

var
  lastFio: string = '';

function showMotohrMessage(var text: string; var fio: string): boolean;
var
  w: TMotohrMessageForm;
begin
  w := TMotohrMessageForm.Create(Form1);
  w.ed.Text := lastFio;
  w.memo.Text := '';
  Result :=  w.ShowModal = mrOk;
  text := w.memo.Text;
  ReplaceS(text, #13, ' ');
  fio := w.ed.Text;
  lastFio := fio;
  w.Free
end;




procedure TMotohrMessageForm.btOkClick(Sender: TObject);
begin
  if Trim(ed.Text) = '' then
    exit;

  ModalResult := mrOk;
end;

end.

