Exemplo n.º 1
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();
    }
Exemplo n.º 2
0
    private void SetSelectSecondType(uint type, bool force = false)
    {
        if (null == mSecondTabCreator)
        {
            return;
        }
        if (m_uint_activeStype == type && !force)
        {
            return;
        }
        UISecondTypeGrid sGrid = null;

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

        m_uint_activeStype = type;
        if (m_uint_activeFType != 0)
        {
            sGrid = mSecondTabCreator.GetGrid <UISecondTypeGrid>(mlstFirstTabIds.IndexOf(m_uint_activeFType), m_dic[m_uint_activeFType].IndexOf(m_uint_activeStype));
            if (null != sGrid)
            {
                sGrid.SetHightLight(true);
            }
        }
        m_UIXmlRichText.Clear();
        BibleDataBase table = GameTableManager.Instance.GetTableItem <BibleDataBase>(m_uint_activeFType, (int)m_uint_activeStype);

        if (table == null)
        {
            Engine.Utility.Log.Warning("华夏宝典表格大类{0}-小类{1}数据为空!", m_uint_activeFType, m_uint_activeStype);
            return;
        }
        string content = table.content;

        m_UIXmlRichText.AddXml(RichXmlHelper.RichXmlAdapt(content));
    }
Exemplo n.º 3
0
    private void SetSelectSecondType(uint type, bool force = false)
    {
        if (null == mSecondTabCreator)
        {
            return;
        }
        if (m_uint_activeStype == type && !force)
        {
            return;
        }
        UISecondTypeGrid sGrid = null;

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

        m_uint_activeStype = type;
        if (m_uint_activeFType != 0)
        {
            sGrid = mSecondTabCreator.GetGrid <UISecondTypeGrid>(mlstFirstTabIds.IndexOf(m_uint_activeFType), m_dic[m_uint_activeFType].IndexOf(m_uint_activeStype));
            if (null != sGrid)
            {
                sGrid.SetHightLight(true);
            }
        }
        stRequestOrderListRelationUserCmd_C cmd = new stRequestOrderListRelationUserCmd_C();

        if (sGrid != null)
        {
            OrderListType xx = (OrderListType)Enum.Parse(typeof(OrderListType), sGrid.name);
            cmd.type = xx;
            NetService.Instance.Send(cmd);
        }
    }
Exemplo n.º 4
0
    private void SetSelectSecondType(uint type, bool force = false)
    {
        if (null == mSecondTabCreator)
        {
            return;
        }
        if (m_uint_activeStype == type && !force)
        {
            return;
        }
        UISecondTypeGrid sGrid = null;

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

        m_uint_activeStype = type;
        if (m_uint_activeFType != 0)
        {
            sGrid = mSecondTabCreator.GetGrid <UISecondTypeGrid>(mlstFirstTabIds.IndexOf(m_uint_activeFType), m_uintDic[m_uint_activeFType].IndexOf(m_uint_activeStype));
            if (null != sGrid)
            {
                sGrid.SetHightLight(true);
            }
        }
        SecondTypeClick(m_uint_activeStype);

        if (null != previousGrid)
        {
            previousGrid.SetSelect(false);
        }
    }
Exemplo n.º 5
0
    /// <summary>
    /// 设置选中二级分页
    /// </summary>
    /// <param name="type"></param>
    /// <param name="force"></param>
    private void SetSelectSecondType(QuestTraceInfo quest, bool force = false)
    {
        if (quest == null)
        {
            return;
        }
        if (m_uActiveStype == quest.taskId && !force)
        {
            return;
        }
        UISecondTypeGrid sGrid = (m_dicsType.ContainsKey(m_uActiveStype)) ? m_dicsType[m_uActiveStype] : null;

        if (null != sGrid)
        {
            sGrid.SetHightLight(false);
        }
        m_uActiveStype = quest.taskId;
        sGrid          = (m_dicsType.ContainsKey(m_uActiveStype)) ? m_dicsType[m_uActiveStype] : null;
        if (null != sGrid)
        {
            sGrid.SetHightLight(true);
        }
        ShowTaskInfo(quest);
    }
Exemplo n.º 6
0
    void SetSelectSecondTypeGrid(uint id)
    {
        UISecondTabCreatorBase creator = GetSecondTabCreator();

        if (creator == null)
        {
            return;
        }

        List <QuestTraceInfo> taskList = GetQuestListByType(m_selectTaskTypeId);

        if (taskList == null)
        {
            return;
        }

        QuestTraceInfo quest = taskList.Find((data) => { return(data.taskId == m_selectTaskId); });

        if (quest != null && taskTypeList.Contains(m_selectTaskTypeId))
        {
            UISecondTypeGrid grid = creator.GetGrid <UISecondTypeGrid>(taskTypeList.IndexOf(m_selectTaskTypeId), taskList.IndexOf(quest));
            if (grid != null)
            {
                grid.SetHightLight(false);
            }
        }

        QuestTraceInfo q = taskList.Find((data) => { return(data.taskId == id); });

        if (q != null && taskTypeList.Contains(m_selectTaskTypeId))
        {
            UISecondTypeGrid grid = creator.GetGrid <UISecondTypeGrid>(taskTypeList.IndexOf(m_selectTaskTypeId), taskList.IndexOf(q));
            if (grid != null)
            {
                grid.SetHightLight(true);
                ShowTaskInfo(q);
                this.m_selectTaskId = id;
            }
        }
    }