home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a070 / 3.ddi / FOXPRO / TEMPLGEN / PROLABE.INC < prev    next >
Encoding:
Text File  |  1989-11-03  |  1.8 KB  |  69 lines

  1. <<* Prolabe.inc *>>
  2.  
  3. <<procedure GenLabelBody>>
  4. <<begin>>
  5. <<genln>>
  6.  
  7. * --- This routine is called when the Labels option is chosen from the Utilities menu
  8.  
  9. PROCEDURE {fileprefix}_labe
  10. PRIVATE savrecnum,okcancel,done
  11. savrecnum = RECNO()
  12. SAVE SCREEN TO mscreen
  13. choice = 3 
  14. okcancel = 0  
  15. done = .F. 
  16. mreport = .F. 
  17.  
  18. * --- Create and activate a menu containing the label options
  19.  
  20. DO WHILE .T.
  21.     ACTIVATE WINDOW menter
  22.     @ 0,14 TO 8,27
  23.     @ 1,5 SAY 'Label: '
  24.     @ 1,15 PROMPT '  Create   '
  25.     @ 3,15 PROMPT '  Modify   '
  26.     @ 5,15 PROMPT '  Print    '
  27.     @ 7,15 PROMPT '  Exit     '
  28.     MENU TO choice
  29.     DEACTIVATE WINDOW menter
  30.     DO CASE 
  31.  
  32.         * --- Exit this procedure  
  33.         CASE choice = 4    .or. choice = 0
  34.             EXIT
  35.  
  36.         * --- Create new label definition file
  37.         CASE choice = 1
  38. << filespec( fmain,fpath,fname,fext )  >>
  39.             filename = PUTFILE('Label File to Create:',{'}{fname}{'}+'.LBX','LBX')
  40.             IF LEN(TRIM(filename)) <> 0
  41.                 CREATE LABEL &filename
  42.                 DEACTIVATE WINDOW ALL
  43.             ENDIF
  44.  
  45.         * --- Modify an existing label definition file
  46.         CASE choice = 2    
  47.             filename = GETFILE('LBX','Label File to Modify:')
  48.             IF LEN(TRIM(filename)) <> 0
  49.                 MODIFY LABEL &filename
  50.                 DEACTIVATE WINDOW ALL
  51.             ENDIF
  52.  
  53.         * --- Print an existing label definition file
  54.         CASE choice = 3
  55.             filename = GETFILE('LBX','Label File to Print:')
  56.             IF LEN(TRIM(filename)) <> 0
  57.                 DO {fileprefix}_rprnt 
  58.             ENDIF
  59.     ENDCASE
  60. ENDDO
  61. IF savrecnum > 0 .AND. savrecnum <= RECCOUNT()
  62.     GOTO savrecnum
  63. ELSE
  64.     GO TOP
  65. ENDIF
  66. RETURN
  67. <<end>> <<*prolabe.inc*>>
  68.  
  69.