Пример #1
0
        //returns final control height
        public void UpdateLayout()
        {
            if ((m_stsControls != null) && (m_bScrolledToTop))
            {
                TimelineStatus tsTop = m_stsControls.Peek();
                m_lmaMotion             = new LinearMotionAnimation(new Point(0, tsTop.Top), new Point(0, 0), 40, LinearMotionAnimation.MotionType.EaseIn);
                m_iAnimateTimeElapsed   = 0;
                tmrTweetAnimate.Enabled = true;
            }
            else
            {
                Stack <TimelineStatus> .Enumerator stsEnum = m_stsControls.GetEnumerator();
                TimelineStatus tsPrev = null;

                stsEnum.MoveNext();
                tsPrev = stsEnum.Current;

                while (stsEnum.MoveNext())
                {
                    stsEnum.Current.Top   = tsPrev.Bottom;
                    stsEnum.Current.Width = this.Width;
                    stsEnum.Current.Left  = 0;
                    stsEnum.Current.Invalidate();
                    tsPrev = stsEnum.Current;
                }
            }
        }
Пример #2
0
        //returns final control height
        public void UpdateLayout()
        {
            if ((m_stsControls != null) && (m_bScrolledToTop))
            {
                TimelineStatus tsTop = m_stsControls.Peek();
                m_lmaMotion = new LinearMotionAnimation(new Point(0, tsTop.Top), new Point(0, 0), 40, LinearMotionAnimation.MotionType.EaseIn);
                m_iAnimateTimeElapsed = 0;
                tmrTweetAnimate.Enabled = true;
            }
            else
            {
                Stack<TimelineStatus>.Enumerator stsEnum = m_stsControls.GetEnumerator();
                TimelineStatus tsPrev = null;

                stsEnum.MoveNext();
                tsPrev = stsEnum.Current;

                while (stsEnum.MoveNext())
                {
                    stsEnum.Current.Top = tsPrev.Bottom;
                    stsEnum.Current.Width = this.Width;
                    stsEnum.Current.Left = 0;
                    stsEnum.Current.Invalidate();
                    tsPrev = stsEnum.Current;
                }
            }
        }