private void Show_ExchangeList()
    {
        this.m_nUseTicketNum = 0;
        this.m_nlbList.Clear();
        Dictionary <int, ExchangeEvolutionTable> totalExchangeEvolutionTable = NrTSingleton <PointManager> .Instance.GetTotalExchangeEvolutionTable();

        foreach (ExchangeEvolutionTable current in totalExchangeEvolutionTable.Values)
        {
            NewListItem newListItem          = new NewListItem(this.m_nlbList.ColumnNum, true, string.Empty);
            string      itemNameByItemUnique = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(current.m_nItemUnique);

            ITEM iTEM = new ITEM();
            iTEM.m_nItemUnique = current.m_nItemUnique;
            iTEM.m_nOption[2]  = NrTSingleton <ItemManager> .Instance.GetItemInfo(current.m_nItemUnique).m_nQualityLevel;

            newListItem.SetListItemData(1, iTEM, "Material", null, null);
            newListItem.SetListItemData(2, itemNameByItemUnique, null, null, null);
            newListItem.SetListItemData(3, NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(current.m_nNeedItemUnique), null, null, null);
            string empty = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("632"),
                "count",
                NrTSingleton <CTextParser> .Instance.GetTextColor("1107") + current.m_nNeedCount
            });

            newListItem.SetListItemData(4, empty, null, null, null);
            newListItem.SetListItemData(5, false);
            newListItem.Data = current;
            this.m_nlbList.Add(newListItem);
        }
        this.m_nlbList.RepositionItems();
        this.m_nlbList.SetSelectedItem(0);
    }
Пример #2
0
    private void ShowListBox()
    {
        this.m_ListBox.Clear();
        WhisperRoom room = NrTSingleton <WhisperManager> .Instance.GetRoom(this.m_RoomUnique);

        List <WhisperUser> users = room.GetUsers();
        List <long>        list  = new List <long>();

        foreach (WhisperUser current in users)
        {
            list.Add(current.PersonID);
        }
        for (int i = 0; i < this.m_CommunityUserList.Count; i++)
        {
            COMMUNITY_USER_INFO cOMMUNITY_USER_INFO = this.m_CommunityUserList[i];
            if (cOMMUNITY_USER_INFO != null && !list.Contains(cOMMUNITY_USER_INFO.i64PersonID) && cOMMUNITY_USER_INFO.bConnect)
            {
                NewListItem newListItem = new NewListItem(this.m_ListBox.ColumnNum, true, string.Empty);
                newListItem.SetListItemData(0, cOMMUNITY_USER_INFO.strName, null, null, null);
                newListItem.SetListItemData(1, NrTSingleton <UIDataManager> .Instance.GetString("Lv ", cOMMUNITY_USER_INFO.i16Level.ToString()), null, null, null);
                newListItem.SetListItemData(2, CommunityUI_DLG.CommunityIcon(cOMMUNITY_USER_INFO), null, null, null);
                newListItem.Data = cOMMUNITY_USER_INFO;
                this.m_ListBox.Add(newListItem);
            }
        }
        this.m_ListBox.RepositionItems();
    }
    private void SetItemColum(ITEM itemdata, int pos, ref NewListItem item)
    {
        this.m_Text.Remove(0, this.m_Text.Length);
        string rankColorName = NrTSingleton <ItemManager> .Instance.GetRankColorName(itemdata);

        item.SetListItemData(1, itemdata, true, null, null);
        item.SetListItemData(2, rankColorName, null, null, null);
        if (NrTSingleton <ItemManager> .Instance.GetItemPartByItemUnique(itemdata.m_nItemUnique) == eITEM_PART.ITEMPART_WEAPON)
        {
            int nValue       = Protocol_Item.Get_Min_Damage(itemdata);
            int optionValue  = Tooltip_Dlg.GetOptionValue(itemdata, nValue, 1);
            int nValue2      = Protocol_Item.Get_Max_Damage(itemdata);
            int optionValue2 = Tooltip_Dlg.GetOptionValue(itemdata, nValue2, 1);
            this.m_Text.Append(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("242") + NrTSingleton <UIDataManager> .Instance.GetString(" ", optionValue.ToString(), " ~ ", optionValue2.ToString()));
        }
        else if (NrTSingleton <ItemManager> .Instance.GetItemPartByItemUnique(itemdata.m_nItemUnique) == eITEM_PART.ITEMPART_ARMOR)
        {
            int nValue      = Protocol_Item.Get_Defense(itemdata);
            int optionValue = Tooltip_Dlg.GetOptionValue(itemdata, nValue, 2);
            this.m_Text.Append(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("243") + NrTSingleton <UIDataManager> .Instance.GetString(" ", optionValue.ToString()));
        }
        item.SetListItemData(3, this.m_Text.ToString(), null, null, null);
        item.SetListItemData(4, string.Empty, itemdata, new EZValueChangedDelegate(this.OnClickItemView), null);
        item.Data = itemdata;
    }
Пример #4
0
 public void SetShowList()
 {
     if (this.m_liMatchList == null)
     {
         return;
     }
     if (this.m_liMatchList.Count <= 0)
     {
         return;
     }
     this.m_lbBattleMatchInfo.Clear();
     foreach (TOURNAMENT_MATCH_LIST current in this.m_liMatchList)
     {
         NewListItem newListItem             = new NewListItem(this.m_lbBattleMatchInfo.ColumnNum, true, string.Empty);
         string      tournamentStateToString = this.GetTournamentStateToString(current.ePlayerState[0]);
         newListItem.SetListItemData(7, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2387"), null, null, null);
         newListItem.SetListItemData(8, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2388"), null, null, null);
         newListItem.SetListItemData(9, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2389"), null, null, null);
         newListItem.SetListItemData(10, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2390"), null, null, null);
         newListItem.SetListItemData(this.STATE1, tournamentStateToString, null, null, null);
         tournamentStateToString = this.GetTournamentStateToString(current.ePlayerState[1]);
         newListItem.SetListItemData(this.STATE2, tournamentStateToString, null, null, null);
         newListItem.SetListItemData(this.BUTTON, string.Empty, current, new EZValueChangedDelegate(this.OnClickMatch), null);
         newListItem.SetListItemData(this.PLAYER1, current.m_szPlayer[0], null, null, null);
         newListItem.SetListItemData(this.PLAYER2, current.m_szPlayer[1], null, null, null);
         newListItem.SetListItemData(this.OBSERVER, current.m_szObserver, null, null, null);
         newListItem.SetListItemData(this.BUTTON_UPDATE, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2420"), current, new EZValueChangedDelegate(this.OnClickUpdateMatch), null);
         newListItem.SetListItemData(this.MATCHINDEX, current.nIndex.ToString(), null, null, null);
         if (current.m_nStartTurnAlly == 0)
         {
             newListItem.SetListItemData(this.TURN, current.m_szPlayer[0], null, null, null);
         }
         else if (current.m_nStartTurnAlly == 1)
         {
             newListItem.SetListItemData(this.TURN, current.m_szPlayer[1], null, null, null);
         }
         else
         {
             newListItem.SetListItemData(this.TURN, "RANDOM", null, null, null);
         }
         newListItem.SetListItemData(18, "1", current, new EZValueChangedDelegate(this.OnClickTurn1), null);
         newListItem.SetListItemData(19, "2", current, new EZValueChangedDelegate(this.OnClickTurn2), null);
         newListItem.SetListItemData(20, "R", current, new EZValueChangedDelegate(this.OnClickTurnR), null);
         newListItem.SetListItemData(this.WINCOUNT1, current.m_nWinCount[0].ToString(), null, null, null);
         newListItem.SetListItemData(this.WINCOUNT2, current.m_nWinCount[1].ToString(), null, null, null);
         newListItem.SetListItemData(this.DELETEBUTTON, string.Empty, current, new EZValueChangedDelegate(this.OnClickDELETE), null);
         if (current.bUseLoddy)
         {
             newListItem.SetListItemData(this.LOBBY, "LOBBY", null, null, null);
         }
         else
         {
             newListItem.SetListItemData(this.LOBBY, string.Empty, null, null, null);
         }
         newListItem.SetListItemEnable(this.LOBBY, current.bUseLoddy);
         this.m_lbBattleMatchInfo.Add(newListItem);
         this.ChangeButtonState(current);
     }
     this.m_lbBattleMatchInfo.RepositionItems();
 }
    private void SetCharList()
    {
        NrCharBase[] @char = NrTSingleton <NkCharManager> .Instance.Get_Char();

        NrCharBase char2 = NrTSingleton <NkCharManager> .Instance.GetChar(1);

        int num = 0;

        this.m_nlbCharList.Clear();
        NrCharBase[] array = @char;
        for (int i = 0; i < array.Length; i++)
        {
            NrCharBase nrCharBase = array[i];
            if (nrCharBase != null && nrCharBase.GetPersonID() > 0L && char2.GetPersonID() != nrCharBase.GetPersonID())
            {
                if (num >= this.m_nCurPage * this.m_nNumPerPage && num < (this.m_nCurPage + 1) * this.m_nNumPerPage)
                {
                    NewListItem newListItem = new NewListItem(this.m_nlbCharList.ColumnNum, true, string.Empty);
                    newListItem.SetListItemData(0, nrCharBase.GetCharName(), null, null, null);
                    newListItem.SetListItemData(1, nrCharBase.GetPersonInfo().GetLevel(0L).ToString(), null, null, null);
                    newListItem.Data = nrCharBase.GetCharName();
                    this.m_nlbCharList.Add(newListItem);
                    this.m_nlbCharList.RepositionItems();
                    num++;
                }
                else
                {
                    num++;
                }
            }
        }
        this.m_nTotalPage = num / this.m_nNumPerPage + 1;
    }
Пример #6
0
    public void RefreshInfo()
    {
        this.m_nlbApllicant.Clear();
        for (int i = 0; i < NrTSingleton <NewGuildManager> .Instance.GetApplicantCount(); i++)
        {
            NewGuildApplicant applicantInfoFromIndex = NrTSingleton <NewGuildManager> .Instance.GetApplicantInfoFromIndex(i);

            if (applicantInfoFromIndex != null)
            {
                NewListItem newListItem       = new NewListItem(this.m_nlbApllicant.ColumnNum, true, string.Empty);
                string      textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1639");

                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref textFromInterface, new object[]
                {
                    textFromInterface,
                    "count",
                    applicantInfoFromIndex.GetLevel(),
                    "targetname",
                    applicantInfoFromIndex.GetCharName()
                });

                newListItem.SetListItemData(0, textFromInterface, null, null, null);
                newListItem.SetListItemData(1, string.Empty, applicantInfoFromIndex, new EZValueChangedDelegate(this.ApplicantDetailInfo), null);
                newListItem.SetListItemData(2, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("318"), applicantInfoFromIndex, new EZValueChangedDelegate(this.ClickReject), null);
                newListItem.SetListItemData(3, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("317"), applicantInfoFromIndex, new EZValueChangedDelegate(this.ClickApproval), null);
                newListItem.Data = applicantInfoFromIndex;
                this.m_nlbApllicant.Add(newListItem);
            }
        }
        this.m_nlbApllicant.RepositionItems();
        this.WaitCount();
    }
Пример #7
0
 private void UpdateList(int sortType, bool clear)
 {
     if (!clear && this.ComposeNewListBox.Count > 0 && this.m_kOldSolNum == this.mSortList.Count && this.ComposeNewListBox.Reserve)
     {
         UIHelper.SetSolSort(sortType, this.ComposeNewListBox.GetItems());
     }
     else
     {
         this.ComposeNewListBox.Clear();
         this.ListCnt = 0;
         foreach (NkSoldierInfo current in this.mSortList)
         {
             NewListItem newListItem = this.UpdateSolList(current);
             if (newListItem != null)
             {
                 this.ComposeNewListBox.Add(newListItem);
                 this.ListCnt++;
             }
         }
     }
     this.m_kOldSolNum = this.mSortList.Count;
     this.ComposeNewListBox.RepositionItems();
     if (SolComposeMainDlg.Instance != null)
     {
         this.lbSubNum.SetText(string.Format("{0}/{1}", SolComposeMainDlg.Instance.SELECT_COUNT, 50));
         this.lbCostMoney.SetText(string.Format("{0:###,###,###,##0}", SolComposeMainDlg.Instance.COST));
     }
 }
Пример #8
0
    public void SetSolList()
    {
        this.m_kSolList.Clear();
        List <NkSoldierInfo> solInfo = NrTSingleton <ExplorationManager> .Instance.GetSolInfo();

        int num = 0;

        for (int i = 0; i < solInfo.Count; i++)
        {
            NkSoldierInfo nkSoldierInfo = solInfo[i];
            if (nkSoldierInfo != null)
            {
                if (num >= 6)
                {
                    break;
                }
                if (nkSoldierInfo != null)
                {
                    NewListItem item = new NewListItem(this.m_kSolList.ColumnNum, true, string.Empty);
                    this.MakeSolListItem(ref item, nkSoldierInfo);
                    this.m_kSolList.Add(item);
                }
            }
        }
        for (int j = solInfo.Count; j < 6; j++)
        {
            NewListItem item2 = new NewListItem(this.m_kSolList.ColumnNum, true, string.Empty);
            this.MakeSolListItem(ref item2, null);
            this.m_kSolList.Add(item2);
        }
        this.m_kSolList.RepositionItems();
    }
Пример #9
0
    public void ShowList()
    {
        this.m_lbFloor.Clear();
        short num = NrTSingleton <BabelTowerManager> .Instance.GetLastGuildBossFloor();

        short guildBossLastFloor = NrTSingleton <ContentsLimitManager> .Instance.GetGuildBossLastFloor();

        if (0 < guildBossLastFloor && guildBossLastFloor < num)
        {
            num = guildBossLastFloor;
        }
        short num2 = num / 5;

        if (num % 5 != 0)
        {
            num2 += 1;
        }
        for (short num3 = num2; num3 > 0; num3 -= 1)
        {
            NewListItem newListItem = this.CreateItem(num3);
            if (newListItem != null)
            {
                this.m_lbFloor.Add(newListItem);
            }
        }
        this.SetRoomStateEffect();
        this.m_lbFloor.RepositionItems();
        this.m_lbFloor.SetSelectedItem((int)this.m_Selectindex);
    }
Пример #10
0
    private void ShowTicketList()
    {
        this.m_kList.SetMultiSelectMode(false);
        this.m_kList.Clear();
        List <ITEM> functionItemsByInvenType = NkUserInventory.instance.GetFunctionItemsByInvenType(6, eITEM_SUPPLY_FUNCTION.SUPPLY_GETSOLDIER);

        foreach (ITEM current in functionItemsByInvenType)
        {
            if (!NrTSingleton <ItemManager> .Instance.IsItemATB(current.m_nItemUnique, 2048L))
            {
                PointTable pointTable = NrTSingleton <PointManager> .Instance.GetPointTable(current.m_nItemUnique);

                if (pointTable != null)
                {
                    if (0 < pointTable.m_nGetPoint)
                    {
                        NewListItem newListItem = new NewListItem(this.m_kList.ColumnNum, true, string.Empty);
                        string      name        = NrTSingleton <ItemManager> .Instance.GetName(current);

                        newListItem.SetListItemData(1, current, null, null, null);
                        newListItem.SetListItemData(2, name, null, null, null);
                        newListItem.SetListItemData(3, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2254"), null, null, null);
                        newListItem.SetListItemData(4, NrTSingleton <CTextParser> .Instance.GetTextColor("1107") + pointTable.m_nGetPoint.ToString(), null, null, null);
                        newListItem.SetListItemData(5, false);
                        newListItem.SetListItemData(6, false);
                        newListItem.Data = current;
                        this.m_kList.Add(newListItem);
                    }
                }
            }
        }
        this.m_kList.RepositionItems();
        functionItemsByInvenType.Clear();
    }
Пример #11
0
    private void ReqWebImageCallback(Texture2D txtr, object _param)
    {
        long guildID = NrTSingleton <NewGuildManager> .Instance.GetGuildID();

        int num = (int)_param;

        if (num < 0)
        {
            return;
        }
        if (txtr != null)
        {
            IUIListObject iUIListObject = this.m_nlbWaitGuildInfo.GetItem(num);
            if (iUIListObject != null)
            {
                NewListItem newListItem = new NewListItem(this.m_nlbWaitGuildInfo.ColumnNum, true, string.Empty);
                if (this.m_TempGuildInfo[num].nGuildID == guildID)
                {
                    newListItem.SetListItemData(0, NrTSingleton <CTextParser> .Instance.GetTextColor("1107") + this.m_TempGuildInfo[num].strGuildName, null, null, null);
                }
                else
                {
                    newListItem.SetListItemData(0, this.m_TempGuildInfo[num].strGuildName, null, null, null);
                }
                newListItem.SetListItemData(1, txtr, true, null, null, null);
                this.m_nlbWaitGuildInfo.RemoveAdd(num, newListItem);
            }
        }
        this.m_nTotalCount++;
        if (this.m_nTotalCount == this.m_TempGuildInfo.Count)
        {
            this.m_nlbWaitGuildInfo.RepositionItems();
        }
    }
Пример #12
0
    private void SetItemColum(ITEM itemdata, int pos, ref NewListItem item)
    {
        StringBuilder stringBuilder = new StringBuilder();
        string        rankColorName = NrTSingleton <ItemManager> .Instance.GetRankColorName(itemdata);

        item.SetListItemData(2, itemdata, null, null, null);
        item.SetListItemData(3, rankColorName, null, null, null);
        int rank = itemdata.m_nOption[2];

        item.SetListItemData(4, ItemManager.RankTextColor(rank) + ItemManager.RankText(rank), null, null, null);
        stringBuilder.Remove(0, stringBuilder.Length);
        if (NrTSingleton <ItemManager> .Instance.GetItemPartByItemUnique(itemdata.m_nItemUnique) == eITEM_PART.ITEMPART_WEAPON)
        {
            int nValue       = Protocol_Item.Get_Min_Damage(itemdata);
            int optionValue  = Tooltip_Dlg.GetOptionValue(itemdata, nValue, 1);
            int nValue2      = Protocol_Item.Get_Max_Damage(itemdata);
            int optionValue2 = Tooltip_Dlg.GetOptionValue(itemdata, nValue2, 1);
            stringBuilder.Append(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("242") + NrTSingleton <UIDataManager> .Instance.GetString(" ", optionValue.ToString(), " ~ ", optionValue2.ToString()));
        }
        else if (NrTSingleton <ItemManager> .Instance.GetItemPartByItemUnique(itemdata.m_nItemUnique) == eITEM_PART.ITEMPART_ARMOR)
        {
            int nValue      = Protocol_Item.Get_Defense(itemdata);
            int optionValue = Tooltip_Dlg.GetOptionValue(itemdata, nValue, 2);
            stringBuilder.Append(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("243") + NrTSingleton <UIDataManager> .Instance.GetString(" ", optionValue.ToString()));
        }
        item.SetListItemData(0, stringBuilder.ToString(), null, null, null);
        item.Data = itemdata;
    }
Пример #13
0
    private void SetSolEquipItem()
    {
        if (this.m_SelectSol == null)
        {
            this.m_ShowType = ReforgeSelectDlg.SHOWTYPE.SOLDER;
            return;
        }
        int num = 0;

        for (int i = 0; i < 6; i++)
        {
            ITEM item = this.m_SelectSol.GetEquipItemInfo().m_kItem[i].GetItem();
            if (item != null)
            {
                if (item.m_nItemUnique > 0)
                {
                    if (NrTSingleton <ItemManager> .Instance.GetItemInfo(item.m_nItemUnique) != null)
                    {
                        NewListItem item2 = new NewListItem(this.m_NewListBox.ColumnNum, true, string.Empty);
                        this.SetItemColum(item, num++, ref item2);
                        this.m_NewListBox.Add(item2);
                    }
                }
            }
        }
        this.m_NewListBox.RepositionItems();
        if (num == 0)
        {
            this.m_lbText.Visible = true;
        }
        else
        {
            this.m_lbText.Visible = false;
        }
    }
Пример #14
0
    public void UpdateData(int nItemPos, int nItemType, long nItemID)
    {
        bool flag = false;

        for (int i = 0; i < this.m_NewListBox.Count; i++)
        {
            if (this.m_NewListBox.GetItem(i) != null)
            {
                ITEM iTEM = this.m_NewListBox.GetItem(i).Data as ITEM;
                if (iTEM.m_nItemPos == nItemPos && iTEM.m_nPosType == nItemType)
                {
                    ITEM        item  = NkUserInventory.GetInstance().GetItem(nItemType, nItemPos);
                    NewListItem item2 = new NewListItem(this.m_NewListBox.ColumnNum, true, string.Empty);
                    this.SetItemColum(item, i, ref item2);
                    this.m_NewListBox.UpdateAdd(i, item2);
                    flag = true;
                }
            }
        }
        this.m_NewListBox.RepositionItems();
        if (!flag)
        {
            this.SetInvItemData();
        }
    }
Пример #15
0
        private void SetCostumeCount(ref NewListItem item, CharCostumeInfo_Data costumeData)
        {
            bool visibe = true;

            if (costumeData.IsNormalCostume())
            {
                visibe = false;
            }
            item.SetListItemData(18, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3294"), null, null, null);
            item.SetListItemData(18, visibe);
            string       text        = string.Empty;
            COSTUME_INFO costumeInfo = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumeInfo(costumeData.m_costumeUnique);

            if (costumeInfo == null)
            {
                text = "(0/0)";
            }
            else
            {
                text = string.Concat(new object[]
                {
                    "(",
                    costumeInfo.i32CostumePossibleToUse,
                    "/",
                    costumeInfo.i32CostumeCount,
                    ")"
                });
            }
            item.SetListItemData(16, text, null, null, null);
            item.SetListItemData(16, visibe);
        }
Пример #16
0
    private void ShowTicketList()
    {
        this.m_nUseTicketNum = 0;
        this.m_kList.Clear();
        Dictionary <int, GuildWarExchangeTable> totalGuildWarExchangeTable = NrTSingleton <PointManager> .Instance.GetTotalGuildWarExchangeTable();

        foreach (GuildWarExchangeTable current in totalGuildWarExchangeTable.Values)
        {
            NewListItem newListItem          = new NewListItem(this.m_kList.ColumnNum, true, string.Empty);
            string      itemNameByItemUnique = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(current.m_nItemUnique);

            newListItem.SetListItemData(1, NrTSingleton <ItemManager> .Instance.GetItemTexture(current.m_nItemUnique), null, null, null);
            newListItem.SetListItemData(2, itemNameByItemUnique, null, null, null);
            newListItem.SetListItemData(3, NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(current.m_nNeedItemUnique), null, null, null);
            string empty = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("632"),
                "count",
                NrTSingleton <CTextParser> .Instance.GetTextColor("1107") + current.m_nNeedNum
            });

            newListItem.SetListItemData(4, empty, null, null, null);
            newListItem.Data = current;
            this.m_kList.Add(newListItem);
        }
        this.m_kList.RepositionItems();
        this.m_kList.SetSelectedItem(0);
    }
Пример #17
0
 public void ReloadMaterialList()
 {
     if (this.m_NeedItemList == null)
     {
         this.m_NeedItemList = NrTSingleton <ITEM_COMPOSE_Manager> .Instance.ComposeItem_MaterialList(this.m_BaseComposeData);
     }
     if (this.m_NeedItemList != null)
     {
         this.m_nlbNeedItem.Clear();
         this.bSendServerOK = true;
         for (int i = 0; i < this.m_NeedItemList.Length; i++)
         {
             int nItemUnique = this.m_NeedItemList[i].m_nItemUnique;
             int itemCnt     = NkUserInventory.GetInstance().GetItemCnt(nItemUnique);
             if (nItemUnique > 0)
             {
                 NewListItem newListItem = new NewListItem(this.m_nlbNeedItem.ColumnNum, true, string.Empty);
                 newListItem.SetListItemData(0, true);
                 newListItem.SetListItemData(1, this.m_NeedItemList[i].m_t2ItemIcon, null, null, null);
                 newListItem.SetListItemData(2, this.m_NeedItemList[i].m_strItemName, null, null, null);
                 string text = this.ReCountMaterialItem(this.m_NeedItemList[i].m_shItemNumber, itemCnt);
                 newListItem.SetListItemData(3, text, null, null, null);
                 this.m_nlbNeedItem.Add(newListItem);
             }
         }
         this.m_nlbNeedItem.RepositionItems();
     }
 }
Пример #18
0
    public void SetDeclareWarInfo(string strGuildName, string targetName)
    {
        if (strGuildName == string.Empty)
        {
            return;
        }
        NewListItem newListItem = new NewListItem(this.m_DeclareWarList.ColumnNum, true, string.Empty);
        string      empty       = string.Empty;

        if (targetName == strGuildName)
        {
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2943"),
                "targetname",
                strGuildName
            });
        }
        else
        {
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2942"),
                "targetname",
                strGuildName
            });
        }
        newListItem.SetListItemData(0, empty, null, null, null);
        this.m_DeclareWarList.Add(newListItem);
    }
Пример #19
0
 private void SetFriendList()
 {
     this.m_FriendList.Clear();
     foreach (USER_FRIEND_INFO uSER_FRIEND_INFO in NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_kFriendInfo.GetFriendInfoValues())
     {
         if (1L > uSER_FRIEND_INFO.FriendHelpSolInfo.i64HelpSolID || uSER_FRIEND_INFO.FriendHelpSolInfo.i64HelpSolID >= 11L)
         {
             NewListItem newListItem = new NewListItem(this.m_FriendList.ColumnNum, true, string.Empty);
             string      text        = TKString.NEWString(uSER_FRIEND_INFO.szName);
             newListItem.SetListItemData(0, text, null, null, null);
             newListItem.SetListItemData(1, uSER_FRIEND_INFO.i16Level.ToString(), null, null, null);
             if (0 < uSER_FRIEND_INFO.i8Location)
             {
                 if (0 < uSER_FRIEND_INFO.i8UserPlayState)
                 {
                     newListItem.SetListItemData(2, "Win_I_Comm01", null, null, null);
                 }
                 else
                 {
                     newListItem.SetListItemData(2, "Win_I_Comm03", null, null, null);
                 }
             }
             else
             {
                 newListItem.SetListItemData(2, "Win_I_Comm02", null, null, null);
             }
             newListItem.Data = text;
             this.m_FriendList.Add(newListItem);
         }
     }
     this.m_FriendList.RepositionItems();
 }
Пример #20
0
    public void MakeMerchantItem(AGIT_MERCHANT_SUB_INFO Data)
    {
        NewListItem newListItem = new NewListItem(this.m_nlbSellList.ColumnNum, true, string.Empty);

        newListItem.SetListItemData(1, NrTSingleton <ItemManager> .Instance.GetItemTexture(Data.i32ItemUnique), null, null, null);
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1697"),
            "itemname",
            NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(Data.i32ItemUnique),
            "count",
            Data.i32ItemNum
        });

        newListItem.SetListItemData(2, this.m_strText, null, null, null);
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("411"),
            "count",
            Data.i32PriceHearts
        });

        newListItem.SetListItemData(3, Data.i32PriceHearts.ToString(), null, null, null);
        newListItem.Data = Data;
        this.m_nlbSellList.Add(newListItem);
    }
Пример #21
0
    private void ChangeSolInfo(IUIObject obj, int index)
    {
        if (index >= this.mSortList.Count)
        {
            return;
        }
        NkSoldierInfo nkSoldierInfo = this.mSortList[index];

        if (nkSoldierInfo == null)
        {
            return;
        }
        NewListItem newListItem = this.UpdateSolList(nkSoldierInfo);

        if (newListItem == null)
        {
            return;
        }
        this.ComposeNewListBox.UpdateContents(index, newListItem);
        int index2 = index % this.ComposeNewListBox.Count;
        UIListItemContainer item = this.ComposeNewListBox.GetItem(index2);

        if (null != item)
        {
            if (this.IsContainSelect(nkSoldierInfo.GetSolID()))
            {
                item.SetSelected(true);
            }
            else
            {
                item.SetSelected(false);
            }
        }
    }
Пример #22
0
    private void _LinkItemData()
    {
        foreach (Battle_ResultMineDlg.BATTLE_RESULT_ITEM_REWARD_INFO current in this.m_ItemList)
        {
            NewListItem      newListItem = new NewListItem(this.m_lbItemList.ColumnNum, true, string.Empty);
            UIBaseInfoLoader itemTexture = NrTSingleton <ItemManager> .Instance.GetItemTexture(current.m_nItemUnique);

            newListItem.SetListItemData(0, itemTexture, null, null, null);
            string itemNameByItemUnique = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(current.m_nItemUnique);

            newListItem.SetListItemData(1, itemNameByItemUnique, null, null, null);
            int    nItemNum = current.m_nItemNum;
            string text     = Protocol_Item.Money_Format((long)nItemNum) + NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("442");

            if (current.m_nBonusItemNum > 0)
            {
                string empty = string.Empty;
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2967"),
                    "count",
                    current.m_nBonusItemNum
                });

                text += empty;
            }
            newListItem.SetListItemData(2, text, null, null, null);
            this.m_lbItemList.Add(newListItem);
        }
        this.m_lbItemList.RepositionItems();
    }
Пример #23
0
 public void SetUserTextureUpdate(Texture2D _Texture, long i64PersonID)
 {
     for (int i = 0; i < this.m_MemberList.Count; i++)
     {
         NewGuildMember newGuildMember = this.m_MemberList[i];
         if (newGuildMember == null)
         {
             return;
         }
         if (i64PersonID == newGuildMember.GetPersonID())
         {
             NewListItem newListItem = new NewListItem(this.m_nlbMember.ColumnNum, true, string.Empty);
             newListItem.SetListItemData(0, true);
             newListItem.SetListItemData(1, _Texture, null, null, null, null);
             newListItem.SetListItemData(2, newGuildMember.GetCharName(), null, null, null);
             newListItem.SetListItemData(3, string.Empty, newGuildMember, new EZValueChangedDelegate(this.ClickRightMenu), null);
             string empty  = string.Empty;
             string empty2 = string.Empty;
             NewGuildMemberDlg.CurrentLocationName(newGuildMember, ref empty, ref empty2);
             newListItem.SetListItemData(4, NrTSingleton <CTextParser> .Instance.GetTextColor(empty2) + empty, null, null, null);
             string rankText = newGuildMember.GetRankText();
             newListItem.SetListItemData(5, rankText, null, null, null);
             newListItem.SetListItemData(6, newGuildMember.GetLevel().ToString(), null, null, null);
             newListItem.SetListItemData(7, newGuildMember.GetContribute().ToString(), null, null, null);
             newListItem.Data = newGuildMember;
             this.m_nlbMember.RemoveAdd(i, newListItem);
             this.m_nlbMember.RepositionItems();
             break;
         }
     }
 }
Пример #24
0
    private void _LinkContRankData()
    {
        byte   b     = 0;
        string text  = string.Empty;
        string empty = string.Empty;

        foreach (MINE_REPORT_CONTRANK_USER_INFO current in this.m_ContributionRankList)
        {
            NewListItem newListItem = new NewListItem(this.m_lbContRankList.ColumnNum, true, string.Empty);
            if (current.ContributionRank == 0)
            {
                b += 1;
            }
            else
            {
                b = current.ContributionRank;
            }
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1413");

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                text,
                "rank",
                b,
                "targetname",
                TKString.NEWString(current.szCharName)
            });

            newListItem.SetListItemData(0, empty, null, null, null);
            this.m_lbContRankList.Add(newListItem);
        }
        this.m_lbContRankList.RepositionItems();
    }
Пример #25
0
    private void ShowList(int pageIndex)
    {
        this.lb_RankPageInfo.SetText(pageIndex.ToString());
        this.nlb_Rank.Clear();
        MYTHRAID_RANK_INFO[] array;
        if (this.isSoloMode)
        {
            array = this.dic_SoloRankInfo[pageIndex];
        }
        else
        {
            array = this.dic_PartyRankInfo[pageIndex];
        }
        for (int i = 0; i < array.Length; i++)
        {
            NewListItem newListItem = new NewListItem(this.nlb_Rank.ColumnNum, true, string.Empty);
            string      text        = NrTSingleton <MythRaidManager> .Instance.AddComma(array[i].i64Damage.ToString());

            newListItem.SetListItemData(4, array[i].i32Rank.ToString(), null, null, null);
            newListItem.SetListItemData(1, TKString.NEWString(array[i].strName), null, null, null);
            newListItem.SetListItemData(2, text, null, null, null);
            newListItem.Data = 123;
            this.nlb_Rank.Add(newListItem);
        }
        this.nlb_Rank.RepositionItems();
    }
Пример #26
0
        private void SetMoneyType(ref NewListItem item, CharCostumeInfo_Data costumeData)
        {
            bool visibe = !costumeData.IsNormalCostume();

            item.SetListItemData(14, visibe);
            item.SetListItemData(20, visibe);
        }
Пример #27
0
    public override void SetComponent()
    {
        Dictionary <string, UIEmoticonInfo> uIEmoticonDictionary = NrTSingleton <UIEmoticonManager> .Instance.UIEmoticonDictionary;

        this._nlbEmo = (base.GetControl("NLB_Emo") as NewListBox);
        NewListItem newListItem = new NewListItem(this._nlbEmo.ColumnNum, true, string.Empty);
        int         num         = 0;

        foreach (KeyValuePair <string, UIEmoticonInfo> current in uIEmoticonDictionary)
        {
            int    num2 = num * 3;
            string text = current.Key;
            text = text.Replace("^", string.Empty);
            newListItem.SetListItemData(num2, string.Empty, current.Key, new EZValueChangedDelegate(this.OnClickEmoticon), null);
            newListItem.SetListItemData(num2 + 1, current.Key, null, null, null);
            newListItem.SetListItemData(num2 + 2, text, null, null, null);
            num++;
            if (num >= 3)
            {
                num = 0;
                this._nlbEmo.Add(newListItem);
                newListItem = new NewListItem(this._nlbEmo.ColumnNum, true, string.Empty);
            }
        }
        this._nlbEmo.RepositionItems();
        this.fTime = Time.realtimeSinceStartup + 0.5f;
    }
Пример #28
0
        private void SetWearButton(ref NewListItem item, CharCostumeInfo_Data costumeData)
        {
            item.SetListItemData(17, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3286"), costumeData, new EZValueChangedDelegate(this.OnCostumeWearBtn), null);
            bool visibe = NrTSingleton <NrCharCostumeTableManager> .Instance.IsBuyCostume(costumeData.m_costumeUnique);

            if (costumeData.IsNormalCostume())
            {
                visibe = true;
            }
            if (this.IsWearedCostume(this._owner._myCharListSetter._SelectedSolInfo, costumeData))
            {
                visibe = false;
            }
            COSTUME_INFO costumeInfo = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumeInfo(costumeData.m_costumeUnique);

            if (!costumeData.IsNormalCostume() && (costumeInfo == null || costumeInfo.i32CostumePossibleToUse <= 0))
            {
                visibe = false;
            }
            if (this._selectedCostumeData == null)
            {
                visibe = false;
            }
            if (this._selectedCostumeData != null && this._selectedCostumeData.m_costumeUnique != costumeData.m_costumeUnique)
            {
                visibe = false;
            }
            if (this._owner._myCharListSetter._SelectedSolInfo == null)
            {
                visibe = false;
            }
            item.SetListItemData(17, visibe);
        }
Пример #29
0
    private void SetEmoticonData()
    {
        this.m_nlbEmoticon.Clear();
        BATTLE_EMOTICON_Manager instance = BATTLE_EMOTICON_Manager.GetInstance();

        if (instance == null)
        {
            return;
        }
        for (int i = 0; i < 9; i++)
        {
            BATTLE_EMOTICON data = instance.GetData((eBATTLE_EMOTICON)i);
            if (data != null)
            {
                NewListItem newListItem = new NewListItem(this.m_nlbEmoticon.ColumnNum, true, string.Empty);
                object      data2;
                if (this.IsRadioAlarmMode())
                {
                    data2 = i;
                }
                else
                {
                    data2 = data;
                }
                newListItem.SetListItemData(0, string.Empty, data2, new EZValueChangedDelegate(this.OnClickEmoticonListBox), null);
                newListItem.SetListItemData(1, data.m_szTexture, null, null, null);
                newListItem.SetListItemData(2, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(data.m_szTextKey), null, null, null);
                this.m_nlbEmoticon.Add(newListItem);
            }
        }
        this.m_nlbEmoticon.RepositionItems();
    }
Пример #30
0
    private void ShowList(int _rank)
    {
        this.myRankIndex = this.GetRankIndex(_rank);
        this.nlb_RewardInfo.SetColumnCenter();
        int resourceCount = NrTSingleton <NrBaseTableManager> .Instance.GetResourceCount(NrTableData.eResourceType.eRT_MYTHRAIDRANKREWARD);

        for (int i = 0; i < resourceCount; i++)
        {
            MYTHRAID_RANK_REWARD_INFO mythRaidRankRewardData = NrTSingleton <NrBaseTableManager> .Instance.GetMythRaidRankRewardData(i.ToString());

            NewListItem newListItem = new NewListItem(this.nlb_RewardInfo.ColumnNum, true, string.Empty);
            newListItem.SetListItemData(3, this.ChangeRank(i), null, null, null);
            string reward = this.GetReward(mythRaidRankRewardData);
            newListItem.SetListItemData(1, reward, null, null, null);
            if (this.myRankIndex - 1 == i)
            {
                newListItem.SetListItemData(0, NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Win_T_ListBoxBlueHL"), null, null, null);
            }
            else if (_rank != 0 && this.myRankIndex == i)
            {
                newListItem.SetListItemData(0, NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Win_T_ListBoxOrangeHL"), null, null, null);
            }
            this.nlb_RewardInfo.Add(newListItem);
        }
        this.nlb_RewardInfo.RepositionItems();
    }