コード例 #1
0
    /// <summary>
    /// 跟新一级页签数据
    /// </summary>
    /// <param name="gridBase"></param>
    /// <param name="index"></param>
    private void OnUpdateTitileCtrTypeGrid(UIGridBase gridBase, int index)
    {
        if (m_titleDic != null && m_titleDic.Keys.Count > index)
        {
            UICtrTypeGrid grid = gridBase as UICtrTypeGrid;
            if (grid == null)
            {
                return;
            }

            Dictionary <uint, List <uint> > .KeyCollection kc = m_titleDic.Keys;
            List <uint> keyIdList = kc.ToList <uint>();
            uint        keyId     = keyIdList[index];

            List <uint> secondIdList;
            if (m_titleDic.TryGetValue(keyId, out secondIdList))
            {
                if (secondIdList.Count == 0)
                {
                    return;
                }
                TitleDataBase tdb = m_lstTableTitle.Find((d) => { return(d.dwID == secondIdList[0]); });

                //数据
                grid.SetData(keyId, tdb != null ? tdb.secondTypeName : "", secondIdList.Count);

                //红点
                bool haveNewTitle = HaveNewTilteInList(secondIdList);
                grid.SetRedPointStatus(haveNewTitle);
            }
        }
    }
コード例 #2
0
    private void OnGridUIEventDlg(UIEventType eventType, object data, object param)
    {
        if (eventType == UIEventType.Click)
        {
            if (data is UICtrTypeGrid)
            {
                UICtrTypeGrid grid = data as UICtrTypeGrid;
                if (grid == null)
                {
                    return;
                }

                SetSelectFirstType((uint)grid.ID);
            }

            if (data is UITeamActivityChildGrid)
            {
                UITeamActivityChildGrid grid = data as UITeamActivityChildGrid;
                if (grid == null)
                {
                    return;
                }

                SetSelectSecondType(grid.Id);

                //请求当前活动队伍
                DataManager.Manager <TeamDataManager>().ReqConvenientTeamListByTeamActivityId(m_selectActivityId);
                SetMatchBtn(m_selectTypeId);
            }
        }
    }
コード例 #3
0
 /// <summary>
 /// 镶嵌格子数据UI事件回调
 /// </summary>
 /// <param name="eventType"></param>
 /// <param name="data"></param>
 /// <param name="param"></param>
 private void OnInlayGridUIEventDlg(UIEventType eventType, object data, object param)
 {
     switch (eventType)
     {
     case UIEventType.Click:
     {
         if (data is UICtrTypeGrid)
         {
             UICtrTypeGrid ctg = data as UICtrTypeGrid;
             SetActiveGemType((GameCmd.GemType)ctg.ID);
         }
         else if (data is UIGemGrid)
         {
             UIGemGrid gGRid = data as UIGemGrid;
             //镶嵌
             DoInlay(gGRid.Data);
         }
         else if (data is UIEquipPosStatusGrid)
         {
             UIEquipPosStatusGrid epsGrid = data as UIEquipPosStatusGrid;
             SetSelectPart(epsGrid.Data);
         }
         else if (data is UIGemInLayGrid)
         {
             UIGemInLayGrid gInlayGrid = data as UIGemInLayGrid;
             DoUnload(gInlayGrid.Data);
         }
     }
     break;
     }
 }
コード例 #4
0
ファイル: RankPanel.cs プロジェクト: zuojiashun/src
 private void OnRankGridDataUpdate(UIGridBase data, int index)
 {
     if (data is UIRankGrid)
     {
         UIRankGrid rg = data as UIRankGrid;
         rg.SetRankIndex((uint)index);
         if (index < rankList.Count)
         {
             rg.SetGridData(rankList[index]);
             rg.SetSelect(false);
         }
     }
     else if (data is UICtrTypeGrid)
     {
         if (index < mlstFirstTabIds.Count)
         {
             UICtrTypeGrid grid = data as UICtrTypeGrid;
             grid.SetRedPointStatus(false);
             if (rankDic.ContainsKey((uint)(index + 1)))
             {
                 List <RankTypeDataBase> d = rankDic[(uint)(index + 1)];
                 if (index < mlstFirstTabIds.Count && d.Count > 0)
                 {
                     grid.SetData(mlstFirstTabIds[index], d[0].mainName, d.Count);
                 }
             }
         }
     }
 }
コード例 #5
0
 /// <summary>
 /// 格子事件委托
 /// </summary>
 /// <param name="eventType"></param>
 /// <param name="data"></param>
 /// <param name="param"></param>
 private void OnGridEventDlg(UIEventType eventType, object data, object param)
 {
     switch (eventType)
     {
     case UIEventType.Click:
     {
         if (data is UICtrTypeGrid)
         {
             UICtrTypeGrid tGrid = data as UICtrTypeGrid;
             SetSelectFirstType((uint)tGrid.ID);
         }
         else if (data is UISecondTypeGrid)
         {
             UISecondTypeGrid sGrid = data as UISecondTypeGrid;
             SetSelectSecondType(sGrid.Data);
         }
         else if (data is UIComposeGrid)
         {
             UIComposeGrid cGrid = data as UIComposeGrid;
             SetSelectId(cGrid.Id);
         }
     }
     break;
     }
 }
コード例 #6
0
 private void OnGridUIEventDlg(UIEventType eventType, object data, object param)
 {
     switch (eventType)
     {
     case UIEventType.Click:
         if (data is UICtrTypeGrid)
         {
             UICtrTypeGrid tabGrid = data as UICtrTypeGrid;
             SetSelectFirstType((uint)tabGrid.ID);
             if (m_uintDic.ContainsKey((uint)tabGrid.ID))
             {
                 if (m_uintDic[(uint)tabGrid.ID].Count > 0)
                 {
                     SetSelectSecondType(m_uintDic[(uint)tabGrid.ID][0], true);
                 }
             }
         }
         if (data is UIAchievemenGrid)
         {
             UIAchievemenGrid achieveGrid = data as UIAchievemenGrid;
             if (null != achieveGrid)
             {
                 SetSelectAchievementGrid(achieveGrid.index);
             }
         }
         if (data is UISecondTypeGrid)
         {
             UISecondTypeGrid sec = data as UISecondTypeGrid;
             SetSelectSecondType(sec.Data);
         }
         break;
     }
 }
コード例 #7
0
    /// <summary>
    /// 镶嵌格子数据刷新回调
    /// </summary>
    /// <param name="grid"></param>
    /// <param name="index"></param>
    private void OnUpdateInlayGrid(UIGridBase grid, int index)
    {
        if (grid is UICtrTypeGrid)
        {
            UICtrTypeGrid ctg = grid as UICtrTypeGrid;
            if (mlstCanInlayGemType.Count > index)
            {
                GameCmd.GemType gemType = mlstCanInlayGemType[index];

                GemInlayUpdateData updateData = GetGemInlayUpdateData(gemType);
                int num = (null != updateData) ? updateData.Count : 0;
                ctg.SetData(gemType, DataManager.Manager <TextManager>().GetGemNameByType(gemType), num);
                ctg.SetRedPointStatus(DataManager.Manager <ForgingManager>().HaveGemCanImprove(m_emSelectInlayPos, gemType));
            }
        }
        else if (grid is UIEquipPosStatusGrid)
        {
            UIEquipPosStatusGrid posGrid = grid as UIEquipPosStatusGrid;
            GameCmd.EquipPos     pos     = GetEquipPosByIndex(index);
            bool isInlay = IsPanelMode(ForgingPanelMode.Inlay);
            posGrid.SetGridViewData(pos, isInlay);
            posGrid.SetHightLight(pos == m_emSelectInlayPos);
            if (isInlay)
            {
                Gem    gem              = null;
                uint   inLayGemBaseId   = 0;
                string inlayGemIconName = "";
                bool   inlay            = false;
                bool   unlock           = false;
                for (EquipManager.EquipGridIndexType i = EquipManager.EquipGridIndexType.First; i < EquipManager.EquipGridIndexType.Max; i++)
                {
                    inlayGemIconName = "";
                    inlay            = false;
                    unlock           = false;
                    if (i < 0)
                    {
                        continue;
                    }

                    if (emgr.TryGetEquipGridInlayGem(pos, i, out inLayGemBaseId))
                    {
                        gem = DataManager.Manager <ItemManager>()
                              .GetTempBaseItemByBaseID <Gem>(inLayGemBaseId, ItemDefine.ItemDataType.Gem);
                        inlayGemIconName = gem.Icon;
                        unlock           = true;
                        inlay            = true;
                    }
                    else if (emgr.IsUnlockEquipGridIndex(i))
                    {
                        unlock = true;
                    }
                    posGrid.SetInlayIcon(i, unlock, inlay, inlayGemIconName);
                }
            }
        }
    }
コード例 #8
0
ファイル: ChinaBiblePanel.cs プロジェクト: zuojiashun/src
 public void onUpdateGrid(UIGridBase grid, int index)
 {
     if (grid is UICtrTypeGrid)
     {
         UICtrTypeGrid        tab = grid as UICtrTypeGrid;
         List <BibleDataBase> d   = bibleDic[mlstFirstTabIds[index]];
         tab.SetData(mlstFirstTabIds[index], d[0].firName, d.Count);
         tab.SetGridData((uint)mlstFirstTabIds[index]);
     }
 }
コード例 #9
0
 private void OnUpdateGridData(UIGridBase grid, int index)
 {
     if (grid is UICtrTypeGrid)
     {
         UICtrTypeGrid tabGrid = grid as UICtrTypeGrid;
         if (tabGrid != null)
         {
             if (index == 0)
             {
                 int haveNum  = 0;
                 int totalNum = 0;
                 achievementManager.GetGainAchieveNum(out haveNum, out totalNum);
                 string titleTips = "综合";
                 tabGrid.SetRedPointStatus(achievementManager.HaveCanReceiveAchieveByType((uint)index));
                 if (index < mlstFirstTabIds.Count)
                 {
                     tabGrid.SetData(mlstFirstTabIds[index], titleTips, 0);
                 }
             }
             else
             {
                 AchievementDataBase achievementData = achievementManager.GetParentAchievementData(index);
                 if (achievementData != null)
                 {
                     int haveNum  = 0;
                     int totalNum = 0;
                     int count    = 0;
                     if (achieveDic.ContainsKey((uint)index))
                     {
                         count = achieveDic[(uint)(index)].Count;
                     }
                     achievementManager.GetGainAchieveByType(achievementData.type, out haveNum, out totalNum);
                     string titleTips = string.Format("{0}({1}/{2})", achievementData.typeName, haveNum, totalNum);
                     tabGrid.SetRedPointStatus(achievementManager.HaveCanReceiveAchieveByType((uint)index));
                     if (index < mlstFirstTabIds.Count)
                     {
                         tabGrid.SetData(mlstFirstTabIds[index], titleTips, count);
                     }
                 }
             }
         }
     }
     else if (grid is UIAchievemenGrid)
     {
         UIAchievemenGrid achieveGrid = grid as UIAchievemenGrid;
         if (null != achieveGrid)
         {
             AchieveData achieveData = dailyAchieveDataList.Count > index ? dailyAchieveDataList[index] : null;
             achieveGrid.UpdateItemInfo(achieveData);
             achieveGrid.SetGridData(index);
             achieveGrid.SetSelect(false);
         }
     }
 }
コード例 #10
0
ファイル: RankPanel.cs プロジェクト: zuojiashun/src
    void UpdataTypeGrid(int index)
    {
        List <RankTypeDataBase> d       = rankDic[(uint)(index + 1)];
        UICtrTypeGrid           tabGrid = mSecondTabCreator.GetGrid <UICtrTypeGrid>(index);

        if (tabGrid != null)
        {
            tabGrid.SetGridData((uint)index);
            tabGrid.SetName(d[0].mainName);
            tabGrid.SetRedPointStatus(false);
        }
    }
コード例 #11
0
    /// <summary>
    /// 可合成装备红点提示
    /// </summary>
    private void UpdateCanComposeRedPoint()
    {
        UITypeGrid tGrid = null;

        if (null != mSecondTabCreator)
        {
            UICtrTypeGrid ctg = mSecondTabCreator.GetGrid <UICtrTypeGrid>(0);
            if (null != ctg)
            {
                List <uint> datas = m_mgr.GetCanComposeItemIds();
                ctg.SetRedPointStatus((null != datas && datas.Count != 0));
            }
        }
    }
コード例 #12
0
 void ShowUIByToggle(ConsignmentItemMode type)
 {
     m_ctor_SellItemPriceList.SetVisible(false);
     m_saleUIToggle = type;
     if (type == ConsignmentItemMode.Buy)
     {
         m_trans_CommonContent.gameObject.SetActive(true);
         m_trans_BuyMoneyContent.gameObject.SetActive(true);
         m_trans_SellMoneyContent.gameObject.SetActive(false);
         m_trans_AccountContent.gameObject.SetActive(false);
         ResetArrow(type);
         InitText();
         if (mSecondTabCreator != null)
         {
             UICtrTypeGrid grid = mSecondTabCreator.GetGrid <UICtrTypeGrid>(0);
             if (grid != null)
             {
                 grid.SetName("我的关注");
             }
         }
     }
     else if (type == ConsignmentItemMode.Sell)
     {
         m_trans_CommonContent.gameObject.SetActive(true);
         m_trans_BuyMoneyContent.gameObject.SetActive(false);
         m_trans_SellMoneyContent.gameObject.SetActive(true);
         m_trans_AccountContent.gameObject.SetActive(false);
         ResetArrow(type);
         InitText();
     }
     else if (type == ConsignmentItemMode.Account)
     {
         m_trans_CommonContent.gameObject.SetActive(false);
         m_trans_BuyMoneyContent.gameObject.SetActive(false);
         m_trans_SellMoneyContent.gameObject.SetActive(false);
         m_trans_AccountContent.gameObject.SetActive(true);
     }
     else if (type == ConsignmentItemMode.ShowItem)
     {
         if (mSecondTabCreator != null)
         {
             UICtrTypeGrid grid = mSecondTabCreator.GetGrid <UICtrTypeGrid>(0);
             if (grid != null)
             {
                 grid.SetName("所有公示");
             }
         }
     }
 }
コード例 #13
0
    /// <summary>
    /// 跟新一级页签数据
    /// </summary>
    /// <param name="gridBase"></param>
    /// <param name="index"></param>
    private void OnUpdateMissionCtrTypeGrid(UIGridBase gridBase, int index)
    {
        if (taskTypeList != null && taskTypeList.Count > index)
        {
            UICtrTypeGrid grid = gridBase as UICtrTypeGrid;
            if (grid == null)
            {
                return;
            }

            List <QuestTraceInfo> taskList = GetQuestListByType(taskTypeList[index]);

            //数据
            grid.SetData(taskTypeList[index], taskTypeList[index].GetEnumDescription(), taskList != null ? taskList.Count : 0);
            grid.SetRedPointStatus(false);
        }
    }
コード例 #14
0
ファイル: RankPanel.cs プロジェクト: zuojiashun/src
    private void OnRankGridUIEvent(UIEventType eventType, object data, object param)
    {
        switch (eventType)
        {
        case UIEventType.Click:
            if (data is UISecondTypeGrid)
            {
                if (previous != null)
                {
                    previous.SetSelect(false);
                }
                UISecondTypeGrid sec = data as UISecondTypeGrid;
                SetSelectSecondType(sec.Data);
            }
            else if (data is UIRankGrid)
            {
                UIRankGrid grid = data as UIRankGrid;
                grid.SetSelect(true);

                if (previous == null)
                {
                    previous = grid;
                }
                else
                {
                    if (selectIndex != (int)grid.RankIndex)
                    {
                        previous.SetSelect(false);
                        previous    = grid;
                        selectIndex = (int)grid.RankIndex;
                    }
                }
                DataManager.Instance.Sender.RequestPlayerInfoForOprate(grid.PlayID, PlayerOpreatePanel.ViewType.Normal);
            }
            if (data is UICtrTypeGrid)
            {
                if (previous != null)
                {
                    previous.SetSelect(false);
                }
                UICtrTypeGrid tabGrid = data as UICtrTypeGrid;
                SetSelectFirstType((uint)tabGrid.ID);
            }
            break;
        }
    }
コード例 #15
0
 /// <summary>
 /// 设置展开的宝石类型
 /// </summary>
 /// <param name="gType">目标宝石类型</param>
 /// <param name="instant">是否直接展开不需要过度</param>
 private void SetActiveGemType(GameCmd.GemType gType, bool instant = false)
 {
     if (gType == GameCmd.GemType.GemType_None)
     {
         return;
     }
     if (null != mSecondsTabCreator)
     {
         UICtrTypeGrid      ctgGrid           = mSecondsTabCreator.GetGrid <UICtrTypeGrid>(mlstCanInlayGemType.IndexOf(m_emActiveGemType));
         GemInlayUpdateData gemCurUpdateData  = GetGemInlayUpdateData();
         GemInlayUpdateData gemNextUpdateData = GetGemInlayUpdateData(gType);
         if (m_emActiveGemType == gType)
         {
             if (!mSecondsTabCreator.IsOpen(mlstCanInlayGemType.IndexOf(m_emActiveGemType)) ||
                 gemCurUpdateData.Count == 0)
             {
                 mSecondsTabCreator.Close(mlstCanInlayGemType.IndexOf(m_emActiveGemType), true);
                 m_emActiveGemType = GameCmd.GemType.GemType_None;
                 TipsManager.Instance.ShowLocalFormatTips(LocalTextType.Gemstone_Commond_2);
             }
             else
             {
                 TipsManager.Instance.ShowLocalFormatTips(LocalTextType.Gemstone_Commond_1);
             }
             return;
         }
         if (null != gemCurUpdateData && (gemCurUpdateData.Count == 0 || gemNextUpdateData.Count != 0))
         {
             mSecondsTabCreator.Close(mlstCanInlayGemType.IndexOf(m_emActiveGemType), true);
         }
         if (null != gemNextUpdateData)
         {
             if (gemNextUpdateData.Count != 0)
             {
                 m_emActiveGemType = gType;
                 mSecondsTabCreator.Open(mlstCanInlayGemType.IndexOf(m_emActiveGemType), instant);
             }
             else
             {
                 TipsManager.Instance.ShowLocalFormatTips(LocalTextType.Gemstone_Commond_2);
             }
         }
     }
 }
コード例 #16
0
    private void OnGrowUpTypeGridUIEventDlg(UIEventType eventType, object data, object param)
    {
        if (eventType == UIEventType.Click)
        {
            if (data is UICtrTypeGrid)
            {
                UICtrTypeGrid grid = data as UICtrTypeGrid;
                if (grid == null)
                {
                    return;
                }

                SetSelectCtrTypeGrid((uint)grid.ID);

                //默认选中二级grid的第一个
                Dictionary <uint, List <uint> > secondKeyDic;
                if (m_dicGrowUp.TryGetValue((uint)grid.ID, out secondKeyDic))
                {
                    List <uint> secondKeyIdList = secondKeyDic.Keys.ToList <uint>();
                    if (secondKeyIdList.Count > 0)
                    {
                        uint secondKeyId = secondKeyIdList[0];
                        SetSelectSecondTypeGrid((uint)grid.ID, secondKeyId);

                        CreateGrowUpGrid();
                    }
                }
            }

            if (data is UIGrowUpSecondTypeGrid)
            {
                UIGrowUpSecondTypeGrid grid = data as UIGrowUpSecondTypeGrid;
                if (grid == null)
                {
                    return;
                }

                SetSelectSecondTypeGrid(grid.FirstKeyId, grid.SecondKeyId);

                CreateGrowUpGrid();
            }
        }
    }
コード例 #17
0
ファイル: ChinaBiblePanel.cs プロジェクト: zuojiashun/src
    public void OnGridUIEvent(UIEventType eventType, object data, object param)
    {
        switch (eventType)
        {
        case UIEventType.Click:
        {
            if (data is UISecondTypeGrid)
            {
                UISecondTypeGrid sec = data as UISecondTypeGrid;
                SetSelectSecondType(sec.Data);
            }

            if (data is UICtrTypeGrid)
            {
                UICtrTypeGrid tabGrid = data as UICtrTypeGrid;
                SetSelectFirstType((uint)tabGrid.ID);
            }
        }
        break;
        }
    }
コード例 #18
0
    private void OnUpdateCtrTypeGrid(UIGridBase gridBase, int index)
    {
        if (index < m_dicActivity.Keys.Count)
        {
            UICtrTypeGrid grid = gridBase as UICtrTypeGrid;
            if (grid == null)
            {
                return;
            }

            List <uint> typeIdList = m_dicActivity.Keys.ToList <uint>();
            uint        typeId     = typeIdList[index];

            List <uint> teamActivityIdList;
            if (m_dicActivity.TryGetValue(typeId, out teamActivityIdList))
            {
                string typeName = TDManager.GetConvenientTeamActivityFirstTypeName(typeId, teamActivityIdList.Count > 0 ? teamActivityIdList[0] : 0);
                grid.SetData(typeId, typeName, teamActivityIdList.Count);
            }
        }
    }
コード例 #19
0
    /// <summary>
    /// grid事件
    /// </summary>
    /// <param name="eventType"></param>
    /// <param name="data"></param>
    /// <param name="param"></param>
    private void OnTitileCtrTypeGridUIEventDlg(UIEventType eventType, object data, object param)
    {
        if (eventType == UIEventType.Click)
        {
            //一级页签
            if (data is UICtrTypeGrid)
            {
                UICtrTypeGrid grid = data as UICtrTypeGrid;
                if (grid == null)
                {
                    return;
                }

                SetSelectCtrTypeGrid((uint)grid.ID);

                //默认选中二级页签第一个
                List <uint> secondIdList;
                if (m_titleDic.TryGetValue((uint)grid.ID, out secondIdList))
                {
                    if (secondIdList.Count > 0)
                    {
                        uint secondId = secondIdList[0];
                        SetSelectSecondType((uint)grid.ID, secondId);
                    }
                }
            }

            //二级页签
            if (data is UITitleSecondTypeGrid)
            {
                UITitleSecondTypeGrid grid = data as UITitleSecondTypeGrid;
                if (grid == null)
                {
                    return;
                }

                SetSelectSecondType(grid.FirstKeyId, grid.TitleId);
            }
        }
    }
コード例 #20
0
    /// <summary>
    /// 取消红点提示
    /// </summary>
    /// <param name="titleId"></param>
    public void CancelNewTitleRedPoint(uint firstKeyId, uint titleId)
    {
        //1、 清数据
        if (TManager.IsNewTitle(titleId))
        {
            TManager.NewTitleIdList.Remove(titleId);

            //检查主界面红点提示
            stShowMainPanelRedPoint st = new stShowMainPanelRedPoint()
            {
                modelID   = (int)WarningEnum.TITLE_NEWTITLE,
                direction = (int)WarningDirection.Left,
                bShowRed  = TManager.HaveNewTitle(),
            };
            EventEngine.Instance().DispatchEvent((int)GameEventID.MAINPANEL_SHOWREDWARING, st);
        }

        //2、 下面的一级页签
        if (m_secondsTabCreator != null)
        {
            List <uint> titleIdList;
            if (m_titleDic.TryGetValue(firstKeyId, out titleIdList))
            {
                bool haveNewTitle = HaveNewTilteInList(titleIdList);

                List <uint>   firstKeyIdList = m_titleDic.Keys.ToList <uint>();
                UICtrTypeGrid ctrTypeGrid    = m_secondsTabCreator.GetGrid <UICtrTypeGrid>(firstKeyIdList.IndexOf(firstKeyId));
                if (ctrTypeGrid != null)
                {
                    ctrTypeGrid.SetRedPointStatus(haveNewTitle);
                }
            }
        }

        //3、最上面的grid
        SetTopCategoryGridNewMark(HaveNewTilteInList(m_lstTitleData));
    }
コード例 #21
0
 /// <summary>
 /// 格子更新
 /// </summary>
 /// <param name="gridBase"></param>
 /// <param name="index"></param>
 private void OnGridUpdate(UIGridBase gridBase, int index)
 {
     if (gridBase is UIComposeGrid)
     {
         UIComposeGrid cGrid = gridBase as UIComposeGrid;
         if (m_list_composeDatas.Count > index)
         {
             cGrid.SetGridData(m_list_composeDatas[index]);
             cGrid.SetHightLight(m_uint_composeId == m_list_composeDatas[index]);
         }
     }
     else if (gridBase is UICtrTypeGrid)
     {
         if (index < mlstFirstTabIds.Count)
         {
             UICtrTypeGrid    ctg  = gridBase as UICtrTypeGrid;
             CategoryTypeData fctd = null;
             if (index == 0)
             {
                 fctd = new CategoryTypeData(0, "可合成");
                 ctg.EnableArrow(false);
             }
             else
             {
                 ctg.SetRedPointStatus(false);
                 fctd = m_mgr.GetCategoryTypeDataByType(CategoryTypeData.CategoryType.First
                                                        , mlstFirstTabIds[index]);
             }
             if (null != fctd)
             {
                 ctg.SetData(fctd.m_uint_categoryId
                             , fctd.m_str_categoryName
                             , fctd.Count);
             }
         }
     }
 }
コード例 #22
0
    private void OnUpdateGrowUpCtrTypeGrid(UIGridBase gridBase, int index)
    {
        if (m_dicGrowUp != null && m_dicGrowUp.Keys.Count > index)
        {
            UICtrTypeGrid grid = gridBase as UICtrTypeGrid;
            if (grid == null)
            {
                return;
            }

            List <uint> keyIdList = m_dicGrowUp.Keys.ToList <uint>();
            uint        keyId     = keyIdList[index];

            Dictionary <uint, List <uint> > secondKeyDic;
            if (m_dicGrowUp.TryGetValue(keyId, out secondKeyDic))
            {
                GrowUpDabaBase growUpDabaBase = m_lstGrowUpDabaBase.Find((data) => { return(data.Type == keyId); });
                if (growUpDabaBase != null)
                {
                    grid.SetData(keyId, growUpDabaBase.TypeName, secondKeyDic.Keys.Count);
                }
            }
        }
    }
コード例 #23
0
    /// <summary>
    /// grid事件
    /// </summary>
    /// <param name="eventType"></param>
    /// <param name="data"></param>
    /// <param name="param"></param>
    private void OnMissionCtrTypeGridUIEventDlg(UIEventType eventType, object data, object param)
    {
        if (eventType == UIEventType.Click)
        {
            //一级页签
            if (data is UICtrTypeGrid)
            {
                UICtrTypeGrid grid = data as UICtrTypeGrid;
                if (grid == null)
                {
                    return;
                }

                SetSelectCtrTypeGrid((MissionEnum)grid.ID);

                ////默认选中第一个
                //List<QuestTraceInfo> taskList = GetQuestListByType(m_selectTaskTypeId);
                //if (taskList != null && taskList.Count > 0)
                //{
                //    SetSelectSecondTypeGrid(taskList[0].taskId);
                //}
            }

            //二级页签
            if (data is UISecondTypeGrid)
            {
                UISecondTypeGrid grid = data as UISecondTypeGrid;
                if (grid == null)
                {
                    return;
                }

                SetSelectSecondTypeGrid(grid.Data);
            }
        }
    }