Criei este fonte pra incluir samples no tutorial
Código: Selecionar todos
PROCEDURE Main
LOCAL aList, aFile, cTxt, cPath := "d:\github\hwgui\samples\"
SetMode(33,100)
CLS
cTxt := MemoRead( "tutor_eng.xml" )
cTxt := Substr( cTxt, 1, At( "</init>", cTxt ) - 1 )
aList := Directory( cPath + "*.prg" )
cTxt += '<chapter name="samples folder" >'
FOR EACH aFile IN aList
? aFile[ 1 ]
cTxt += '<module name="' + Lower( aFile[ 1 ] ) + '">'
cTxt += '<![CDATA[' + MemoRead( cPath + aFile[ 1 ] )
cTxt += ']]>'
cTxt += '</module>'
NEXT
cTxt += '</chapter>'
cTxt += '</init>'
hb_MemoWrit( "tutor_eng.xml", cTxt )
Inkey(0)
RETURN
