Changeset 132
- Timestamp:
- May 2, 2023, 12:09:33 AM (20 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UEngine.pas
r131 r132 1014 1014 var 1015 1015 Node2: TDOMNode; 1016 I: Integer; 1016 1017 begin 1017 1018 inherited; … … 1026 1027 if Assigned(Node2) then 1027 1028 LineStations.LoadFromXmlNode(Node2); 1029 for I := 0 to LineStations.Count - 1 do 1030 LineStations[I].MapStation.Lines.Add(Self); 1028 1031 end; 1029 1032 … … 1359 1362 DestinationIndex := ReadInteger(Node, 'DestinationIndex', Integer(DestinationIndex)); 1360 1363 IsTerminal := ReadBoolean(Node, 'IsTerminal', IsTerminal); 1364 OverloadDuration := ReadDateTime(Node, 'OverloadDuration', OverloadDuration); 1361 1365 1362 1366 Node2 := Node.FindNode(DOMString(TMetroPassengers.GetClassSysName)); … … 1374 1378 WriteInteger(Node, 'DestinationIndex', DestinationIndex); 1375 1379 WriteBoolean(Node, 'IsTerminal', IsTerminal); 1380 WriteDateTime(Node, 'OverloadDuration', OverloadDuration); 1376 1381 1377 1382 NewNode := Node.OwnerDocument.CreateElement(DOMString(TMetroPassengers.GetClassSysName)); … … 4039 4044 City := Cities.SearchBySysName(ReadString(Node, 'CityName', '')); 4040 4045 AvailableTerminals := ReadInteger(Node, 'AvailableTerminals', AvailableTerminals); 4046 LastNewShapeTime := ReadDateTime(Node, 'LastNewShapeTime', LastNewShapeTime); 4047 LastNewWeekTime := ReadDateTime(Node, 'LastNewWeekTime', LastNewWeekTime); 4048 LastNewPassengerTime := ReadDateTime(Node, 'LastNewPassengerTime', LastNewPassengerTime); 4049 LastNewStationTime := ReadDateTime(Node, 'LastNewStationTime', LastNewStationTime); 4041 4050 4042 4051 NewNode := Node.FindNode(DOMString(TView.GetClassSysName)); … … 4085 4094 if Assigned(NewNode) then 4086 4095 Trains.LoadFromXmlNode(NewNode); 4096 4097 ComputeShapeDistance; 4087 4098 end; 4088 4099 … … 4105 4116 if Assigned(City) then WriteString(Node, 'CityName', City.SysName); 4106 4117 WriteInteger(Node, 'AvailableTerminals', AvailableTerminals); 4118 WriteDateTime(Node, 'LastNewShapeTime', LastNewShapeTime); 4119 WriteDateTime(Node, 'LastNewWeekTime', LastNewWeekTime); 4120 WriteDateTime(Node, 'LastNewPassengerTime', LastNewPassengerTime); 4121 WriteDateTime(Node, 'LastNewStationTime', LastNewStationTime); 4107 4122 4108 4123 NewNode := Node.OwnerDocument.CreateElement(DOMString(TView.GetClassSysName)); -
trunk/UItems.pas
r131 r132 119 119 Node2 := Node.FirstChild; 120 120 while Assigned(Node2) and (Node2.NodeName = DOMString(T.GetClassSysName)) do begin 121 RefId := StrToInt(string(Node .TextContent));121 RefId := StrToInt(string(Node2.TextContent)); 122 122 NewItem := Target.FindById(RefId); 123 123 if Assigned(NewItem) then Add(NewItem) … … 168 168 Count := 0; 169 169 Node2 := Node.FirstChild; 170 while Assigned(Node2) and (Node2.NodeName = UnicodeString( GetItemClass.GetClassSysName)) do begin170 while Assigned(Node2) and (Node2.NodeName = UnicodeString(T.GetClassSysName)) do begin 171 171 NewItem := CreateItem; 172 172 NewItem.LoadFromXmlNode(Node2); … … 183 183 for I := 0 to Count - 1 do 184 184 with TItem(Items[I]) do begin 185 NewNode2 := Node.OwnerDocument.CreateElement(UnicodeString( GetItemClass.GetClassSysName));185 NewNode2 := Node.OwnerDocument.CreateElement(UnicodeString(T.GetClassSysName)); 186 186 Node.AppendChild(NewNode2); 187 187 SaveToXmlNode(NewNode2);
Note:
See TracChangeset
for help on using the changeset viewer.