You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RnQ/RnQ/aboutDlg.pas

181 lines
4.5 KiB
Plaintext

{
This file is part of R&Q.
Under same license
}
unit aboutDlg;
{$I RnQConfig.inc}
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
RnQButtons, RQThemes, StdCtrls, ExtCtrls, RDGlobal, Vcl.Imaging.GIFImg;
{$I NoRTTI.inc}
type
TaboutFrm = class(TForm)
MThanks: TMemo;
versionLbl: TLabel;
AbPnl: TPanel;
forumLbl: TLabel;
L5: TLabel;
L3: TLabel;
RDLbl: TLabel;
L6: TLabel;
L2: TLabel;
L1: TLabel;
Lbl: TLabel;
BuiltLbl: TLabel;
RnQLogoGif: TImage;
PanelLike: TLabel;
CrdBtn: TRnQButton;
OkBtn: TRnQButton;
procedure L6Click(Sender: TObject);
procedure wwwLblClick(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject);
procedure lblMouseEnter(Sender: TObject);
procedure lblMouseLeave(Sender: TObject);
procedure RDLblClick(Sender: TObject);
// procedure antonLblClick(Sender: TObject);
procedure forumLblClick(Sender: TObject);
procedure CrdBtnClick(Sender: TObject);
procedure OkBtnClick(Sender: TObject);
procedure FormKeyPress(Sender: TObject; var Key: Char);
procedure BuiltLblClick(Sender: TObject);
procedure FormShow(Sender: TObject);
public
procedure view;
procedure CreateParams(var Params: TCreateParams); override;
// public procedure destroyHandle;
end;
var
aboutFrm: TaboutFrm = nil;
implementation
uses
Math, Types, UITypes, RQUtil, RnQLangs, RnQSysUtils, RnQBinUtils, RnQGraphics32, RnQPics,
mainDlg, utilLib, globalLib, themesLib;
{$R *.DFM}
procedure TaboutFrm.BuiltLblClick(Sender: TObject);
begin
openURL('http://code.highspec.ru/Mikanoshi/rnq')
end;
procedure TaboutFrm.CrdBtnClick(Sender: TObject);
begin
MThanks.Visible := not MThanks.Visible;
AbPnl.Visible := not MThanks.Visible;
if AbPnl.Visible then
CrdBtn.Caption := getTranslation('Credits >')
else
CrdBtn.Caption := getTranslation('< About');
end;
procedure TaboutFrm.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
with Params do
begin
// Style := Style and (not WS_CAPTION);
// Style := Style and not WS_OVERLAPPEDWINDOW or WS_BORDER and (not WS_CAPTION);
// Style := (Style or WS_POPUP) and (not WS_DLGFRAME);
ExStyle := ExStyle or WS_EX_APPWINDOW
end;
end;
procedure TaboutFrm.view;
var
bt: TDateTime;
begin
versionLbl.Caption := IntToStr(RnQBuild) + ' ' + getTranslation('Build') + ' ' + IntToStr(RnQBuildCustom);
{$IFDEF CPUX64}
versionLbl.Caption := versionLbl.Caption + ' x64';
{$ENDIF CPUX64}
{$IFDEF UNICODE}
{$ELSE nonUNICODE}
versionLbl.Caption := versionLbl.Caption + ' Ansi';
{$ENDIF UNICODE}
if LiteVersion then
versionLbl.Caption := versionLbl.Caption + #13' Lite';
bt := builtTime;
BuiltLbl.Caption := getTranslation('Built at') + ' ' + DateTimeToStr(bt) + ' [Mikanoshi]';
MThanks.Height := AbPnl.Height - 10;
showForm(self);
end;
procedure TaboutFrm.wwwLblClick(Sender: TObject);
begin
openURL(rnqSite)
end;
procedure TaboutFrm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
// destroyHandle;
aboutFrm := nil;
// Im.Picture.free;
Action := caFree;
// free;
end;
procedure TaboutFrm.FormCreate(Sender: TObject);
begin
(RnQLogoGif.Picture.Graphic as TGIFImage).Animate := True;
theme.pic2ico(RQteFormIcon, PIC_RNQ, icon);
Lbl.Caption := 'R&Q IM';
end;
procedure TaboutFrm.FormKeyPress(Sender: TObject; var Key: Char);
begin
// if Key in [#0013, #0027] then
if (Key = #0013) or (Key = #0027) then
close;
end;
procedure TaboutFrm.FormShow(Sender: TObject);
begin
theme.pic2ico(RQteFormIcon, PIC_RNQ, Icon);
end;
// procedure TaboutFrm.destroyHandle; begin inherited end;
procedure TaboutFrm.lblMouseEnter(Sender: TObject);
begin
with (Sender as TLabel).font do
Style := Style + [fsUnderline]
end;
procedure TaboutFrm.lblMouseLeave(Sender: TObject);
begin
with (Sender as TLabel).font do
Style := Style - [fsUnderline]
end;
procedure TaboutFrm.OkBtnClick(Sender: TObject);
begin
close;
end;
procedure TaboutFrm.RDLblClick(Sender: TObject);
begin
exec('mailto:Rapid@rnq.ru?subject=[RnQ]')
end;
procedure TaboutFrm.forumLblClick(Sender: TObject);
begin
openURL('http://rnq.ru/forum')
end;
procedure TaboutFrm.L6Click(Sender: TObject);
begin
exec('mailto:support@RnQ.ru?subject=About RnQ')
end;
end.