예제 #1
0
        @Override
        public void onClick(View v) {
          // TODO Auto-generated method stub
          RWSharedPreferences pre = new RWSharedPreferences(context, "addInfo");
          context.sessionId = pre.getStringValue("sessionid");
          context.phonenum = pre.getStringValue("phonenum");
          context.userno = pre.getStringValue("userno");
          if (context.userno == null || context.userno.equals("")) {
            Intent intentSession = new Intent(context, UserLogin.class);
            context.startActivityForResult(intentSession, 0);
          } else if (zhuShu == 0) {
            Toast.makeText(context, "请选择过关方式", Toast.LENGTH_SHORT).show();
          } else {

            if (isAmtDialog()) {
              alertInfo(
                  context.getString(R.string.jc_main_touzhu_alert_text_content),
                  context.getString(R.string.jc_main_touzhu_alert_text_title));
            } else {
              switch (v.getId()) {
                case R.id.alert_dialog_touzhu_button_cancel:
                  initBet();
                  context.toJoinActivity();
                  break;
                case R.id.alert_dialog_touzhu_button_ok:
                  beginTouzhu();
                  break;
              }
              dialog.cancel();
            }
          }
        }
예제 #2
0
 private void initBet() {
   context.initBet();
   context.getBetAndGiftPojo().setAmount("" + getAllAmt() * 100);
   context.getBetAndGiftPojo().setLotmulti("" + getBeishu());
   if (jcMainView.isDanguan) {
     context
         .getBetAndGiftPojo()
         .setBet_code(
             getBetCode(context.getString(R.string.jc_touzhu_DAN))
                 + "_"
                 + PublicMethod.isTen(getBeishu())
                 + "_"
                 + oneAmt * 100
                 + "_"
                 + jcMainView.getDanZhushu() * oneAmt * 100
                 + "!");
   } else {
     context.getBetAndGiftPojo().setBet_code(viewGroup.getBetCode());
   }
   context.getBetAndGiftPojo().setIsSellWays("1");
 }