예제 #1
0
        private static void AnimatorError(object sender, AnimationErrorEventArgs e)
        {
#if WPF
            var source = e.Source as UIElement;
            source?.RaiseEvent(e);
#elif WINRT || SILVERLIGHT
            Error?.Invoke(e.Source, e);
#endif
        }
        internal static void OnError(object sender, Exception exception, AnimationErrorKind kind)
        {
            EventHandler <AnimationErrorEventArgs> handler = Error;

            if (handler != null)
            {
                var e = new AnimationErrorEventArgs(exception, kind);
                handler(sender, e);
            }
        }
예제 #3
0
        internal static void OnError(Image image, Exception exception, AnimationErrorKind kind)
        {
            // ISSUE: reference to a compiler-generated field
            EventHandler <AnimationErrorEventArgs> error = AnimationBehavior.Error;

            if (error == null)
            {
                return;
            }
            Image image1 = image;
            AnimationErrorEventArgs e = new AnimationErrorEventArgs(exception, kind);

            error(image1, e);
        }
예제 #4
0
        private void AnimationBehavior_OnError(DependencyObject d, AnimationErrorEventArgs e)
        {
            if (e.Kind == AnimationErrorKind.Loading)
                IsDownloading = false;

            MessageBox.Show($"An error occurred ({e.Kind}): {e.Exception}");
        }
예제 #5
0
        private static void AnimatorError(object sender, AnimationErrorEventArgs e)
        {
            var source = e.Source as UIElement;

            source?.RaiseEvent(e);
        }
예제 #6
0
        private static void AnimatorError(object sender, AnimationErrorEventArgs e)
        {
#if WPF
            var source = e.Source as UIElement;
            source?.RaiseEvent(e);
#elif WINRT || SILVERLIGHT
            Error?.Invoke(e.Source, e);
#endif
        }
        private void backgroundImage_Error(DependencyObject d, AnimationErrorEventArgs e)
        {
            this.iterationCount = 0;
            this.GifUrl = this.giphyDataSource.GetNextGif();

            System.Diagnostics.Debug.WriteLine($"An error occurred ({e.Kind}): {e.Exception}");
        }