w_aifmb_login.srw 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. $PBExportHeader$w_aifmb_login.srw
  2. forward
  3. global type w_aifmb_login from window
  4. end type
  5. type cb_exit from commandbutton within w_aifmb_login
  6. end type
  7. type cb_1 from commandbutton within w_aifmb_login
  8. end type
  9. type p_1 from picture within w_aifmb_login
  10. end type
  11. type sle_authcode from singlelineedit within w_aifmb_login
  12. end type
  13. type st_3 from statictext within w_aifmb_login
  14. end type
  15. type st_2 from statictext within w_aifmb_login
  16. end type
  17. type sle_psw from singlelineedit within w_aifmb_login
  18. end type
  19. type st_1 from statictext within w_aifmb_login
  20. end type
  21. type sle_username from singlelineedit within w_aifmb_login
  22. end type
  23. end forward
  24. global type w_aifmb_login from window
  25. integer width = 1061
  26. integer height = 580
  27. boolean titlebar = true
  28. string title = "登录"
  29. boolean controlmenu = true
  30. boolean minbox = true
  31. windowtype windowtype = popup!
  32. long backcolor = 67108864
  33. string icon = "AppIcon!"
  34. boolean center = true
  35. cb_exit cb_exit
  36. cb_1 cb_1
  37. p_1 p_1
  38. sle_authcode sle_authcode
  39. st_3 st_3
  40. st_2 st_2
  41. sle_psw sle_psw
  42. st_1 st_1
  43. sle_username sle_username
  44. end type
  45. global w_aifmb_login w_aifmb_login
  46. on w_aifmb_login.create
  47. this.cb_exit=create cb_exit
  48. this.cb_1=create cb_1
  49. this.p_1=create p_1
  50. this.sle_authcode=create sle_authcode
  51. this.st_3=create st_3
  52. this.st_2=create st_2
  53. this.sle_psw=create sle_psw
  54. this.st_1=create st_1
  55. this.sle_username=create sle_username
  56. this.Control[]={this.cb_exit,&
  57. this.cb_1,&
  58. this.p_1,&
  59. this.sle_authcode,&
  60. this.st_3,&
  61. this.st_2,&
  62. this.sle_psw,&
  63. this.st_1,&
  64. this.sle_username}
  65. end on
  66. on w_aifmb_login.destroy
  67. destroy(this.cb_exit)
  68. destroy(this.cb_1)
  69. destroy(this.p_1)
  70. destroy(this.sle_authcode)
  71. destroy(this.st_3)
  72. destroy(this.st_2)
  73. destroy(this.sle_psw)
  74. destroy(this.st_1)
  75. destroy(this.sle_username)
  76. end on
  77. event open;Int rslt = 1
  78. String arg_msg
  79. uo_aifmb = Create uo_aifmb
  80. Blob lb_pic
  81. IF uo_aifmb.uf_AuthCode(lb_pic, arg_msg) <> 1 THEN
  82. rslt = 0
  83. GOTO ext
  84. END IF
  85. p_1.SetPicture(lb_pic)
  86. ext:
  87. Destroy uo_aifmb
  88. IF rslt = 0 THEN
  89. MessageBox('Error', arg_msg)
  90. cb_exit.PostEvent(Clicked!)
  91. END IF
  92. end event
  93. type cb_exit from commandbutton within w_aifmb_login
  94. integer x = 658
  95. integer y = 392
  96. integer width = 229
  97. integer height = 84
  98. integer taborder = 50
  99. integer textsize = -9
  100. integer weight = 400
  101. fontcharset fontcharset = gb2312charset!
  102. fontpitch fontpitch = variable!
  103. string facename = "宋体"
  104. string text = "取消"
  105. boolean cancel = true
  106. end type
  107. event clicked;close(parent)
  108. end event
  109. type cb_1 from commandbutton within w_aifmb_login
  110. integer x = 407
  111. integer y = 392
  112. integer width = 229
  113. integer height = 84
  114. integer taborder = 40
  115. integer textsize = -9
  116. integer weight = 400
  117. fontcharset fontcharset = gb2312charset!
  118. fontpitch fontpitch = variable!
  119. string facename = "宋体"
  120. string text = "登录"
  121. boolean default = true
  122. end type
  123. event clicked;Int rslt = 1
  124. String arg_msg
  125. uo_aifmb = Create uo_aifmb
  126. IF uo_aifmb.uf_UserLogin(sle_username.Text, sle_psw.Text, sle_authcode.Text, arg_msg) <> 1 THEN
  127. rslt = 0
  128. GOTO ext
  129. END IF
  130. ext:
  131. Destroy uo_aifmb
  132. IF rslt = 0 THEN
  133. MessageBox('Error', arg_msg)
  134. ELSE
  135. Close(Parent)
  136. END IF
  137. end event
  138. type p_1 from picture within w_aifmb_login
  139. integer x = 786
  140. integer y = 272
  141. integer width = 215
  142. integer height = 92
  143. boolean originalsize = true
  144. boolean focusrectangle = false
  145. end type
  146. event clicked;int rslt = 1
  147. string arg_msg
  148. uo_aifmb = create uo_aifmb
  149. blob lb_pic
  150. if uo_aifmb.uf_AuthCode(lb_pic, arg_msg) <> 1 then
  151. rslt = 0
  152. goto ext
  153. end if
  154. p_1.SetPicture(lb_pic)
  155. ext:
  156. destroy uo_aifmb
  157. if rslt = 0 then
  158. MessageBox('Error', arg_msg)
  159. end if
  160. end event
  161. type sle_authcode from singlelineedit within w_aifmb_login
  162. integer x = 311
  163. integer y = 272
  164. integer width = 457
  165. integer height = 92
  166. integer taborder = 30
  167. integer textsize = -9
  168. integer weight = 400
  169. fontcharset fontcharset = gb2312charset!
  170. fontpitch fontpitch = variable!
  171. string facename = "宋体"
  172. long textcolor = 33554432
  173. borderstyle borderstyle = stylelowered!
  174. end type
  175. type st_3 from statictext within w_aifmb_login
  176. integer x = 46
  177. integer y = 292
  178. integer width = 247
  179. integer height = 48
  180. integer textsize = -9
  181. integer weight = 400
  182. fontcharset fontcharset = gb2312charset!
  183. fontpitch fontpitch = variable!
  184. string facename = "宋体"
  185. long textcolor = 33554432
  186. long backcolor = 67108864
  187. string text = "验证码"
  188. alignment alignment = right!
  189. boolean focusrectangle = false
  190. end type
  191. type st_2 from statictext within w_aifmb_login
  192. integer x = 46
  193. integer y = 172
  194. integer width = 247
  195. integer height = 48
  196. integer textsize = -9
  197. integer weight = 400
  198. fontcharset fontcharset = gb2312charset!
  199. fontpitch fontpitch = variable!
  200. string facename = "宋体"
  201. long textcolor = 33554432
  202. long backcolor = 67108864
  203. string text = "密码"
  204. alignment alignment = right!
  205. boolean focusrectangle = false
  206. end type
  207. type sle_psw from singlelineedit within w_aifmb_login
  208. integer x = 311
  209. integer y = 152
  210. integer width = 457
  211. integer height = 92
  212. integer taborder = 20
  213. integer textsize = -9
  214. integer weight = 400
  215. fontcharset fontcharset = gb2312charset!
  216. fontpitch fontpitch = variable!
  217. string facename = "宋体"
  218. long textcolor = 33554432
  219. boolean password = true
  220. borderstyle borderstyle = stylelowered!
  221. end type
  222. type st_1 from statictext within w_aifmb_login
  223. integer x = 64
  224. integer y = 52
  225. integer width = 229
  226. integer height = 48
  227. integer textsize = -9
  228. integer weight = 400
  229. fontcharset fontcharset = gb2312charset!
  230. fontpitch fontpitch = variable!
  231. string facename = "宋体"
  232. long textcolor = 33554432
  233. long backcolor = 67108864
  234. string text = "用户名"
  235. alignment alignment = right!
  236. boolean focusrectangle = false
  237. end type
  238. type sle_username from singlelineedit within w_aifmb_login
  239. integer x = 311
  240. integer y = 32
  241. integer width = 457
  242. integer height = 92
  243. integer taborder = 10
  244. integer textsize = -9
  245. integer weight = 400
  246. fontcharset fontcharset = gb2312charset!
  247. fontpitch fontpitch = variable!
  248. string facename = "宋体"
  249. long textcolor = 33554432
  250. borderstyle borderstyle = stylelowered!
  251. end type