📄 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 + -