Exemple #1
0
 private void CompositeHelper_Rendering(object sender, System.Windows.Media.RenderingEventArgs e)
 {
     if (animationUpdater != null)
     {
         animationUpdater.Update(Stopwatch.GetTimestamp(), Stopwatch.Frequency);
     }
 }
 private void CompositeHelper_Rendering(object sender, System.Windows.Media.RenderingEventArgs e)
 {
     if (animationUpdater != null)
     {
         if (reset)
         {
             animationUpdater.Reset();
             animationUpdater.RepeatMode = SelectedRepeatMode;
             reset = false;
         }
         else
         {
             animationUpdater.Update(Stopwatch.GetTimestamp(), Stopwatch.Frequency);
         }
     }
 }
        private void Render(object sender, System.Windows.Media.RenderingEventArgs e)
        {
            //Animation with perf testing
            long t = Stopwatch.GetTimestamp();

            //Update animation. Ensures all animation times are in sync
            long ts = Stopwatch.GetTimestamp();
            long fq = Stopwatch.Frequency;

            foreach (IAnimationUpdater updater in animationUpdaters)
            {
                updater.Update(ts, fq);
            }

            t          = Stopwatch.GetTimestamp() - t;
            debugLabel = t.ToString();
        }