Exemplo n.º 1
0
    /// <summary>
    /// 设置选中二级分页
    /// </summary>
    /// <param name="firstKeyId"></param>
    /// <param name="titleId"></param>
    /// <param name="force"></param>
    private void SetSelectSecondType(uint firstKeyId, uint titleId, bool force = false)
    {
        UITitleSecondTypeGrid grid = GetTitleSecondTypeGrid(m_selectTitleTypeId, m_selectTitleId);

        if (grid != null)
        {
            grid.SetSelect(false);
        }

        grid = GetTitleSecondTypeGrid(firstKeyId, titleId);
        if (grid != null)
        {
            //选中高亮
            grid.SetSelect(true);

            //取消grid的红点
            grid.SetRedPointStatus(false);
        }

        this.m_selectTitleId = titleId;

        InitTitleInfoUI();

        //取消红点提示
        CancelNewTitleRedPoint(firstKeyId, titleId);
    }
Exemplo n.º 2
0
    /// <summary>
    /// 更新二级页签数据
    /// </summary>
    /// <param name="gridBase"></param>
    /// <param name="id"></param>
    /// <param name="index"></param>
    private void OnUpdateTitleSecondGrid(UIGridBase gridBase, object id, int index)
    {
        UITitleSecondTypeGrid grid = gridBase as UITitleSecondTypeGrid;

        if (grid == null)
        {
            return;
        }

        List <uint> secondIdList;

        if (m_titleDic.TryGetValue((uint)id, out secondIdList))
        {
            if (secondIdList.Count > index)
            {
                grid.SetGridData((uint)id, secondIdList[index]);

                grid.SetSelect(secondIdList[index] == m_selectTitleId);
                bool isNewTitle = TManager.NewTitleIdList.Contains(secondIdList[index]);
                grid.SetRedPointStatus(isNewTitle);
            }
        }
    }