$PBExportHeader$uo_aifmb_ui_login_state.sru forward global type uo_aifmb_ui_login_state from userobject end type type st_2 from uo_aifmb_text within uo_aifmb_ui_login_state end type type st_1 from uo_aifmb_text within uo_aifmb_ui_login_state end type end forward global type uo_aifmb_ui_login_state from userobject integer width = 2103 integer height = 936 long backcolor = 67108864 long tabtextcolor = 33554432 long picturemaskcolor = 536870912 st_2 st_2 st_1 st_1 end type global uo_aifmb_ui_login_state uo_aifmb_ui_login_state type variables long ins_state = 0 // 0 未注册 1 未登录 2 已登陆 end variables forward prototypes public subroutine wf_face () end prototypes public subroutine wf_face ();Int rslt = 0 String arg_msg uo_aifmb = Create uo_aifmb ins_state = 0 String ls_localusername IF uo_aifmb.uf_getlocalusername(ls_localusername, arg_msg) <> 1 THEN st_2.Text = '亚洲国际电商平台' st_1.Text = '企业注册' GOTO ext END IF String ls_username ls_username = uo_aifmb.sf_username() IF ls_username = '' THEN st_2.Text = ls_localusername st_1.Text = '登录' ins_state = 1 GOTO ext END IF st_2.Text = ls_localusername + ',' + ls_username st_1.Text = '注销' ins_state = 2 GOTO ext ext: Destroy uo_aifmb end subroutine on uo_aifmb_ui_login_state.create this.st_2=create st_2 this.st_1=create st_1 this.Control[]={this.st_2,& this.st_1} end on on uo_aifmb_ui_login_state.destroy destroy(this.st_2) destroy(this.st_1) end on event constructor;wf_face() end event type st_2 from uo_aifmb_text within uo_aifmb_ui_login_state integer width = 1152 long backcolor = 67108864 string text = "亚洲国际电商平台" end type type st_1 from uo_aifmb_text within uo_aifmb_ui_login_state integer x = 1161 integer width = 293 boolean underline = true long textcolor = 16711680 long backcolor = 67108864 string text = "企业注册" alignment alignment = right! long bordercolor = 16711680 end type event clicked;call super::clicked;IF ins_state = 0 THEN IF sys_power_issuper THEN Open(w_aifmb_regcom) wf_face() END IF ELSEIF ins_state = 1 THEN Open(w_aifmb_login_response) wf_face() ELSEIF ins_state = 2 THEN uo_aifmb = Create uo_aifmb String arg_msg uo_aifmb.uf_userlogout(arg_msg) Destroy uo_aifmb wf_face() END IF end event