解决方案 »
- 求助!!
- 如何在一个DELPHI中同时运行多个进程(急急急)
- 怎样在鼠标点其它地方时,TPopupMenu 自动关闭?
- 如何做一个和任务栏一样的窗体?
- 哪位高手知道 FastReport2.5 在程序中怎么设置 “Band”对象 的强迫换行.
- 小工具,针对d5、6、7
- 关于telnet的IdTelnet的问题!
- 怎么使自己做的文本编辑器像 记事本 一样双击一个文本文件就打开它?
- 一个简单问提,谢谢
- [组件开发]谁有做过类似于TDBGrid中的Columns属性或TstatusBar中的Panels属性的属性编辑器?
- 求一配对算法如何检错,集思广益
- 求助,如何删除(关闭)由TRzPageControl 生成的融合窗口
procedure TForm1.Button1Click(Sender: TObject);
var str: WideString;
FTextList :TStrings;
i:integer;
k:integer;timestr:String;
content:WideString;
lastIndex:integer;
timeNum:integer;
n:integer;
begin
FTextList:=TStringList.create;
if(op1.Execute) then
begin
FTextList.loadFromfile(op1.FileName);
for i:=0 to FTextList.count -1 do
begin
str := FTextList[i];
lastIndex:=LastDelimiter(']',str);
//showmessage(inttostr(lastIndex));
//ÏÂÃæ´¦Àítime±êÇ©
timeNum:=lastIndex div 10;
showmessage(inttostr(timeNum)); content :=copy(str,lastIndex+1,length(str)-lastIndex) ;
//m1.Lines.Add(content);
if timeNum=0 then m1.Lines.Add(str)
else
for n:=0 to timeNum-1 do
begin
timestr:=copy(str,n*10+1,10) ;
m1.Lines.Add(timestr+content);
end;
end;
end;
end;