示例#1
0
        /// <summary>
        /// Pass touch move events to the children.
        /// </summary>
        /// <param name="sender">Object associated with the event.</param>
        /// <param name="e">Touch event arguments.</param>
        private void TouchMoveEvent(object sender, TouchEventArgs e)
        {
            if (_handleEvents)
            {
                OnTouchMove(e);

                if (!_moving)
                {
                    if (_ignoredTouchMoves < _maxIgnoredTouchMoves)
                    {
                        _ignoredTouchMoves++;
                    }
                    else
                    {
                        _ignoredTouchMoves = 0;
                        _moving            = true;
                    }
                }
                else
                {
                    int dragDistance = e.Point.Y - _lastPressY;
                    ListY = _lastListY - dragDistance;

                    if (Height > Glide.LCD.Height)
                    {
                        _listMaxY = Height - Glide.LCD.Height;
                    }

                    ListY = GlideUtils.Math.MinMax(ListY, 0, _listMaxY);

                    Glide.screen.DrawImage(X, Y, Graphics.GetBitmap(), 0, ListY, Width, Height);
                    Glide.screen.Flush();
                }
            }
        }
示例#2
0
        /// <summary>
        /// Renders the window and flushes it to the screen.
        /// </summary>
        // Since windows need to flush we must override the default invalidate.
        public override void Invalidate()
        {
            Render();
            Glide.screen.DrawImage(Graphics.GetBitmap(), new System.Drawing.Rectangle(X, Y, Width, Height), new System.Drawing.Rectangle(0, ListY, Width, Height), GraphicsUnit.Pixel);

            //Glide.screen.DrawImage(X, Y, Graphics.GetBitmap(), 0, ListY, Width, Height, 0xff);
            Glide.screen.Flush();
            //Glide.screen.Flush(0,0,Glide.screen.Width,Glide.screen.Height);
        }
示例#3
0
 /// <summary>
 /// Renders the window and flushes it to the screen.
 /// </summary>
 // Since windows need to flush we must override the default invalidate.
 public override void Invalidate()
 {
     Render();
     Glide.screen.DrawImage(X, Y, Graphics.GetBitmap(), 0, ListY, Width, Height);
     Glide.screen.Flush();
 }