⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unit4.pas

📁 旅游查询系统
💻 PAS
字号:
unit Unit4;

interface

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

type
  TForm4 = class(TForm)
    Label1: TLabel;
    Memo1: TMemo;
    Button1: TButton;
    Button2: TButton;
    procedure Button2Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form4: TForm4;

implementation

{$R *.dfm}

FUNCTION  placess(i:integer):string;
BEGIN
    CASE i OF
        1:placess:='北京';
        2:placess:='上海';
        3:placess:='广州';
        4:placess:='哈尔滨';
        5:placess:='大连';
        6:placess:='天津';
        7:placess:='西安';
        8:placess:='郑州';
        9:placess:='杭州';
        10:placess:='成都';
        11:placess:='桂林';
        12:placess:='拉萨';
    END
END;

procedure TForm4.Button2Click(Sender: TObject);
begin
    close;
    memo1.Text:='';
end;

procedure TForm4.Button1Click(Sender: TObject);
VAR i,foundtime2:integer;
begin
    foundtime2:=720*(strtoint(Form2.Label8.Caption))+(24*strtoint(Form2.Label9.Caption))+strtoint(Form2.Label10.Caption);
    i:=1;
    Memo1.Lines[0]:='现在时间是'+Form2.Label7.Caption+'年'+Form2.Label8.Caption+'月'+Form2.Label9.Caption+'日'+Form2.Label10.Caption+'时';
    WHILE i<=totalnumber DO
        BEGIN
            IF foundtime2-passageinformation[i].searchtime>passageinformation[i].spendtime THEN
                  Memo1.Lines[i]:='旅客'+passageinformation[i].passagename+'已经到达目的地'+placess(passageinformation[i].arrivalplace)
                      ELSE  Memo1.Lines[i]:='旅客'+passageinformation[i].passagename+'正在从'+placess(passageinformation[i].departplace)+'到'+placess(passageinformation[i].arrivalplace)+'的途中';
            i:=i+1;
        END;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -