Ejemplo n.º 1
0
 public override ImageProvider Provide()
 {
     for (; _index < _files.Length; _index++)
     {
         var provider = new FileImageProvider(_files[_index]);
         if (provider.GetImage() != null)
         {
             return(provider);
         }
     }
     return(null);
 }
Ejemplo n.º 2
0
 public override ImageProvider Provide()
 {
     for (; _index < _files.Length; _index++)
     {
       var provider = new FileImageProvider(_files[_index]);
       if (provider.GetImage() != null)
     {
       return provider;
     }
     }
       return null;
 }
Ejemplo n.º 3
0
        void RenderRectangle(Rectangle rectangle, string filename)
        {
            var provider = new FileImageProvider(filename);

            rectangle.Provider = provider;
            var image = provider.GetImage();

            if (image != null)
            {
                var renderer = _preview.GetRenderer(_layout.Value);
                rectangle.Render(image, renderer);
                renderer.Cleanup();
                provider.Release();
            }
            else
            {
                //	  Console.WriteLine("Couldn't load: " + filename);
                // Error dialog here.
            }
        }
Ejemplo n.º 4
0
 void RenderRectangle(Rectangle rectangle, string filename)
 {
     var provider = new FileImageProvider(filename);
       rectangle.Provider = provider;
       var image = provider.GetImage();
       if (image != null)
     {
       var renderer = _preview.GetRenderer(_layout.Value);
       rectangle.Render(image, renderer);
       renderer.Cleanup();
       provider.Release();
     }
       else
     {
       //	  Console.WriteLine("Couldn't load: " + filename);
       // Error dialog here.
     }
 }