w_view_dscrp2.srw 4.9 KB

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