unit InfoUnit;

interface

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

type
  TInfoForm = class(TForm)
    Label1: TLabel;
    MemoShowInfo: TMemo;
    BtnQuit: TButton;
    procedure FormShow(Sender: TObject);
    procedure BtnQuitClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  InfoForm: TInfoForm;

implementation

uses InputUnit;

{$R *.dfm}

procedure TInfoForm.FormShow(Sender: TObject);
  var
    tmpstring,sex,book:string;
begin
  MemoShowInfo.lines.Clear;
    if InputForm.RadioButton1.Checked=true then
      sex:='男'
    else
      sex:='女';
  book:='';
  if InputForm.CheckBox1.Checked=true then
    book:='历史类';
  if InputForm.CheckBox2.Checked=true then
    book:=book+'  文学类';
  if InputForm.CheckBox3.Checked=true then
    book:=book+'  哲学类';
  If InputForm.Checkbox4.Checked=true then
    book:=book+'  科学类';
  tmpstring:= '姓名：';
  tmpstring:=tmpstring+InputForm.Edit1.Text;
  tmpstring:=tmpstring+#13+#10;
  tmpstring:=tmpstring+'工龄：'+InputForm.Edit2.Text+#13+#10;
  tmpstring:=tmpstring+'性别：'+sex+#13+#10;
  tmpstring:=tmpstring+'职务：'+InputForm.ComboBox1.Text+#13+#10;
  tmpstring:=tmpstring+'部门：'+InputForm.ComboBox2.Text+#13+#10;
  tmpstring:=tmpstring+'籍贯：' ;
  tmpstring:=tmpstring+InputForm.listBox1.Items[InputForm.listBox1.ItemIndex]+#13+#10;
  tmpstring:=tmpstring+'喜爱阅读的书籍类型：'+book+#13+#10;
  MemoShowInfo.Lines.Add(tmpstring);
end;

procedure TInfoForm.BtnQuitClick(Sender: TObject);
begin
  InfoForm.Close;  //关闭FormInfoShow窗体
end;
end.
