예제 #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();
    }
예제 #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();
 }
예제 #3
0
 private int CompareNameDESC(ItemGiftTargetDlg.TARGET_INFO a, ItemGiftTargetDlg.TARGET_INFO b)
 {
     if (b.Name.Equals(a.Name))
     {
         return(b.Level.CompareTo(a.Level));
     }
     return(b.Name.CompareTo(a.Name));
 }
예제 #4
0
    public NewListItem GetNewListItem(ItemGiftTargetDlg.TARGET_INFO Info)
    {
        NewListItem newListItem = new NewListItem(this.m_nlbGiftTarget.ColumnNum, true, string.Empty);

        newListItem.SetListItemData(0, true);
        newListItem.SetListItemData(1, Info.CharKind, null, null, null);
        newListItem.SetListItemData(2, Info.Name, null, null, null);
        newListItem.SetListItemData(3, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1723"), Info.PersonID, new EZValueChangedDelegate(this.ClickTargetUser), null);
        newListItem.Data = Info.PersonID;
        return(newListItem);
    }