HJSZ.PRG
上传用户:abc1382430
上传日期:2013-01-31
资源大小:1233k
文件大小:4k
- ********************************
- * 文件名: Hjsz.prg *
- * 功能: 环境设置 *
- * 设计: 黄朝生 *
- ********************************
- use cs
- dele all
- pack
- appe from uccom.ini sdf
- loca all for 'Port=' $cs
- x1=subs(cs,6,4)
- loca all for 'Baud=' $cs
- x2=subs(cs,6,5)
- do case
- case alltrim(x1)='COM1'
- M_Port='Port=COM1'
- M_IRQ='IRQ=4'
- M_zdh=4
- M_PortAdd='PortAddress=1016'
- case alltrim(x1)='COM2'
- M_Port='Port=COM2'
- M_IRQ='IRQ=3'
- M_zdh=3
- M_PortAdd='PortAddress=760'
- case alltrim(x1)='COM3'
- M_Port='Port=COM3'
- M_IRQ='IRQ=4'
- M_zdh=4
- M_PortAdd='PortAddress=1000'
- endcase
- do case
- case alltrim(x2)='9600'
- M_Baud='Baud=9600'
- case alltrim(x2)='14400'
- M_Baud='Baud=14400'
- case alltrim(x2)='19600'
- M_Baud='Baud=19600'
- case alltrim(x2)='28800'
- M_Baud='Baud=28800'
- endcase
- defi wind jqwin1 from 6,10 to 14,50 shad colo 6+/3,4+/2
- acti wind jqwin1
- @ 0,12 say '设定MODEM参数:'
- @ 2,8 say 'COM='+x1
- @ 2,25 say '速率='+x2
- do whil .t.
- xz=3
- set colo to n+/w,1*/4
- @ 3,8 prom '改变COM口'
- @ 3,26 prom '改变速率'
- @ 5,15 prom '确 定'
- menu to xz
- do case
- case xz=1
- defi wind jqwin11 from 8,28 to 12,35 shad
- acti wind jqwin11
- xz1=2
- @ 0,1 prom 'COM1'
- @ 1,1 prom 'COM2'
- @ 2,1 prom 'COM3'
- menu to xz1
- do case
- case xz1=1
- M_Port='Port=COM1'
- M_IRQ='IRQ=4'
- M_zdh=4
- M_PortAdd='PortAddress=1016'
- deac wind jqwin11
- @ 2,8 say 'COM=COM1' colo 6+/3
- case xz1=2
- M_Port='Port=COM2'
- M_IRQ='IRQ=3'
- M_zdh=3
- M_PortAdd='PortAddress=760'
- deac wind jqwin11
- @ 2,8 say 'COM=COM2' colo 6+/3
- case xz1=3
- M_Port='Port=COM3'
- M_IRQ='IRQ=4'
- M_zdh=4
- M_PortAdd='PortAddress=1000'
- deac wind jqwin11
- @ 2,8 say 'COM=COM3' colo 6+/3
- endcase
- deac wind jqwin11
-
- case xz=2
- defi wind jqwin11 from 8,48 to 13,56 shad
- acti wind jqwin11
- xz2=4
- @ 0,1 prom '9600 '
- @ 1,1 prom '14400'
- @ 2,1 prom '19600'
- @ 3,1 prom '28800'
- menu to xz2
- do case
- case xz2=1
- M_Baud='Baud=9600'
- deac wind jqwin11
- @ 2,25 say '速率=9600 ' colo 6+/3
- case xz2=2
- M_Baud='Baud=14400'
- deac wind jqwin11
- @ 2,25 say '速率=14400' colo 6+/3
- case xz2=3
- M_Baud='Baud=19600'
- deac wind jqwin11
- @ 2,25 say '速率=19600' colo 6+/3
- case xz2=4
- M_Baud='Baud=28800'
- deac wind jqwin11
- @ 2,25 say '速率=28800' colo 6+/3
- endcase
- deac wind jqwin11
- case xz=3 .or. xz=0
- exit
- endcase
- enddo
- defi wind jqwin11 from 8,25 to 12,55 shad
- acti wind jqwin11
- @ 1,4 say '请修改中断号:' get M_zdh
- read
- M_IRQ='IRQ='+alltrim(str(M_zdh))
- deac wind jqwin11
- deac wind jqwin1
- use cs
- *dele all
- *pack
- *appe from uccom.ini sdf
- loca all for 'Port=' $cs
- repl cs with M_Port
- loca all for 'Baud=' $cs
- repl cs with M_Baud
- loca all for 'IRQ=' $cs
- repl cs with M_IRQ
- loca all for 'PortAddress=' $cs
- repl cs with M_PortAdd
- ***************************
- eras uccom.ini
- use cs
- set print on
- set devi to print
- set printer to 'uccom.ini'
- go top
- i=0
- do whil !eof()
- @ i,0 say alltrim(cs)
- i=i+1
- skip
- enddo
- set print off
- set devi to screen
- defi wind jqwin11 from 8,30 to 13,64 shad colo 6+/w
- acti wind jqwin11
- @ 1,4 say '退出系统后,重新进入JQFAX,'
- @ 2,2 say '使设置的参数有效!'
- @ 3,12 prom '确 定'
- menu to xz
- deac wind jqwin11
- quit
- retu