2019-03-20 18:27:11 +01:00
|
|
|
|
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;
|
2019-03-26 22:47:45 +01:00
|
|
|
|
using CzokoŚmieciarka.WPF.Interfaces;
|
2019-03-20 18:27:11 +01:00
|
|
|
|
|
|
|
|
|
namespace CzokoŚmieciarka.WPF.Models
|
|
|
|
|
{
|
2019-03-26 22:47:45 +01:00
|
|
|
|
class DumpWPF : AObject, INotifyPropertyChanged
|
2019-03-20 18:27:11 +01:00
|
|
|
|
{
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|