Exemple #1
0
    public void AddGuildList()
    {
        this.m_nlbGiftTarget.Clear();
        this.m_TargetInfoList.Clear();
        for (int i = 0; i < NrTSingleton <NewGuildManager> .Instance.GetMemberCount(); i++)
        {
            NewGuildMember memberInfoFromIndex = NrTSingleton <NewGuildManager> .Instance.GetMemberInfoFromIndex(i);

            if (memberInfoFromIndex != null)
            {
                if (NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_PersonID != memberInfoFromIndex.GetPersonID())
                {
                    ItemGiftTargetDlg.TARGET_INFO tARGET_INFO = new ItemGiftTargetDlg.TARGET_INFO();
                    tARGET_INFO.SetInfo(memberInfoFromIndex.GetCharName(), memberInfoFromIndex.GetPersonID(), memberInfoFromIndex.GetLevel(), memberInfoFromIndex.GetFaceCharKind());
                    this.m_TargetInfoList.Add(tARGET_INFO);
                }
            }
        }
        if (0 < this.m_TargetInfoList.Count)
        {
            this.m_TargetInfoList.Sort(new Comparison <ItemGiftTargetDlg.TARGET_INFO>(this.CompareNameDESC));
            for (int i = 0; i < this.m_TargetInfoList.Count; i++)
            {
                NewListItem newListItem = this.GetNewListItem(this.m_TargetInfoList[i]);
                if (newListItem != null)
                {
                    this.m_nlbGiftTarget.Add(newListItem);
                }
            }
        }
        this.m_nlbGiftTarget.RepositionItems();
    }
Exemple #2
0
 public void AddFriendList()
 {
     this.m_nlbGiftTarget.Clear();
     this.m_TargetInfoList.Clear();
     foreach (USER_FRIEND_INFO uSER_FRIEND_INFO in NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_kFriendInfo.GetFriendInfoValues())
     {
         if (uSER_FRIEND_INFO != null)
         {
             if (uSER_FRIEND_INFO.nPersonID >= 11L)
             {
                 ItemGiftTargetDlg.TARGET_INFO tARGET_INFO = new ItemGiftTargetDlg.TARGET_INFO();
                 tARGET_INFO.SetInfo(TKString.NEWString(uSER_FRIEND_INFO.szName), uSER_FRIEND_INFO.nPersonID, uSER_FRIEND_INFO.i16Level, uSER_FRIEND_INFO.i32FaceCharKind);
                 this.m_TargetInfoList.Add(tARGET_INFO);
             }
         }
     }
     if (0 < this.m_TargetInfoList.Count)
     {
         this.m_TargetInfoList.Sort(new Comparison <ItemGiftTargetDlg.TARGET_INFO>(this.CompareNameDESC));
         for (int i = 0; i < this.m_TargetInfoList.Count; i++)
         {
             NewListItem newListItem = this.GetNewListItem(this.m_TargetInfoList[i]);
             if (newListItem != null)
             {
                 this.m_nlbGiftTarget.Add(newListItem);
             }
         }
     }
     this.m_nlbGiftTarget.RepositionItems();
 }