翱
翱翔雨天
Unregistered / Unconfirmed
GUEST, unregistred user!
if(DirectoryExists(Dir))
{
filecount=GetFile(Dir,MSCFileList);
filecount=0;
for(i=0;i<MSCFileList->Count;i++)
{
if(FileExists(MSCFileList->Strings))
{
Label2->Caption=MSCFileList->Strings;
Label4->Caption=MSCFileList->Strings;
StatusBar1->SimpleText="正在处理:"+MSCFileList->Strings+"...";
MSCFile->Clear();
MSCFile->LoadFromFile(MSCFileList->Strings);
state=TraceMSCData(MSCFile,OutPath,MSCFileList->Strings);
if(state==5)
{
WorkListBox->Items->Add("文件 "+ExtractFileName(MSCFileList->Strings)+" 转换完毕");
filecount++;
}
}
}
StatusBar1->SimpleText="处理完毕。共转换了"+IntToStr(MSCFileList->Count)+"个文件,"+IntToStr(filecount)+"个文件成功。";
//-----------------------删除临时文件-------------------------------
if(FindFirst(Dir+"//*.*",faAnyFile,SearchRec)==0)
{
if(DeleteFile(Dir+"//"+SearchRec.Name))
ShowMessage(10);
FindClose(SearchRec);
}
while(FindNext(SearchRec)==0)
{
DeleteFile(Dir+"//"+SearchRec.Name);
FindClose(SearchRec);
}
RemoveDir(Dir);
}
else
{
Application->MessageBox("目的路径有问题,请重新选择!","MSC DataTrace",MB_ICONWARNING);
}
//-----------------------------------------------------------------
delete MSCFile;
{
filecount=GetFile(Dir,MSCFileList);
filecount=0;
for(i=0;i<MSCFileList->Count;i++)
{
if(FileExists(MSCFileList->Strings))
{
Label2->Caption=MSCFileList->Strings;
Label4->Caption=MSCFileList->Strings;
StatusBar1->SimpleText="正在处理:"+MSCFileList->Strings+"...";
MSCFile->Clear();
MSCFile->LoadFromFile(MSCFileList->Strings);
state=TraceMSCData(MSCFile,OutPath,MSCFileList->Strings);
if(state==5)
{
WorkListBox->Items->Add("文件 "+ExtractFileName(MSCFileList->Strings)+" 转换完毕");
filecount++;
}
}
}
StatusBar1->SimpleText="处理完毕。共转换了"+IntToStr(MSCFileList->Count)+"个文件,"+IntToStr(filecount)+"个文件成功。";
//-----------------------删除临时文件-------------------------------
if(FindFirst(Dir+"//*.*",faAnyFile,SearchRec)==0)
{
if(DeleteFile(Dir+"//"+SearchRec.Name))
ShowMessage(10);
FindClose(SearchRec);
}
while(FindNext(SearchRec)==0)
{
DeleteFile(Dir+"//"+SearchRec.Name);
FindClose(SearchRec);
}
RemoveDir(Dir);
}
else
{
Application->MessageBox("目的路径有问题,请重新选择!","MSC DataTrace",MB_ICONWARNING);
}
//-----------------------------------------------------------------
delete MSCFile;