public int notify(ref TNofityUI msg) { if (msg.mType == "click") { if (msg.mSender == mButtonClose) { this.Dispose(); } else if (msg.mSender == mButtonLogin) { Action action = () => { MessageBox.Show("OK"); }; this.BeginInvoke(action); } } else if (msg.mType == "itemselect") { Action <string, string> action = (controlName, strText) => { if (controlName == "accountcombo") { EditUI pAccountEdit = (EditUI)mManager.findControl("accountedit"); if (pAccountEdit != null) { pAccountEdit.setText(strText); } } }; this.BeginInvoke(action, msg.mSender.getName(), msg.mSender.getText()); } return(0); }
public void init() { mButtonClose = mManager.findControl("closebtn"); mButtonLogin = mManager.findControl("loginBtn"); { ComboUI pAccountCombo = (ComboUI)mManager.findControl("accountcombo"); EditUI pAccountEdit = (EditUI)mManager.findControl("accountedit"); if (pAccountCombo != null && pAccountEdit != null) { pAccountEdit.setText(pAccountCombo.getText()); } } }
public void init() { mButtonClose = mManager.findControl("closebtn"); mButtonLogin = mManager.findControl("loginBtn"); { ComboUI pAccountCombo = (ComboUI)mManager.findControl("accountcombo"); EditUI pAccountEdit = (EditUI)mManager.findControl("accountedit"); if (pAccountCombo != null && pAccountEdit != null) { pAccountEdit.setText(pAccountCombo.getText()); } } { // 获取列表控件 mUserList = (ListUI)mManager.findControl("userlist"); mUserList.setTextCallback(this); } }