Пример #1
0
        public void UpdateShow_Check(PlayerMessagePanelData.Message Message_Check)
        {
            transform.GetComponent <Canvas>().overrideSorting = true;
            Message_Check_ = Message_Check;
            anhui.MahjongCommonMethod.Instance.GetPlayerAvatar(HeadIamge, Message_Check.head);
            NickName.text = Message_Check.senderNick;
            UserId.text   = "ID:" + Message_Check.senderUid;
            useId         = Convert.ToInt32(Message_Check.senderUid);
            if (Convert.ToInt32(Message_Check.playCardAcc) == 0)
            {
                PutCardSpeed.text = "0秒/平均";
            }
            else
            {
                PutCardSpeed.text = (Convert.ToInt32(Message_Check.playCardTimeAcc) / Convert.ToInt32(Message_Check.playCardAcc)).ToString() + "秒/平均";
            }

            if (Convert.ToInt32(Message_Check.gameNumAcc) == 0)
            {
                EscapeRate.text = "0%";
            }
            else
            {
                EscapeRate.text = (Convert.ToInt32(Message_Check.disconnectAcc) / Convert.ToInt32(Message_Check.gameNumAcc)).ToString() + "%";
            }

            Completite.text = Message_Check.compliment;
            if (Convert.ToInt32(Message_Check.operate) != 0)
            {
                Btn[0].SetActive(false);
                Btn[1].SetActive(false);
            }
            else
            {
                Btn[0].SetActive(true);
                Btn[1].SetActive(false);
            }
            ParlorMessage_Num.SetActive(true);
            ParlorMessage_Num.transform.GetChild(0).GetChild(2).GetComponent <Text>().text = Message_Check.leaveAcc + "次";
            ParlorMessage_Num.transform.GetChild(1).GetChild(2).GetComponent <Text>().text = Message_Check.kickAcc + "次";
        }
Пример #2
0
        //更新审核列表信息
        public void UpdateShow_Check(PlayerMessagePanelData.Message message)
        {
            Type          = 1;
            Message_Check = message;
            anhui.MahjongCommonMethod.Instance.GetPlayerAvatar(HeadImage, message.head);
            NickName.text = message.senderNick;

            int length = 0;

            if (message.senderNick.Length > 6)
            {
                length = 6;
            }
            else
            {
                length = message.senderNick.Length;
            }

            if (NickName.preferredWidth > 120)
            {
                NickName.text = message.senderNick.Substring(0, length) + "...";
            }

            UserId.text         = message.senderUid;
            LevelParlorAcc.text = message.leaveAcc;
            KickParlorAcc.text  = message.kickAcc;
            BtnOpeartion[0].gameObject.SetActive(true);
            BtnOpeartion[1].gameObject.SetActive(false);
            BtnOpeartion[2].gameObject.SetActive(false);
            //显示是否被踢过的信息
            string[] kick = message.kick.Split(',');
            KickSign.SetActive(false);
            for (int i = 0; i < kick.Length; i++)
            {
                if (Convert.ToInt32(kick[i]) == GameData.Instance.ParlorShowPanelData.iParlorId)
                {
                    KickSign.SetActive(true);
                    break;
                }
            }
        }