Example #1
0
        /// <summary>
        /// 启用正常中间光标
        /// </summary>
        /// <param name="type"></param>
        public void CusrorPartNormalStart(CursorPartType type)
        {
            foreach (var item in CursorPartDir.Values)
            {
                if ((item.CursorType == CursorPartType.FingerPress ||
                     item.CursorType == CursorPartType.FingerFocus ||
                     item.CursorType == CursorPartType.Focus ||
                     item.CursorType == CursorPartType.Press ||
                     item.CursorType == CursorPartType.Reset) &&

                    item.CursorType == type)
                {
                    if (item.IsModuleStarted == false)
                    {
                        item.ModuleStart();
                    }
                }
                else if (
                    (item.CursorType == CursorPartType.FingerPress ||
                     item.CursorType == CursorPartType.FingerFocus ||
                     item.CursorType == CursorPartType.Focus ||
                     item.CursorType == CursorPartType.Press ||
                     item.CursorType == CursorPartType.Reset) &&

                    item.IsModuleStarted)
                {
                    item.ModuleStop();
                }
            }
        }
Example #2
0
        public CursorPartBase GetCursorPart(CursorPartType type)
        {
            CursorPartBase cursor = null;

            if (CursorPartDir.ContainsKey(type))
            {
                cursor = CursorPartDir[type];
            }
            return(cursor);
        }
Example #3
0
 public void CursorPartModuleStop(CursorPartType type)
 {
     if (CursorPartDir.ContainsKey(type))
     {
         CursorPartDir[type].ModuleStop();
     }
     else
     {
         DebugMy.Log("CursorPartModuleStop: Can not Found CursorPart " + type, this);
     }
 }