Changeset 19 for trunk/Packages/Common/UXMLUtils.pas
- Timestamp:
- Dec 7, 2017, 12:21:08 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/UXMLUtils.pas
r18 r19 12 12 function DateTimeToXMLTime(Value: TDateTime; ApplyLocalBias: Boolean = True): WideString; 13 13 procedure WriteInteger(Node: TDOMNode; Name: string; Value: Integer); 14 procedure WriteInt64(Node: TDOMNode; Name: string; Value: Int64); 14 15 procedure WriteBoolean(Node: TDOMNode; Name: string; Value: Boolean); 15 16 procedure WriteString(Node: TDOMNode; Name: string; Value: string); 16 17 procedure WriteDateTime(Node: TDOMNode; Name: string; Value: TDateTime); 17 18 function ReadInteger(Node: TDOMNode; Name: string; DefaultValue: Integer): Integer; 19 function ReadInt64(Node: TDOMNode; Name: string; DefaultValue: Int64): Int64; 18 20 function ReadBoolean(Node: TDOMNode; Name: string; DefaultValue: Boolean): Boolean; 19 21 function ReadString(Node: TDOMNode; Name: string; DefaultValue: string): string; … … 142 144 end; 143 145 146 procedure WriteInt64(Node: TDOMNode; Name: string; Value: Int64); 147 var 148 NewNode: TDOMNode; 149 begin 150 NewNode := Node.OwnerDocument.CreateElement(Name); 151 NewNode.TextContent := IntToStr(Value); 152 Node.AppendChild(NewNode); 153 end; 154 144 155 procedure WriteBoolean(Node: TDOMNode; Name: string; Value: Boolean); 145 156 var … … 177 188 if Assigned(NewNode) then 178 189 Result := StrToInt(NewNode.TextContent); 190 end; 191 192 function ReadInt64(Node: TDOMNode; Name: string; DefaultValue: Int64): Int64; 193 var 194 NewNode: TDOMNode; 195 begin 196 Result := DefaultValue; 197 NewNode := Node.FindNode(Name); 198 if Assigned(NewNode) then 199 Result := StrToInt64(NewNode.TextContent); 179 200 end; 180 201
Note:
See TracChangeset
for help on using the changeset viewer.