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

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

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

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

            case EnumTouchEventType.OnEnter:
                if (onEnter == null)
                {
                    onEnter = new TouchHandle();
                }
                onEnter.SetHandle(_handle, _params);
                break;

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

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

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

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

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

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

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

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

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