w_kms_messagebox.srw 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. $PBExportHeader$w_kms_messagebox.srw
  2. forward
  3. global type w_kms_messagebox from w_publ_base
  4. end type
  5. type st_2 from statictext within w_kms_messagebox
  6. end type
  7. type shl_1 from statichyperlink within w_kms_messagebox
  8. end type
  9. type p_1 from picture within w_kms_messagebox
  10. end type
  11. type st_3 from statictext within w_kms_messagebox
  12. end type
  13. type shl_2 from statichyperlink within w_kms_messagebox
  14. end type
  15. type cb_confirm from commandbutton within w_kms_messagebox
  16. end type
  17. type cb_cancle from commandbutton within w_kms_messagebox
  18. end type
  19. type mle_1 from multilineedit within w_kms_messagebox
  20. end type
  21. type st_1 from statictext within w_kms_messagebox
  22. end type
  23. end forward
  24. global type w_kms_messagebox from w_publ_base
  25. integer height = 1224
  26. string title = "异常"
  27. boolean minbox = false
  28. windowtype windowtype = response!
  29. long backcolor = 1073741824
  30. st_2 st_2
  31. shl_1 shl_1
  32. p_1 p_1
  33. st_3 st_3
  34. shl_2 shl_2
  35. cb_confirm cb_confirm
  36. cb_cancle cb_cancle
  37. mle_1 mle_1
  38. st_1 st_1
  39. end type
  40. global w_kms_messagebox w_kms_messagebox
  41. type variables
  42. s_kms_msg s_open
  43. int ins_rslt
  44. end variables
  45. on w_kms_messagebox.create
  46. int iCurrent
  47. call super::create
  48. this.st_2=create st_2
  49. this.shl_1=create shl_1
  50. this.p_1=create p_1
  51. this.st_3=create st_3
  52. this.shl_2=create shl_2
  53. this.cb_confirm=create cb_confirm
  54. this.cb_cancle=create cb_cancle
  55. this.mle_1=create mle_1
  56. this.st_1=create st_1
  57. iCurrent=UpperBound(this.Control)
  58. this.Control[iCurrent+1]=this.st_2
  59. this.Control[iCurrent+2]=this.shl_1
  60. this.Control[iCurrent+3]=this.p_1
  61. this.Control[iCurrent+4]=this.st_3
  62. this.Control[iCurrent+5]=this.shl_2
  63. this.Control[iCurrent+6]=this.cb_confirm
  64. this.Control[iCurrent+7]=this.cb_cancle
  65. this.Control[iCurrent+8]=this.mle_1
  66. this.Control[iCurrent+9]=this.st_1
  67. end on
  68. on w_kms_messagebox.destroy
  69. call super::destroy
  70. destroy(this.st_2)
  71. destroy(this.shl_1)
  72. destroy(this.p_1)
  73. destroy(this.st_3)
  74. destroy(this.shl_2)
  75. destroy(this.cb_confirm)
  76. destroy(this.cb_cancle)
  77. destroy(this.mle_1)
  78. destroy(this.st_1)
  79. end on
  80. event open;call super::open;s_open = Message.Powerobjectparm
  81. IF Not IsValid(s_open) THEN RETURN
  82. IF IsNull(s_open) THEN RETURN
  83. IF s_open.Msgtype = 0 THEN
  84. // 弹出警告界面, 如果 s_rslt.DocCode1/DocCode2(操作说明文章码/解决办法文章码) 有内容,分别提供连接转到文章
  85. This.icon = "Error!"
  86. This.Title = "错误信息"
  87. cb_cancle.Visible = false
  88. cb_confirm.x = (this.workspacewidth() - cb_confirm.width) / 2
  89. ins_rslt = 1
  90. ELSEIF s_open.Msgtype = 1 THEN
  91. This.icon = "Question!"
  92. This.Title = "询问"
  93. ELSE
  94. This.Title = "成功"
  95. cb_cancle.Visible = false
  96. cb_confirm.x = (this.workspacewidth() - cb_confirm.width) / 2
  97. ins_rslt = 1
  98. END IF
  99. //IF s_rslt.Msgtype = 0 THEN
  100. // fmessagebox(s_rslt.Msg)
  101. // return 0
  102. //ELSEIF s_rslt.Msgtype = 1 THEN
  103. // // TODO: 弹出询问界面, 如果 s_rslt.DocCode1/DocCode2(操作说明文章码/解决办法文章码) 有内容,分别提供连接转到文章
  104. // RETURN MessageBox('', s_rslt.Msg, Question!, YesNo!, 1)
  105. //ELSE
  106. // // 成功提示
  107. // return MessageBox('', s_rslt.Msg)
  108. //END IF
  109. mle_1.Text = s_open.Msg
  110. st_1.Text = "提示代码:" + s_open.msgid
  111. end event
  112. event close;call super::close;closewithreturn(this, ins_rslt)
  113. end event
  114. type cb_func from w_publ_base`cb_func within w_kms_messagebox
  115. boolean visible = false
  116. end type
  117. type cb_exit from w_publ_base`cb_exit within w_kms_messagebox
  118. boolean visible = false
  119. end type
  120. type st_2 from statictext within w_kms_messagebox
  121. integer x = 50
  122. integer y = 784
  123. integer width = 123
  124. integer height = 48
  125. boolean bringtotop = true
  126. integer textsize = -9
  127. integer weight = 400
  128. fontcharset fontcharset = gb2312charset!
  129. fontpitch fontpitch = variable!
  130. string facename = "宋体"
  131. long textcolor = 33554432
  132. string text = "点击"
  133. boolean focusrectangle = false
  134. end type
  135. type shl_1 from statichyperlink within w_kms_messagebox
  136. integer x = 261
  137. integer y = 784
  138. integer width = 233
  139. integer height = 48
  140. boolean bringtotop = true
  141. integer textsize = -9
  142. integer weight = 400
  143. fontcharset fontcharset = gb2312charset!
  144. fontpitch fontpitch = variable!
  145. string facename = "宋体"
  146. boolean underline = true
  147. string pointer = "HyperLink!"
  148. long textcolor = 134217856
  149. string text = "操作说明"
  150. boolean focusrectangle = false
  151. end type
  152. event clicked;IF Len(s_open.doccode1) > 0 THEN
  153. kms_showdoc(s_open.doccode1)
  154. ELSE
  155. Messagebox('','知识库暂未收录该提示的操作说明"')
  156. END IF
  157. end event
  158. type p_1 from picture within w_kms_messagebox
  159. integer x = 169
  160. integer y = 776
  161. integer width = 73
  162. integer height = 64
  163. boolean bringtotop = true
  164. boolean originalsize = true
  165. string picturename = "Help!"
  166. boolean focusrectangle = false
  167. end type
  168. type st_3 from statictext within w_kms_messagebox
  169. integer x = 494
  170. integer y = 784
  171. integer width = 672
  172. integer height = 48
  173. boolean bringtotop = true
  174. integer textsize = -9
  175. integer weight = 400
  176. fontcharset fontcharset = gb2312charset!
  177. fontpitch fontpitch = variable!
  178. string facename = "宋体"
  179. long textcolor = 33554432
  180. string text = "可以帮助您排除操作问题。"
  181. boolean focusrectangle = false
  182. end type
  183. type shl_2 from statichyperlink within w_kms_messagebox
  184. integer x = 50
  185. integer y = 896
  186. integer width = 672
  187. integer height = 48
  188. boolean bringtotop = true
  189. integer textsize = -9
  190. integer weight = 400
  191. fontcharset fontcharset = gb2312charset!
  192. fontpitch fontpitch = variable!
  193. string facename = "宋体"
  194. boolean underline = true
  195. string pointer = "HyperLink!"
  196. long textcolor = 134217856
  197. string text = "查找更多原因和解决方案。"
  198. boolean focusrectangle = false
  199. end type
  200. event clicked;IF Len(s_open.doccode2) > 0 THEN
  201. kms_showdoc(s_open.doccode2)
  202. ELSE
  203. Messagebox('','知识库暂未收录该提示的解决方案"')
  204. END IF
  205. end event
  206. type cb_confirm from commandbutton within w_kms_messagebox
  207. integer x = 626
  208. integer y = 1028
  209. integer width = 325
  210. integer height = 84
  211. integer taborder = 20
  212. boolean bringtotop = true
  213. integer textsize = -9
  214. integer weight = 400
  215. fontcharset fontcharset = gb2312charset!
  216. fontpitch fontpitch = variable!
  217. string facename = "宋体"
  218. string text = "确定"
  219. end type
  220. event clicked;ins_rslt = 1
  221. close(parent)
  222. end event
  223. type cb_cancle from commandbutton within w_kms_messagebox
  224. integer x = 1051
  225. integer y = 1028
  226. integer width = 325
  227. integer height = 84
  228. integer taborder = 30
  229. boolean bringtotop = true
  230. integer textsize = -9
  231. integer weight = 400
  232. fontcharset fontcharset = gb2312charset!
  233. fontpitch fontpitch = variable!
  234. string facename = "宋体"
  235. string text = "取消"
  236. end type
  237. event clicked;close(parent)
  238. end event
  239. type mle_1 from multilineedit within w_kms_messagebox
  240. integer x = 50
  241. integer y = 52
  242. integer width = 1902
  243. integer height = 472
  244. integer taborder = 30
  245. boolean bringtotop = true
  246. integer textsize = -9
  247. integer weight = 400
  248. fontcharset fontcharset = gb2312charset!
  249. fontpitch fontpitch = variable!
  250. string facename = "宋体"
  251. long textcolor = 33554432
  252. boolean vscrollbar = true
  253. boolean autovscroll = true
  254. boolean displayonly = true
  255. borderstyle borderstyle = stylelowered!
  256. end type
  257. type st_1 from statictext within w_kms_messagebox
  258. integer x = 50
  259. integer y = 564
  260. integer width = 1902
  261. integer height = 48
  262. boolean bringtotop = true
  263. integer textsize = -9
  264. integer weight = 400
  265. fontcharset fontcharset = gb2312charset!
  266. fontpitch fontpitch = variable!
  267. string facename = "宋体"
  268. long textcolor = 33554432
  269. string text = "提示代码:"
  270. boolean focusrectangle = false
  271. end type