123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177 |
- $PBExportHeader$w_waitforwsrslt.srw
- forward
- global type w_waitforwsrslt from window
- end type
- type p_1 from picture within w_waitforwsrslt
- end type
- type st_t from statictext within w_waitforwsrslt
- end type
- type cb_cancel from commandbutton within w_waitforwsrslt
- end type
- type st_msg from statictext within w_waitforwsrslt
- end type
- end forward
- global type w_waitforwsrslt from window
- integer x = 201
- integer y = 200
- integer width = 1815
- integer height = 356
- windowtype windowtype = response!
- long backcolor = 134217732
- string icon = "AppIcon!"
- string pointer = "HourGlass!"
- boolean center = true
- p_1 p_1
- st_t st_t
- cb_cancel cb_cancel
- st_msg st_msg
- end type
- global w_waitforwsrslt w_waitforwsrslt
- type variables
- long ins_waitsec=15 //默认等待时间
- decimal ins_cursec=0.1
- string ins_ori_title='与后台通讯中...'
- string ins_ori_msg//原提示消息
- string ins_bytes_msg//收到数据量消息
- long ins_bytes=0//已经接收到的数据包大小
- end variables
- forward prototypes
- public subroutine add_bytes (long arg_bytes)
- end prototypes
- public subroutine add_bytes (long arg_bytes);ins_bytes=ins_bytes+arg_bytes
- ins_bytes_msg=' 已接收到'+string(ins_bytes)+'字节'
- //st_msg.text=ins_ori_msg+ins_bytes_msg
- st_msg.text=string(ins_cursec)+' '+ins_ori_title+'~r~n'+ins_bytes_msg+' '+string(round(dec(ins_bytes/1024),1))+'k'
- end subroutine
- on w_waitforwsrslt.create
- this.p_1=create p_1
- this.st_t=create st_t
- this.cb_cancel=create cb_cancel
- this.st_msg=create st_msg
- this.Control[]={this.p_1,&
- this.st_t,&
- this.cb_cancel,&
- this.st_msg}
- end on
- on w_waitforwsrslt.destroy
- destroy(this.p_1)
- destroy(this.st_t)
- destroy(this.cb_cancel)
- destroy(this.st_msg)
- end on
- event open;s_waitforwsrslt_para s_para
- s_para=message.powerobjectparm
- if s_para.waitsecond>0 then
- ins_waitsec=s_para.waitsecond
- ins_cursec=0
- ins_ori_title=s_para.title
- ins_ori_msg=st_msg.text
- ins_bytes_msg=' 已接收到'+string(ins_bytes)+'字节'
- if s_para.if_allow_cancel=false then
- this.cb_cancel.enabled=false
- end if
- end if
- st_msg.text=string(ins_cursec)+' '+ins_ori_title+'~r~n'+ins_bytes_msg+' '+string(round(dec(ins_bytes/1024),1))+'k'
- timer(0.1)
- end event
- event timer;
- if st_t.text='>' then
- st_t.text=' <'
- else
- st_t.text='>'
- end if
- ins_cursec=ins_cursec+0.1
- st_msg.text=string(ins_cursec)+' '+ins_ori_title+'~r~n'+ins_bytes_msg+' '+string(round(dec(ins_bytes/1024),1))+'k'
- //IF ins_cursec >= ins_waitsec THEN
- // Close(THIS)
- //END IF
- IF sys_buf_new THEN
- // if_consuc = 1
- Close(THIS)
- ELSEIF ins_cursec >= ins_waitsec THEN
- // if_consuc = 0
- Close(THIS)
- END IF
- end event
- type p_1 from picture within w_waitforwsrslt
- integer width = 1829
- integer height = 160
- string picturename = "graphics\jdt_banner.jpg"
- boolean focusrectangle = false
- end type
- type st_t from statictext within w_waitforwsrslt
- integer x = 32
- integer y = 184
- integer width = 96
- integer height = 96
- integer textsize = -13
- integer weight = 700
- fontcharset fontcharset = ansi!
- fontpitch fontpitch = variable!
- fontfamily fontfamily = swiss!
- string facename = "Arial"
- string pointer = "HourGlass!"
- long textcolor = 33554432
- long backcolor = 134217732
- string text = ">"
- boolean focusrectangle = false
- end type
- type cb_cancel from commandbutton within w_waitforwsrslt
- integer x = 1527
- integer y = 196
- integer width = 251
- integer height = 92
- integer textsize = -9
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "取消"
- end type
- event clicked;if sys_wsc.getstate()=7 then
- // sys_wsc.send_cancel()
- // sys_wsc.triggerevent('ue_send')
- sys_wsc.object.senddata("[cancel]")
- end if
- close(parent)
- end event
- type st_msg from statictext within w_waitforwsrslt
- integer x = 137
- integer y = 192
- integer width = 1367
- integer height = 132
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = ansi!
- fontpitch fontpitch = variable!
- fontfamily fontfamily = swiss!
- string facename = "Arial"
- string pointer = "HourGlass!"
- long textcolor = 33554432
- long backcolor = 134217732
- string text = "与后台通讯中..."
- boolean focusrectangle = false
- end type
|