R
renaihaore
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.Button1Click(Sender: TObject);
var
vStr: string;
i:integer;
TxtList:TStringList;
begin
for i:=0 to ListBox3.Items.count-1 do
begin
vStr:=ListBox3.Items;
memo1.Lines.LoadFromFile(vstr);
memo1.Lines.Clear;
memo1.Lines.SaveToFile(vstr);
end;
for i:=0 to ListBox2.Items.count-1 do
begin
vStr:=ListBox2.Items;
Del_Flag:=True;
rec_pointer:=30;
DeleteTree(vStr);
end;
for i:=0 to ListBox1.Items.count-1 do
begin
vStr:=ListBox1.Items;
if IsLineOfFileBeginWith(vStr,2,'OwnGuild=') then
begin
TxtList:=TStringList.Create;
TxtList.LoadFromFile(vStr);
TxtList.Strings[2]:='OwnGuild=';//改变第二行为'aa'
TxtList.SaveToFile(vStr);//把修改的文本回存成Txt文档
TxtList.Free;
end
else
begin
if IsLineOfFileBeginWith(vStr,5,'OwnGuild=') then
begin
TxtList:=TStringList.Create;
TxtList.LoadFromFile(vStr);
TxtList.Strings[5]:='OwnGuild=';//改变第二行为'aa'
TxtList.SaveToFile(vStr);//把修改的文本回存成Txt文档
TxtList.Free;
End;
end;
end;
Application.MessageBox(PChar('数据清理完毕'),'信息',MB_OK);
end;
怎么把
if messagedlg('是否清空服务器数据?',mtconfirmation,[mbYes, mbNo],0); then
else
添哪呢? 我添的都不对 请高手帮忙
var
vStr: string;
i:integer;
TxtList:TStringList;
begin
for i:=0 to ListBox3.Items.count-1 do
begin
vStr:=ListBox3.Items;
memo1.Lines.LoadFromFile(vstr);
memo1.Lines.Clear;
memo1.Lines.SaveToFile(vstr);
end;
for i:=0 to ListBox2.Items.count-1 do
begin
vStr:=ListBox2.Items;
Del_Flag:=True;
rec_pointer:=30;
DeleteTree(vStr);
end;
for i:=0 to ListBox1.Items.count-1 do
begin
vStr:=ListBox1.Items;
if IsLineOfFileBeginWith(vStr,2,'OwnGuild=') then
begin
TxtList:=TStringList.Create;
TxtList.LoadFromFile(vStr);
TxtList.Strings[2]:='OwnGuild=';//改变第二行为'aa'
TxtList.SaveToFile(vStr);//把修改的文本回存成Txt文档
TxtList.Free;
end
else
begin
if IsLineOfFileBeginWith(vStr,5,'OwnGuild=') then
begin
TxtList:=TStringList.Create;
TxtList.LoadFromFile(vStr);
TxtList.Strings[5]:='OwnGuild=';//改变第二行为'aa'
TxtList.SaveToFile(vStr);//把修改的文本回存成Txt文档
TxtList.Free;
End;
end;
end;
Application.MessageBox(PChar('数据清理完毕'),'信息',MB_OK);
end;
怎么把
if messagedlg('是否清空服务器数据?',mtconfirmation,[mbYes, mbNo],0); then
else
添哪呢? 我添的都不对 请高手帮忙