using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Media; using System.Windows.Media.Imaging; using CzokoŚmieciarka.DataModels.Interfaces; using CzokoŚmieciarka.DataModels.Models; using CzokoŚmieciarka.WPF.Interfaces; namespace CzokoŚmieciarka.WPF.Models { class DumpWPF : AObject, INotifyPropertyChanged { public ITypeOfGarbage TypeOfGarbage { get; set; } public event PropertyChangedEventHandler PropertyChanged; public DumpWPF(int columns, Coords location, ITypeOfGarbage typeOfGarbage) { Location = new Coords(location.X, location.Y * columns); TypeOfGarbage = typeOfGarbage; switch (TypeOfGarbage.GarbageType) { case "glass": ImagePath = AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\Dumps\glass.png"; Image = new ImageBrush(new BitmapImage(new Uri(ImagePath))); Data = "Szkło"; break; case "plasticmetal": ImagePath = AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\Dumps\plasticmetal.png"; Image = new ImageBrush(new BitmapImage(new Uri(ImagePath))); Data = "Plastiki i metale"; break; case "organic": ImagePath = AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\Dumps\organic.png"; Image = new ImageBrush(new BitmapImage(new Uri(ImagePath))); Data = "Organiczne"; break; case "paper": ImagePath = AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\Dumps\paper.png"; Image = new ImageBrush(new BitmapImage(new Uri(ImagePath))); Data = "Papier"; break; } } } }