w_cmpl_qty_ch_son.srw 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. $PBExportHeader$w_cmpl_qty_ch_son.srw
  2. forward
  3. global type w_cmpl_qty_ch_son from w_publ_base
  4. end type
  5. type cb_1 from uo_imflatbutton within w_cmpl_qty_ch_son
  6. end type
  7. type st_3 from statictext within w_cmpl_qty_ch_son
  8. end type
  9. type em_1 from editmask within w_cmpl_qty_ch_son
  10. end type
  11. type rb_1 from radiobutton within w_cmpl_qty_ch_son
  12. end type
  13. type rb_2 from radiobutton within w_cmpl_qty_ch_son
  14. end type
  15. type em_2 from editmask within w_cmpl_qty_ch_son
  16. end type
  17. end forward
  18. global type w_cmpl_qty_ch_son from w_publ_base
  19. integer width = 1120
  20. integer height = 404
  21. string title = "公式辅助参数"
  22. boolean minbox = false
  23. windowtype windowtype = response!
  24. cb_1 cb_1
  25. st_3 st_3
  26. em_1 em_1
  27. rb_1 rb_1
  28. rb_2 rb_2
  29. em_2 em_2
  30. end type
  31. global w_cmpl_qty_ch_son w_cmpl_qty_ch_son
  32. type variables
  33. s_cmpl_qty s_cmpl
  34. string ls_num
  35. string ls_value
  36. string ls_flag
  37. end variables
  38. on w_cmpl_qty_ch_son.create
  39. int iCurrent
  40. call super::create
  41. this.cb_1=create cb_1
  42. this.st_3=create st_3
  43. this.em_1=create em_1
  44. this.rb_1=create rb_1
  45. this.rb_2=create rb_2
  46. this.em_2=create em_2
  47. iCurrent=UpperBound(this.Control)
  48. this.Control[iCurrent+1]=this.cb_1
  49. this.Control[iCurrent+2]=this.st_3
  50. this.Control[iCurrent+3]=this.em_1
  51. this.Control[iCurrent+4]=this.rb_1
  52. this.Control[iCurrent+5]=this.rb_2
  53. this.Control[iCurrent+6]=this.em_2
  54. end on
  55. on w_cmpl_qty_ch_son.destroy
  56. call super::destroy
  57. destroy(this.cb_1)
  58. destroy(this.st_3)
  59. destroy(this.em_1)
  60. destroy(this.rb_1)
  61. destroy(this.rb_2)
  62. destroy(this.em_2)
  63. end on
  64. event close;call super::close;closewithreturn(this,s_cmpl)
  65. end event
  66. event open;call super::open;ls_value = f_ProfileString (sys_empid,'w_cmpl_qty_ch', "value",'1')
  67. ls_num = f_ProfileString (sys_empid,'w_cmpl_qty_ch', "num",'5')
  68. ls_flag = f_ProfileString (sys_empid,'w_cmpl_qty_ch', "flag",'0')
  69. IF ls_num > '5' THEN
  70. ls_num = '5'
  71. END IF
  72. IF ls_flag = '1' THEN
  73. rb_1.Checked = TRUE
  74. rb_2.Checked = FALSE
  75. ELSE
  76. rb_1.Checked = FALSE
  77. rb_2.Checked = TRUE
  78. END IF
  79. em_1.Text = ls_num
  80. em_2.Text = ls_value
  81. s_cmpl.retu = 0
  82. end event
  83. type cb_func from w_publ_base`cb_func within w_cmpl_qty_ch_son
  84. boolean visible = false
  85. end type
  86. type cb_exit from w_publ_base`cb_exit within w_cmpl_qty_ch_son
  87. integer x = 613
  88. integer y = 188
  89. integer width = 343
  90. integer taborder = 50
  91. end type
  92. type cb_1 from uo_imflatbutton within w_cmpl_qty_ch_son
  93. integer x = 142
  94. integer y = 188
  95. integer width = 343
  96. integer height = 96
  97. integer taborder = 40
  98. boolean bringtotop = true
  99. string normalpicname = "ok.bmp"
  100. end type
  101. event clicked;call super::clicked;ls_num = em_1.Text
  102. ls_value = em_2.Text
  103. IF rb_1.Checked THEN
  104. ls_flag = '1'
  105. s_cmpl.flag = TRUE
  106. ELSE
  107. ls_flag = '0'
  108. s_cmpl.flag = FALSE
  109. END IF
  110. f_SetProfileString (sys_empid,"w_cmpl_qty_ch", "num", ls_num)
  111. f_SetProfileString (sys_empid,"w_cmpl_qty_ch", "value", ls_value)
  112. f_SetProfileString (sys_empid,'w_cmpl_qty_ch', "flag",ls_flag)
  113. s_cmpl.num = Long(ls_num)
  114. s_cmpl.addvalue = Dec(ls_value)
  115. s_cmpl.retu = 1
  116. Close(PARENT)
  117. end event
  118. type st_3 from statictext within w_cmpl_qty_ch_son
  119. integer x = 5
  120. integer y = 52
  121. integer width = 201
  122. integer height = 64
  123. boolean bringtotop = true
  124. integer textsize = -9
  125. integer weight = 400
  126. fontcharset fontcharset = gb2312charset!
  127. fontpitch fontpitch = variable!
  128. string facename = "宋体"
  129. long textcolor = 33554432
  130. long backcolor = 134217738
  131. string text = "小数位:"
  132. alignment alignment = right!
  133. boolean focusrectangle = false
  134. end type
  135. type em_1 from editmask within w_cmpl_qty_ch_son
  136. integer x = 224
  137. integer y = 36
  138. integer width = 165
  139. integer height = 84
  140. integer taborder = 60
  141. boolean bringtotop = true
  142. integer textsize = -9
  143. integer weight = 400
  144. fontcharset fontcharset = gb2312charset!
  145. fontpitch fontpitch = variable!
  146. string facename = "宋体"
  147. long textcolor = 33554432
  148. alignment alignment = right!
  149. borderstyle borderstyle = stylelowered!
  150. string mask = "###0"
  151. boolean spin = true
  152. double increment = 1
  153. string minmax = "0~~5"
  154. end type
  155. event modified;em_2.SetFocus()
  156. end event
  157. type rb_1 from radiobutton within w_cmpl_qty_ch_son
  158. integer x = 453
  159. integer y = 16
  160. integer width = 155
  161. integer height = 60
  162. boolean bringtotop = true
  163. integer textsize = -9
  164. integer weight = 400
  165. fontcharset fontcharset = gb2312charset!
  166. fontpitch fontpitch = variable!
  167. string facename = "宋体"
  168. long textcolor = 33554432
  169. long backcolor = 134217738
  170. string text = "*"
  171. boolean checked = true
  172. end type
  173. type rb_2 from radiobutton within w_cmpl_qty_ch_son
  174. integer x = 453
  175. integer y = 96
  176. integer width = 160
  177. integer height = 56
  178. boolean bringtotop = true
  179. integer textsize = -9
  180. integer weight = 400
  181. fontcharset fontcharset = gb2312charset!
  182. fontpitch fontpitch = variable!
  183. string facename = "宋体"
  184. long textcolor = 33554432
  185. long backcolor = 134217738
  186. string text = "/"
  187. end type
  188. type em_2 from editmask within w_cmpl_qty_ch_son
  189. integer x = 635
  190. integer y = 44
  191. integer width = 421
  192. integer height = 84
  193. integer taborder = 300
  194. boolean bringtotop = true
  195. integer textsize = -9
  196. integer weight = 400
  197. fontcharset fontcharset = gb2312charset!
  198. fontpitch fontpitch = variable!
  199. string facename = "宋体"
  200. long textcolor = 33554432
  201. alignment alignment = right!
  202. borderstyle borderstyle = stylelowered!
  203. string mask = "#########0.##########"
  204. end type
  205. event modified;cb_1.SetFocus()
  206. end event