$PBExportHeader$w_waitforconnect.srw forward global type w_waitforconnect from window end type type cb_cancel from commandbutton within w_waitforconnect end type type st_msg from statictext within w_waitforconnect end type type st_t from statictext within w_waitforconnect end type type p_1 from picture within w_waitforconnect end type end forward global type w_waitforconnect from window integer width = 1815 integer height = 356 windowtype windowtype = response! long backcolor = 67108864 string icon = "AppIcon!" boolean center = true cb_cancel cb_cancel st_msg st_msg st_t st_t p_1 p_1 end type global w_waitforconnect w_waitforconnect type variables string ins_ori_msg long ins_waitsec=15 //默认等待时间 decimal ins_cursec=0.1 long if_consuc=0//是否连接成功 end variables on w_waitforconnect.create this.cb_cancel=create cb_cancel this.st_msg=create st_msg this.st_t=create st_t this.p_1=create p_1 this.Control[]={this.cb_cancel,& this.st_msg,& this.st_t,& this.p_1} end on on w_waitforconnect.destroy destroy(this.cb_cancel) destroy(this.st_msg) destroy(this.st_t) destroy(this.p_1) end on event open;ins_ori_msg=st_msg.text 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_msg IF sys_wsc.getstate() = 7 THEN if_consuc = 1 Close(THIS) ELSEIF ins_cursec >= ins_waitsec THEN if_consuc = 0 Close(THIS) END IF end event event close;closewithreturn(this,if_consuc) end event type cb_cancel from commandbutton within w_waitforconnect integer x = 1509 integer y = 200 integer width = 251 integer height = 92 integer taborder = 10 integer textsize = -9 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string text = "取消" end type event clicked;close(parent) end event type st_msg from statictext within w_waitforconnect integer x = 137 integer y = 188 integer width = 1321 integer height = 108 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 = 67108864 string text = "连接中..." boolean focusrectangle = false end type type st_t from statictext within w_waitforconnect integer x = 32 integer y = 192 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 = 67108864 string text = ">" boolean focusrectangle = false end type type p_1 from picture within w_waitforconnect integer width = 1829 integer height = 160 boolean originalsize = true string picturename = "graphics\jdt_banner.jpg" boolean focusrectangle = false end type