标签:turn his fun 创建文件 als dal result func component
1.选择产品界面
frmSelectLaserFile->strLaserFileName = strSystemLaserFileName; //frmSelectLaserFile->jczCard = jczCard; frmSelectLaserFile->ShowModal(); // if(frmSelectLaserFile->ModalResult == mrOk) { // strSystemLaserFileName = frmSelectLaserFile->strLaserFileName; panLaserFileName->Caption = strSystemLaserFileName; jczCard.InitEntName(this,strSystemLaserFileName,false,false); // // 保存系统参数 SaveSystemConfig(); }
需要载入SelectLaserFile.cpp动态库,并定义全局变量UnicodeString strSystemLaserFileName;
该函数调用结束后,可直接将panEntName控件动态生成。
2.
void __fastcall TfrmMain::SaveMarkData() { // UnicodeString strDate,strDataFilePath,strMarkData,strMarkContent; strDate = Now().FormatString("YYYYMMDD"); strDataFilePath = ExtractFilePath(Application->ExeName); strDataFilePath += panLaserFileName->Caption.Trim() + "\\"; // if(!func.CreateFolder(strDataFilePath)) { func.SysStatus(this,"创建文件夹 " + strDataFilePath + " 失败!"); return; } // strDataFilePath += strDate + ".csv"; // strMarkData = Now().FormatString("YYYY-MM-DD hh:mm:ss.zzz") + ","; for(int n = 0; n < 50; n++) { if(!panEntName->FindComponent("edtMarkContent_" + UnicodeString(n))) break; // strMarkContent = ((TRzEdit*)panEntName->FindComponent("edtMarkContent_" + UnicodeString(n)))->Text.Trim(); // func.SysStatus(this,"写入数据 " + UnicodeString(n) + ":" + strMarkContent); opc.WriteOPCString("BOLN.OPC.data" + UnicodeString(n),strMarkContent); strMarkData += strMarkContent + ","; } // strMarkData += "\n"; // func.SysStatus(this,"写入数据 " + strMarkData + " 至文件 " + strDataFilePath); func.WriteFileData(strDataFilePath,strMarkData); }
该函数目的为将每个模板的数据存贮起来。
标签:turn his fun 创建文件 als dal result func component
原文地址:https://www.cnblogs.com/situzzz/p/14890764.html