Ignore:
Timestamp:
Dec 7, 2017, 12:21:08 PM (7 years ago)
Author:
chronos
Message:
  • Fixed: Build under Lazarus 1.8.0.
  • Modified: Updated Common package.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/UXMLUtils.pas

    r18 r19  
    1212function DateTimeToXMLTime(Value: TDateTime; ApplyLocalBias: Boolean = True): WideString;
    1313procedure WriteInteger(Node: TDOMNode; Name: string; Value: Integer);
     14procedure WriteInt64(Node: TDOMNode; Name: string; Value: Int64);
    1415procedure WriteBoolean(Node: TDOMNode; Name: string; Value: Boolean);
    1516procedure WriteString(Node: TDOMNode; Name: string; Value: string);
    1617procedure WriteDateTime(Node: TDOMNode; Name: string; Value: TDateTime);
    1718function ReadInteger(Node: TDOMNode; Name: string; DefaultValue: Integer): Integer;
     19function ReadInt64(Node: TDOMNode; Name: string; DefaultValue: Int64): Int64;
    1820function ReadBoolean(Node: TDOMNode; Name: string; DefaultValue: Boolean): Boolean;
    1921function ReadString(Node: TDOMNode; Name: string; DefaultValue: string): string;
     
    142144end;
    143145
     146procedure WriteInt64(Node: TDOMNode; Name: string; Value: Int64);
     147var
     148  NewNode: TDOMNode;
     149begin
     150  NewNode := Node.OwnerDocument.CreateElement(Name);
     151  NewNode.TextContent := IntToStr(Value);
     152  Node.AppendChild(NewNode);
     153end;
     154
    144155procedure WriteBoolean(Node: TDOMNode; Name: string; Value: Boolean);
    145156var
     
    177188  if Assigned(NewNode) then
    178189    Result := StrToInt(NewNode.TextContent);
     190end;
     191
     192function ReadInt64(Node: TDOMNode; Name: string; DefaultValue: Int64): Int64;
     193var
     194  NewNode: TDOMNode;
     195begin
     196  Result := DefaultValue;
     197  NewNode := Node.FindNode(Name);
     198  if Assigned(NewNode) then
     199    Result := StrToInt64(NewNode.TextContent);
    179200end;
    180201
Note: See TracChangeset for help on using the changeset viewer.