Ejemplo n.º 1
0
 private void Images_ImageLoadSuccess(object sender, ImageLoadEventArgs e)
 {
     if (_failedImagePaths?.Remove(e.Path) ?? false)
     {
         InvalidateStatusReport();
     }
 }
Ejemplo n.º 2
0
        internal void OnImageLoaded(ImageLoadEventArgs e)
        {
            EventHandler <ImageLoadEventArgs> handler = ImageLoaded;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Ejemplo n.º 3
0
        private void Images_ImageLoadFailure(object sender, ImageLoadEventArgs e)
        {
            if (_failedImagePaths == null)
            {
                // this is normal state during profile loading
                return;
            }

            // track in case we turn reporting back on
            _failedImagePaths.Add(e.Path);

            if (Model.IgnoreMissingImages)
            {
                // suppressed
                return;
            }

            // log as warning if not suppressed (to raise caution) and report in status report, because we only logged missing user images at info level during deserializaton
            Logger.Warn("an image referenced in the profile {ProfileName} could not be loaded from {Path}",
                        Profile?.Name, e.Path);
            InvalidateStatusReport();
        }