using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Controls; using System.Windows.Media.Imaging; namespace CzokoŚmieciarka.WPFv2.Models { public sealed class ImageContainer { private static ImageContainer _Instance = null; private Dictionary Images; public static ImageContainer Instance { get { if (_Instance == null) { _Instance = new ImageContainer(); } return _Instance; } } public ImageContainer() { Images = new Dictionary(); Images.Add("Road", new Image { Source = new BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\intersection.png")) }); } public Image GetImage(string s) { return Images[s]; } } }