Subversion Repositories spacemission

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

  1. unit SplInfo;
  2.                                        
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   StdCtrls, ShellAPI, ExtCtrls;
  8.  
  9. type
  10.   TInfoForm = class(TForm)
  11.     ElPopupButton1: TButton;
  12.     HomeLbl: TLabel;
  13.     Image: TImage;
  14.     FirmaLbl: TLabel;
  15.     NameLbl: TLabel;
  16.     VersionLbl: TLabel;
  17.     EMailLbl: TLabel;
  18.     CopyrightLbl: TLabel;
  19.     Copyright2Lbl: TLabel;
  20.     URL2: TLabel;
  21.     URL1: TLabel;
  22.     procedure ElPopupButton1Click(Sender: TObject);
  23.     procedure FormCreate(Sender: TObject);
  24.     procedure FormShow(Sender: TObject);
  25.     procedure FormHide(Sender: TObject);
  26.     procedure URL2Click(Sender: TObject);
  27.     procedure URL1Click(Sender: TObject);
  28.   end;
  29.  
  30. var
  31.   InfoForm: TInfoForm;
  32.  
  33. implementation
  34.  
  35. uses
  36.   SplMain;
  37.  
  38. {$R *.DFM}
  39.  
  40. procedure TInfoForm.ElPopupButton1Click(Sender: TObject);
  41. begin
  42.   close;
  43. end;
  44.  
  45. procedure TInfoForm.FormCreate(Sender: TObject);
  46. begin
  47.   VersionLbl.caption := 'Version ' + mainform.fengineversion;
  48.   CopyrightLbl.caption := mainform.versioninfo.LegalCopyright + '.';
  49.   FirmaLbl.caption := mainform.versioninfo.CompanyName;
  50.   NameLbl.caption := 'SpaceMission';
  51.   image.picture.loadfromfile(mainform.FDirectory + 'Bilder\Delphi.bmp');
  52. end;
  53.  
  54. procedure TInfoForm.FormShow(Sender: TObject);
  55. begin
  56.   mainform.dxtimer.enabled := false;
  57. end;
  58.  
  59. procedure TInfoForm.FormHide(Sender: TObject);
  60. begin
  61.   if not mainform.gamepause.checked then mainform.dxtimer.enabled := true;
  62. end;
  63.  
  64. procedure TInfoForm.URL2Click(Sender: TObject);
  65. begin
  66.   shellexecute(application.Handle, 'open', pchar('http://'+url2.caption+'/'), nil, nil, SW_SHOW);
  67. end;
  68.  
  69. procedure TInfoForm.URL1Click(Sender: TObject);
  70. begin
  71.   shellexecute(application.Handle, 'open', pchar('mailto:'+url1.Caption+'?subject=SpaceMission ' + mainform.fengineversion), nil, nil, SW_SHOW);
  72. end;
  73.  
  74. end.
  75.  
  76.