Ejemplo n.º 1
0
        /// <summary>
        ///     计算图标开启情况
        /// </summary>
        private void CalculateOpenedButton()
        {
            _openedButtons.Clear();
            TaskVo mainTaskVo = TaskModel.Instance.CurrentMainTaskVo;

            if (SystemSettingMode.Instance.ShowButton || mainTaskVo == null)
            {
                _openedButtons.AddRange(_downRowButtons);
                _openedButtons.AddRange(_upRowButtons);
            }
            else
            {
                int mainTaskNum = (int)mainTaskVo.TaskId * 10 + TaskUtil.GetTaskTriggerType(mainTaskVo);
                List <SysGuideVo> guideVoList = BaseDataMgr.instance.GetGuideVoList();
                foreach (SysGuideVo sysGuideVo in guideVoList)
                {
                    //guide_type 1-3为功能开启指引
                    if (sysGuideVo.guide_type > 3 || sysGuideVo.guide_type < 1)
                    {
                        continue;
                    }
                    int guideTaskId  = int.Parse(StringUtils.GetValueString(sysGuideVo.condition));
                    int guideTaskNum = sysGuideVo.trigger_type + guideTaskId * 10;
                    if (mainTaskNum >= guideTaskNum)
                    {
                        int guideId = sysGuideVo.guideID;
                        if (_buttonGuideRelation.ContainsKey(guideId))
                        {
                            _openedButtons.Add(_buttonGuideRelation[guideId]);
                        }
                    }
                }
            }
            _openedButtons.Add(btn_js);
        }