/// <summary>
 /// Creates a new EasingThicknessKeyFrame.
 /// </summary>
 public EasingThicknessKeyFrame(Thickness value, KeyTime keyTime, IEasingFunction easingFunction)
     : this()
 {
     Value = value;
     KeyTime = keyTime;
     EasingFunction = easingFunction;
 }
 /// <summary>
 /// Creates a new EasingByteKeyFrame.
 /// </summary>
 public EasingByteKeyFrame(Byte value, KeyTime keyTime, IEasingFunction easingFunction)
     : this()
 {
     Value = value;
     KeyTime = keyTime;
     EasingFunction = easingFunction;
 }
        /// <summary>
        /// Creates a new SplineByteKeyFrame.
        /// </summary>
        public SplineByteKeyFrame(Byte value, KeyTime keyTime, KeySpline keySpline)
            : this()
        {
            if (keySpline == null)
            {
                throw new ArgumentNullException("keySpline");
            }

            Value = value;
            KeyTime = keyTime;
            KeySpline = keySpline;
        }
Ejemplo n.º 4
0
 public SplineByteKeyFrame(byte value, KeyTime keyTime, KeySpline keySpline)
 {
     this.value   = value;
     this.keyTime = keyTime;
     KeySpline    = keySpline;
 }
 /// <summary>
 /// Creates a new DiscretePoint3DKeyFrame.
 /// </summary>
 public DiscretePoint3DKeyFrame(Point3D value, KeyTime keyTime)
     : base(value, keyTime)
 {
 }
Ejemplo n.º 6
0
	public DiscreteColorKeyFrame (Color value, KeyTime keyTime)
	{
		this.value = value;
		this.keyTime = keyTime;
	}
Ejemplo n.º 7
0
 public DiscreteCharKeyFrame(char value, KeyTime keyTime)
 {
     this.value   = value;
     this.keyTime = keyTime;
 }
 public SplinePointKeyFrame(System.Windows.Point value, KeyTime keyTime, KeySpline keySpline)
 {
 }
 public SplineRectKeyFrame(System.Windows.Rect value, KeyTime keyTime, KeySpline keySpline)
 {
 }
 /// <summary>Initializes a new instance of the <see cref="T:System.Windows.Media.Animation.ThicknessKeyFrame" /> class that has the specified target <see cref="P:System.Windows.Media.Animation.ThicknessKeyFrame.Value" /> and <see cref="P:System.Windows.Media.Animation.ThicknessKeyFrame.KeyTime" />.  </summary>
 /// <param name="value">The <see cref="P:System.Windows.Media.Animation.ThicknessKeyFrame.Value" /> of the new <see cref="T:System.Windows.Media.Animation.ThicknessKeyFrame" /> instance.</param>
 /// <param name="keyTime">The <see cref="P:System.Windows.Media.Animation.ThicknessKeyFrame.KeyTime" /> of the new <see cref="T:System.Windows.Media.Animation.ThicknessKeyFrame" /> instance.</param>
 // Token: 0x06001719 RID: 5913 RVA: 0x00071BF0 File Offset: 0x0006FDF0
 protected ThicknessKeyFrame(Thickness value, KeyTime keyTime) : this()
 {
     this.Value   = value;
     this.KeyTime = keyTime;
 }
Ejemplo n.º 11
0
	protected BooleanKeyFrame (bool value, KeyTime keyTime)
	{
	}
Ejemplo n.º 12
0
 public DiscreteThicknessKeyFrame(System.Windows.Thickness value, KeyTime keyTime)
 {
 }
 /// <summary>Initializes a new instance of the <see cref="T:System.Windows.Media.Animation.LinearThicknessKeyFrame" /> class with the specified ending value and key time.</summary>
 /// <param name="value">Ending value (also known as "target value") for the key frame.</param>
 /// <param name="keyTime">Key time for the key frame. The key time determines when the target value is reached which is also when the key frame ends.</param>
 // Token: 0x06001725 RID: 5925 RVA: 0x00071BBA File Offset: 0x0006FDBA
 public LinearThicknessKeyFrame(Thickness value, KeyTime keyTime) : base(value, keyTime)
 {
 }
 protected DoubleKeyFrame(double value, KeyTime keyTime)
 {
 }
 public EasingInt16KeyFrame(short value, KeyTime keyTime, IEasingFunction easingFunction)
 {
 }
 public EasingInt16KeyFrame(short value, KeyTime keyTime)
 {
 }
 protected DoubleKeyFrame(double value, KeyTime keyTime)
 {
 }
 protected ThicknessKeyFrame(System.Windows.Thickness value, KeyTime keyTime)
 {
 }
 public DiscreteObjectKeyFrame(Object value, KeyTime keyTime)
 {
 }
 public LinearInt64KeyFrame(long value, KeyTime keyTime)
 {
 }
Ejemplo n.º 21
0
Archivo: KeyTime.cs Proyecto: dfr0/moon
		public bool Equals(KeyTime value)
		{
			return this == value;
		}
 protected Int64KeyFrame(long value, KeyTime keyTime)
 {
 }
Ejemplo n.º 23
0
 /// <summary>
 /// Creates a new DiscreteThicknessKeyFrame.
 /// </summary> 
 public DiscreteThicknessKeyFrame(Thickness value, KeyTime keyTime)
     : base(value, keyTime) 
 { 
 }
 public DiscreteInt64KeyFrame(long value, KeyTime keyTime)
 {
 }
 public LinearByteKeyFrame(byte value, KeyTime keyTime)
 {
 }
Ejemplo n.º 26
0
 public LinearColorKeyFrame(Color value, KeyTime keyTime)
 {
     this.value   = value;
     this.keyTime = keyTime;
 }
 public DiscretePoint3DKeyFrame(System.Windows.Media.Media3D.Point3D value, KeyTime keyTime)
 {
 }
Ejemplo n.º 28
0
        // Token: 0x06001775 RID: 6005 RVA: 0x00072B80 File Offset: 0x00070D80
        private void ResolveKeyTimes()
        {
            int num = 0;

            if (this._keyFrames != null)
            {
                num = this._keyFrames.Count;
            }
            if (num == 0)
            {
                this._sortedResolvedKeyFrames = null;
                this._areKeyTimesValid        = true;
                return;
            }
            this._sortedResolvedKeyFrames = new ResolvedKeyFrameEntry[num];
            int i;

            for (i = 0; i < num; i++)
            {
                this._sortedResolvedKeyFrames[i]._originalKeyFrameIndex = i;
            }
            TimeSpan resolvedKeyTime = TimeSpan.Zero;
            Duration duration        = base.Duration;

            if (duration.HasTimeSpan)
            {
                resolvedKeyTime = duration.TimeSpan;
            }
            else
            {
                resolvedKeyTime = this.LargestTimeSpanKeyTime;
            }
            int       num2      = num - 1;
            ArrayList arrayList = new ArrayList();
            bool      flag      = false;

            i = 0;
            while (i < num)
            {
                KeyTime keyTime = this._keyFrames[i].KeyTime;
                switch (keyTime.Type)
                {
                case KeyTimeType.Uniform:
                case KeyTimeType.Paced:
                    if (i == num2)
                    {
                        this._sortedResolvedKeyFrames[i]._resolvedKeyTime = resolvedKeyTime;
                        i++;
                    }
                    else if (i == 0 && keyTime.Type == KeyTimeType.Paced)
                    {
                        this._sortedResolvedKeyFrames[i]._resolvedKeyTime = TimeSpan.Zero;
                        i++;
                    }
                    else
                    {
                        if (keyTime.Type == KeyTimeType.Paced)
                        {
                            flag = true;
                        }
                        ThicknessAnimationUsingKeyFrames.KeyTimeBlock keyTimeBlock = default(ThicknessAnimationUsingKeyFrames.KeyTimeBlock);
                        keyTimeBlock.BeginIndex = i;
                        while (++i < num2)
                        {
                            KeyTimeType type = this._keyFrames[i].KeyTime.Type;
                            if (type == KeyTimeType.Percent || type == KeyTimeType.TimeSpan)
                            {
                                break;
                            }
                            if (type == KeyTimeType.Paced)
                            {
                                flag = true;
                            }
                        }
                        keyTimeBlock.EndIndex = i;
                        arrayList.Add(keyTimeBlock);
                    }
                    break;

                case KeyTimeType.Percent:
                    this._sortedResolvedKeyFrames[i]._resolvedKeyTime = TimeSpan.FromMilliseconds(keyTime.Percent * resolvedKeyTime.TotalMilliseconds);
                    i++;
                    break;

                case KeyTimeType.TimeSpan:
                    this._sortedResolvedKeyFrames[i]._resolvedKeyTime = keyTime.TimeSpan;
                    i++;
                    break;
                }
            }
            for (int j = 0; j < arrayList.Count; j++)
            {
                ThicknessAnimationUsingKeyFrames.KeyTimeBlock keyTimeBlock2 = (ThicknessAnimationUsingKeyFrames.KeyTimeBlock)arrayList[j];
                TimeSpan timeSpan = TimeSpan.Zero;
                if (keyTimeBlock2.BeginIndex > 0)
                {
                    timeSpan = this._sortedResolvedKeyFrames[keyTimeBlock2.BeginIndex - 1]._resolvedKeyTime;
                }
                long     num3 = (long)(keyTimeBlock2.EndIndex - keyTimeBlock2.BeginIndex + 1);
                TimeSpan t    = TimeSpan.FromTicks((this._sortedResolvedKeyFrames[keyTimeBlock2.EndIndex]._resolvedKeyTime - timeSpan).Ticks / num3);
                i = keyTimeBlock2.BeginIndex;
                TimeSpan timeSpan2 = timeSpan + t;
                while (i < keyTimeBlock2.EndIndex)
                {
                    this._sortedResolvedKeyFrames[i]._resolvedKeyTime = timeSpan2;
                    timeSpan2 += t;
                    i++;
                }
            }
            if (flag)
            {
                this.ResolvePacedKeyTimes();
            }
            Array.Sort <ResolvedKeyFrameEntry>(this._sortedResolvedKeyFrames);
            this._areKeyTimesValid = true;
        }
 protected Rotation3DKeyFrame(System.Windows.Media.Media3D.Rotation3D value, KeyTime keyTime)
 {
 }
 public DiscretePointKeyFrame(System.Windows.Point value, KeyTime keyTime)
 {
 }
Ejemplo n.º 31
0
 protected BooleanKeyFrame(bool value, KeyTime keyTime)
 {
 }
 public EasingDecimalKeyFrame(Decimal value, KeyTime keyTime, IEasingFunction easingFunction)
 {
 }
 /// <summary>
 /// Creates a new DiscreteMatrixKeyFrame.
 /// </summary>
 public DiscreteMatrixKeyFrame(Matrix value, KeyTime keyTime)
     : base(value, keyTime)
 {
 }
 public EasingDecimalKeyFrame(Decimal value, KeyTime keyTime)
 {
 }
 public SplineVectorKeyFrame(System.Windows.Vector value, KeyTime keyTime, KeySpline keySpline)
 {
 }
Ejemplo n.º 36
0
 protected CharKeyFrame(char value, KeyTime keyTime)
 {
 }
 protected SingleKeyFrame(float value, KeyTime keyTime)
 {
 }
 public DiscreteRectKeyFrame(System.Windows.Rect value, KeyTime keyTime)
 {
 }
 public SplineColorKeyFrame(System.Windows.Media.Color value, KeyTime keyTime, KeySpline keySpline)
 {
 }
Ejemplo n.º 40
0
 public SplineSingleKeyFrame(float value, KeyTime keyTime, KeySpline keySpline)
 {
 }
Ejemplo n.º 41
0
Archivo: KeyTime.cs Proyecto: dfr0/moon
		public static bool Equals (KeyTime keyTime1, KeyTime keyTime2)
		{
			return keyTime1 == keyTime2;
		}
 public LinearSizeKeyFrame(System.Windows.Size value, KeyTime keyTime)
 {
 }
 public LinearVectorKeyFrame(System.Windows.Vector value, KeyTime keyTime)
 {
 }
 protected ColorKeyFrame(System.Windows.Media.Color value, KeyTime keyTime)
 {
 }
 public DiscreteVectorKeyFrame(System.Windows.Vector value, KeyTime keyTime)
 {
 }
 public EasingRotation3DKeyFrame(System.Windows.Media.Media3D.Rotation3D value, KeyTime keyTime, IEasingFunction easingFunction)
 {
 }
Ejemplo n.º 47
0
	protected PointKeyFrame (Point value, KeyTime keyTime)
	{
	}
Ejemplo n.º 48
0
        private void ResolveKeyTimes()
        {
            Debug.Assert(!_areKeyTimesValid, "KeyFrameCharAnimaton.ResolveKeyTimes() shouldn't be called if the key times are already valid.");

            int keyFrameCount = 0;

            if (_keyFrames != null)
            {
                keyFrameCount = _keyFrames.Count;
            }

            if (keyFrameCount == 0)
            {
                _sortedResolvedKeyFrames = null;
                _areKeyTimesValid        = true;
                return;
            }

            _sortedResolvedKeyFrames = new ResolvedKeyFrameEntry[keyFrameCount];

            int index = 0;

            // Initialize the _originalKeyFrameIndex.
            for ( ; index < keyFrameCount; index++)
            {
                _sortedResolvedKeyFrames[index]._originalKeyFrameIndex = index;
            }

            // calculationDuration represents the time span we will use to resolve
            // percent key times. This is defined as the value in the following
            // precedence order:
            //   1. The animation's duration, but only if it is a time span, not auto or forever.
            //   2. The largest time span specified key time of all the key frames.
            //   3. 1 second, to match the From/To/By animations.

            TimeSpan calculationDuration = TimeSpan.Zero;

            Duration duration = Duration;

            if (duration.HasTimeSpan)
            {
                calculationDuration = duration.TimeSpan;
            }
            else
            {
                calculationDuration = LargestTimeSpanKeyTime;
            }

            int       maxKeyFrameIndex  = keyFrameCount - 1;
            ArrayList unspecifiedBlocks = new ArrayList();
            bool      hasPacedKeyTimes  = false;

            //
            // Pass 1: Resolve Percent and Time key times.
            //

            index = 0;
            while (index < keyFrameCount)
            {
                KeyTime keyTime = _keyFrames[index].KeyTime;

                switch (keyTime.Type)
                {
                case KeyTimeType.Percent:

                    _sortedResolvedKeyFrames[index]._resolvedKeyTime = TimeSpan.FromMilliseconds(
                        keyTime.Percent * calculationDuration.TotalMilliseconds);
                    index++;
                    break;

                case KeyTimeType.TimeSpan:

                    _sortedResolvedKeyFrames[index]._resolvedKeyTime = keyTime.TimeSpan;

                    index++;
                    break;

                case KeyTimeType.Paced:
                case KeyTimeType.Uniform:

                    if (index == maxKeyFrameIndex)
                    {
                        // If the last key frame doesn't have a specific time
                        // associated with it its resolved key time will be
                        // set to the calculationDuration, which is the
                        // defined in the comments above where it is set.
                        // Reason: We only want extra time at the end of the
                        // key frames if the user specifically states that
                        // the last key frame ends before the animation ends.

                        _sortedResolvedKeyFrames[index]._resolvedKeyTime = calculationDuration;
                        index++;
                    }
                    else if (index == 0 &&
                             keyTime.Type == KeyTimeType.Paced)
                    {
                        // Note: It's important that this block come after
                        // the previous if block because of rule precendence.

                        // If the first key frame in a multi-frame key frame
                        // collection is paced, we set its resolved key time
                        // to 0.0 for performance reasons.  If we didn't, the
                        // resolved key time list would be dependent on the
                        // base value which can change every animation frame
                        // in many cases.

                        _sortedResolvedKeyFrames[index]._resolvedKeyTime = TimeSpan.Zero;
                        index++;
                    }
                    else
                    {
                        if (keyTime.Type == KeyTimeType.Paced)
                        {
                            hasPacedKeyTimes = true;
                        }

                        KeyTimeBlock block = new KeyTimeBlock();
                        block.BeginIndex = index;

                        // NOTE: We don't want to go all the way up to the
                        // last frame because if it is Uniform or Paced its
                        // resolved key time will be set to the calculation
                        // duration using the logic above.
                        //
                        // This is why the logic is:
                        //    ((++index) < maxKeyFrameIndex)
                        // instead of:
                        //    ((++index) < keyFrameCount)

                        while ((++index) < maxKeyFrameIndex)
                        {
                            KeyTimeType type = _keyFrames[index].KeyTime.Type;

                            if (type == KeyTimeType.Percent ||
                                type == KeyTimeType.TimeSpan)
                            {
                                break;
                            }
                            else if (type == KeyTimeType.Paced)
                            {
                                hasPacedKeyTimes = true;
                            }
                        }

                        Debug.Assert(index < keyFrameCount,
                                     "The end index for a block of unspecified key frames is out of bounds.");

                        block.EndIndex = index;
                        unspecifiedBlocks.Add(block);
                    }

                    break;
                }
            }

            //
            // Pass 2: Resolve Uniform key times.
            //

            for (int j = 0; j < unspecifiedBlocks.Count; j++)
            {
                KeyTimeBlock block = (KeyTimeBlock)unspecifiedBlocks[j];

                TimeSpan blockBeginTime = TimeSpan.Zero;

                if (block.BeginIndex > 0)
                {
                    blockBeginTime = _sortedResolvedKeyFrames[block.BeginIndex - 1]._resolvedKeyTime;
                }

                // The number of segments is equal to the number of key
                // frames we're working on plus 1.  Think about the case
                // where we're working on a single key frame.  There's a
                // segment before it and a segment after it.
                //
                //  Time known         Uniform           Time known
                //  ^                  ^                 ^
                //  |                  |                 |
                //  |   (segment 1)    |   (segment 2)   |

                Int64    segmentCount    = (block.EndIndex - block.BeginIndex) + 1;
                TimeSpan uniformTimeStep = TimeSpan.FromTicks((_sortedResolvedKeyFrames[block.EndIndex]._resolvedKeyTime - blockBeginTime).Ticks / segmentCount);

                index = block.BeginIndex;
                TimeSpan resolvedTime = blockBeginTime + uniformTimeStep;

                while (index < block.EndIndex)
                {
                    _sortedResolvedKeyFrames[index]._resolvedKeyTime = resolvedTime;

                    resolvedTime += uniformTimeStep;
                    index++;
                }
            }

            //
            // Pass 3: Resolve Paced key times.
            //

            if (hasPacedKeyTimes)
            {
                ResolvePacedKeyTimes();
            }

            //
            // Sort resolved key frame entries.
            //

            Array.Sort(_sortedResolvedKeyFrames);

            _areKeyTimesValid = true;
            return;
        }
Ejemplo n.º 49
0
	public LinearInt16KeyFrame (short value, KeyTime keyTime)
	{
		this.value = value;
		this.keyTime = keyTime;
	}
Ejemplo n.º 50
0
 public LinearVectorKeyFrame(Vector value, KeyTime keyTime)
 {
     this.value   = value;
     this.keyTime = keyTime;
 }
Ejemplo n.º 51
0
	protected Int64KeyFrame (long value, KeyTime keyTime)
	{
	}
 /// <summary>
 /// Creates a new SplineThicknessKeyFrame.
 /// </summary>
 public SplineThicknessKeyFrame(Thickness value, KeyTime keyTime)
     : this()
 {
     Value   = value;
     KeyTime = keyTime;
 }
Ejemplo n.º 53
0
	public SplineRectKeyFrame (Rect value, KeyTime keyTime, KeySpline keySpline)
	{
		this.value = value;
		this.keyTime = keyTime;
		KeySpline = keySpline;
	}
Ejemplo n.º 54
0
 public SplineDoubleKeyFrame(double value, KeyTime keyTime, KeySpline keySpline)
 {
 }
 public SplineInt64KeyFrame(long value, KeyTime keyTime, KeySpline keySpline)
 {
 }
Ejemplo n.º 56
0
 public DiscreteBooleanKeyFrame(bool value, KeyTime keyTime)
 {
     this.value   = value;
     this.keyTime = keyTime;
 }
Ejemplo n.º 57
0
	public DiscreteStringKeyFrame (String value, KeyTime keyTime)
	{
		this.value = value;
		this.keyTime = keyTime;
	}
Ejemplo n.º 58
0
 public DiscreteInt32KeyFrame(int value, KeyTime keyTime)
 {
     this.value   = value;
     this.keyTime = keyTime;
 }
 protected Int16KeyFrame(short value, KeyTime keyTime)
 {
 }
Ejemplo n.º 60
0
 public SplineInt16KeyFrame(short value, KeyTime keyTime, KeySpline keySpline)
 {
 }