?? selectcopyright.pas
字號:
unit selectcopyright;
interface
uses
SysUtils, Classes
, copyrightmgr, MultiLang, wbsData, settings
{$IFDEF CLX}
,QGraphics, QControls, QForms, QDialogs, QStdCtrls
{$ELSE}
, Graphics, Controls, Forms, Dialogs, StdCtrls
, FileCtrl
{$ENDIF}
;
type
TForm9 = class(TForm)
ListBox1: TListBox;
Button1: TButton;
Button2: TButton;
Button3: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormShow(Sender: TObject);
procedure Button3Click(Sender: TObject);
private
{ Private-Deklarationen }
public
CopyrightPath: String;
SelectedFile: String;
Filenames: TStrings;
end;
var
Form9: TForm9;
implementation
{$R *.dfm}
procedure TForm9.Button1Click(Sender: TObject);
begin
Close;
end;
procedure TForm9.Button2Click(Sender: TObject);
begin
Form8.CopyrightPath:=CopyrightPath;
Form8.ShowModal;
FormShow(self);
end;
procedure TForm9.FormCreate(Sender: TObject);
begin
Button1.Caption:=ml.GetComponentString('selectcopyright.Button1.Caption');
Button2.Caption:=ml.GetComponentString('selectcopyright.Button2.Caption');
Button3.Caption:=ml.GetComponentString('selectcopyright.Button3.Caption');
Form9.Caption:=ml.GetComponentString('selectcopyright.Form9.Caption');
Filenames:=TStringList.Create;
end;
procedure TForm9.FormDestroy(Sender: TObject);
begin
Filenames.Free;
end;
procedure TForm9.FormClose(Sender: TObject; var Action: TCloseAction);
begin
if ListBox1.ItemIndex>-1 then SelectedFile:=Filenames.Strings[ListBox1.ItemIndex]
else SelectedFile:='';
end;
procedure TForm9.FormShow(Sender: TObject);
var
fsr: TSearchRec;
cpi: TextFile;
str: String;
line: String;
//
Capt: String;
Start: WideString;
begin
Capt:=ml.GetCodeString('selectcopyright',1);
if (CopyRightPath='undefined') then begin
Form10.CopyrightPath:=CopyrightPath;
Form10.Language:=Lang;
Form10.ShowModal;
CopyrightPath:=Form10.CopyrightPath;
Lang:=Form10.Language;
end;
Filenames.Clear;
ListBox1.Items.Clear;
if FindFirst(CopyRightPath+'*.cpi',faAnyFile,fsr)=0 then begin
if FileExists(CopyRightPath+fsr.Name) then begin
Filenames.Add(CopyRightPath+fsr.Name);
AssignFile(cpi,CopyRightPath+fsr.Name);
Reset(cpi);
Readln(cpi,line);
Readln(cpi,str);
line:=line+' '+str;
Readln(cpi,str);
line:=line+', '+str;
CloseFile(cpi);
ListBox1.Items.Add(line);
end;
while FindNext(fsr)=0 do begin
if FileExists(CopyRightPath+fsr.Name) then begin
Filenames.Add(CopyRightPath+fsr.Name);
AssignFile(cpi,CopyRightPath+fsr.Name);
Reset(cpi);
Readln(cpi,line);
Readln(cpi,str);
line:=line+' '+str;
Readln(cpi,str);
line:=line+', '+str;
CloseFile(cpi);
ListBox1.Items.Add(line);
end;
end;
end;
end;
procedure TForm9.Button3Click(Sender: TObject);
begin
{$IFDEF CLX}
Application.HelpSystem.ShowContextHelp(810,Application.HelpFile);
{$ELSE}
Application.HelpContext(810);
{$ENDIF}
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -