Ejemplo n.º 1
0
 /// <summary>
 /// shi
 /// </summary>
 /// <param name="composeId"></param>
 public void FocusComposeData(uint composeId)
 {
     table.ComposeDataBase curDB
         = GameTableManager.Instance.GetTableItem <table.ComposeDataBase>(composeId);
     if (null != curDB)
     {
         CategoryTypeData ctd = m_mgr.GetCategoryTypeDataByType(CategoryTypeData.CategoryType.First, curDB.fType);
         if (null != mSecondTabCreator && null != ctd)
         {
             uint secondType = m_mgr.BuildComposeSecondsKey(curDB.fType, curDB.sType);
             SetSelectFirstType(curDB.fType, true);
             SetSelectSecondType(secondType, true);
             mSecondTabCreator.FocusData(mlstFirstTabIds.IndexOf(curDB.fType), ctd.IndexOf(secondType));
         }
         SetSelectId(composeId);
     }
 }
Ejemplo n.º 2
0
    /// <summary>
    /// 设置选中二级分页
    /// </summary>
    /// <param name="type"></param>
    /// <param name="force"></param>
    private void SetSelectSecondType(uint type, bool force = false)
    {
        if (null == mSecondTabCreator)
        {
            return;
        }
        if (m_uint_activeStype == type && !force)
        {
            return;
        }

        CategoryTypeData ftd   = m_mgr.GetCategoryTypeDataByType(CategoryTypeData.CategoryType.First, m_uint_activeFType);
        UISecondTypeGrid sGrid = null;

        if (null != ftd && m_uint_activeFType != 0)
        {
            sGrid = mSecondTabCreator.GetGrid <UISecondTypeGrid>(mlstFirstTabIds.IndexOf(m_uint_activeFType), ftd.IndexOf(m_uint_activeStype));
            if (null != sGrid)
            {
                sGrid.SetHightLight(false);
            }
        }

        m_uint_activeStype = type;
        if (null != ftd && m_uint_activeFType != 0)
        {
            sGrid = mSecondTabCreator.GetGrid <UISecondTypeGrid>(mlstFirstTabIds.IndexOf(m_uint_activeFType), ftd.IndexOf(m_uint_activeStype));
            if (null != sGrid)
            {
                sGrid.SetHightLight(true);
            }
        }
        BuildComposeList();
        UpdateComposeUI();
    }