52 lines
1.7 KiB
C#
52 lines
1.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Linq;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Media;
|
|
using System.Windows.Media.Imaging;
|
|
using CzokoŚmieciarka.DataModels.Interfaces.GarbageCollector;
|
|
using CzokoŚmieciarka.DataModels.Interfaces.TrashCans;
|
|
using CzokoŚmieciarka.DataModels.Models;
|
|
using CzokoŚmieciarka.WPFv2.Annotations;
|
|
using CzokoŚmieciarka.WPFv2.Interfaces;
|
|
|
|
namespace CzokoŚmieciarka.WPFv2.Models
|
|
{
|
|
class WPFGarbageCollector : AGarbageCollector, IWPFObject, INotifyPropertyChanged
|
|
{
|
|
public Image Image { get; set; }
|
|
//{
|
|
// get
|
|
// {
|
|
// return new Image
|
|
// {
|
|
// Source = new BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\garbageCollector.png"))
|
|
// };
|
|
// }
|
|
//}
|
|
|
|
public WPFGarbageCollector(Coords startPosition, IEnumerable<AGarbageCollectorContainer> trashContainers, int columns, int rows) : base(startPosition, trashContainers, columns, rows)
|
|
{
|
|
Image = new Image()
|
|
{
|
|
Source = new BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\garbageCollector.png"))
|
|
};
|
|
}
|
|
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
|
|
|
[NotifyPropertyChangedInvocator]
|
|
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
|
{
|
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|