w_view_dscrp.srw 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. $PBExportHeader$w_view_dscrp.srw
  2. forward
  3. global type w_view_dscrp from w_publ_base
  4. end type
  5. type cb_1 from uo_imflatbutton within w_view_dscrp
  6. end type
  7. type mle_dscrp from multilineedit within w_view_dscrp
  8. end type
  9. type st_2 from statictext within w_view_dscrp
  10. end type
  11. type gb_1 from groupbox within w_view_dscrp
  12. end type
  13. type st_msg from statictext within w_view_dscrp
  14. end type
  15. type cb_choice from commandbutton within w_view_dscrp
  16. end type
  17. end forward
  18. global type w_view_dscrp from w_publ_base
  19. integer width = 2002
  20. integer height = 1284
  21. string title = ""
  22. boolean minbox = false
  23. windowtype windowtype = response!
  24. cb_1 cb_1
  25. mle_dscrp mle_dscrp
  26. st_2 st_2
  27. gb_1 gb_1
  28. st_msg st_msg
  29. cb_choice cb_choice
  30. end type
  31. global w_view_dscrp w_view_dscrp
  32. type variables
  33. s_view_dscrp s_view
  34. long limit_flag=0
  35. end variables
  36. on w_view_dscrp.create
  37. int iCurrent
  38. call super::create
  39. this.cb_1=create cb_1
  40. this.mle_dscrp=create mle_dscrp
  41. this.st_2=create st_2
  42. this.gb_1=create gb_1
  43. this.st_msg=create st_msg
  44. this.cb_choice=create cb_choice
  45. iCurrent=UpperBound(this.Control)
  46. this.Control[iCurrent+1]=this.cb_1
  47. this.Control[iCurrent+2]=this.mle_dscrp
  48. this.Control[iCurrent+3]=this.st_2
  49. this.Control[iCurrent+4]=this.gb_1
  50. this.Control[iCurrent+5]=this.st_msg
  51. this.Control[iCurrent+6]=this.cb_choice
  52. end on
  53. on w_view_dscrp.destroy
  54. call super::destroy
  55. destroy(this.cb_1)
  56. destroy(this.mle_dscrp)
  57. destroy(this.st_2)
  58. destroy(this.gb_1)
  59. destroy(this.st_msg)
  60. destroy(this.cb_choice)
  61. end on
  62. event open;call super::open;s_view = Message.PowerObjectParm
  63. mle_dscrp.Text = s_view.dscrp
  64. IF not s_view.editmode THEN
  65. cb_1.Visible = FALSE
  66. cb_exit.Visible = FALSE
  67. cb_choice.visible=false
  68. mle_dscrp.Height = 980
  69. mle_dscrp.DisplayOnly = TRUE
  70. THIS.Title = s_view.Title + ' - 查看状态'
  71. ELSE
  72. cb_1.Visible = TRUE
  73. cb_exit.Visible = TRUE
  74. mle_dscrp.Height = 840
  75. mle_dscrp.DisplayOnly = FALSE
  76. THIS.Title = s_view.Title + ' - 编辑状态'
  77. END IF
  78. st_msg.text = '剩余' + string(250 - len(mle_dscrp.text)) + '个字节'
  79. end event
  80. event close;call super::close;closewithreturn(this,s_view)
  81. end event
  82. type cb_func from w_publ_base`cb_func within w_view_dscrp
  83. boolean visible = false
  84. end type
  85. type cb_exit from w_publ_base`cb_exit within w_view_dscrp
  86. integer x = 1207
  87. integer y = 1072
  88. string text = "取消"
  89. end type
  90. type cb_1 from uo_imflatbutton within w_view_dscrp
  91. integer x = 498
  92. integer y = 1072
  93. integer width = 311
  94. integer height = 96
  95. integer taborder = 20
  96. boolean bringtotop = true
  97. string normalpicname = "ok.bmp"
  98. end type
  99. event clicked;call super::clicked;IF IsNull(s_view.dscrp) THEN s_view.dscrp = ''
  100. IF mle_dscrp.Text <> s_view.dscrp THEN
  101. s_view.dscrp = mle_dscrp.Text
  102. END IF
  103. Close(PARENT)
  104. end event
  105. type mle_dscrp from multilineedit within w_view_dscrp
  106. event enchange pbm_enchange
  107. integer x = 69
  108. integer y = 212
  109. integer width = 1865
  110. integer height = 836
  111. integer taborder = 30
  112. boolean bringtotop = true
  113. integer textsize = -9
  114. integer weight = 400
  115. fontcharset fontcharset = gb2312charset!
  116. fontpitch fontpitch = variable!
  117. string facename = "宋体"
  118. long textcolor = 33554432
  119. boolean vscrollbar = true
  120. boolean autovscroll = true
  121. integer limit = 2500
  122. borderstyle borderstyle = stylelowered!
  123. boolean hideselection = false
  124. end type
  125. event enchange;st_msg.Text = '剩余' + String(250 - Len(This.Text)) + '个字节'
  126. IF limit_flag = 0 And Len(This.Text) > 250 THEN
  127. MessageBox('提示','当前字数已超过250 !!')
  128. limit_flag = 1
  129. END IF
  130. end event
  131. type st_2 from statictext within w_view_dscrp
  132. integer x = 64
  133. integer y = 44
  134. integer width = 1440
  135. integer height = 48
  136. boolean bringtotop = true
  137. integer textsize = -9
  138. integer weight = 400
  139. fontcharset fontcharset = gb2312charset!
  140. fontpitch fontpitch = variable!
  141. string facename = "宋体"
  142. long textcolor = 255
  143. long backcolor = 67108864
  144. string text = "说明:备注不能超过250个字节,中文 = 2字节,英文 = 1字节"
  145. boolean focusrectangle = false
  146. end type
  147. type gb_1 from groupbox within w_view_dscrp
  148. integer x = 18
  149. integer width = 1961
  150. integer height = 1188
  151. integer taborder = 30
  152. integer textsize = -9
  153. integer weight = 400
  154. fontcharset fontcharset = gb2312charset!
  155. fontpitch fontpitch = variable!
  156. string facename = "宋体"
  157. long textcolor = 33554432
  158. long backcolor = 67108864
  159. end type
  160. type st_msg from statictext within w_view_dscrp
  161. integer x = 1573
  162. integer y = 44
  163. integer width = 338
  164. integer height = 48
  165. boolean bringtotop = true
  166. integer textsize = -9
  167. integer weight = 400
  168. fontcharset fontcharset = gb2312charset!
  169. fontpitch fontpitch = variable!
  170. string facename = "宋体"
  171. long textcolor = 33554432
  172. long backcolor = 67108864
  173. boolean focusrectangle = false
  174. end type
  175. type cb_choice from commandbutton within w_view_dscrp
  176. integer x = 64
  177. integer y = 116
  178. integer width = 247
  179. integer height = 84
  180. integer taborder = 50
  181. boolean bringtotop = true
  182. integer textsize = -9
  183. integer weight = 400
  184. fontcharset fontcharset = gb2312charset!
  185. fontpitch fontpitch = variable!
  186. string facename = "宋体"
  187. string text = "选择"
  188. end type
  189. event clicked;IF Not IsValid(w_dscrpdef_edit) THEN
  190. Open(w_dscrpdef_edit)
  191. s_outrepdef s_outrep_ch
  192. s_outrep_ch = Message.PowerObjectParm
  193. IF s_outrep_ch.outrepdscrp <> '' THEN
  194. mle_dscrp.Text = s_outrep_ch.outrepdscrp
  195. END IF
  196. END IF
  197. end event