using System;
using System.IO;
using System.Reflection;
using System.Windows.Media.Imaging;

namespace SurfacePlot3D.Services
{
    public class EmbeddedResourceService
    {
        public EmbeddedResourceService() { }

        public BitmapImage GetResource(String resourceName)
        {
            var currentFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\";
            return new BitmapImage(new Uri(currentFolder + resourceName));
        }
    }
}