Ejemplo n.º 1
0
    /// <summary>
    /// 获取对应分类下的数据
    /// </summary>
    /// <param name="type">分类类型</param>
    /// <param name="typeId">分类id</param>
    /// <returns></returns>
    public List <uint> GetTypeDatas(CategoryTypeData.CategoryType type, uint typeId)
    {
        List <uint>      datas     = new List <uint>();
        CategoryTypeData cTypeData = GetCategoryTypeDataByType(type, typeId);

        if (null != cTypeData)
        {
            datas.AddRange(cTypeData.GetDatas());
        }
        datas.Sort();
        return(datas);
    }
Ejemplo n.º 2
0
    /// <summary>
    /// 设置选中第一分页
    /// </summary>
    /// <param name="type"></param>
    private void SetSelectFirstType(uint type, bool force = false)
    {
        if (null == mSecondTabCreator)
        {
            return;
        }
        if (m_uint_activeFType == type && !force)
        {
            mSecondTabCreator.DoToggle(mlstFirstTabIds.IndexOf(m_uint_activeFType), true, true);
            return;
        }
        m_uint_activeFType = type;
        mSecondTabCreator.Open(mlstFirstTabIds.IndexOf(m_uint_activeFType), true);
        CategoryTypeData ctd = m_mgr.GetCategoryTypeDataByType(CategoryTypeData.CategoryType.First, m_uint_activeFType);
        uint             selectSecondsKey = 0;

        if (null != ctd && ctd.GetDatas().Count != 0)
        {
            selectSecondsKey = ctd.GetDatas()[0];
        }
        SetSelectSecondType(selectSecondsKey, m_uint_activeStype == 0);
    }