unit about;

{$IFDEF FPC}
  {$MODE DELPHI}{$H+}
{$ENDIF}

(***************************************)
(* Copyright (C) 2025, SHIRAISHI Kazuo *)
(***************************************)


interface

uses  Classes, Graphics, Forms, Controls, StdCtrls,
  Buttons, ComCtrls, ExtCtrls, LResources,LCLIntf;

type

  { TAboutBox }

  TAboutBox = class(TForm)
    Web: TLabel;
    Panel1: TPanel;
    OKButton: TBitBtn;
    ProductName: TLabel;
    Copyright: TLabel;
    Comments: TLabel;
    Memo1: TMemo;
    version: TLabel;
    Web2: TLabel;
    procedure FormCreate(Sender: TObject);
    procedure Web2Click(Sender: TObject);
    procedure WebClick(Sender: TObject);
  private
    s1,s2:string;
  public
    { Public 宣言 }
  end;

var
  AboutBox: TAboutBox;


implementation
uses SysUtils,LCLVersion,Dialogs,
     sconsts;
{$R *.lfm}

procedure TAboutBox.FormCreate(Sender: TObject);
var
  FName:string;
  F:TextFile;
begin
   ProductName.left:=10;
   Comments.left:=20;
   version.Left:=100;
   version.Caption:='Version 0.9.4.3'
                    {$IFDEF CPUX86_64}+' (x86_64)'{$ENDIF}
                    {$IFDEF CPUAARCH64}+' (ARM 64)'{$ENDIF}
                    {$IFDEF CPUARM}+' (ARM 32)'{$ENDIF}
                    {$IFDEF LCLQt}+' Qt'{$ENDIF}
                    {$IFDEF LCLQt5}+' Qt5'{$ENDIF}
                    {$IFDEF LCLQt6}+' Qt6'{$ENDIF}
                    {$IFDEF LCLGTK2}+' GTK2'{$ENDIF}
                    {$IFDEF LCLGTK3}+' GTK3'{$ENDIF}
                    +'  (LCL '+lcl_version+')';
   Copyright.left:=20;
   CopyRight.Caption:='Copyright(C) 2026 SHIRAISHI Kazuo';
   Web.Font.Color:=clBlue;
   Web2.Font.Color:=clBlue;
   //{$IFDEF LCLGTK2}
   memo1.enabled:=false;
   //{$ENDIF}

  FName:=ExtractFilePath(Application.ExeName)+'URLs.txt';
  assignFile(F,FName);
  try
    reset(F);
    readLn(F,s1);
    readLn(F,s2);
    closeFile(F);
  except
    on E:Exception do
       showMessage(FName+#13#10+ E.Message)
  end;
end;

procedure TAboutBox.WebClick(Sender: TObject);
begin
   OpenURL(s1{s_URL});
end;

procedure TAboutBox.Web2Click(Sender: TObject);
begin
   OpenURL(s2);
end;



initialization



end.

