Skip to content

Commit

Permalink
Updating About form
Browse files Browse the repository at this point in the history
  • Loading branch information
dpradov committed Dec 23, 2023
1 parent c9c5f18 commit 8b0cf9c
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 7 deletions.
31 changes: 27 additions & 4 deletions general/kn_about.dfm
Expand Up @@ -35,11 +35,34 @@ object AboutBox: TAboutBox
Transparent = False
OnClick = BTN_CloseClick
end
object lblDonations: TLabel
Left = 289
Top = 333
Width = 119
Height = 13
Cursor = crHandPoint
Hint =
'Thanks for using KeyNote NF. You can show your appreciation and ' +
'support future development by donating!'
AutoSize = False
Caption = 'Donate with PayPal'
Font.Charset = ANSI_CHARSET
Font.Color = clNavy
Font.Height = -11
Font.Name = 'Verdana'
Font.Style = []
ParentFont = False
PopupMenu = NetMenu
StyleElements = [seClient, seBorder]
OnClick = lblDonationsClick
OnMouseDown = Label_MAILTOMouseDown
OnMouseUp = Label_MAILTOMouseUp
end
object Panel_Main: TPanel
Left = 8
Top = 10
Width = 397
Height = 314
Height = 317
BevelOuter = bvSpace
BorderWidth = 1
BorderStyle = bsSingle
Expand Down Expand Up @@ -382,7 +405,7 @@ object AboutBox: TAboutBox
end
object LB_RichEditVer: TLabel
Left = 66
Top = 277
Top = 282
Width = 9
Height = 13
Caption = 'rtf'
Expand Down Expand Up @@ -498,8 +521,8 @@ object AboutBox: TAboutBox
end
end
object NetMenu: TPopupMenu
Left = 369
Top = 326
Left = 17
Top = 334
object CopyEmailaddress1: TMenuItem
Caption = 'Copy &E-mail address'
OnClick = CopyEmailaddress1Click
Expand Down
20 changes: 17 additions & 3 deletions general/kn_about.pas
Expand Up @@ -65,10 +65,12 @@ TAboutBox = class(TForm)
Image_Program: TImage;
Label_Version_Date: TLabel;
Label_KeynoteNF: TLabel;
lblDonations: TLabel;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure BTN_CloseClick(Sender: TObject);
procedure Label_MAILTODblClick(Sender: TObject);
procedure OpenURL(URL: String; Lbl: TLabel);
procedure Label_URLDblClick(Sender: TObject);
procedure CopyEmailaddress1Click(Sender: TObject);
procedure CopyuWebURL1Click(Sender: TObject);
Expand All @@ -79,6 +81,7 @@ TAboutBox = class(TForm)
procedure FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure Image1DblClick(Sender: TObject);
procedure lblDonationsClick(Sender: TObject);
private
{ Private declarations }
public
Expand Down Expand Up @@ -124,6 +127,7 @@ procedure TAboutBox.FormCreate(Sender: TObject);
Label_Dart.Font.Color := _GF_NAVY;
Label_KeynoteNF.Font.Color := _GF_NAVY;


GetDLLProductVersion(pathDLL, VersionDLL, VersionRichEdit);

nameDLL := ' (' + ExtractFileName(pathDLL) + ')';
Expand Down Expand Up @@ -177,15 +181,25 @@ procedure TAboutBox.Label_MAILTODblClick(Sender: TObject);
screen.Cursor := crDefault;
end;

procedure TAboutBox.Label_URLDblClick(Sender: TObject);
procedure TAboutBox.OpenURL(URL: String; Lbl: TLabel);
begin
screen.Cursor := crHourGlass;
( sender as TLabel ).Font.Color := _GF_BLUE;
//Lbl.Font.Color := _GF_BLUE;
ShellExecute( 0, 'open', PChar( Label_URL.Caption ), nil, nil, SW_NORMAL );
( sender as TLabel ).Font.Color := _GF_PURPLE;
//Lbl.Font.Color := _GF_PURPLE;
screen.Cursor := crDefault;
end;

procedure TAboutBox.Label_URLDblClick(Sender: TObject);
begin
OpenURL (Label_URL.Caption, (sender as TLabel));
end;

procedure TAboutBox.lblDonationsClick(Sender: TObject);
begin
OpenURL (Program_URL_Donations, (sender as TLabel));
end;

procedure TAboutBox.CopyEmailaddress1Click(Sender: TObject);
begin
Clipboard.SetTextBuf( PChar( Label_MAILTO.Caption ));
Expand Down

0 comments on commit 8b0cf9c

Please sign in to comment.