Ejemplo n.º 1
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.º 2
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.
     }
 }