?? calcbcb.pas
字號:
unit CalcBcb;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics,
Calculate;
type
TCalcBcb = class(TCalculate)
private
public
constructor Create;
destructor Destroy; override;
function GetFileList(List: TStrings): boolean; override;
end;
implementation
constructor TCalcBcb.Create;
begin
inherited Create;
end;
destructor TCalcBcb.Destroy;
begin
inherited Destroy;
end;
function TCalcBcb.GetFileList(List: TStrings): boolean;
var
Lines: TStrings;
i, j: integer;
LineStr, FileName: string;
Path, CppFileName, HeadFileName: string;
begin
Result := true;
Path := ExtractFilePath(FPrjFilename);
CppFileName := ChangeFileExt(FPrjFileName, '.cpp');
List.Clear;
List.Add(CppFileName);
Lines := TStringList.Create;
try
Lines.LoadFromFile(CppFileName);
for i := 0 to Lines.Count - 1 do
begin
LineStr := UpperCase(Lines[i]);
j := Pos('USEFORM("', LineStr);
if j <=0 then j := Pos('USEUNIT("', LineStr);
if j > 0 then
begin
FileName := '';
j := j + 9;
if j <= Length(LineStr) then
begin
FileName := Path;
while LineStr[j] <> '"' do
begin
FileName := FileName + Lines[i][j];
Inc(j);
if j > Length(LineStr) then break;
end;
end;
if FileName <> '' then
List.Add(FileName);
HeadFileName := ChangeFileExt(FileName, '.h');
if FileExists(HeadFileName) then
List.Add(HeadFileName);
end;
end;
except
Result := false;
end;
Lines.Free;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -