示例#1
0
 /// <summary>
 /// 设置数据并显示数据
 /// </summary>
 /// <param name="day"></param>
 /// <param name="week"></param>
 /// <param name="month"></param>
 public void SetData(PlayerRecordDetailNum num, string userid, bool isAgent = true)
 {
     mIsAgent = isAgent;
     mUserId  = userid;
     InitNum(num);
     ShowItems();
 }
示例#2
0
 /// <summary>
 /// 显示朋友圈
 /// </summary>
 private void ShowItems(PlayerRecordDetailNum nums)
 {
     InitNum(nums);
     mAllIndex = MainViewModel.Inst.mCurGainList.Count;
     mSingleScroll.gameObject.SetActive(true);
     mSingleScroll.SetData(MainViewModel.Inst.mCurGainList.Count);
 }
示例#3
0
    /// <summary>
    /// 获取盈利收入信息
    /// </summary>
    /// <param name="req"></param>
    public void SendGetNewPageGainInfo(SendGetGainDetail req, CallBack <PlayerRecordDetailNum> call)
    {
        NetProcess.SendRequest <SendGetGainDetail>(req, ProtoIdMap.CMD_SendGainDetail, (msg) =>
        {
            SendGetGainAck ack = msg.Read <SendGetGainAck>();
            if (ack.code == 1)
            {
                PlayerRecordDetailNum nums = null;
                if (ack.data != null)
                {
                    nums = ack.data.statisticsNum;
                    MainViewModel.Inst.UpdateGainList(req.type, req.page, ack.data.infoList);
                }

                if (call != null)
                {
                    call(nums);
                }
            }
            else
            {
                GameUtils.ShowErrorTips(ack.code);
            }
        });
    }
示例#4
0
 /// <summary>
 /// 设置数量
 /// </summary>
 /// <param name="num"></param>
 private void InitNum(PlayerRecordDetailNum num)
 {
     if (num == null)
     {
         num = new PlayerRecordDetailNum();
     }
     mDayNum.text = (num.day > 0 ? "+" + num.day : num.day.ToString());         //数量
     //mDayNum.color = num.day > 0 ? NGUIText.ParseColor("46a30e") : NGUIText.ParseColor("d53535");
     mWeekNum.text = (num.week > 0 ? "+" + num.week : num.week.ToString());     //数量
     //mWeekNum.color = num.week > 0 ? NGUIText.ParseColor("46a30e") : NGUIText.ParseColor("d53535");
     mMonthNum.text = (num.month > 0 ? "+" + num.month : num.month.ToString()); //数量
     //mMonthNum.color = num.month > 0 ? NGUIText.ParseColor("46a30e") : NGUIText.ParseColor("d53535");
 }
示例#5
0
    private void InitNum(PlayerRecordDetailNum num)
    {
        if (num == null)
        {
            num = new PlayerRecordDetailNum();
        }
        float day   = num.day;
        float week  = num.week;
        float month = num.month;

        if (!mIsAgent)//不是代理要反过来
        {
            day   = float.Parse((-day).ToString("f2"));
            week  = float.Parse((-week).ToString("f2"));
            month = float.Parse((-month).ToString("f2"));
        }
    }
示例#6
0
    private void InitNum(PlayerRecordDetailNum num)
    {
        if (num == null)
        {
            num = new PlayerRecordDetailNum();
        }
        float day   = num.day;
        float week  = num.week;
        float month = num.month;

        if (!mIsAgent)//不是代理要反过来
        {
            day   = float.Parse((-day).ToString("f2"));
            week  = float.Parse((-week).ToString("f2"));
            month = float.Parse((-month).ToString("f2"));
        }
        mDayNum.text = (day > 0 ? "+" + day : day.ToString());         //数量
        //mDayNum.color = day > 0 ? NGUIText.ParseColor("46a30e") : NGUIText.ParseColor("d53535");
        mWeekNum.text = (week > 0 ? "+" + week : week.ToString());     //数量
        //mWeekNum.color = week > 0 ? NGUIText.ParseColor("46a30e") : NGUIText.ParseColor("d53535");
        mMonthNum.text = (month > 0 ? "+" + month : month.ToString()); //数量
        //mMonthNum.color = month > 0 ? NGUIText.ParseColor("46a30e") : NGUIText.ParseColor("d53535");
    }