w_waitforconnect.srw 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. $PBExportHeader$w_waitforconnect.srw
  2. forward
  3. global type w_waitforconnect from window
  4. end type
  5. type cb_cancel from commandbutton within w_waitforconnect
  6. end type
  7. type st_msg from statictext within w_waitforconnect
  8. end type
  9. type st_t from statictext within w_waitforconnect
  10. end type
  11. type p_1 from picture within w_waitforconnect
  12. end type
  13. end forward
  14. global type w_waitforconnect from window
  15. integer width = 1815
  16. integer height = 356
  17. windowtype windowtype = response!
  18. long backcolor = 67108864
  19. string icon = "AppIcon!"
  20. boolean center = true
  21. cb_cancel cb_cancel
  22. st_msg st_msg
  23. st_t st_t
  24. p_1 p_1
  25. end type
  26. global w_waitforconnect w_waitforconnect
  27. type variables
  28. string ins_ori_msg
  29. long ins_waitsec=15 //默认等待时间
  30. decimal ins_cursec=0.1
  31. long if_consuc=0//是否连接成功
  32. end variables
  33. on w_waitforconnect.create
  34. this.cb_cancel=create cb_cancel
  35. this.st_msg=create st_msg
  36. this.st_t=create st_t
  37. this.p_1=create p_1
  38. this.Control[]={this.cb_cancel,&
  39. this.st_msg,&
  40. this.st_t,&
  41. this.p_1}
  42. end on
  43. on w_waitforconnect.destroy
  44. destroy(this.cb_cancel)
  45. destroy(this.st_msg)
  46. destroy(this.st_t)
  47. destroy(this.p_1)
  48. end on
  49. event open;ins_ori_msg=st_msg.text
  50. timer(0.1)
  51. end event
  52. event timer;if st_t.text='>' then
  53. st_t.text=' <'
  54. else
  55. st_t.text='>'
  56. end if
  57. ins_cursec=ins_cursec+0.1
  58. st_msg.text=string(ins_cursec)+' '+ins_ori_msg
  59. IF sys_wsc.getstate() = 7 THEN
  60. if_consuc = 1
  61. Close(THIS)
  62. ELSEIF ins_cursec >= ins_waitsec THEN
  63. if_consuc = 0
  64. Close(THIS)
  65. END IF
  66. end event
  67. event close;closewithreturn(this,if_consuc)
  68. end event
  69. type cb_cancel from commandbutton within w_waitforconnect
  70. integer x = 1509
  71. integer y = 200
  72. integer width = 251
  73. integer height = 92
  74. integer taborder = 10
  75. integer textsize = -9
  76. fontcharset fontcharset = gb2312charset!
  77. fontpitch fontpitch = variable!
  78. string facename = "宋体"
  79. string text = "取消"
  80. end type
  81. event clicked;close(parent)
  82. end event
  83. type st_msg from statictext within w_waitforconnect
  84. integer x = 137
  85. integer y = 188
  86. integer width = 1321
  87. integer height = 108
  88. integer textsize = -9
  89. integer weight = 400
  90. fontcharset fontcharset = ansi!
  91. fontpitch fontpitch = variable!
  92. fontfamily fontfamily = swiss!
  93. string facename = "Arial"
  94. string pointer = "HourGlass!"
  95. long textcolor = 33554432
  96. long backcolor = 67108864
  97. string text = "连接中..."
  98. boolean focusrectangle = false
  99. end type
  100. type st_t from statictext within w_waitforconnect
  101. integer x = 32
  102. integer y = 192
  103. integer width = 96
  104. integer height = 96
  105. integer textsize = -13
  106. integer weight = 700
  107. fontcharset fontcharset = ansi!
  108. fontpitch fontpitch = variable!
  109. fontfamily fontfamily = swiss!
  110. string facename = "Arial"
  111. string pointer = "HourGlass!"
  112. long textcolor = 33554432
  113. long backcolor = 67108864
  114. string text = ">"
  115. boolean focusrectangle = false
  116. end type
  117. type p_1 from picture within w_waitforconnect
  118. integer width = 1829
  119. integer height = 160
  120. boolean originalsize = true
  121. string picturename = "graphics\jdt_banner.jpg"
  122. boolean focusrectangle = false
  123. end type