Esempio n. 1
0
    public void Init(string userID)
    {
        m_UserID = userID;
        ControlPlayer.UserInfo tmp = ControlPlayer.Instance.m_UserInfoDic[userID];


        m_UserName.GetComponent <Text>().text = tmp.userID + ". " + tmp.lastName + " " + tmp.firstName;
        m_Button.onClick.AddListener(OnClick);
    }
Esempio n. 2
0
    void OnPhoneNameEditEnd(string s)
    {
        ControlPlayer.Instance.m_UserInfoDic[ControlPlayer.Instance.m_CurrentEditUserID].phone = s;

        if (m_SaveUserInfo.ContainsKey(ControlPlayer.Instance.m_CurrentEditUserID))
        {
            m_SaveUserInfo[ControlPlayer.Instance.m_CurrentEditUserID].phone = s;
        }
        else
        {
            ControlPlayer.UserInfo userInfo = new ControlPlayer.UserInfo();
            userInfo = ControlPlayer.Instance.m_UserInfoDic[ControlPlayer.Instance.m_CurrentEditUserID];

            m_SaveUserInfo.Add(ControlPlayer.Instance.m_CurrentEditUserID, userInfo);
        }
    }
Esempio n. 3
0
    void OnAddNewUser(string data)
    {
        //销毁加入新组面板;
        Destroy(GameObject.Find("AddNewUserPanel(Clone)"));

        MsgJson.AddNewUser tmp = JsonUtility.FromJson <MsgJson.AddNewUser>(data);

        if (tmp.state == "success")
        {
            GameObject go = FrameUtil.AddChild(m_UserItemList.gameObject, m_UserAccessUserItem, m_UserItemList.childCount - 1);


            ControlPlayer.Instance.m_CurrentEditUserID = tmp.id;

            //将新数据加入总管理;
            ControlPlayer.UserInfo userInfo = new ControlPlayer.UserInfo();
            userInfo.userID    = tmp.id;
            userInfo.userName  = tmp.username;
            userInfo.firstName = tmp.firstname;
            userInfo.lastName  = tmp.lastname;
            userInfo.email     = tmp.email;
            userInfo.phone     = tmp.phone;

            ControlPlayer.Instance.m_UserInfoDic[tmp.id] = userInfo;

            //刷新该用户的组相关数据;
            RefreshGroupDisplay(userInfo.userID);

            //刷新显示;
            m_FirstName.text = userInfo.firstName;
            m_LastName.text  = userInfo.lastName;
            m_Email.text     = userInfo.email;
            m_Phone.text     = userInfo.phone;

            go.GetComponent <UserAccessUserItemLogic>().Init(tmp.id);
        }
        else
        {
            Debug.LogError("--------------------------------- 添加新组失败 --------------------------------------");
        }
    }