uo_aifmb_ui_login_state.sru 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. $PBExportHeader$uo_aifmb_ui_login_state.sru
  2. forward
  3. global type uo_aifmb_ui_login_state from userobject
  4. end type
  5. type st_2 from uo_aifmb_text within uo_aifmb_ui_login_state
  6. end type
  7. type st_1 from uo_aifmb_text within uo_aifmb_ui_login_state
  8. end type
  9. end forward
  10. global type uo_aifmb_ui_login_state from userobject
  11. integer width = 2103
  12. integer height = 936
  13. long backcolor = 67108864
  14. long tabtextcolor = 33554432
  15. long picturemaskcolor = 536870912
  16. st_2 st_2
  17. st_1 st_1
  18. end type
  19. global uo_aifmb_ui_login_state uo_aifmb_ui_login_state
  20. type variables
  21. long ins_state = 0 // 0 未注册 1 未登录 2 已登陆
  22. end variables
  23. forward prototypes
  24. public subroutine wf_face ()
  25. end prototypes
  26. public subroutine wf_face ();Int rslt = 0
  27. String arg_msg
  28. uo_aifmb = Create uo_aifmb
  29. ins_state = 0
  30. String ls_localusername
  31. IF uo_aifmb.uf_getlocalusername(ls_localusername, arg_msg) <> 1 THEN
  32. st_2.Text = '亚洲国际电商平台'
  33. st_1.Text = '企业注册'
  34. GOTO ext
  35. END IF
  36. String ls_username
  37. ls_username = uo_aifmb.sf_username()
  38. IF ls_username = '' THEN
  39. st_2.Text = ls_localusername
  40. st_1.Text = '登录'
  41. ins_state = 1
  42. GOTO ext
  43. END IF
  44. st_2.Text = ls_localusername + ',' + ls_username
  45. st_1.Text = '注销'
  46. ins_state = 2
  47. GOTO ext
  48. ext:
  49. Destroy uo_aifmb
  50. end subroutine
  51. on uo_aifmb_ui_login_state.create
  52. this.st_2=create st_2
  53. this.st_1=create st_1
  54. this.Control[]={this.st_2,&
  55. this.st_1}
  56. end on
  57. on uo_aifmb_ui_login_state.destroy
  58. destroy(this.st_2)
  59. destroy(this.st_1)
  60. end on
  61. event constructor;wf_face()
  62. end event
  63. type st_2 from uo_aifmb_text within uo_aifmb_ui_login_state
  64. integer width = 1152
  65. long backcolor = 67108864
  66. string text = "亚洲国际电商平台"
  67. end type
  68. type st_1 from uo_aifmb_text within uo_aifmb_ui_login_state
  69. integer x = 1161
  70. integer width = 293
  71. boolean underline = true
  72. long textcolor = 16711680
  73. long backcolor = 67108864
  74. string text = "企业注册"
  75. alignment alignment = right!
  76. long bordercolor = 16711680
  77. end type
  78. event clicked;call super::clicked;IF ins_state = 0 THEN
  79. IF sys_power_issuper THEN
  80. Open(w_aifmb_regcom)
  81. wf_face()
  82. END IF
  83. ELSEIF ins_state = 1 THEN
  84. Open(w_aifmb_login_response)
  85. wf_face()
  86. ELSEIF ins_state = 2 THEN
  87. uo_aifmb = Create uo_aifmb
  88. String arg_msg
  89. uo_aifmb.uf_userlogout(arg_msg)
  90. Destroy uo_aifmb
  91. wf_face()
  92. END IF
  93. end event