Example #1
0
 private void RemoveHandle(TouchHandle _handle)
 {
     if (null != _handle)
     {
         _handle.DestoryHandle();
         _handle = null;
     }
 }
Example #2
0
        public void SetEventHandle(EnumTouchEventType _type, OnTouchEventHandle _handle, params object[] _params)
        {
            switch (_type)
            {
            case EnumTouchEventType.OnClick:
                if (null == onClick)
                {
                    onClick = new TouchHandle();
                }
                onClick.SetEventHandle(_handle, _params);
                break;

            case EnumTouchEventType.OnDoubleClick:
                if (null == onDoubleClick)
                {
                    onDoubleClick = new TouchHandle();
                }
                onDoubleClick.SetEventHandle(_handle, _params);
                break;

            case EnumTouchEventType.onDown:
                if (null == onDown)
                {
                    onDown = new TouchHandle();
                }
                onDown.SetEventHandle(_handle, _params);
                break;

            case EnumTouchEventType.onExit:
                if (null == onExit)
                {
                    onExit = new TouchHandle();
                }
                onExit.SetEventHandle(_handle, _params);
                break;

            case EnumTouchEventType.onUp:
                if (null == onUp)
                {
                    onUp = new TouchHandle();
                }
                onUp.SetEventHandle(_handle, _params);
                break;

            case EnumTouchEventType.onSelect:
                if (null == onSelect)
                {
                    onSelect = new TouchHandle();
                }
                onSelect.SetEventHandle(_handle, _params);
                break;

            case EnumTouchEventType.onUpdateSelect:
                if (null == onUpdateSelect)
                {
                    onUpdateSelect = new TouchHandle();
                }
                onUpdateSelect.SetEventHandle(_handle, _params);
                break;

            case EnumTouchEventType.onDeSelect:
                if (null == onDeSelect)
                {
                    onDeSelect = new TouchHandle();
                }
                onDeSelect.SetEventHandle(_handle, _params);
                break;

            case EnumTouchEventType.onDrag:
                if (null == onDrag)
                {
                    onDrag = new TouchHandle();
                }
                onDrag.SetEventHandle(_handle, _params);
                break;

            case EnumTouchEventType.onDragEnd:
                if (null == onDragEnd)
                {
                    onDragEnd = new TouchHandle();
                }
                onDragEnd.SetEventHandle(_handle, _params);
                break;

            case EnumTouchEventType.onDrop:
                if (null == onDrop)
                {
                    onDrop = new TouchHandle();
                }
                onDrop.SetEventHandle(_handle, _params);
                break;

            case EnumTouchEventType.onScroll:
                if (null == onScroll)
                {
                    onScroll = new TouchHandle();
                }
                onScroll.SetEventHandle(_handle, _params);
                break;

            case EnumTouchEventType.onMove:
                if (null == onMove)
                {
                    onMove = new TouchHandle();
                }
                onMove.SetEventHandle(_handle, _params);
                break;

            default:
                break;
            }
        }