{ 
    SemTel version 1.0.0 ... comfortable telnet client
    Copyright (C) 1995-2000 Jan Tomasek <jan@tomasek.cz>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
}
{-------------------------------------------------------------------------------
Version  : 0.908.0
Date     : 29.10.1998
Dialog   : About box
History  : 30.04.1998 QC
           23.06.1998 version number is now in three digit format
TODO     :
  * Texty umoznit nastavovat pomoci property, tj. aby se v budoucnu umoznilo
    kryptovani textu jejich ulozeni do externiho souboru.
-------------------------------------------------------------------------------}
unit AboutBox;

interface

uses
  Forms,   StdCtrls, Classes, Controls,
  ExtCtrls;

type
  TfAboutBox = class(TForm)
    pnMain        : TPanel;
    pnMainClient  : TPanel;
    pnSpliter     : TPanel;
    Logo          : TImage;
    SemTel        : TLabel;
    version       : TLabel;
    copyright     : TLabel;
    e_mail        : TLabel;
    url           : TLabel;
    BitSize       : TLabel;
    Memo1         : TMemo;
    Memo2: TMemo;
    procedure FormShow(Sender: TObject);
    procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
    procedure CloseOnMouse(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
  private
    { Private declarations }
    function RRegisteredTo:TStrings;
  public
    { Public declarations }
    property RegisteredTo : TStrings read RRegisteredTo;
  end;

var
  fAboutBox: TfAboutBox;

implementation
Uses
  STConfig, kUnits;
{$R *.DFM}

function TfAboutBox.RRegisteredTo:TStrings;
Begin
//  Result:=memoRegisteredTo.Lines;
End;

procedure TfAboutBox.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
  Close;
end;

procedure TfAboutBox.CloseOnMouse(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  Close;
end;

procedure TfAboutBox.FormShow(Sender: TObject);
begin
  Version.Caption:=STConfig.Version;
  If CFG^.Language='.cz' Then Begin
    Copyright.Caption := '(c) 1995-00 Jan Tomášek';
//    lbLicencedTo.Caption := 'Tento produkt je licencován pro:';
    url.Caption := 'http://tomasek.cz/semtel_cz.html';
{    memoRegisteredTo.Lines.Clear;
    If CFG^.RData_Valid Then Begin
      If CFG^.RData.D.CompanyName2='' Then memoRegisteredTo.Lines.Add('');
      memoRegisteredTo.Lines.Add(CFG^.RData.D.CompanyName);
      If CFG^.RData.D.CompanyName2<>'' Then memoRegisteredTo.Lines.Add(CFG^.RData.D.CompanyName2);
      memoRegisteredTo.Lines.Add(CFG^.RData.D.Address);
      memoRegisteredTo.Lines.Add(CFG^.RData.D.City);
      memoRegisteredTo.Lines.Add(CFG^.RData.D.StateProvinec);
    End Else Begin
      memoRegisteredTo.Lines.Add('');
      memoRegisteredTo.Lines.Add('Tato kopie SemTelu není');
      memoRegisteredTo.Lines.Add('registrována! Registrujte ji');
      memoRegisteredTo.Lines.Add('prosím.');
    End;}
  End Else Begin
    Copyright.Caption := '(c) 1995-00 Jan Tomasek';
//    lbLicencedTo.Caption := 'This product is licenced to:';
    url.Caption := 'http://tomasek.cz/semtel_en.html';
//    memoRegisteredTo.Lines.Clear;
{    If CFG^.RData_Valid Then Begin
      If CFG^.RData.D.CompanyName2='' Then memoRegisteredTo.Lines.Add('');
      memoRegisteredTo.Lines.Add(CFG^.RData.D.CompanyName);
      If CFG^.RData.D.CompanyName2<>'' Then memoRegisteredTo.Lines.Add(CFG^.RData.D.CompanyName2);
      memoRegisteredTo.Lines.Add(CFG^.RData.D.Address);
      memoRegisteredTo.Lines.Add(CFG^.RData.D.City);
      memoRegisteredTo.Lines.Add(CFG^.RData.D.StateProvinec);
    End Else Begin
      memoRegisteredTo.Lines.Add('');
      memoRegisteredTo.Lines.Add('This copy of SemTel software');
      memoRegisteredTo.Lines.Add('is not registered! Register it,');
      memoRegisteredTo.Lines.Add('please.');
    End;}
  End;

  {$IFDEF Win32}BitSize.Caption:='32 bit';
  {$ELSE}       BitSize.Caption:='16 bit';{$ENDIF}
  pnSpliter.Caption:='';


{$IFDEF METAL_SHIT}
  fAboutBox.url.Caption := '';
{$ENDIF}
end;

initialization
  {$IFDEF DEBUGMSG}WriteToLog(DebugDetailed, kuAboutBox, 'initialization', '');{$ENDIF}
{$IFDEF Win32}finalization
  {$IFDEF DEBUGMSG}WriteToLog(DebugDetailed, kuAboutBox, 'finalization', '');{$ENDIF}{$ENDIF}
end.
