Esempio n. 1
0
        /// <summary>
        /// Removes a RectKeyFrame from the collection.
        /// </summary>
        public void Remove(RectKeyFrame keyFrame)
        {
            WritePreamble();

            if (_keyFrames.Contains(keyFrame))
            {
                OnFreezablePropertyChanged(keyFrame, null);
                _keyFrames.Remove(keyFrame);

                WritePostscript();
            }
        }
Esempio n. 2
0
        protected virtual void AddChild(object child)
        {
            RectKeyFrame keyFrame = child as RectKeyFrame;

            if (keyFrame != null)
            {
                KeyFrames.Add(keyFrame);
            }
            else
            {
                throw new ArgumentException(SR.Get(SRID.Animation_ChildMustBeKeyFrame), "child");
            }
        }
Esempio n. 3
0
        private TimeSpan GetKeyFrameTime(RectKeyFrame keyFrame, TimeSpan keyFramesDuration)
        {
            if (keyFrame.KeyTime.HasTimeSpan)
            {
                return(keyFrame.KeyTime.TimeSpan);
            }

            if (keyFrame.KeyTime.HasPercent)
            {
                return(keyFramesDuration.Scale(keyFrame.KeyTime.Percent));
            }

            throw new Granular.Exception("KeyTime of type \"{0}\" is not supported", keyFrame.KeyTime.Type);
        }
Esempio n. 4
0
        /// <summary>
        /// Inserts a RectKeyFrame into a specific location in the collection. 
        /// </summary>
        public void Insert(int index, RectKeyFrame keyFrame)
        {
            if (keyFrame == null)
            {
                throw new ArgumentNullException("keyFrame");
            }

            WritePreamble();

            OnFreezablePropertyChanged(null, keyFrame);
            _keyFrames.Insert(index, keyFrame);

            WritePostscript();
        }
Esempio n. 5
0
        /// <summary>
        /// Implementation of <see cref="System.Windows.Freezable.GetCurrentValueAsFrozenCore(System.Windows.Freezable)">Freezable.GetCurrentValueAsFrozenCore</see>.
        /// </summary>
        protected override void GetCurrentValueAsFrozenCore(Freezable sourceFreezable)
        {
            RectKeyFrameCollection sourceCollection = (RectKeyFrameCollection) sourceFreezable;
            base.GetCurrentValueAsFrozenCore(sourceFreezable);

            int count = sourceCollection._keyFrames.Count;

            _keyFrames = new List< RectKeyFrame>(count);

            for (int i = 0; i < count; i++)
            {
                RectKeyFrame keyFrame = (RectKeyFrame)sourceCollection._keyFrames[i].GetCurrentValueAsFrozen();
                _keyFrames.Add(keyFrame);
                OnFreezablePropertyChanged(null, keyFrame);
            }
        }
Esempio n. 6
0
        /// <summary>
        /// Adds a RectKeyFrame to the collection.
        /// </summary>
        public int Add(RectKeyFrame keyFrame)
        {
            if (keyFrame == null)
            {
                throw new ArgumentNullException("keyFrame");
            }

            WritePreamble();

            OnFreezablePropertyChanged(null, keyFrame);
            _keyFrames.Add(keyFrame);

            WritePostscript();

            return _keyFrames.Count - 1;
        }
        /// <summary>
        /// Adds a RectKeyFrame to the collection.
        /// </summary>
        public int Add(RectKeyFrame keyFrame)
        {
            if (keyFrame == null)
            {
                throw new ArgumentNullException("keyFrame");
            }

            WritePreamble();

            OnFreezablePropertyChanged(null, keyFrame);
            _keyFrames.Add(keyFrame);

            WritePostscript();

            return _keyFrames.Count - 1;
        }
 public bool Contains(RectKeyFrame keyFrame)
 {
     return(default(bool));
 }
Esempio n. 9
0
        /// <summary>
        /// Returns the index of a given RectKeyFrame in the collection. 
        /// </summary>
        public int IndexOf(RectKeyFrame keyFrame)
        {
            ReadPreamble();

            return _keyFrames.IndexOf(keyFrame);
        }
Esempio n. 10
0
 public void Insert(int index, RectKeyFrame keyFrame)
 {
     throw new NotImplementedException();
 }
Esempio n. 11
0
 public int Add(RectKeyFrame keyFrame)
 {
     throw new NotImplementedException();
 }
 public void Insert(int index, RectKeyFrame keyFrame)
 {
 }
        /// <summary>
        /// Inserts a RectKeyFrame into a specific location in the collection. 
        /// </summary>
        public void Insert(int index, RectKeyFrame keyFrame)
        {
            if (keyFrame == null)
            {
                throw new ArgumentNullException("keyFrame");
            }

            WritePreamble();

            OnFreezablePropertyChanged(null, keyFrame);
            _keyFrames.Insert(index, keyFrame);

            WritePostscript();
        }
	public bool Contains (RectKeyFrame keyFrame)
	{
		throw new NotImplementedException ();
	}
	public void CopyTo (RectKeyFrame[] array, int index)
	{
		throw new NotImplementedException ();
	}
	public int Add (RectKeyFrame keyFrame)
	{
		throw new NotImplementedException ();
	}
	public void Remove (RectKeyFrame keyFrame)
	{
		throw new NotImplementedException ();
	}
	public void Insert (int index, RectKeyFrame keyFrame)
	{
		throw new NotImplementedException ();
	}
        /// <summary>
        /// Returns true of the collection contains the given RectKeyFrame.
        /// </summary>
        public bool Contains(RectKeyFrame keyFrame)
        {
            ReadPreamble();

            return _keyFrames.Contains(keyFrame);
        }
 public void Remove(RectKeyFrame keyFrame)
 {
 }
        /// <summary>
        /// Returns the index of a given RectKeyFrame in the collection. 
        /// </summary>
        public int IndexOf(RectKeyFrame keyFrame)
        {
            ReadPreamble();

            return _keyFrames.IndexOf(keyFrame);
        }
 public int Add(RectKeyFrame keyFrame)
 {
   return default(int);
 }
        /// <summary>
        /// Removes a RectKeyFrame from the collection.
        /// </summary>
        public void Remove(RectKeyFrame keyFrame)
        {
            WritePreamble();

            if (_keyFrames.Contains(keyFrame))
            {
                OnFreezablePropertyChanged(keyFrame, null);
                _keyFrames.Remove(keyFrame);

                WritePostscript();
            }
        }
 public bool Contains(RectKeyFrame keyFrame)
 {
   return default(bool);
 }
Esempio n. 25
0
 public void Remove(RectKeyFrame keyFrame)
 {
     throw new NotImplementedException();
 }
 public int Add(RectKeyFrame keyFrame)
 {
     return(default(int));
 }
Esempio n. 27
0
 public bool Contains(RectKeyFrame keyFrame)
 {
     throw new NotImplementedException();
 }
 public void Remove(RectKeyFrame keyFrame)
 {
 }
Esempio n. 29
0
        /// <summary>
        /// Returns true of the collection contains the given RectKeyFrame.
        /// </summary>
        public bool Contains(RectKeyFrame keyFrame)
        {
            ReadPreamble();

            return _keyFrames.Contains(keyFrame);
        }
        /// <summary>
        /// Copies all of the RectKeyFrames in the collection to an
        /// array of RectKeyFrames.
        /// </summary>
        public void CopyTo(RectKeyFrame[] array, int index)
        {
            ReadPreamble();

            _keyFrames.CopyTo(array, index);
        }
 public void CopyTo(RectKeyFrame[] array, int index)
 {
 }
 public int IndexOf(RectKeyFrame keyFrame)
 {
     return(default(int));
 }
 public int IndexOf(RectKeyFrame keyFrame)
 {
   return default(int);
 }
 public void Insert(int index, RectKeyFrame keyFrame)
 {
 }