Ejemplo n.º 1
0
    private void ShowAsChannelAsk()
    {
        this.FriendInfosUIVisibility = true;
        this.FriendFindsUIVisibility = false;
        this.UpdateRecommendsPanelActive();
        this.FriendInfoUnits.Clear();
        List <BuddyInfo> asks = FriendManager.Instance.GetAsks();
        string           text = DataReader <GlobalParams> .Get("friend_invite_limit_i").value;

        text = GameDataUtils.SplitString4Dot0(text);
        if (asks.get_Count() > 0)
        {
            this.FriendTip = string.Empty;
            string color = TextColorMgr.GetColor(asks.get_Count().ToString(), "A45A41", string.Empty);
            this.FriendNum = "申请数量:" + color + "/" + text;
            for (int i = 0; i < asks.get_Count(); i++)
            {
                BuddyInfo        sdata = asks.get_Item(i);
                OOFriendInfoUnit o     = this.CreateFriendInfoUnit(OOFriendInfoUnit.UnitType.Ask, sdata, false);
                this.FriendInfoUnits.Add(o);
            }
        }
        else
        {
            this.FriendTip = GameDataUtils.GetChineseContent(502083, false);
            string color2 = TextColorMgr.GetColor("0", "A45A41", string.Empty);
            this.FriendNum = "申请数量:" + color2 + "/" + text;
        }
    }
Ejemplo n.º 2
0
    private void ShowAsChannelBlack()
    {
        this.FriendInfosUIVisibility = true;
        this.FriendFindsUIVisibility = false;
        this.UpdateRecommendsPanelActive();
        this.FriendInfoUnits.Clear();
        List <BuddyInfo> blacks = FriendManager.Instance.GetBlacks();

        if (blacks.get_Count() > 0)
        {
            this.FriendTip = string.Empty;
            string color = TextColorMgr.GetColor(blacks.get_Count().ToString(), "A45A41", string.Empty);
            this.FriendNum = "黑名单数量:" + color;
            for (int i = 0; i < blacks.get_Count(); i++)
            {
                BuddyInfo        sdata = blacks.get_Item(i);
                OOFriendInfoUnit o     = this.CreateFriendInfoUnit(OOFriendInfoUnit.UnitType.Black, sdata, false);
                this.FriendInfoUnits.Add(o);
            }
        }
        else
        {
            this.FriendTip = GameDataUtils.GetChineseContent(502084, false);
            string color2 = TextColorMgr.GetColor("0", "A45A41", string.Empty);
            this.FriendNum = "黑名单数量:" + color2;
        }
    }
Ejemplo n.º 3
0
    private void ShowAsChannelFriend()
    {
        this.FriendInfosUIVisibility = true;
        this.FriendFindsUIVisibility = false;
        this.UpdateRecommendsPanelActive();
        this.FriendInfoUnits.Clear();
        List <BuddyInfo> friends = FriendManager.Instance.GetFriends();

        friends.Sort(new Comparison <BuddyInfo>(FriendUIViewModel.FriendSortCompare));
        string text = DataReader <GlobalParams> .Get("friend_limit_i").value;

        text = GameDataUtils.SplitString4Dot0(text);
        if (friends.get_Count() > 0)
        {
            this.FriendTip = string.Empty;
            string color = TextColorMgr.GetColor(friends.get_Count().ToString(), "A45A41", string.Empty);
            this.FriendNum = "好友数量:" + color + "/" + text;
            for (int i = 0; i < friends.get_Count(); i++)
            {
                BuddyInfo        sdata = friends.get_Item(i);
                OOFriendInfoUnit o     = this.CreateFriendInfoUnit(OOFriendInfoUnit.UnitType.Friend, sdata, false);
                this.FriendInfoUnits.Add(o);
            }
        }
        else
        {
            this.FriendTip = GameDataUtils.GetChineseContent(502082, false);
            string color2 = TextColorMgr.GetColor("0", "A45A41", string.Empty);
            this.FriendNum = "好友数量:" + color2 + "/" + text;
        }
    }