/// <summary>
    /// 设置锻造加工模式
    /// </summary>
    /// <param name="mode"></param>
    private void SetProccessMode(ForgingProccessMode mode, bool force = false)
    {
        if (this.m_em_fpm == mode && !force)
        {
            return;
        }

        UITabGrid grid = null;

        if (null != m_dic_fpTabs && m_dic_fpTabs.TryGetValue(m_em_fpm, out grid))
        {
            grid.SetHightLight(false);
        }
        this.m_em_fpm = mode;
        if (null != m_dic_fpTabs && m_dic_fpTabs.TryGetValue(m_em_fpm, out grid))
        {
            grid.SetHightLight(true);
        }
        ResetProccess();
        UpdateProccess(Data);
    }
 /// <summary>
 /// 是否为当前加工模式
 /// </summary>
 /// <param name="mode"></param>
 private bool IsProccessMode(ForgingProccessMode mode)
 {
     return(m_em_fpm == mode);
 }
    private void InitProccessWidgets()
    {
        if (IsInitStatus(ForgingPanelMode.Proccess))
        {
            return;
        }
        SetInitStatus(ForgingPanelMode.Proccess, true);
        //装备
        GameObject preObj = UIManager.GetResGameObj(GridID.Uiitemgrowshowgrid) as GameObject;

        if (null != preObj)
        {
            GameObject cloneObj = null;
            if (null != m_trans_ProcessInfoRoot && null == m_processGrowShow)
            {
                cloneObj = NGUITools.AddChild(m_trans_ProcessInfoRoot.gameObject, preObj);
                if (null != cloneObj)
                {
                    m_processGrowShow = cloneObj.GetComponent <UIItemGrowShowGrid>();
                    if (null == m_processGrowShow)
                    {
                        m_processGrowShow = cloneObj.AddComponent <UIItemGrowShowGrid>();
                    }
                    m_processGrowShow.RegisterUIEventDelegate(OnUIEventCallback);
                }
            }

            preObj = UIManager.GetResGameObj(GridID.Uiproccessgrid) as GameObject;
            if (null != m_trans_ProcessCostRoot && null == m_processRsGrowShow)
            {
                cloneObj = NGUITools.AddChild(m_trans_ProcessCostRoot.gameObject, preObj);
                if (null != cloneObj)
                {
                    m_processRsGrowShow = cloneObj.GetComponent <UIProccessGrid>();
                    if (null == m_processRsGrowShow)
                    {
                        m_processRsGrowShow = cloneObj.AddComponent <UIProccessGrid>();
                    }
                    m_processRsGrowShow.RegisterUIEventDelegate((eventType, data, param) =>
                    {
                        if (eventType == UIEventType.Click)
                        {
                            if (data is UIItemInfoGrid)
                            {
                                UIItemInfoGrid infoGrid = data as UIItemInfoGrid;
                                if (null != infoGrid && infoGrid.NotEnough && null != param && param is uint)
                                {
                                    ShowItemGet((uint)param);
                                }
                            }
                            else if (data is UIProccessGrid)
                            {
                                if (IsPanelMode(ForgingPanelMode.Proccess))
                                {
                                    if (!IsProccessMode(ForgingProccessMode.Fetch))
                                    {
                                        if (null != param)
                                        {
                                            m_uint_selectRSBaseId = 0;
                                            m_processRsGrowShow.SetGridData(m_uint_selectRSBaseId, needUnload: true);
                                        }
                                        else
                                        {
                                            OnSelectProcessRuneStone();
                                        }
                                    }
                                }
                            }
                        }
                    });
                }
            }
        }


        if (null == m_dic_fpTabs)
        {
            m_dic_fpTabs = new Dictionary <ForgingProccessMode, UITabGrid>();
        }
        m_dic_fpTabs.Clear();
        Transform ts = null;

        if (null != m_trans_ProcessTabs)
        {
            UITabGrid tGrid = null;
            for (ForgingProccessMode i = ForgingProccessMode.Promote; i < ForgingProccessMode.Max; i++)
            {
                ts = m_trans_ProcessTabs.Find(i.ToString() + "Tab");
                if (null == ts)
                {
                    continue;
                }
                tGrid = ts.GetComponent <UITabGrid>();
                if (null == tGrid)
                {
                    tGrid = ts.gameObject.AddComponent <UITabGrid>();
                }
                tGrid.SetGridData(i);
                tGrid.RegisterUIEventDelegate(OnUIEventCallback);
                tGrid.SetHightLight(false);
                m_dic_fpTabs.Add(i, tGrid);
            }
        }
        if (null == m_dic_propCurGrids)
        {
            m_dic_propCurGrids = new Dictionary <ForgingProccessPropertyIndex, UIEquipPropertyGrid>();
        }
        m_dic_propCurGrids.Clear();
        if (null == m_dic_propNextGrids)
        {
            m_dic_propNextGrids = new Dictionary <ForgingProccessPropertyIndex, UIEquipPropertyGrid>();
        }
        m_dic_propNextGrids.Clear();
        if (null == m_dic_propCBs)
        {
            m_dic_propCBs = new Dictionary <ForgingProccessPropertyIndex, UIToggle>();
        }
        m_dic_propCBs.Clear();

        UIEquipPropertyGrid uPGrid = null;
        UIToggle            toggle = null;

        //属性格子
        for (ForgingProccessPropertyIndex i = ForgingProccessPropertyIndex.One
             ; i < ForgingProccessPropertyIndex.Max; i++)
        {
            if (null != m_trans_ProccessPropertyContentRoot)
            {
                //Cur
                ts = Util.findTransform(m_trans_ProccessPropertyContentRoot, i.ToString() + "CPP");
                if (null != ts)
                {
                    uPGrid = ts.GetComponent <UIEquipPropertyGrid>();
                    if (null == uPGrid)
                    {
                        uPGrid = ts.gameObject.AddComponent <UIEquipPropertyGrid>();
                    }
                    m_dic_propCurGrids.Add(i, uPGrid);
                }
                //Nex
                ts = Util.findTransform(m_trans_ProccessPropertyContentRoot, i.ToString() + "NPP");
                if (null != ts)
                {
                    uPGrid = ts.GetComponent <UIEquipPropertyGrid>();
                    if (null == uPGrid)
                    {
                        uPGrid = ts.gameObject.AddComponent <UIEquipPropertyGrid>();
                    }
                    m_dic_propNextGrids.Add(i, uPGrid);
                }
                //CheckBox
                ts = Util.findTransform(m_trans_ProccessPropertyContentRoot, i.ToString() + "CB");
                if (null != ts)
                {
                    toggle = ts.GetComponent <UIToggle>();
                    if (null == uPGrid)
                    {
                        toggle = ts.gameObject.AddComponent <UIToggle>();
                    }

                    m_dic_propCBs.Add(i, toggle);
                }
            }
        }

        SetProccessMode(ForgingProccessMode.Promote, true);
        //InitPromote();
        //InitRemove();
        //InitFetch();
    }