⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fabout.pas

📁 siMail, siMail, siMail, siMail
💻 PAS
字号:
(*
# (C) Copyright 2003
# Miha Vrhovnik, miha.vrhovnik@cordia.si
#
# 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., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#
# The Initial Developer of the Original Code is Miha Vrhovnik (Slovenia).
# Portions created by Miha Vrhovnik are Copyright (c)2003.
# All Rights Reserved.
#==============================================================================
# Contributor(s):
#==============================================================================
# History: see whats new.txt from distribution package
#==============================================================================
*)
unit fAbout;

interface

uses
  Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls, Buttons,
  ExtCtrls, Messages, ShellApi;

type
  TfrmAbout = class(TForm)
    Label3: TLabel;
    Label1: TLabel;
    lblVersion: TLabel;
    Label4: TLabel;
    Memo1: TMemo;
    Label2: TLabel;
    lblHomePage: TLabel;
    Label6: TLabel;
    cmdClose: TButton;
    Label5: TLabel;
    Label7: TLabel;
    Label8: TLabel;
    Label9: TLabel;
    Label10: TLabel;
    Label11: TLabel;
    Label12: TLabel;
    Shape1: TShape;
    Shape2: TShape;
    Image1: TImage;
    procedure cmdCloseClick(Sender: TObject);
    procedure FormShortCut(var Msg: TWMKey; var Handled: Boolean);
    procedure FormShow(Sender: TObject);
    procedure lblHomeClick(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure FormHide(Sender: TObject);
    procedure Label9Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmAbout: TfrmAbout;

implementation

uses
  fMain, mailBox, gnugettext, defFldrs, dImages;

{$R *.DFM}

procedure TfrmAbout.cmdCloseClick(Sender: TObject);
begin
  Self.Close;
end;

procedure TfrmAbout.FormShortCut(var Msg: TWMKey; var Handled: Boolean);
begin
  if msg.CharCode = 27 then begin
    Self.Close;
    Handled := True;
  end;
end;

procedure TfrmAbout.FormShow(Sender: TObject);
begin
  //translate me
  TranslateComponent(Self);

  lblHomePage.Caption := siMailHome;
  lblVersion.Caption := _('Version: ') + frmMain.GetFileVersionAsString(
    Application.ExeName);
  Image1.Picture.Assign(Application.Icon);
  //read self position & size
  frmMailbox.Profile.Config.ReadControlSettings(Self);
end;

procedure TfrmAbout.lblHomeClick(Sender: TObject);
begin
  ShellExecute(Self.Handle, 'open', PChar((Sender as TLabel).Caption),
    nil, nil, SW_SHOWNORMAL);
end;

procedure TfrmAbout.Button1Click(Sender: TObject);
begin
  Self.Close;
end;

procedure TfrmAbout.FormHide(Sender: TObject);
begin
  //write self position & size
  frmMailbox.Profile.Config.WriteControlSettings(Self);
end;

procedure TfrmAbout.Label9Click(Sender: TObject);
begin
  ShellExecute(Self.Handle, 'open', PChar('mailto:' + (Sender as TLabel).Caption),
    nil, nil, SW_SHOWNORMAL);
end;

end.
 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -