2019-03-27 15:54:50 +01:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
2019-04-01 21:53:06 +02:00
|
|
|
|
using System.Windows.Controls;
|
2019-03-27 15:54:50 +01:00
|
|
|
|
using System.Windows.Media;
|
2019-04-01 23:10:31 +02:00
|
|
|
|
using System.Windows.Media.Imaging;
|
|
|
|
|
using CzokoŚmieciarka.DataModels.Enums;
|
|
|
|
|
using CzokoŚmieciarka.DataModels.GeneralModels.Models;
|
2019-03-27 15:54:50 +01:00
|
|
|
|
using CzokoŚmieciarka.DataModels.Interfaces;
|
|
|
|
|
using CzokoŚmieciarka.DataModels.Interfaces.TrashCans;
|
|
|
|
|
using CzokoŚmieciarka.DataModels.Models;
|
2019-04-01 21:53:06 +02:00
|
|
|
|
using CzokoŚmieciarka.WPFv2.Interfaces;
|
2019-03-27 15:54:50 +01:00
|
|
|
|
|
|
|
|
|
namespace CzokoŚmieciarka.WPFv2.Models
|
|
|
|
|
{
|
2019-04-01 21:53:06 +02:00
|
|
|
|
class WPFDump : ADump, IWPFObject
|
2019-03-27 15:54:50 +01:00
|
|
|
|
{
|
|
|
|
|
public string ImagePath { get; set; }
|
2019-04-01 21:53:06 +02:00
|
|
|
|
public Image Image { get; set; }
|
2019-03-27 15:54:50 +01:00
|
|
|
|
|
2019-04-08 15:47:01 +02:00
|
|
|
|
public WPFDump(ITypeOfGarbage typeofGarbage, int maxVolume, Coords localization) : base ( typeofGarbage, maxVolume, localization)
|
2019-03-27 15:54:50 +01:00
|
|
|
|
{
|
2019-04-01 23:10:31 +02:00
|
|
|
|
Image = new Image();
|
|
|
|
|
switch (typeofGarbage.GarbageType)
|
|
|
|
|
{
|
|
|
|
|
case GarbageType.Glass:
|
|
|
|
|
ImagePath = AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\Dumps\glass.png";
|
|
|
|
|
Image.Source = new BitmapImage(new Uri(ImagePath));
|
|
|
|
|
break;
|
|
|
|
|
case GarbageType.PlasticMetal:
|
|
|
|
|
ImagePath = AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\Dumps\plasticmetal.png";
|
|
|
|
|
Image.Source = new BitmapImage(new Uri(ImagePath));
|
|
|
|
|
break;
|
|
|
|
|
case GarbageType.Organic:
|
|
|
|
|
ImagePath = AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\Dumps\organic.png";
|
|
|
|
|
Image.Source = new BitmapImage(new Uri(ImagePath));
|
|
|
|
|
break;
|
|
|
|
|
case GarbageType.Paper:
|
|
|
|
|
ImagePath = AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\Dumps\paper.png";
|
|
|
|
|
Image.Source = new BitmapImage(new Uri(ImagePath));
|
|
|
|
|
break;
|
|
|
|
|
}
|
2019-03-27 15:54:50 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|