w_changerate_ch.srw 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. $PBExportHeader$w_changerate_ch.srw
  2. forward
  3. global type w_changerate_ch from w_publ_base
  4. end type
  5. type cb_1 from uo_imflatbutton within w_changerate_ch
  6. end type
  7. type cb_2 from uo_imflatbutton within w_changerate_ch
  8. end type
  9. type sle_1 from singlelineedit within w_changerate_ch
  10. end type
  11. type st_1 from statictext within w_changerate_ch
  12. end type
  13. type st_2 from statictext within w_changerate_ch
  14. end type
  15. type rb_1 from radiobutton within w_changerate_ch
  16. end type
  17. type rb_2 from radiobutton within w_changerate_ch
  18. end type
  19. type rb_3 from radiobutton within w_changerate_ch
  20. end type
  21. type st_3 from statictext within w_changerate_ch
  22. end type
  23. type cbx_1 from checkbox within w_changerate_ch
  24. end type
  25. end forward
  26. global type w_changerate_ch from w_publ_base
  27. integer width = 1175
  28. integer height = 644
  29. string title = "设定转换比率"
  30. boolean minbox = false
  31. windowtype windowtype = response!
  32. cb_1 cb_1
  33. cb_2 cb_2
  34. sle_1 sle_1
  35. st_1 st_1
  36. st_2 st_2
  37. rb_1 rb_1
  38. rb_2 rb_2
  39. rb_3 rb_3
  40. st_3 st_3
  41. cbx_1 cbx_1
  42. end type
  43. global w_changerate_ch w_changerate_ch
  44. type variables
  45. string ls_rate
  46. long ll_cmp1,ll_cmp2
  47. s_changerate s_rate
  48. end variables
  49. on w_changerate_ch.create
  50. int iCurrent
  51. call super::create
  52. this.cb_1=create cb_1
  53. this.cb_2=create cb_2
  54. this.sle_1=create sle_1
  55. this.st_1=create st_1
  56. this.st_2=create st_2
  57. this.rb_1=create rb_1
  58. this.rb_2=create rb_2
  59. this.rb_3=create rb_3
  60. this.st_3=create st_3
  61. this.cbx_1=create cbx_1
  62. iCurrent=UpperBound(this.Control)
  63. this.Control[iCurrent+1]=this.cb_1
  64. this.Control[iCurrent+2]=this.cb_2
  65. this.Control[iCurrent+3]=this.sle_1
  66. this.Control[iCurrent+4]=this.st_1
  67. this.Control[iCurrent+5]=this.st_2
  68. this.Control[iCurrent+6]=this.rb_1
  69. this.Control[iCurrent+7]=this.rb_2
  70. this.Control[iCurrent+8]=this.rb_3
  71. this.Control[iCurrent+9]=this.st_3
  72. this.Control[iCurrent+10]=this.cbx_1
  73. end on
  74. on w_changerate_ch.destroy
  75. call super::destroy
  76. destroy(this.cb_1)
  77. destroy(this.cb_2)
  78. destroy(this.sle_1)
  79. destroy(this.st_1)
  80. destroy(this.st_2)
  81. destroy(this.rb_1)
  82. destroy(this.rb_2)
  83. destroy(this.rb_3)
  84. destroy(this.st_3)
  85. destroy(this.cbx_1)
  86. end on
  87. event close;call super::close;closewithreturn(this,s_rate)
  88. end event
  89. event open;call super::open;long ll_pzflag,ll_addqty
  90. //string ls_rate
  91. ls_rate = f_ProfileString (sys_empid,'w_changedrate_ch', "changedrate",'0')
  92. if ls_rate = '0' then
  93. ls_rate = '100'
  94. end if
  95. ll_addqty = long(f_ProfileString (sys_empid,'w_changedrate_ch', "addqty",'0'))
  96. if ll_addqty = 1 then
  97. cbx_1.checked = true
  98. end if
  99. ll_pzflag = long(f_ProfileString (sys_empid,'w_changedrate_ch', "pzflag",'0'))
  100. if ll_pzflag = 3 then
  101. rb_3.checked = true
  102. elseif ll_pzflag = 2 then
  103. rb_2.checked = true
  104. else
  105. rb_1.checked = true
  106. end if
  107. sle_1.text = ls_rate //string(ll_rate,'#,##0.#####')
  108. end event
  109. type cb_func from w_publ_base`cb_func within w_changerate_ch
  110. boolean visible = false
  111. end type
  112. type cb_exit from w_publ_base`cb_exit within w_changerate_ch
  113. integer x = 795
  114. integer y = 436
  115. integer width = 302
  116. integer height = 100
  117. end type
  118. type cb_1 from uo_imflatbutton within w_changerate_ch
  119. integer x = 55
  120. integer y = 436
  121. integer taborder = 20
  122. boolean bringtotop = true
  123. end type
  124. event clicked;call super::clicked;ls_rate = sle_1.text
  125. if rb_1.checked then
  126. ll_cmp1 = 1
  127. elseif rb_2.checked then
  128. ll_cmp1 = 2
  129. else
  130. ll_cmp1 = 3
  131. end if
  132. if cbx_1.checked then
  133. ll_cmp2 = 1
  134. else
  135. ll_cmp2 = 0
  136. end if
  137. s_rate.rate = ls_rate
  138. s_rate.cmp1 = ll_cmp1
  139. s_rate.cmp2 = ll_cmp2
  140. close(parent)
  141. end event
  142. type cb_2 from uo_imflatbutton within w_changerate_ch
  143. integer x = 430
  144. integer y = 436
  145. integer taborder = 20
  146. boolean bringtotop = true
  147. string text = "修改默认"
  148. end type
  149. event clicked;call super::clicked;f_SetProfileString (sys_empid,'w_changedrate_ch', "changedrate",sle_1.text)
  150. if cbx_1.checked then
  151. f_SetProfileString (sys_empid,'w_changedrate_ch', "addqty",'1')
  152. else
  153. f_SetProfileString (sys_empid,'w_changedrate_ch', "addqty",'0')
  154. end if
  155. if rb_1.checked then
  156. f_SetProfileString (sys_empid,'w_changedrate_ch', "pzflag",'1')
  157. elseif rb_2.checked then
  158. f_SetProfileString (sys_empid,'w_changedrate_ch', "pzflag",'2')
  159. else
  160. f_SetProfileString (sys_empid,'w_changedrate_ch', "pzflag",'3')
  161. end if
  162. messagebox('提示','修改成功', Information!, OK! )
  163. end event
  164. type sle_1 from singlelineedit within w_changerate_ch
  165. integer x = 402
  166. integer y = 36
  167. integer width = 402
  168. integer height = 84
  169. integer taborder = 30
  170. boolean bringtotop = true
  171. integer textsize = -9
  172. integer weight = 400
  173. fontcharset fontcharset = gb2312charset!
  174. fontpitch fontpitch = variable!
  175. string facename = "宋体"
  176. long textcolor = 33554432
  177. borderstyle borderstyle = stylelowered!
  178. end type
  179. type st_1 from statictext within w_changerate_ch
  180. integer x = 119
  181. integer y = 52
  182. integer width = 233
  183. integer height = 48
  184. boolean bringtotop = true
  185. integer textsize = -9
  186. integer weight = 400
  187. fontcharset fontcharset = gb2312charset!
  188. fontpitch fontpitch = variable!
  189. string facename = "宋体"
  190. long textcolor = 33554432
  191. long backcolor = 134217738
  192. string text = "默认比率"
  193. boolean focusrectangle = false
  194. end type
  195. type st_2 from statictext within w_changerate_ch
  196. integer x = 110
  197. integer y = 240
  198. integer width = 242
  199. integer height = 52
  200. boolean bringtotop = true
  201. integer textsize = -9
  202. integer weight = 400
  203. fontcharset fontcharset = gb2312charset!
  204. fontpitch fontpitch = variable!
  205. string facename = "宋体"
  206. long textcolor = 33554432
  207. long backcolor = 134217738
  208. string text = "计算公式"
  209. boolean focusrectangle = false
  210. end type
  211. type rb_1 from radiobutton within w_changerate_ch
  212. integer x = 389
  213. integer y = 160
  214. integer width = 270
  215. integer height = 60
  216. boolean bringtotop = true
  217. integer textsize = -9
  218. integer weight = 400
  219. fontcharset fontcharset = gb2312charset!
  220. fontpitch fontpitch = variable!
  221. string facename = "宋体"
  222. long textcolor = 33554432
  223. long backcolor = 134217738
  224. string text = "属性"
  225. end type
  226. type rb_2 from radiobutton within w_changerate_ch
  227. integer x = 389
  228. integer y = 240
  229. integer width = 270
  230. integer height = 56
  231. boolean bringtotop = true
  232. integer textsize = -9
  233. integer weight = 400
  234. fontcharset fontcharset = gb2312charset!
  235. fontpitch fontpitch = variable!
  236. string facename = "宋体"
  237. long textcolor = 33554432
  238. long backcolor = 134217738
  239. string text = "属性1"
  240. end type
  241. type rb_3 from radiobutton within w_changerate_ch
  242. integer x = 389
  243. integer y = 312
  244. integer width = 270
  245. integer height = 60
  246. boolean bringtotop = true
  247. integer textsize = -9
  248. integer weight = 400
  249. fontcharset fontcharset = gb2312charset!
  250. fontpitch fontpitch = variable!
  251. string facename = "宋体"
  252. long textcolor = 33554432
  253. long backcolor = 134217738
  254. string text = "属性2"
  255. end type
  256. type st_3 from statictext within w_changerate_ch
  257. integer x = 690
  258. integer y = 232
  259. integer width = 69
  260. integer height = 96
  261. boolean bringtotop = true
  262. integer textsize = -16
  263. integer weight = 700
  264. fontcharset fontcharset = gb2312charset!
  265. fontpitch fontpitch = variable!
  266. string facename = "宋体"
  267. long textcolor = 33554432
  268. long backcolor = 134217738
  269. string text = "+"
  270. alignment alignment = center!
  271. boolean focusrectangle = false
  272. end type
  273. type cbx_1 from checkbox within w_changerate_ch
  274. integer x = 823
  275. integer y = 244
  276. integer width = 219
  277. integer height = 64
  278. boolean bringtotop = true
  279. integer textsize = -9
  280. integer weight = 400
  281. fontcharset fontcharset = gb2312charset!
  282. fontpitch fontpitch = variable!
  283. string facename = "宋体"
  284. long textcolor = 33554432
  285. long backcolor = 134217738
  286. string text = "辅数"
  287. end type