Esempio n. 1
0
        /// <summary>
        /// 设置提示的感叹号状态
        /// </summary>
        /// <param name="remindType"></param>
        /// <param name="remindCtrlType"></param>
        /// <param name="isShow"></param>
        public static void SetRemindState(RemindType remindType, RemindCtrlType remindCtrlType, bool isShow)
        {
            if (!remindDic.ContainsKey(remindType))
            {
                remindDic.Add(remindType, new Dictionary <RemindCtrlType, bool>());
            }
            if (isShow)
            {
                if (!remindDic[remindType].ContainsKey(remindCtrlType))
                {
                    remindDic[remindType].Add(remindCtrlType, true);
                }
            }
            else
            {
                if (remindDic[remindType].ContainsKey(remindCtrlType))
                {
                    remindDic[remindType].Remove(remindCtrlType);
                }
            }

            if (remindCallBackDic.Keys.Count == 0)
            {
                return;
            }

            //发送消息
            messageMgr.sendMessage(null, remindCallBackDic[remindType], (int)remindType, (int)remindCtrlType);
        }
Esempio n. 2
0
 /// <summary>
 /// 获得提示感叹号的状态
 /// </summary>
 /// <param name="remindType"></param>
 /// <param name="remindCtrlType"></param>
 /// <returns></returns>
 public static bool GetRemindState(RemindType remindType, RemindCtrlType remindCtrlType)
 {
     if (!remindDic.ContainsKey(remindType))
     {
         remindDic.Add(remindType, new Dictionary <RemindCtrlType, bool>());
     }
     if (remindCtrlType == RemindCtrlType.None)
     {
         if (remindDic[remindType].Keys.Count == 0)
         {
             return(false);
         }
         else
         {
             return(true);
         }
     }
     else
     {
         return(remindDic[remindType].ContainsKey(remindCtrlType));
     }
 }
Esempio n. 3
0
        void CheckStateCallBack(object sender, MsgArgs e)
        {
            RemindType     _type     = (RemindType)(int.Parse(e.paramList[0].ToString()));
            RemindCtrlType _ctrlType = (RemindCtrlType)(int.Parse(e.paramList[1].ToString()));

            if (ctrlType == RemindCtrlType.None)
            {
                if (_type == type)
                {
                    if (!GameUI_Mgr_Remind.remindFunc.ContainsKey(this))
                    {
                        if (GameUI_Mgr_Remind.GetRemindState(type, ctrlType))
                        {
                            GameUI_Mgr_Remind.remindFunc.Add(this, true);
                        }
                        else
                        {
                            GameUI_Mgr_Remind.remindFunc.Add(this, false);
                        }
                    }
                    return;
                }
            }
            if (_ctrlType == ctrlType)
            {
                if (!GameUI_Mgr_Remind.remindFunc.ContainsKey(this))
                {
                    if (GameUI_Mgr_Remind.GetRemindState(type, ctrlType))
                    {
                        GameUI_Mgr_Remind.remindFunc.Add(this, true);
                    }
                    else
                    {
                        GameUI_Mgr_Remind.remindFunc.Add(this, false);
                    }
                }
            }
        }