w_sys_wait_jdt.srw 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. $PBExportHeader$w_sys_wait_jdt.srw
  2. $PBExportComments$单进度条
  3. forward
  4. global type w_sys_wait_jdt from w_publ_base
  5. end type
  6. type r_back from rectangle within w_sys_wait_jdt
  7. end type
  8. type st_msg from statictext within w_sys_wait_jdt
  9. end type
  10. type p_1 from picture within w_sys_wait_jdt
  11. end type
  12. type st_3 from statictext within w_sys_wait_jdt
  13. end type
  14. type r_obj from rectangle within w_sys_wait_jdt
  15. end type
  16. end forward
  17. global type w_sys_wait_jdt from w_publ_base
  18. integer x = 626
  19. integer y = 488
  20. integer width = 1568
  21. integer height = 304
  22. boolean titlebar = false
  23. boolean controlmenu = false
  24. boolean minbox = false
  25. long backcolor = 16776960
  26. r_back r_back
  27. st_msg st_msg
  28. p_1 p_1
  29. st_3 st_3
  30. r_obj r_obj
  31. end type
  32. global w_sys_wait_jdt w_sys_wait_jdt
  33. type variables
  34. int ls_x
  35. double obj_tol=0,obj_inc=0
  36. string old_msg
  37. end variables
  38. forward prototypes
  39. public function integer wf_inc (double inc)
  40. public function integer wf_accepttol (double tol)
  41. public function integer wf_set_msg (string arg_msg)
  42. end prototypes
  43. public function integer wf_inc (double inc);//wf_inc
  44. obj_inc=inc
  45. double bf=0
  46. if obj_tol=0 then
  47. r_obj.width=0
  48. return 0
  49. end if
  50. bf=(obj_inc/obj_tol)
  51. st_3.text=string(bf,'0.0%')
  52. if bf>1 then bf=1
  53. r_obj.width=r_back.width*bf
  54. if mod( long(right(string(bf),1)) ,2 )=0 then
  55. p_1.Invert=true
  56. else
  57. p_1.Invert=false
  58. end if
  59. //messagebox(string(inc)+' '+string(obj_inc),string(r_obj.width)+' '+string(r_back.width))
  60. return 0
  61. end function
  62. public function integer wf_accepttol (double tol);//wf_accepttol
  63. obj_tol=tol
  64. r_obj.width=0
  65. wf_set_msg(old_msg)
  66. return 0
  67. end function
  68. public function integer wf_set_msg (string arg_msg);//wf_set_msg()
  69. st_msg.Text = arg_msg
  70. RETURN 0
  71. end function
  72. on w_sys_wait_jdt.create
  73. int iCurrent
  74. call super::create
  75. this.r_back=create r_back
  76. this.st_msg=create st_msg
  77. this.p_1=create p_1
  78. this.st_3=create st_3
  79. this.r_obj=create r_obj
  80. iCurrent=UpperBound(this.Control)
  81. this.Control[iCurrent+1]=this.r_back
  82. this.Control[iCurrent+2]=this.st_msg
  83. this.Control[iCurrent+3]=this.p_1
  84. this.Control[iCurrent+4]=this.st_3
  85. this.Control[iCurrent+5]=this.r_obj
  86. end on
  87. on w_sys_wait_jdt.destroy
  88. call super::destroy
  89. destroy(this.r_back)
  90. destroy(this.st_msg)
  91. destroy(this.p_1)
  92. destroy(this.st_3)
  93. destroy(this.r_obj)
  94. end on
  95. event open;call super::open;ls_x=p_1.x
  96. wf_accepttol(0)
  97. wf_inc(0)
  98. old_msg=st_msg.text
  99. end event
  100. event timer;//if p_1.x=ls_x then
  101. // p_1.x=ls_x+20
  102. //else
  103. // p_1.x=ls_x
  104. //end if
  105. end event
  106. event hide;//wf_accepttol(0)
  107. //wf_inc(0)
  108. end event
  109. event activate;//timer(0.1)
  110. end event
  111. event show;//wf_accepttol(0)
  112. //wf_inc(0)
  113. end event
  114. event other;////open(w_sys_wait_jdt) //打开进度窗口
  115. ////w_sys_wait_jdt.WF_ACCEPTTOL(dw_contract.ROWCOUNT()) //初始化进度条
  116. ////w_sys_wait_jdt.wf_set_msg('新提示内容,请稍候...')
  117. ////FOR LS_LONG =1 TO dw_contract.ROWCOUNT()
  118. //// ///处理
  119. //// w_sys_wait_jdt.WF_INC(LS_LONG) //进度
  120. ////NEXT
  121. ////messagebox('操作完成','新建合约收费明细 '+STRING(OBJ_RC)+' 个,请核对!')
  122. ////close(w_sys_wait_jdt)
  123. end event
  124. type cb_func from w_publ_base`cb_func within w_sys_wait_jdt
  125. boolean visible = false
  126. boolean enabled = false
  127. end type
  128. type cb_exit from w_publ_base`cb_exit within w_sys_wait_jdt
  129. boolean visible = false
  130. boolean enabled = false
  131. end type
  132. type r_back from rectangle within w_sys_wait_jdt
  133. long linecolor = 65535
  134. integer linethickness = 4
  135. long fillcolor = 16777215
  136. integer x = 87
  137. integer y = 204
  138. integer width = 1381
  139. integer height = 36
  140. end type
  141. type st_msg from statictext within w_sys_wait_jdt
  142. integer x = 206
  143. integer y = 40
  144. integer width = 1285
  145. integer height = 108
  146. boolean bringtotop = true
  147. integer textsize = -9
  148. integer weight = 400
  149. fontcharset fontcharset = gb2312charset!
  150. fontpitch fontpitch = variable!
  151. string facename = "宋体"
  152. long backcolor = 16776960
  153. boolean enabled = false
  154. string text = "系统正在进行数据处理,请稍候..."
  155. boolean focusrectangle = false
  156. end type
  157. type p_1 from picture within w_sys_wait_jdt
  158. integer x = 23
  159. integer y = 16
  160. integer width = 183
  161. integer height = 120
  162. boolean bringtotop = true
  163. boolean originalsize = true
  164. string picturename = "graphics\report_sp.bmp"
  165. boolean focusrectangle = false
  166. end type
  167. type st_3 from statictext within w_sys_wait_jdt
  168. integer x = 631
  169. integer y = 148
  170. integer width = 288
  171. integer height = 52
  172. boolean bringtotop = true
  173. integer textsize = -9
  174. integer weight = 400
  175. fontcharset fontcharset = gb2312charset!
  176. fontpitch fontpitch = variable!
  177. string facename = "宋体"
  178. long backcolor = 16776960
  179. boolean enabled = false
  180. string text = "%"
  181. alignment alignment = center!
  182. boolean focusrectangle = false
  183. end type
  184. type r_obj from rectangle within w_sys_wait_jdt
  185. long linecolor = 16711680
  186. integer linethickness = 4
  187. long fillcolor = 255
  188. integer x = 87
  189. integer y = 204
  190. integer width = 389
  191. integer height = 36
  192. end type