home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a075 / 1.img / TOOLKIT1.EXE / SST177.PRG < prev    next >
Encoding:
Text File  |  1989-10-03  |  24.5 KB  |  770 lines

  1. ********************
  2.  
  3. FUNCTION Scrinit
  4.  
  5.    CLEAR SCREEN
  6.    IF TYPE("scrdata") = "U"
  7.       IF FILE("Screen.sys")
  8.          RESTORE FROM Screen.sys ADDITIVE
  9.       ELSE
  10.          RETURN(.F.)
  11.       ENDIF
  12.    ENDIF
  13.    EXTERNAL Dside
  14.    PUBLIC wedopt, option0
  15.    STORE 1 TO option0, wedopt
  16.    @  0, 0 SAY scrleft_1 + " / " + scrleft_2
  17.    @  0,68 SAY "Screen Setup"
  18.    SET SCOREBOARD OFF
  19.  
  20.    Windowpush(1,0,3,79)
  21.  
  22.    real_abort = .F.
  23.    SET WRAP ON
  24.    moveframe = CHR(203) + CHR(205) + CHR(203) + CHR(186) + CHR(188) + CHR(205) + CHR(200) + CHR(186)
  25.    KEYBOARD CHR(24)
  26.    DO WHILE .T.
  27.       Bringsetup()
  28.       SET KEY 24 TO Dside
  29.       wedopt = MAKEMENU(" Disk     / System   / Border   / Colors   / Reports   / Keep  ", 2, 3, wedopt, 4, .F.)
  30.       option5 = 0     && This is for saving the system
  31.       IF EMPTY(wedopt)
  32.          KEYBOARD "K"
  33.          LOOP
  34.       ENDIF
  35.       IF wedopt = 1
  36.          Down1()
  37.  
  38.       ELSEIF wedopt = 2
  39.          Down2()
  40.  
  41.       ELSEIF wedopt = 3
  42.          Down3()
  43.  
  44.       ELSEIF wedopt = 4
  45.          Down4()
  46.  
  47.       ELSEIF wedopt = 5
  48.          Down5()
  49.  
  50.       ELSEIF wedopt = 6
  51.          Down6()
  52.          IF real_abort
  53.             EXIT
  54.          ENDIF
  55.       ENDIF
  56.    ENDDO
  57.    Windowpop()
  58.    RETURN( !real_abort )
  59.  
  60. ********************
  61.  
  62. PROCEDURE Down1
  63.  
  64.    option1 = 1
  65.    Windowpush(3, 3,17, 52)
  66.    DO WHILE .T.   
  67.       Totalkeyon()
  68.       Typeset()
  69.       DECLARE amen[13]
  70.       amen[1] = "1> " + IF(scrsys, "Hard", "Floppy") + " Disk"
  71.       amen[2] = "2> Program Drive Set to " + scrprog
  72.       amen[3] = "3> Data Drive Set to " + scrdata 
  73.       amen[4] = "4> Set Data Search Path"
  74.       amen[5] = "5> Help " + IF(scrhelp, "IS", "IS NOT") + " available"
  75.       amen[6] = "6> " + LTRIM(TRIM(TRANSFORM(scrnet1, "999"))) + " seconds per try"
  76.       amen[7] = "7> " + LTRIM(TRIM(TRANSFORM(scrnet2, "99"))) + " tries before abort"
  77.       amen[8] = "8> " + IF(scrprot, "Protect", "UNProtect") + " Databases "
  78.       amen[9] = "Screen Level is " + LTRIM(STR(scr_level))
  79.       amen[10]= "Window Coordinates are " + LTRIM(STR(scrwrow)) +"-"+ LTRIM(STR(scrwcol)) +"-"+ LTRIM(STR(scrwdown)) +"-"+ LTRIM(STR(scrwover))
  80.       amen[11]= "Buffers " + LTRIM(STR(scrbuffers))
  81.       amen[12]= "Files " + LTRIM(STR(scrfiles))
  82.       amen[13]= Fill_out("Root name of help file is " + SUBSTR(scrhname, 1, 19), 46)
  83.       option1 = MAKEMENU(amen, Wrow(1), Wcol(1), option1, 3)
  84.       Totalkeyoff()
  85.  
  86.       IF option1 = 0   && I keep this separate so that I can have only 1 Pushscreen
  87.          EXIT          && call rather than many calls in each CASE statement
  88.       ENDIF
  89.  
  90.       Windowpush(17,00,20,79)
  91.       DO CASE
  92.       CASE option1 = 1
  93.          scrsys = !scrsys
  94.          IF !scrsys .AND. scrprog = scrdata
  95.             KEYBOARD "2"
  96.          ENDIF
  97.       CASE option1 = 2
  98.          @ 18,10 SAY "Enter Program Drive: " GET scrprog PICT "!" 
  99.          READ
  100.          IF !scrsys
  101.             IF scrprog = scrdata
  102.                Clear_area()
  103.                @ 18,10 SAY "Data Drive and Program Drive NOT EQUAL for Floppy System"
  104.                @ 19,10 SAY "Enter Data Drive: " GET scrdata PICT "!" VALID scrprog <> scrdata 
  105.                READ
  106.             ENDIF
  107.          ENDIF
  108.       CASE option1 = 3
  109.          @ 18,10 SAY "Enter Data Drive: " GET scrdata PICT "!" 
  110.          READ
  111.          IF !scrsys
  112.             IF scrprog = scrdata
  113.                Clear_area()
  114.                @ 18,10 SAY "Program Drive and Data Drive NOT EQUAL for Floppy System"
  115.                @ 19,10 SAY "Enter Program Drive: " GET scrprog PICT "!" VALID scrdata <> scrprog 
  116.             ENDIF
  117.          ENDIF
  118.       CASE option1 = 4
  119.          IF LEN(scrpath) < 40
  120.             scrpath = FILL_OUT(scrpath, 40)
  121.          ENDIF
  122.          new_sc_lev = scr_level
  123.  
  124.          Clear_area()
  125.  
  126.          EXTERNAL Showtree
  127.  
  128.          SET KEY 63 TO Showtree
  129.          @ 18, 5 SAY "Set Data Search Path / ? To Build Directory Tree ..."
  130.          @ 19,10 GET scrpath PICT "@K@!"
  131.          READ
  132.          scr_level = new_sc_lev
  133.          SET KEY 63 TO
  134.          scrpath = TRIM(scrpath)
  135.       CASE option1 = 5
  136.          scrhelp = !scrhelp
  137.       CASE option1 = 6
  138.          @ 18,10 SAY "Enter the number of seconds to wait before each network "
  139.          @ 19,10 SAY "       attempt is made => " GET scrnet1 PICT "###" VALID(scrnet1 >=0 .AND. scrnet1 <=300)
  140.          READ
  141.       CASE option1 = 7
  142.          @ 18,10 SAY "Enter the number of tries for a failed networking attempt"
  143.          @ 19,10 SAY "    before file access and operation is aborted => " GET scrnet2 PICT "##" VALID(scrnet2 >= 0 .AND. scrnet2 <=50)
  144.          READ
  145.       CASE option1 = 8
  146.          scrprot = !scrprot
  147.       CASE option1 = 11
  148.          @ 18,10 SAY "Enter the BUFFER size for the Config.SYS FIle => " GET scrbuffers PICT "##" VALID(scrbuffers >= 8 .AND. scrbuffers <= 99)
  149.          READ
  150.       CASE option1 = 12
  151.          @ 18,10 SAY "Enter the number of FILES for the Config.SYS FIle => " GET scrfiles PICT "##" VALID(scrfiles >= 7 .AND. scrfiles <= 250)
  152.          READ
  153.       CASE option1 = 13
  154.          scrhname = Fill_out(scrhname, 50)
  155.          @ 18,10 SAY "Enter name of HELP file => " GET scrhname PICT "@!@S30"
  156.          READ
  157.          scrhname = TRIM(scrhname)
  158.          IF SUBSTR(scrhname, 1, 1) = "\"
  159.             scrhname = SUBSTR(scrhname, 2)
  160.          ENDIF
  161.          IF "."$scrhname
  162.             scrhname = SUBSTR(scrhname, 1, AT(".", scrhname))
  163.          ENDIF
  164.  
  165.       OTHERWISE
  166.          @ 18,10 SAY "That operation is NOT available.  Any key to continue."
  167.          INKEY(0)
  168.       ENDCASE
  169.  
  170.       Windowpop()
  171.  
  172.    ENDDO
  173.    Windowpop()
  174.  
  175. ********************
  176.  
  177. PROCEDURE Down2
  178.  
  179.    option1 = 1
  180.    Windowpush( 3, 7, 20, 43)
  181.    DO WHILE .T.
  182.       Totalkeyon()
  183.       Typeset()
  184.       @  4, 8 PROMPT FILL_OUT("1> Confirm is " + IF(scrconfirm, "ON ", "OFF"), 35)
  185.       @  5, 8 PROMPT FILL_OUT("2> Delimiters are " + IF(scrdelim, "ON", "OFF"), 35)
  186.       @  6, 8 PROMPT FILL_OUT("3> Delimiters SET to " + scrdelimto, 35)
  187.       @  7, 8 PROMPT FILL_OUT("4> Bell " + IF(scrbell, "WILL", "WILL NOT") + " ring", 35)
  188.       @  8, 8 PROMPT FILL_OUT("5> Password " + IF(scrshow, "WILL", "WILL NOT") + " echo to screen", 35)
  189.       @  9, 8 PROMPT FILL_OUT("6> Change Password", 35)
  190.       @ 10, 8 PROMPT FILL_OUT("7> " + LTRIM(TRIM(STR(scrtimes))) + " tries at the Password", 35)
  191.       @ 11, 8 PROMPT FILL_OUT("8> " + IF(scrtype, "Engage   ", "Disengage") + " Type-Ahead Feature", 35)
  192.       @ 12, 8 PROMPT FILL_OUT("9> Floppy Disk Capacity is " + LTRIM(TRIM(TRANSFORM(scrdisk/1024, "999999 K"))), 35)
  193.       @ 13, 8 PROMPT FILL_OUT("0> Pausing Factor set to " + LTRIM(TRIM(STR(scrpause))), 35)
  194.       IF EMPTY(scrmess)
  195.          @ 14, 8 PROMPT Fill_out("A> Message Line set  OFF", 35)
  196.       ELSE
  197.          w_is_numb = LTRIM(TRANSFORM(scrmess, "99"))
  198.          @ 14, 8 PROMPT FILL_OUT("A> Message Line set " + w_is_numb, 35)
  199.       ENDIF
  200.       @ 15, 8 PROMPT FILL_OUT("B> Message is " + IF(scrcenter, "centered", "flush left"), 35)
  201.       @ 16, 8 PROMPT FILL_OUT("C> Set Date Type", 35)
  202.       @ 17, 8 PROMPT FILL_OUT("D> Margin is set at " + LTRIM(TRIM(STR(scrmarg))), 35)
  203.       @ 18, 8 PROMPT FILL_OUT("E> Error ROW=" + TRANSFORM(scr_err_row, "99") + " and COL=" + TRANSFORM(scr_err_col, "99"), 35)
  204.       @ 19, 8 PROMPT FILL_OUT("F> System Name/Title", 35)
  205.  
  206.       MENU TO option1
  207.  
  208.       Totalkeyoff()
  209.  
  210.       IF option1 = 0   && I keep this separate so that I can have only 1 Pushscreen
  211.          EXIT          && call rather than many calls in each CASE statement
  212.       ENDIF
  213.  
  214.       Windowpush( 19,00,23,79 )
  215.  
  216.       DO CASE
  217.       CASE option1 = 1
  218.          scrconfirm = !scrconfirm
  219.       CASE option1 = 2
  220.          scrdelim = !scrdelim
  221.       CASE option1 = 3
  222.          STORE " " TO choice
  223.          @ 20,10 SAY "Set Left Delimiter:   " GET choice PICT "X"
  224.          READ
  225.          STORE choice TO scrdelimto
  226.          STORE " " TO choice
  227.          @ 20,10 SAY "Set Right Delimiter:  " GET choice PICT "X"
  228.          READ
  229.          STORE scrdelimto + choice TO scrdelimto
  230.       CASE option1 = 4
  231.          scrbell = !scrbell
  232.       CASE option1 = 5
  233.          scrshow = !scrshow
  234.       CASE option1 = 6
  235.          IF !Chkpass(12,14)
  236.             Badpass( 12, 14, "You must have original Password to", "in order to gain access." )
  237.          ELSE
  238.             STORE SPACE(15) TO password
  239.             @ 20,10 SAY "What Password do you want to use? " GET password PICT "XXXXXXXXXXXXXXX"
  240.             READ
  241.             IF UPDATED()
  242.                scrpass = Genpass(password)
  243.             ENDIF
  244.          ENDIF
  245.       CASE option1 = 7
  246.          @ 20,10 SAY "How may tries for a correct Password? " GET scrtimes PICT "##" range 0,99
  247.          READ
  248.       CASE option1 = 8
  249.          scrtype = !scrtype
  250.       CASE option1 = 9
  251.          @ 20,10 SAY "Enter Floppy Disk Capacity => " GET scrdisk PICT "#########" VALID(scrdisk >= 300000 .AND. scrdisk <= 99999999)
  252.          READ
  253.       CASE option1 = 10
  254.          @ 20,10 SAY "Enter Pausing Factor => " GET scrpause PICT "####" VALID(scrpause>=0 .AND. scrpause<=9999)
  255.          READ
  256.          @ 20,10 SAY "This is a Pausing Test.  Any Key to continue..."
  257.          INKEY(0)
  258.  
  259.          @ 20,10 SAY "                                               "
  260.          @ 20,10 SAY "Working...."
  261.  
  262.          FOR x = 1 TO scrpause
  263.          NEXT
  264.  
  265.          @ ROW(),COL() SAY "...Finished"
  266.          @ 21,10 SAY "Now press any key again to Return to System Sub-Menu"
  267.          INKEY(0)
  268.       CASE option1 = 11
  269.          @ 20,10 SAY "Enter Line Number => " GET scrmess PICT "##" RANGE 0,24
  270.          READ
  271.       CASE option1 = 12
  272.          scrcenter = !scrcenter
  273.       CASE option1 = 13
  274.          Windowpush( 17,12,24,26)
  275.          scrdtype = Makemenu("American /Ansi/British/Italian/French/German", 18,13, scrdtype, 1, .T.)
  276.          Windowpop()
  277.  
  278.       CASE option1 = 14
  279.          @ 20,10 SAY "Enter Column for Margin = " GET scrmarg PICT "##" RANGE 0,70
  280.          READ
  281.       CASE option1 = 15
  282.          @ 20,10 SAY "Enter ROW Number for Error Messages = " GET scr_err_row PICT "##" RANGE 0,24
  283.          @ 21,10 SAY "   COLUMN Number for Error Messages = " GET scr_err_col PICT "##" RANGE 0,79
  284.          READ
  285.       CASE option1 = 16
  286.          @ 20,10 SAY "Enter First Title Line = " GET scrleft_1 PICT "@X@S20"
  287.          @ 21,10 SAY "     Second Title Line = " GET scrleft_2 PICT "@X@S20"
  288.          READ
  289.       ENDCASE
  290.  
  291.       Windowpop()
  292.  
  293.    ENDDO
  294.    Windowpop()
  295.  
  296. ********************
  297.  
  298. PROCEDURE Down3
  299.  
  300.    in_choice = 4
  301.    Windowpush( 3,20,10,55)
  302.    string4 = CHR(201) + CHR(205) + CHR(187) + CHR(186) + CHR(188) + CHR(205) + CHR(200) + CHR(186) + CHR(32)
  303.    string5 = REPLICATE(CHR(176), 8 ) + CHR(32)
  304.    string6 = CHR(218) + CHR(196) + CHR(191) + CHR(179) + CHR(217) + CHR(196) + CHR(192) + CHR(179) + CHR(32)
  305.    stringa = CHR(222) + CHR(223) + CHR(221) + CHR(221) + CHR(221) + CHR(220) + CHR(222) + CHR(222) + CHR(32)
  306.    stringb = REPLICATE(CHR(249), 8) + CHR(32)
  307.    stringc = REPLICATE(CHR(15), 8) + CHR(32)
  308.    stringd = CHR(4) + CHR(31) + CHR(4) + CHR(17) + CHR(4) + CHR(30) + CHR(4) + CHR(16) + CHR(32)
  309.    stringe = REPLICATE(CHR(177), 8) + CHR(32)
  310.    stringf = REPLICATE(CHR(219), 8) + CHR(32)
  311.    DO WHILE .T.
  312.       Totalkeyon()
  313.       Typeset()
  314.       in_choice = Makemenu("1>   *********/2>   =========/3>   ---------/4>   &string4./5>   &string5./6>   &string6./A>   &stringa./B>   &stringb./C>   &stringc./D>   &stringd./E>   &stringe./F>   &stringf.", 4,21,in_choice,4,.T., 1, 9)
  315.       Totalkeyoff()
  316.       DO CASE
  317.       CASE in_choice = 1
  318.          scrframe = "******** "
  319.          scrbar   = REPLICATE("*",80)
  320.          scrlin   = "*"
  321.       CASE in_choice = 2
  322.          scrframe = "======== "
  323.          scrbar   = REPLICATE("=",80)
  324.          scrlin   = "="
  325.       CASE in_choice = 3
  326.          scrframe = "+-+|+-+| "
  327.          scrbar   = "+" + REPLICATE("-",78) + "+"
  328.          scrlin   = "|"
  329.       CASE in_choice = 4
  330.          scrframe = string4
  331.          scrbar   = CHR(204) + REPLICATE(CHR(205),78) + CHR(185)
  332.          scrlin   = CHR(186)
  333.       CASE in_choice = 5
  334.          scrframe = string5
  335.          scrbar   = REPLICATE(CHR(176), 80)
  336.          scrlin   = CHR(176)
  337.       CASE in_choice = 6
  338.          scrframe = string6
  339.          scrbar   = CHR(195) + REPLICATE(CHR(196),78) + CHR(180)
  340.          scrlin   = CHR(179)
  341.       CASE in_choice = 7
  342.          scrframe = stringa
  343.          scrbar   = CHR(222) + REPLICATE(CHR(220),78) + CHR(221)
  344.          scrlin   = CHR(222)
  345.       CASE in_choice = 8
  346.          scrframe = stringb
  347.          scrbar   = REPLICATE(CHR(249),80)
  348.          scrlin   = CHR(249)
  349.       CASE in_choice = 9
  350.          scrframe = stringc
  351.          scrbar   = REPLICATE(CHR(15),80)
  352.          scrlin   = CHR(15)
  353.       CASE in_choice = 10
  354.          scrframe = stringd
  355.          scrbar   = REPLICATE(CHR(4), 80)
  356.          scrlin   = CHR(4)
  357.       CASE in_choice = 11
  358.          scrframe = stringe
  359.          scrbar   = REPLICATE(CHR(177), 80)
  360.          scrlin   = CHR(177)
  361.       CASE in_choice = 12
  362.          scrframe = stringf
  363.          scrbar   = REPLICATE(CHR(219), 80)
  364.          scrlin   = CHR(219)
  365.       OTHERWISE
  366.          EXIT
  367.       ENDCASE
  368.       Drawframe()
  369.    ENDDO
  370.    Windowpop()
  371.  
  372. ********************
  373.  
  374. PROCEDURE Down4
  375.  
  376.    option1 = 1
  377.    Windowpush( 3, 30,11,75)
  378.    DO WHILE .T.
  379.       Typeset()
  380.       Totalkeyon()
  381.       @  4, 31 PROMPT FILL_OUT("1> Screen " + IF(scrbright, "Bright", "Normal"), 44)
  382.       @  5, 31 PROMPT FILL_OUT("2> Field Color is " + IF(scrinten, "ON", "OFF"), 44)
  383.       @  6, 31 PROMPT FILL_OUT("3> Change The Colors " + scrcolor, 44)
  384.       @  7, 31 PROMPT FILL_OUT("4> Build Graphics =>" + scrrtop + scrltop + ;
  385.           scrrbot + scrlbot + scrinter + scrhoriz + scrlin + scrrbar + scrlbar, 44)
  386.       @  8, 31 PROMPT FILL_OUT("5> " + IF(scrmono, "Monocrome Monitor", "Color Monitor"), 44)
  387.       @  9, 31 PROMPT FILL_OUT("6> Manual Color Change ", 44)
  388.       @ 10, 31 PROMPT FILL_OUT("7> Set Default Colors ", 44)
  389.       MENU TO option1
  390.       Totalkeyoff()
  391.       DO CASE
  392.       CASE option1 = 1
  393.          scrcolor = IF(scrbright, STRTRAN(scrcolor, "+", ""), SUBSTR(scrcolor,1,1) + "+" + SUBSTR(scrcolor,2,4) + "+" + SUBSTR(scrcolor,6) )
  394.          scrbright = !scrbright
  395.  
  396.       CASE option1 = 2
  397.          scrinten = !scrinten 
  398.  
  399.       CASE option1 = 3
  400.          IF !scrmono
  401.             Change_col()
  402.          ENDIF
  403.  
  404.       CASE option1 = 4
  405.          Buildgraph()
  406.  
  407.       CASE option1 = 5
  408.          scrmono = !scrmono
  409.  
  410.       CASE option1 = 6
  411.          scrcolor = Fill_out(scrcolor, 30)
  412.          Windowpush(11,30,13,76)
  413.          @ 12,31 SAY "Enter Color =" GET scrcolor PICT "@S15"
  414.          READ
  415.          scrcolor = TRIM(scrcolor)
  416.          Windowpop()
  417.  
  418.       CASE option1 = 7
  419.          scrcolor = IF( ISCOLOR() .AND. !scrmono, "7/1,0/7,N,N,0/7", "7/0,0/7,N,N,0/7" )
  420.       OTHERWISE
  421.          EXIT
  422.       ENDCASE
  423.    ENDDO
  424.    Windowpop()
  425.  
  426. ********************
  427.  
  428. PROCEDURE Down5
  429.  
  430.    option1 = 1
  431.    Windowpush( 3,42,18,74)
  432.    DO WHILE .T.
  433.       Totalkeyon()
  434.       Typeset()
  435.       @  4,43 PROMPT FILL_OUT("1> " + IF(scrpage, "Print", "Do Not Print") + " page numbers", 31)
  436.       @  5,43 PROMPT FILL_OUT("2> " + IF(scrprnt, "Parallel", "Serial") + " printer", 31)
  437.       @  6,43 PROMPT FILL_OUT("3> " + IF(scrdelete, "Show", "Don't show") + " deleted records", 31)
  438.       @  7,43 PROMPT FILL_OUT("4> Choose Date - " + TRANSFORM(scrdate, "9"), 31)
  439.       @  8,43 PROMPT FILL_OUT("5> Insert Condense Printer Code",31)
  440.       @  9,43 PROMPT FILL_OUT("6> Insert Normal Printer Code",31)
  441.       @ 10,43 PROMPT FILL_OUT("7> " + IF(screject, "Extra Page Eject", "No Page Eject"), 31)
  442.       @ 11,43 PROMPT FILL_OUT("8> Top Margin - Page 1 ", 31)
  443.       @ 12,43 PROMPT FILL_OUT("9> Top Margin - Rest   ", 31)
  444.       @ 13,43 PROMPT FILL_OUT("A> Left Margin - Page 1", 31)
  445.       @ 14,43 PROMPT FILL_OUT("B> Left Margin - Rest  ", 31)
  446.       @ 15,43 PROMPT FILL_OUT("C> Template Format     ", 31)
  447.       @ 16,43 PROMPT FILL_OUT("D> Amount Format       ", 31)
  448.       @ 17,43 PROMPT FILL_OUT("E> Template Decimal    ", 31)
  449.       MENU TO option1
  450.       Totalkeyoff()
  451.       DO CASE
  452.       CASE option1 = 1
  453.          scrpage = !scrpage
  454.       CASE option1 = 2
  455.          scrprnt = !scrprnt
  456.       CASE option1 = 3
  457.          scrdelete = !scrdelete
  458.       CASE option1 = 4
  459.          Chang_date()
  460.  
  461.       CASE option1 = 5
  462.          Windowpush( 18,00,22,79 )
  463.          scrpntcd = Fill_out(scrpntcd, 69)
  464.          @ 19,3 SAY Fill_out(Centr("Enter Condense Printer Code", 72), 71)
  465.  
  466.          @ 21,7 GET scrpntcd PICT "@X@S68"
  467.          READ
  468.          scrpntcd = TRIM(scrpntcd)
  469.          Windowpop()
  470.  
  471.       CASE option1 = 6
  472.          Windowpush( 18,00,22,79 )
  473.          scrpntnor = Fill_out(scrpntnor, 69)
  474.          @ 19,3 SAY Fill_out(Centr("Enter Normal Printer Code", 72), 71)
  475.  
  476.          @ 21,7 GET scrpntnor PICT "@X@S68"
  477.          READ
  478.          scrpntnor = TRIM(scrpntnor)
  479.          Windowpop()
  480.  
  481.       CASE option1 = 7
  482.          screject = !screject
  483.       CASE option1 = 8
  484.          Windowpush( 11,0,14,40 )
  485.          @ 12, 5 SAY "Enter Top Margin For"
  486.          @ 13, 5 SAY "   Page 1 of Reports => " GET scrtm1 PICT "##" RANGE 0,25
  487.          READ
  488.          Windowpop()
  489.       CASE option1 = 9
  490.          Windowpush( 11,0,14,40 )
  491.          @ 12, 5 SAY "Enter Top Margin For ALL"
  492.          @ 13, 5 SAY "    other Report Pages => " GET scrtm2 PICT "##" RANGE 0,25
  493.          READ
  494.          Windowpop()
  495.       CASE option1 = 10
  496.          Windowpush( 11,0,14,40 )
  497.          @ 12, 5 SAY "Enter Left Margin For "
  498.          @ 13, 5 SAY "    Page 1 of Reports => " GET scrlm1 PICT "##" RANGE 0,40
  499.          READ
  500.          Windowpop()
  501.  
  502.       CASE option1 = 11
  503.          Windowpush( 11,0,14,40 )
  504.          @ 12, 5 SAY "Enter Left Margin For All"
  505.          @ 13, 5 SAY "     other Report Pages => " GET scrlm2 PICT "##" RANGE 0,40
  506.          READ
  507.          Windowpop()
  508.  
  509.       CASE option1 = 12
  510.          Maketemp()
  511.  
  512.       CASE option1 = 13
  513.          Makeform()
  514.  
  515.       CASE option1 = 14
  516.          Makedeci()
  517.  
  518.       OTHERWISE
  519.         EXIT
  520.  
  521.       ENDCASE
  522.    ENDDO
  523.    Windowpop()
  524.  
  525. ********************
  526.  
  527. PROCEDURE Down6
  528.  
  529.    option5 = 1
  530.    Windowpush( 3,59,7,78)
  531.    DO WHILE .T.
  532.       Totalkeyon()
  533.       Typeset()
  534.       option5 = Makemenu("Save Values/Reset System/Abort & Exit", 4, 60,option5,1,.T.)
  535.       Totalkeyoff()
  536.       DO CASE
  537.       CASE option5 = 1
  538.          @ 12,Center("Now Saving parameters to " + scrprog + "Screen.sys", 40) SAY "Now Saving parameters to " + scrprog + "Screen.sys"
  539.          SAVE ALL LIKE scr* TO Screen.sys
  540.          @ 12,13 SAY "Finished with Terminal/System Installation Procedures"
  541.          INKEY(1)
  542.          real_abort = .T.
  543.          EXIT
  544.       CASE option5 = 2
  545.          oldlevel = scr_level
  546.          RESTORE FROM Screen.sys ADDITIVE
  547.          Bringsetup()
  548.          scr_level = oldlevel
  549.       CASE option5 = 3
  550.          real_abort = .T.
  551.          EXIT
  552.       OTHERWISE
  553.          EXIT
  554.       ENDCASE
  555.    ENDDO
  556.    Windowpop()
  557.  
  558. ********************
  559.  
  560. PROCEDURE Chang_date
  561.  
  562.    Typeset()
  563.    Windowpush( 8,18,17,62)
  564.    option4 = 1
  565.    today = DATE()
  566.    FOR qaz = 1 TO 8
  567.       @ qaz + 8,19 PROMPT Fill_out(TRANSFORM(qaz, "9") + "> " + Printdate(today, qaz), 43)
  568.    NEXT
  569.    MENU TO option4 
  570.    IF option4 > 0
  571.       scrdate = option4
  572.    ENDIF
  573.    Windowpop()
  574.  
  575. ********************
  576.  
  577. PROCEDURE Drawframe
  578.  
  579.    Typeset()
  580.    Windowpush( 12, 5, 20, 40 )
  581.    @ 12, 5, 20, 40 BOX scrframe
  582.    @ 16, 5  SAY SUBSTR(scrbar,1,1) + SUBSTR(scrbar,2,34) + SUBSTR(scrbar,80,1)
  583.    @ 21, 25 SAY "Is this the correct border? "
  584.    IF Prompt()
  585.       KEYBOARD CHR(27)
  586.    ENDIF
  587.    Rid( 21, 25,  "Is this the correct border?    ")
  588.    Windowpop()
  589.  
  590. ********************
  591.  
  592. PROCEDURE Change_col
  593.  
  594.    @ 7,0 SAY ""
  595.  
  596.    Totalkeyoff()
  597.    testcolor = Altercolor(17)
  598.    IF scrcolor != testcolor
  599.       Windowpush( 3, 2, 6, 35)
  600.       @ 4, 3 SAY "The Color Parameters Have Been"
  601.       @ 5, 3 SAY "Changed.  Save them? (Y/N) "
  602.       IF Prompt()
  603.          scrcolor = testcolor
  604.       ENDIF
  605.       Windowpop()
  606.    ENDIF
  607.    Totalkeyon()
  608.  
  609. ********************
  610.  
  611. FUNCTION Down_prmpt
  612.  
  613.    PARAMETER the_row, the_one
  614.  
  615.    RETURN(Makemenu("Black/Blue/Green/Cyan/Red/Magenta/Yellow/White",10,the_row,the_one,1,.T.,1,17,10))
  616.  
  617. ********************
  618.  
  619. PROCEDURE Maketemp
  620.  
  621.    lefttemp = Parsing(@scrtemplate, ".")
  622.    rghttemp = scrtemplate
  623.  
  624.    the_len = LEN(STRTRAN(lefttemp, ",", ""))
  625.  
  626.    DO CASE
  627.    CASE the_len = 9
  628.       down_opt = 1
  629.    CASE the_len = 8
  630.       down_opt = 2
  631.    CASE the_len = 7
  632.       down_opt = 3
  633.    CASE the_len = 6
  634.       down_opt = 4
  635.    CASE the_len = 5
  636.       down_opt = 5
  637.    CASE the_len = 4
  638.       down_opt = 6
  639.    CASE the_len = 3
  640.       down_opt = 7
  641.    OTHERWISE
  642.       down_opt = 8
  643.    ENDCASE
  644.    Windowpush( 5,5,20,29)
  645.    @ 18,6 SAY "Currently Set to..."
  646.    @ 19,6 SAY SUBSTR(lefttemp + "." + rghttemp, 1, 22)
  647.    @  6,6 SAY "Pick the Display Format"
  648.    down_opt = Makemenu("$ 999,999,999      /$ 99,999,999/$ 9,999,999/$ 999,999/$ 99,999/$ 9,999/$ 999/$ 99", 8,6,down_opt,1)
  649.    DO CASE
  650.    CASE down_opt = 1
  651.       scrtemplat = "999,999,999" + "." + rghttemp
  652.    CASE down_opt = 2
  653.       scrtemplat = "99,999,999" + "." + rghttemp
  654.    CASE down_opt = 3 .OR. down_opt = 0
  655.       scrtemplat = "9,999,999" + "." + rghttemp
  656.    CASE down_opt = 4
  657.       scrtemplat = "999,999" + "." + rghttemp
  658.    CASE down_opt = 5
  659.       scrtemplat = "99,999" + "." + rghttemp
  660.    CASE down_opt = 6
  661.       scrtemplat = "9,999" + "." + rghttemp
  662.    CASE down_opt = 7
  663.       scrtemplat = "999" + "." + rghttemp
  664.    OTHERWISE
  665.       scrtemplat = "99" + "." + rghttemp
  666.    ENDCASE
  667.    Windowpop()
  668.    Rid(6,6,"Pick the Display Format")
  669.  
  670. *******************
  671.  
  672. PROCEDURE Makedeci
  673.  
  674.    lefttemp = Parsing(@scrtemplate, ".")
  675.    rghttemp = scrtemplate
  676.    nowdec = LEN(rghttemp)
  677.    Windowpush( 18,0,21,40 )
  678.    @ 19, 5 SAY "Set the number of decimal places"
  679.    @ 20, 5 SAY "for the template => " GET nowdec VALID nowdec >= 0 .AND. nowdec <= 20 - (LEN(lefttemp) + 1 + nowdec)
  680.    READ
  681.    scrtemplate = lefttemp + "." + REPLICATE("9", nowdec)
  682.    Windowpop()
  683.  
  684. ********************
  685.  
  686. PROCEDURE Makeform
  687.  
  688.    DO CASE
  689.    CASE scrform = "@9  "
  690.       down_opt = 1
  691.    CASE scrform = "@E  "
  692.       down_opt = 2
  693.    CASE scrform = "@9 $"
  694.       down_opt = 3
  695.    CASE scrform = "@E £"
  696.       down_opt = 4
  697.    CASE scrform = "@E ¥"
  698.       down_opt = 5
  699.    CASE scrform = "@E ₧"
  700.       down_opt = 6
  701.    CASE scrform = "@E ƒ"
  702.       down_opt = 7
  703.    OTHERWISE
  704.       down_opt = 8
  705.    ENDCASE
  706.    Windowpush( 5,5,16,28)
  707.    @  6,6 SAY "Pick the Amount Format"
  708.    down_opt = MAKEMENU("Standard American /Standard European/Display with $/Display with £/Display with ¥/Display with ₧/Display with ƒ/No Display Format", 8,6,down_opt,1,.T.)
  709.    DO CASE
  710.    CASE down_opt = 1 .OR. down_opt = 0 .OR. down_opt = 8
  711.       scrform = "@9  "
  712.    OTHERWISE
  713.       scrform = SUBSTR("@E  @9 $@9 £@E ¥@E ₧@E ƒ", ((down_opt-1)*4)-3, 4)
  714.    ENDCASE
  715.    Windowpop()
  716.    Rid(6,6,"Pick the Amount Format")
  717.  
  718. ********************
  719.  
  720. PROCEDURE Buildgraph
  721.  
  722.    Totalkeyoff()
  723.    Windowpush( 8,20,20,65)
  724.    _changed = .F.
  725.    _option  = 1
  726.    _astring = "scrrtop scrltop scrrbot scrlbot scrinterscrhorizscrlin  scrrbar scrlbar "
  727.    DO WHILE .T.
  728.       @ 9,21 SAY "Using cursor keys, pick the character..."
  729.       @ 11,22 PROMPT " 1. Right Top    "  && scrrtop
  730.       @ 12,22 PROMPT " 2. Left Top     "  && scrltop
  731.       @ 13,22 PROMPT " 3. Right Bottom "  && scrrbot
  732.       @ 14,22 PROMPT " 4. Left Bottom  "  && scrlbot
  733.       @ 15,22 PROMPT " 5. Intersection "  && scrinter
  734.       @ 11,47 PROMPT " 6. Horizontal   "  && scrhoriz
  735.       @ 12,47 PROMPT " 7. Vertical     "  && scrlin
  736.       @ 13,47 PROMPT " 8. Right Con.   "  && scrrbar
  737.       @ 14,47 PROMPT " 9. Left Connec. "  && scrlbar
  738.       MENU TO _option
  739.       IF _option = 0
  740.          EXIT
  741.       ELSE
  742.          tempstr = SUBSTR(_astring, (_option * 8) - 7, 8)
  743.          thechar = &tempstr.
  744.          SET CURSOR OFF
  745.          Rid(9,21, "Using cursor keys, pick the character...")
  746.          @ 17,21 SAY "ENTER or ESC to Exit..."
  747.          @ 18,21 SAY "Now use cursor keys to change character "
  748.          DO WHILE .T.
  749.             @ 18,61 SAY thechar
  750.             INKEY(0)
  751.             IF LASTKEY() = 27 .OR. LASTKEY() = 13
  752.                EXIT
  753.             ELSEIF LASTKEY() = 24
  754.                thechar = CHR( IF( ASC(thechar) = 1, 255, ASC(thechar)-1) )
  755.             ELSEIF LASTKEY() = 5
  756.                thechar = CHR( IF( ASC(thechar) = 255, 1, ASC(thechar)+1) )
  757.             ENDIF
  758.          ENDDO
  759.          &tempstr. = thechar
  760.          SET CURSOR ON
  761.          Rid(17,21,"ENTER or ESC to Exit...")
  762.          Rid(18,21, "Now use cursor keys to change character    ")
  763.       ENDIF
  764.    ENDDO
  765.    Totalkeyon()
  766.    Windowpop()
  767.  
  768. * End of File
  769.  
  770.