55,8 → 55,7 |
StrUtils, Windows; |
|
const |
MAGIC_V100 = 'FAST100!'; |
UTF8_BOM = ''; |
LEN_MAGIC = 8; |
LEN_ICON = 4; |
LEN_LINENO = 8; |
LEN_DESCLEN = 4; |
118,24 → 117,11 |
|
{$REGION 'Update the treeview'} |
Self.Items.Clear; |
|
{$REGION 'Remove UTF8-BOMs'} |
repeat |
magic := Read(ptr, Length(UTF8_BOM)); |
until magic <> UTF8_BOM; |
ptr := ptr - Length(UTF8_BOM); |
{$ENDREGION} |
|
magic := Read(ptr, length(MAGIC_V100)); |
|
if magic = MAGIC_V100 then |
begin |
magic := Read(ptr, LEN_MAGIC); |
if magic = 'FAST100!' then |
Rec100(nil, ptr) |
end |
else |
begin |
raise EFastNodeException.CreateFmt('FastNode version "%s" not supported.', [magic]); |
end; |
{$ENDREGION} |
|
{$REGION 'Recover the previous current state (selected and expanded flags)'} |