コード例 #1
0
 public void logout() {
   DialogUtils.showLoading(mContext, EventCode.HTTP_POST_SHOPMANAGERACCOUNT_LOGIN_OUT);
   AndroidEventManager.getInstance()
       .addEventListener(EventCode.HTTP_POST_SHOPMANAGERACCOUNT_LOGIN_OUT, this, true);
   AndroidEventManager.getInstance()
       .postEvent(
           EventCode.HTTP_POST_SHOPMANAGERACCOUNT_LOGIN_OUT,
           0,
           URLUtils.URL_SHOPMANAGERACCOUNT_LOGIN_OUT);
 }
コード例 #2
0
 /**
  * @param username
  * @param pwd
  */
 public void login(String username, String pwd) {
   loginForCashierAppUp = new LoginForCashierAppUp(username, pwd);
   DialogUtils.showLoading(mContext, EventCode.HTTP_POST_SHOPMANAGERACCOUNT_LOGIN_IN);
   AndroidEventManager.getInstance()
       .addEventListener(EventCode.HTTP_POST_SHOPMANAGERACCOUNT_LOGIN_IN, this, true);
   AndroidEventManager.getInstance()
       .postEvent(
           EventCode.HTTP_POST_SHOPMANAGERACCOUNT_LOGIN_IN,
           0,
           URLUtils.URL_SHOPMANAGERACCOUNT_LOGIN_IN,
           loginForCashierAppUp);
 }
コード例 #3
0
 /**
  * 移除事件
  *
  * @param nEventCode
  */
 protected void removeCallbackEventListener(int nEventCode) {
   if (codeToListenerMap == null) {
     return;
   }
   codeToListenerMap.remove(nEventCode);
   AndroidEventManager.getInstance().removeEventListener(nEventCode, this);
 }
コード例 #4
0
 /**
  * 添加一次性事件
  *
  * @param nEventCode
  */
 protected void addOncesEventListener(int nEventCode) {
   if (codeToListenerMap == null) {
     codeToListenerMap = new SparseArray<OnEventListener>();
   }
   codeToListenerMap.put(nEventCode, this);
   AndroidEventManager.getInstance().addEventListener(nEventCode, this, true);
 }