Czoko_Smieciarka/Trunk/Interface/CzokoŚmieciarka.WPF/Models/House.cs
2019-03-27 01:11:14 +01:00

26 lines
1.0 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using CzokoŚmieciarka.DataModels.Models;
using CzokoŚmieciarka.WPF.Interfaces;
namespace CzokoŚmieciarka.WPF.Models
{
public class House : AObject
{
public List<Trash> Trashes = new List<Trash>();
public House(int columns, Coords location, List<Trash> trashes)
{
Trashes = trashes;
ImagePath = AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\house.png";
Image = new ImageBrush(new BitmapImage(new Uri(ImagePath)));
Location = new Coords(location.X, location.Y*columns);
Data = String.Format("House\n{0}: {1}\n{2}: {3}\n{4}: {5}\n{6}: {7}", Trashes[0].Type.ToString(), Trashes[0].Weight, Trashes[1].Type.ToString(), Trashes[1].Weight, Trashes[2].Type.ToString(), Trashes[2].Weight, Trashes[3].Type.ToString(), Trashes[3].Weight);
}
}
}