| 100 | 
   | 
   i: Integer; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 101 | 
   | 
   data: TNodeData; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 102 | 
   | 
   node: PVirtualNode; | 
 
 
 
 
 
 
 
 
 | 103 | 
 + | 
   basenode: PVirtualNode; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 104 | 
   | 
 begin | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 105 | 
   | 
   if FConnectionID <> TreeElem.ConnectionID then | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 106 | 
   | 
     SelectConnection(TreeElem.ConnectionID); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 107 | 
   | 
   root := TreeElem; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 108 | 
   | 
   VST.Clear; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 109 | 
   | 
   VST.BeginUpdate; | 
 
 
 
 
 
 
 
 
 | 110 | 
 + | 
   data.Field := root; | 
 
 
 
 
 
 
 
 
 | 111 | 
 + | 
   basenode := AddVSTEntry(VST, nil, data); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 112 | 
   | 
   for i := 0 to root.ChildCount - 1 do | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 113 | 
   | 
   begin | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 114 | 
   | 
     data.Field := root.Child[i]; | 
 
 
 
 
 
 
 
 
 
 
 
 | 115 | 
 < | 
     node := AddVSTEntry(VST, nil, data); | 
 
 
 
 
 
 
 
 
 
 | 115 | 
 > | 
     node := AddVSTEntry(VST, basenode, data); | 
 
 
 
 
 
 
 
 
 
 
 
 | 116 | 
   | 
     if data.Field.ChildCount > 0 then | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 117 | 
   | 
       VST.HasChildren[node] := True; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 118 | 
   | 
   end; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 148 | 
   | 
   Node: PVirtualNode; Column: TColumnIndex); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 149 | 
   | 
 var | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 150 | 
   | 
   data: PNodeData; | 
 
 
 
 
 
 
 
 
 
 
 
 | 151 | 
 < | 
   ffile: TFile; | 
 
 
 
 
 
 
 
 
 
 | 151 | 
 > | 
   ffile: TResource; | 
 
 
 
 
 
 
 
 
 
 
 
 | 152 | 
   | 
 //******************************************************************* | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 153 | 
   | 
   fs: TFileStream; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 154 | 
   | 
 //******************************************************************* | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 155 | 
   | 
 begin | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 156 | 
   | 
   data := Sender.GetNodeData(Node); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 157 | 
   | 
   ffile := nil; | 
 
 
 
 
 
 
 
 
 
 
 
 | 158 | 
 < | 
   if data.Field is TFile then | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 159 | 
 < | 
     ffile := TFile(data.Field); | 
 
 
 
 
 
 
 
 
 
 | 158 | 
 > | 
   if data.Field is TResource then | 
 
 
 
 
 
 | 159 | 
 > | 
     ffile := TResource(data.Field); | 
 
 
 
 
 
 
 
 
 
 
 
 | 160 | 
   | 
   if data.Field is _MetaTypes.TDatLink then | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 161 | 
   | 
     if Assigned(_MetaTypes.TDatLink(data.Field).TargetFile) then | 
 
 
 
 
 
 
 
 
 
 
 
 | 162 | 
 < | 
       ffile := TFile(_MetaTypes.TDatLink(data.Field).TargetFile); | 
 
 
 
 
 
 
 
 
 
 | 162 | 
 > | 
       ffile := TResource(_MetaTypes.TDatLink(data.Field).TargetFile); | 
 
 
 
 
 
 
 
 
 
 
 
 | 163 | 
   | 
   if Assigned(ffile) then | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 164 | 
   | 
   begin | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 165 | 
   | 
     if Assigned(ffile.Editor) then | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 185 | 
   | 
   i: Integer; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 186 | 
   | 
 begin | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 187 | 
   | 
   data := Sender.GetNodeData(NewNode); | 
 
 
 
 
 
 
 
 
 
 
 
 | 188 | 
 < | 
   if data.Field is TFile then | 
 
 
 
 
 
 
 
 
 
 | 188 | 
 > | 
   if data.Field is TResource then | 
 
 
 
 
 
 
 
 
 
 
 
 | 189 | 
   | 
   begin | 
 
 
 
 
 
 
 
 
 
 
 
 | 190 | 
 < | 
     if Assigned(TFile(data.Field).Editor) then | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 191 | 
 < | 
       Allowed := not TFile(data.Field).Opened | 
 
 
 
 
 
 
 
 
 
 | 190 | 
 > | 
     if Assigned(TResource(data.Field).Editor) then | 
 
 
 
 
 
 | 191 | 
 > | 
       Allowed := not TResource(data.Field).Opened | 
 
 
 
 
 
 
 
 
 
 
 
 | 192 | 
   | 
     else | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 193 | 
   | 
       Allowed := True; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 194 | 
   | 
   end; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 195 | 
   | 
   if Allowed and Assigned(OldNode) then | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 196 | 
   | 
   begin | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 197 | 
   | 
     data := Sender.GetNodeData(OldNode); | 
 
 
 
 
 
 
 
 
 
 
 
 | 198 | 
 < | 
     if data.Field is TFile then | 
 
 
 
 
 
 
 
 
 
 | 198 | 
 > | 
     if data.Field is TResource then | 
 
 
 
 
 
 
 
 
 
 
 
 | 199 | 
   | 
     begin | 
 
 
 
 
 
 
 
 
 
 
 
 | 200 | 
 < | 
       if TFile(data.Field).Opened then | 
 
 
 
 
 
 
 
 
 
 | 200 | 
 > | 
       if TResource(data.Field).Opened then | 
 
 
 
 
 
 
 
 
 
 
 
 | 201 | 
   | 
       begin | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 202 | 
   | 
         if tab_meta.ControlCount > 0 then | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 203 | 
   | 
           for i := 0 to tab_meta.ControlCount - 1 do | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 204 | 
   | 
             tab_meta.RemoveControl(tab_meta.Controls[i]); | 
 
 
 
 
 
 
 
 
 
 
 
 | 205 | 
 < | 
         TFile(data.Field).Opened := False; | 
 
 
 
 
 
 
 
 
 
 | 205 | 
 > | 
         TResource(data.Field).Opened := False; | 
 
 
 
 
 
 
 
 
 
 
 
 | 206 | 
   | 
       end; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 207 | 
   | 
     end; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 208 | 
   | 
   end; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 243 | 
   | 
     case Column of | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 244 | 
   | 
       0: | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 245 | 
   | 
         begin | 
 
 
 
 
 
 
 
 
 
 
 
 | 246 | 
 < | 
           if Data.Field is TFile then | 
 
 
 
 
 
 
 
 
 
 | 246 | 
 > | 
           if Data.Field is TResource then | 
 
 
 
 
 
 
 
 
 
 
 
 | 247 | 
   | 
           begin | 
 
 
 
 
 
 
 
 
 
 
 
 | 248 | 
 < | 
             if Length(TFile(Data.Field).FileInfo.Name) = 0 then | 
 
 
 
 
 
 
 
 
 
 | 248 | 
 > | 
             if Length(TResource(Data.Field).FileInfo.Name) = 0 then | 
 
 
 
 
 
 
 
 
 
 
 
 | 249 | 
   | 
               TargetCanvas.Font.Color := $C06060; | 
 
 
 
 
 
 
 
 
 
 
 
 | 250 | 
 < | 
             if TFile(Data.Field).FileInfo.Size = 0 then | 
 
 
 
 
 
 
 
 
 
 | 250 | 
 > | 
             if TResource(Data.Field).FileInfo.Size = 0 then | 
 
 
 
 
 
 
 
 
 
 
 
 | 251 | 
   | 
               TargetCanvas.Font.Color := $2020A0; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 252 | 
   | 
           end; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 253 | 
   | 
         end; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 266 | 
   | 
  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 267 | 
   | 
   i: Integer; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 268 | 
   | 
   links: TStrings; | 
 
 
 
 
 
 
 
 
 | 269 | 
 + | 
   ifile: TResource; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 270 | 
   | 
 begin | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 271 | 
   | 
   inherited; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 272 | 
   | 
   if Assigned(Node) then | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 282 | 
   | 
           2: HintText := ''; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 283 | 
   | 
         end; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 284 | 
   | 
       end; | 
 
 
 
 
 
 
 
 
 
 
 
 | 285 | 
 < | 
       if (data.Field is _MetaTypes.TDatLink) and (Column = 2) then | 
 
 
 
 
 
 
 
 
 
 | 285 | 
 > | 
       if data.Field is TResource then | 
 
 
 
 
 
 
 
 
 
 
 
 | 286 | 
   | 
       begin | 
 
 
 
 
 
 
 
 
 
 
 
 | 287 | 
 < | 
         links := nil; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 288 | 
 < | 
         links := ConManager.Connection[FConnectionID].GetFilesList(_MetaTypes.TDatLink(data.Field).PosExts, '', False, ST_NameAsc); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 289 | 
 < | 
         HintText := IntToStr(links.Count); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 290 | 
 < | 
         for i := 0 to Min(links.Count - 1, 99) do | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 291 | 
 < | 
         begin | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 292 | 
 < | 
           if (i mod 5) = 0 then | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 293 | 
 < | 
             HintText := HintText + #13+#10; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 290 | 
 < | 
           HintText := HintText + links.Strings[i] + '       '; | 
 
 
 
 
 
 
 
 
 
 | 287 | 
 > | 
         ifile := TResource(data.Field); | 
 
 
 
 
 
 | 288 | 
 > | 
         case Column of | 
 
 
 
 
 
 | 289 | 
 > | 
           0: HintText := | 
 
 
 
 
 
 | 290 | 
 > | 
             'FileID:    ' + IntToStr(ifile.FileInfo.ID) + #13#10 + | 
 
 
 
 
 
 | 291 | 
 > | 
             'Name:      ' + ifile.FileInfo.Name + #13#10 + | 
 
 
 
 
 
 | 292 | 
 > | 
             'Extension: ' + ifile.FileInfo.Extension + #13#10 + | 
 
 
 
 
 
 | 293 | 
 > | 
             '.dat-size: ' + IntToStr(ifile.FileInfo.Size) + #13#10; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 294 | 
   | 
         end; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 295 | 
   | 
       end; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 296 | 
   | 
     end; |