if
sCommand =
'NAME'
then
begin
pic:=MakeTest(sAction,sTip);
ss:=pic;
w:=
0
;
for
q:=
1
to
length(ss)
do
if
copy(ss,q,
1
)=
','
then
w:=w+
1
;
AThread
.
Connection
.
WriteLn
(inttostr(w));
for
q:=
1
to
w
do
begin
s:=copy(ss,pos(
','
,ss)+
1
,
1000
);
if
pos(
','
,s)>
0
then
begin
s:=copy(ss,
1
,pos(
','
,ss)-
1
);
ss:=copy(ss,pos(
','
,ss),
1000
);
end
;
AThread
.
Connection
.
WriteLn
(s);
fStream := TFileStream
.
Create(s,fmOpenRead + fmShareDenyNone);
AThread
.
Connection
.
OpenWriteBuffer;
AThread
.
Connection
.
WriteStream(fStream);
AThread
.
Connection
.
CloseWriteBuffer;
FreeAndNil(fStream);
end
;
AThread
.
Connection
.
Disconnect;
AThread
.
Connection
.
Connected;
fStream := TFileStream
.
Create(ExtractFilePath(Application
.
ExeName)+
'Data\Client\'+sAction+'
.ini',fmOpenRead + fmShareDenyNone);
AThread
.
Connection
.
OpenWriteBuffer;
AThread
.
Connection
.
WriteStream(fStream);
AThread
.
Connection
.
CloseWriteBuffer;
FreeAndNil(fStream);
end
;