Beispiel #1
0
    public override void OnResponse(string data)
    {
        List <UserData> udList = new List <UserData>();

        if (data != "0")
        {
            string[] udArray = data.Split('|');

            foreach (string ud in udArray)
            {
                string[] strs = ud.Split(',');
                udList.Add(new UserData(int.Parse(strs[0]), strs[1], int.Parse(strs[2]), int.Parse(strs[3])));
            }
        }
        roomListPanel.LoadRoomItemAsync(udList);
    }
Beispiel #2
0
    public override void OnResponse(string data)
    {
        if (data == "0")
        {
            roomListPanel.EmptyRoomItemOnMain();
            return;
        }
        List <UserData> userDatas = new List <UserData>();

        string[] userHosts = data.Split('|');
        foreach (string host in userHosts)
        {
            string[] strs = host.Split(',');
            userDatas.Add(new UserData(int.Parse(strs[0]), strs[1], int.Parse(strs[2]), int.Parse(strs[3])));
        }
        roomListPanel.LoadRoomItemAsync(userDatas);
    }