_i_do_exploration.pas

 unit _i_do_exploration;

interface

   uses classes,sysutils,ComCtrls,dialogs;

procedure _go_xpLorEr_ShowA_node(_SelXpNode:TTreeNode);


var

XXpX : TStringList;


implementation

  uses unit1,_uc_funcs,_uc_refs_vars,_uc_GuiLanG;




//------------------------------------------------------------------------------
procedure _go_xpLorEr_ShowA_node(_SelXpNode:TTreeNode);
var

i,_Dn,_Fn:integer;
_Vn: tlistitem;
nd : TTreeNode;
_CodeK:string;
begin





//_fgui._XOC_LV._IsUpdating:=true;



//-----------
     if (_SelXpNode._EXO_NODE_ROOT_HD<>_SelXpNode.ItemId) then
     begin
     _Vn:=_FXOC_MAIN.AA_0515_LVExpLorer.Items.Add; //       <f>aaaaaaaa<|>222222
     _Vn.Caption:='..';
     _Vn.ImageIndex := 29;
     _Vn.SubItems.Add('');
     _Vn._RefferNODA:=_SelXpNode.Parent;
     end;
//------------------


_Dn:=0;
_Fn:=0;

XXpX.Text:=_SelXpNode._EXO_NODE_DATA_STOCK;
_FXOC_MAIN.explorStatPath.Caption:=format(___ccc__0060__ProcessingXitems,[XXpX.Count]);
_FXOC_MAIN.explorStatPath.Update;

 XXpX.Sort; // sort if not roots  if copy(XXpX[0],1,3)<>'<R>' then

//_DoDebugLOG(XXpX.Text);


_FXOC_MAIN.AA_0515_LVExpLorer.Items.BeginUpdate;
try


   for i :=0 to XXpX.Count-1 do  //-------------------------LOOP
   begin
   _CodeK:=copy(XXpX[i],1,3);


     if _CodeK='<!>' then  //'<R>?01c:     //major folders
     begin
     _FXOC_MAIN.explorStatPath.Caption:=___ccc__0061__FolderNoExist;
     Break;   // break the main loop to go to end
     end;
    // if copy(XXpX[i],1,4)='<ix>' then id:=copy(XXpX[i],5,10);  // remote id




     if _CodeK='<R>' then  //'<R>?01c:     //major folders
     begin
         if _SelXpNode._EXO_NODE_IS_FULL=0 then
         begin
         nd:=_FXOC_MAIN._eExplorerTV.Items.Addchild(_SelXpNode, copy(XXpX[i],6,length(XXpX[i])-5));
         nd.ImageIndex             :=21;
         nd._EXO_NODE_PATH_NB      :=copy(XXpX[i],4,2);  // major pn
         nd._EXO_NODE_PATH_TX      :='\';  // major path #
         nd._EXO_NODE_USER_IP      :=_SelXpNode._EXO_NODE_USER_IP;
         nd._EXO_NODE_USER_ID      :=_SelXpNode._EXO_NODE_USER_ID;
         nd._EXO_NODE_ROOT_HD      :=_SelXpNode._EXO_NODE_ROOT_HD;      // reffer to root for every child node coming
         nd._EXO_NODE_XP_TYPE      :='0';      // reffer to pubs
        // nd._EXO_NODE_TEK_TEK      :=_SelXpNode._EXO_NODE_TEK_TEK;      // reffer if LAN_node
         nd._EXO_NODE_X_LEVEL      :=_SelXpNode._EXO_NODE_X_LEVEL;
         end;



     _Vn:=_FXOC_MAIN.AA_0515_LVExpLorer.Items.Add;
     _Vn.Caption:=copy(XXpX[i],6,length(XXpX[i])-5);
     _Vn.imageIndex := 21;
     //_Vn.__Put_SubItem(_Vn._iTemIndex,1,'R');
     _Vn.itm_int1:=i;


     continue; // skip <d> & <f> we're in <R>
     end;


     if _CodeK='<V>' then  // private
     begin
         if _SelXpNode._EXO_NODE_IS_FULL=0 then
         begin
         nd:=_FXOC_MAIN._eExplorerTV.Items.Addchild(_SelXpNode, copy(XXpX[i],6,length(XXpX[i])-5));
         nd.ImageIndex             :=23;
         nd._EXO_NODE_PATH_NB      :=copy(XXpX[i],4,2);  // major pn
         nd._EXO_NODE_PATH_TX      :='\';  // major path #
         nd._EXO_NODE_USER_IP      :=_SelXpNode._EXO_NODE_USER_IP;
         nd._EXO_NODE_USER_ID      :=_SelXpNode._EXO_NODE_USER_ID;
         nd._EXO_NODE_ROOT_HD      :=_SelXpNode._EXO_NODE_ROOT_HD;      // reffer to root for every child node coming
         nd._EXO_NODE_XP_TYPE      :='1';      // reffer to privs
        // nd._EXO_NODE_TEK_TEK      :=_SelXpNode._EXO_NODE_TEK_TEK;      // reffer if LAN_node
         nd._EXO_NODE_X_LEVEL      :=_SelXpNode._EXO_NODE_X_LEVEL;
         end;


     _Vn:=_FXOC_MAIN.AA_0515_LVExpLorer.Items.Add;
     _Vn.Caption:=copy(XXpX[i],6,length(XXpX[i])-5);
     _Vn.imageIndex := 23;
     _Vn.itm_int1:=i;  // for <V> to point on own node


     continue; // skip <d> & <f> we're in <R>
     end;



     if _CodeK='<X>' then  // xtra
     begin

         if _SelXpNode._EXO_NODE_IS_FULL=0 then
         begin
         nd:=_FXOC_MAIN._eExplorerTV.Items.Addchild(_SelXpNode, copy(XXpX[i],6,length(XXpX[i])-5));
         nd.ImageIndex             :=25;
         nd._EXO_NODE_PATH_NB      :=copy(XXpX[i],4,2);  // major pn
         nd._EXO_NODE_PATH_TX      :='\';  // major path #
         nd._EXO_NODE_USER_IP      :=_SelXpNode._EXO_NODE_USER_IP;
         nd._EXO_NODE_USER_ID      :=_SelXpNode._EXO_NODE_USER_ID;
         nd._EXO_NODE_ROOT_HD      :=_SelXpNode._EXO_NODE_ROOT_HD;      // reffer to root for every child node coming
         nd._EXO_NODE_XP_TYPE      :='2';      // reffer to xtra
         //nd._EXO_NODE_TEK_TEK      :=_SelXpNode._EXO_NODE_TEK_TEK;      // reffer if LAN_node
         nd._EXO_NODE_X_LEVEL      :=_SelXpNode._EXO_NODE_X_LEVEL;
         end;


     _Vn:=_FXOC_MAIN.AA_0515_LVExpLorer.Items.Add;
     _Vn.Caption:=copy(XXpX[i],6,length(XXpX[i])-5);
     _Vn.imageIndex := 25;
     _Vn.itm_int1:=i;  // for <V> to point on own node

     continue; // skip <d> & <f> we're in <R>
     end;




     if _CodeK='<d>'     //
     then
     begin

         if _SelXpNode._EXO_NODE_IS_FULL=0 then
         begin
         nd:=_FXOC_MAIN._eExplorerTV.Items.Addchild(_SelXpNode, copy(XXpX[i],4,length(XXpX[i])-3));
         nd.ImageIndex             :=_SelXpNode.ImageIndex;
         nd._EXO_NODE_PATH_TX      :=_SelXpNode._EXO_NODE_PATH_TX+nd.Text+'\';  // full path each time       tv.Items[]
         nd._EXO_NODE_PATH_NB      :=_SelXpNode._EXO_NODE_PATH_NB;  // major pn
         nd._EXO_NODE_USER_IP      :=_SelXpNode._EXO_NODE_USER_IP;
         nd._EXO_NODE_USER_ID      :=_SelXpNode._EXO_NODE_USER_ID;
         nd._EXO_NODE_ROOT_HD      :=_SelXpNode._EXO_NODE_ROOT_HD;      // reffer to root for every child node coming
         nd._EXO_NODE_XP_TYPE      :=_SelXpNode._EXO_NODE_XP_TYPE;  // >> set same as parent
       //  nd._EXO_NODE_TEK_TEK      :=_SelXpNode._EXO_NODE_TEK_TEK;          // reffer if LAN_node
         nd._EXO_NODE_X_LEVEL      :=_SelXpNode._EXO_NODE_X_LEVEL;
         end;



     inc(_Dn);

     _Vn:=_FXOC_MAIN.AA_0515_LVExpLorer.Items.Add;
     _Vn.Caption:=copy(XXpX[i],4,length(XXpX[i])-3);
     _Vn.imageIndex:=_SelXpNode.ImageIndex;

     //_Vn.__Put_SubItem(_Vn._iTemIndex,1,'d');
     _Vn.itm_int1:=i;  // for <d> to point on own node

     continue; // skip  <f> we found it <d>
     end;


     if _CodeK='<f>' then          // <f>en_windows_vista_x86_dvd_X12-34293.iso?2678614016
     begin
     inc(_Fn);
     _Vn:=_FXOC_MAIN.AA_0515_LVExpLorer.Items.Add;
     _Vn.Caption:=copy(XXpX[i],4,pos('?',XXpX[i])-4);
     _Vn.imageIndex := 27;
     _Vn.ITM_F_SIZE:=StrToInt64Def(copy(XXpX[i],pos('?',XXpX[i])+1,length(XXpX[i])-(pos('?',XXpX[i])-1)),0);
     _Vn.SubItems.Add(_octos(_Vn.ITM_F_SIZE));
     _Vn.itm_str1:=_SelXpNode._EXO_NODE_PATH_TX+_Vn.Caption;     //file full path   ( _Caption is set when obj creation)
     _Vn.pat_n   :=_SelXpNode._EXO_NODE_PATH_NB;                //pn of file
     _Vn.itm_str2:=_SelXpNode._EXO_NODE_USER_IP;                //ip
     _Vn.uzr_id  :=_SelXpNode._EXO_NODE_USER_ID;                //ID
     _Vn._Type   :=_SelXpNode._EXO_NODE_XP_TYPE; // type ( pub/riv/xtra..)
     _Vn._RefferNODA:=_SelXpNode; // for <f> to point on main user

     end;

   //Application.ProcessMessages;
   end;
   //-------------------------- end of LOOP



finally _FXOC_MAIN.AA_0515_LVExpLorer.Items.EndUpdate; end;





_SelXpNode._EXO_NODE_IS_FULL:=1; //   the real  make node treated   >>>>> in i-explorer


//_fgui._XOC_LV._IsUpdating:=false;  // kk

_FXOC_MAIN.explorStatFiles.Caption:=format(___ccc__0062__XfolderXfiles,[_Dn,_Fn]);
_FXOC_MAIN.explorStatPath.Caption:=_SelXpNode._EXO_NODE_PATH_TX;

if (_VV_LOCAL_CONFIG_EXPAND_SUBFOLDERS) then _SelXpNode.Expand(false);
//_fgui._vxp.;

end;





//------------------------------------------------------------------------------

initialization
XXpX:=TStringList.Create;

finalization
XXpX.free;


end.






../delphi71code/exosee-code-source/i_do_exploration-pas..