示例#1
0
        public StreamPagePanel()
        {
            this.panelContainer          = new StreamContainerWidget();
            this.panelContainer.BaseClip = false;
            base.AddChildLast(this.panelContainer);
            this.sprtContainer          = new StreamContainerWidget();
            this.sprtContainer.BaseClip = false;
            base.AddChildLast(this.sprtContainer);
            this.panelList           = new List <Panel> ();
            this.sprtList            = new List <UISprite> ();
            this.pageCount           = 0;
            this.pageIndex           = -1;
            base.Clip                = true;
            base.HookChildTouchEvent = true;
            this.state               = StreamPagePanel.AnimationState.None;
            this.activeImage         = new ImageAsset(SystemImageAsset.PagePanelActive);
            this.normalImage         = new ImageAsset(SystemImageAsset.PagePanelNormal);
            DragGestureDetector dragGestureDetector = new DragGestureDetector();

            dragGestureDetector.DragDetected += new EventHandler <DragEventArgs> (this.DragEventHandler);
            base.AddGestureDetector(dragGestureDetector);
            FlickGestureDetector flickGestureDetector = new FlickGestureDetector();

            flickGestureDetector.Direction      = FlickDirection.Horizontal;
            flickGestureDetector.FlickDetected += new EventHandler <FlickEventArgs> (this.FlickEventHandler);
            base.AddGestureDetector(flickGestureDetector);
        }
示例#2
0
 public StreamPagePanel()
 {
     this.panelContainer = new StreamContainerWidget ();
     this.panelContainer.BaseClip = false;
     base.AddChildLast (this.panelContainer);
     this.sprtContainer = new StreamContainerWidget ();
     this.sprtContainer.BaseClip = false;
     base.AddChildLast (this.sprtContainer);
     this.panelList = new List<Panel> ();
     this.sprtList = new List<UISprite> ();
     this.pageCount = 0;
     this.pageIndex = -1;
     base.Clip = true;
     base.HookChildTouchEvent = true;
     this.state = StreamPagePanel.AnimationState.None;
     this.activeImage = new ImageAsset (SystemImageAsset.PagePanelActive);
     this.normalImage = new ImageAsset (SystemImageAsset.PagePanelNormal);
     DragGestureDetector dragGestureDetector = new DragGestureDetector ();
     dragGestureDetector.DragDetected += new EventHandler<DragEventArgs> (this.DragEventHandler);
     base.AddGestureDetector (dragGestureDetector);
     FlickGestureDetector flickGestureDetector = new FlickGestureDetector ();
     flickGestureDetector.Direction = FlickDirection.Horizontal;
     flickGestureDetector.FlickDetected += new EventHandler<FlickEventArgs> (this.FlickEventHandler);
     base.AddGestureDetector (flickGestureDetector);
 }