Exemple #1
0
        protected override void OnTouchEvent(TouchEventCollection touchEvents)
        {
            base.OnTouchEvent(touchEvents);
            TouchEvent primaryTouchEvent = touchEvents.PrimaryTouchEvent;

            if (primaryTouchEvent.Type == TouchEventType.Down)
            {
                this.animation         = false;
                this.startPos          = this.panelContainer.X;
                this.touchDownLocalPos = primaryTouchEvent.LocalPosition.X;
                this.state             = StreamPagePanel.AnimationState.None;
            }
            if (primaryTouchEvent.Type == TouchEventType.Up && this.state != StreamPagePanel.AnimationState.Flick)
            {
                this.ScrollTo(this.pageIndex, true);
            }
            if (this.state != StreamPagePanel.AnimationState.Drag && this.state != StreamPagePanel.AnimationState.Flick)
            {
                touchEvents.Forward = true;
            }
        }
Exemple #2
0
        protected override void OnTouchEvent(TouchEventCollection touchEvents)
        {
            base.OnTouchEvent(touchEvents);

            foreach (TouchEvent th in touchEvents)
            {
                if (th.Type == TouchEventType.Up)
                {
                    Widget tmpWidget = th.Source;
                    while (null != tmpWidget)
                    {
                        if (tmpWidget is StoryNameListItem)
                        {
                            StoryNameListItem item = tmpWidget as StoryNameListItem;
                            PSVReader.Logic.ShowOneStory(item.Story, item.Text);

                            break;
                        }
                        tmpWidget = tmpWidget.Parent;
                    }
                }
            }
        }
Exemple #3
0
        protected override void OnTouchEvent(TouchEventCollection touchEvents)
        {
            base.OnTouchEvent (touchEvents);

            foreach (TouchEvent th in touchEvents)
            {
                if (th.Type == TouchEventType.Up)
                {
                    Widget tmpWidget = th.Source;
                    while (null != tmpWidget)
                    {
                        if (tmpWidget is StoryNameListItem)
                        {
                            StoryNameListItem item = tmpWidget as StoryNameListItem;
                            PSVReader.Logic.ShowOneStory(item.Story, item.Text);

                            break;
                        }
                        tmpWidget = tmpWidget.Parent;
                    }
                }
            }
        }
 protected override void OnTouchEvent(TouchEventCollection touchEvents)
 {
     base.OnTouchEvent (touchEvents);
     TouchEvent primaryTouchEvent = touchEvents.PrimaryTouchEvent;
     if (primaryTouchEvent.Type == TouchEventType.Down)
     {
         this.animation = false;
         this.startPos = this.panelContainer.X;
         this.touchDownLocalPos = primaryTouchEvent.LocalPosition.X;
         this.state = StreamPagePanel.AnimationState.None;
     }
     if (primaryTouchEvent.Type == TouchEventType.Up && this.state != StreamPagePanel.AnimationState.Flick)
     {
         this.ScrollTo (this.pageIndex, true);
     }
     if (this.state != StreamPagePanel.AnimationState.Drag && this.state != StreamPagePanel.AnimationState.Flick)
     {
         touchEvents.Forward = true;
     }
 }