⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 prog_ini.prg

📁 别处找来的红虎日记源代码
💻 PRG
字号:
**********************************
***  检测程序所需文件的完整性  ***
**********************************

isShutdown=.f.
cNotFileList=""
nNotFile=0
nFiles=4 && 所需文件个数
dime mFileList(nFiles,2)
mFileList(1,1)='Diary.dbf'
mFileList(1,2)="日记的数据库"
mFileList(2,1)='Diary.fpt'
mFileList(2,2)="日记的数据库备注"
mFileList(3,1)='Alarm.dbf'
mFileList(3,2)='提醒数据库'
mFileList(4,1)='Alarm.fpt'
mFileList(4,2)='提醒数据库备注'


FOR P=1 TO nFiles
   if !file('&mFileList(p,1)')
      nNotFile=nNotFile+1
      cNotFileList=cNotFileList+allt(str(nNotFile))+"、"+"&mFileList(p,2)"+"文件:"+"&mFileList(p,1)"+chr(13)
      isShutdown=.t.
   endif
ENDFOR

if isShutdown=.t.
     n=messagebox("请检查下列文件:"+chr(13)+chr(13)+;
cNotFileList+chr(13)+"由于缺少以上文件,程序运行可能会出错!"+chr(13)+;
"或者您可以忽略并初始化!",2+16,"停止")
    if n=4  && 重试
       do prog_ini
    endif
    if n=3  && 终止
     isNoticeAlarm=.F.
       do shutdown
    endif
else
*!*	    for p=1 to nFiles
*!*	      if '.dbf'$ "&mFileList(p,1)"  .and. isShutdown=.f.
*!*	          do unlockdb with mFileList(p,1)
*!*	          use "&mFileList(p,1)"
*!*	          pack
*!*	          use
*!*	          do lockdb with mFileList(p,1)
*!*	      endif
*!*	    endfor
endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -