Home > Back-end >  If you want to do a LAN remote control program, the TreeView control end use to display the server d
If you want to do a LAN remote control program, the TreeView control end use to display the server d

Time:11-14

If you want to do a LAN remote control program, the TreeView control end use to display the server disk partition file directory tree, file directory information how to package delivery is better? And how to customize the simple protocol?

CodePudding user response:

Server:
Step 1, define structure, should be at least: id, name, rank, ranking id number, if you care about it in the office of the brothers in order, but should also add a order,
Step 2, traverse the server directory, defining the id number and directory name, and specify it's directory hierarchy and the superior directory id;
Step 3, the whole directory into a series of data, for example: separator + directory name directory id1 + 1 + separator + 1 + superior + directory hierarchy id2 +...
Step 4, sent to the control terminals,

Control end:
Collect a series of data, according to the format decoding, with TreeView, according to

Dare not to say, but also can use, I used to show the assets of the location, level including the company name (the first layer, the only), factory name, building, room, location,

CodePudding user response:

You two are exactly what relation and hitting the face ~ ~ ~

CodePudding user response:

reference 1/f, the frog studio reply:
server:
Step 1, define structure, should be at least: id, name, rank, ranking id number, if you care about it in the office of the brothers in order, but should also add a order,
Step 2, traverse the server directory, defining the id number and directory name, and specify it's directory hierarchy and the superior directory id;
Step 3, the whole directory into a series of data, for example: separator + directory name directory id1 + 1 + separator + 1 + superior + directory hierarchy id2 +...
Step 4, sent to the control terminals,

Control end:
Collect a series of data, according to the format decoding, with TreeView, according to

Dare not to say, but also can use, I used to show the assets of the location, level including the company name (the first layer, the only), factory name, building, room, location,


You can refer to,

CodePudding user response:

refer to the second floor early play big play nuclear response:
you two exactly what relation, hitting the face ~ ~ ~


He is a false li ~

CodePudding user response:

Look at my face, who is real?

CodePudding user response:

reference 5 floor frog studio reply:
see my face, who is the real thing?


Registration is small frog head 12 years are not necessarily the beginning...

CodePudding user response:

Use ClientDataSet to create a memory table, put the directory information table, then save as. CDS file, with IdTCPClient finally and IdTCPServer to transfer files,

CodePudding user response:

refer to 6th floor early play big play nuclear response:
Quote: refer to fifth floor frog studio response:

Look at my face, who is real?


Registration is small frog head 12 years are not necessarily the beginning...


Head can change,,

CodePudding user response:

refer to 7th floor titan_ysl response:
with ClientDataSet to create a memory table, put the directory information table, then save as. CDS file, with IdTCPClient finally and IdTCPServer to transfer files,


Put the directory information table, this how to operate?
I hope the directory structure can be layered, transmitted,

CodePudding user response:

Directory information storage structure to your own design, of course, if no ready-made, simply, you can use the
Name this layer whether the folder hierarchy superior directory name four fields to build a table,
Reoccupy findfirst iterates through all files, documents under the content to fill in the table above, of course you like suspicion the above table is too big, can build two tables,
A table of two fields, the superior directory name, number, only
Whether another table hierarchy name this layer folder only number four fields
Ideas of the previous four fields data into the two tables, and pass the two tables, and, of course, to hierarchical access, according to the hierarchy to filter the list, and then put the data into an empty table save after transmission line,
The following is the method of traverse file all documents under
#include
#include
#include
using namespace std;
Void dir (string path)
{
Long hFile=0;
Struct _finddata_t the fileInfo;
String the pathName, exdName;
//\ \ * representative to iterate over all of type
If ((hFile=_findfirst (pathName. Assign (path), append (" \ \ * "). The c_str (), & amp; The fileInfo))==1) {
return;
}
Do
{
//judge file attributes are folder or file
Cout & lt; } while (_findnext (hFile, & amp; The fileInfo)==0);
_findclose (hFile);
return;
}
Int main ()
{
//to iterate through the directory
String path="E: \ \ work \ \ zhidao \ \ test4";
Dir (path);
system("pause");
return 0;
}
From baidu know: https://zhidao.baidu.com/question/1798637132504240907.html? QBL=relate_question_0 & amp; Word=B5 C % 2 b % 2 b % % % % % % C3 B5 BD CE C4 BC CF D0 BC FE % % % % % % % % % % C2 CE C4 BC FE C4 FD CA % % % % BF

CodePudding user response:

The
references to the tenth floor titan_ysl response:
directory information storage structure to your own design, of course, if no ready-made, simply, you can use the
Name this layer whether the folder hierarchy superior directory name four fields to build a table,
Reoccupy findfirst iterates through all files, documents under the content to fill in the table above, of course you like suspicion the above table is too big, can build two tables,
A table of two fields, the superior directory name, number, only
Whether another table hierarchy name this layer folder only number four fields
Ideas of the previous four fields data into the two tables, and pass the two tables, and, of course, to hierarchical access, according to the hierarchy to filter the list, and then put the data into an empty table save after transmission line,
The following is the method of traverse file all documents under
#include
#include
#include
using namespace std;
Void dir (string path)
{
Long hFile=0;
Struct _finddata_t the fileInfo;
String the pathName, exdName;
//\ \ * representative to iterate over all of type
If ((hFile=_findfirst (pathName. Assign (path), append (" \ \ * "). The c_str (), & amp; The fileInfo))==1) {
return;
}
Do
{
//judge file attributes are folder or file
Cout & lt; } while (_findnext (hFile, & amp; The fileInfo)==0);
_findclose (hFile);
return;
}
Int main ()
{
//to iterate through the directory
String path="E: \ \ work \ \ zhidao \ \ test4";
Dir (path);
system("pause");
return 0;
}
From baidu know: https://zhidao.baidu.com/question/1798637132504240907.html? QBL=relate_question_0 & amp; Word=B5 C % 2 b % 2 b % % % % % % C3 B5 BD CE C4 BC D0 BC FE % % % % % % % % CF C2 CE C4 BC C4 FD CA FE % % % % % % BF


Save as a file, and then transmit, can save as memory stream?nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related