Changeset 231 for oup/current/Tools/BinEdit.pas
- Timestamp:
- Jun 21, 2007, 12:24:04 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
oup/current/Tools/BinEdit.pas
r225 r231 30 30 procedure NewFile(fileinfo: TFileInfo); 31 31 32 procedure LoadDat(_fileid: Integer);33 32 function Save: Boolean; 34 33 function GetValue(datatype: Word; offset: Integer): String; … … 121 120 122 121 procedure TForm_BinEdit.NewFile(fileinfo: TFileInfo); 123 begin124 LoadDat(fileinfo.ID);125 end;126 127 128 129 130 function AddVSTEntry(AVST: TCustomVirtualStringTree; ANode: PVirtualNode;131 ARecord: TNodeData): PVirtualNode;132 var133 Data: PNodeData;134 begin135 Result := AVST.AddChild(ANode);136 Data := AVST.GetNodeData(Result);137 AVST.ValidateNode(Result, False);138 Data^ := ARecord;139 end;140 141 142 143 144 procedure TForm_BinEdit.LoadDat(_fileid: Integer);145 122 var 146 123 mem: TMemoryStream; … … 157 134 end; 158 135 end; 159 if _fileid>= 0 then160 begin 161 fileid := _fileid;136 if fileinfo.ID >= 0 then 137 begin 138 fileid := fileinfo.ID; 162 139 ConID := ConnectionID; 163 if ConManager.Connection[ConID].ExtractFileIDOfName(filelist.Items.Strings[filelist.ItemIndex]) <> fileid then164 Self.SelectFileID(ConnectionID, fileid);140 // if ConManager.Connection[ConID].ExtractFileIDOfName(filelist.Items.Strings[filelist.ItemIndex]) <> fileid then 141 // Self.SelectFileID(ConnectionID, fileid); 165 142 Self.ClearStructViewer; 166 143 mem := nil; … … 174 151 else 175 152 begin 176 fileid := _fileid;153 fileid := -1; 177 154 ConID := -1; 178 155 Self.ClearStructViewer; … … 182 159 end; 183 160 end; 161 162 163 164 165 function AddVSTEntry(AVST: TCustomVirtualStringTree; ANode: PVirtualNode; 166 ARecord: TNodeData): PVirtualNode; 167 var 168 Data: PNodeData; 169 begin 170 Result := AVST.AddChild(ANode); 171 Data := AVST.GetNodeData(Result); 172 AVST.ValidateNode(Result, False); 173 Data^ := ARecord; 174 end; 175 176 184 177 185 178
Note:
See TracChangeset
for help on using the changeset viewer.