Zmiana pola Image w modelach
This commit is contained in:
parent
57c53b9bdb
commit
9aaa79a5c5
@ -18,19 +18,23 @@ namespace CzokoŚmieciarka.WPFv2.Models
|
||||
{
|
||||
class WPFGarbageCollector : AGarbageCollector, IWPFObject, INotifyPropertyChanged
|
||||
{
|
||||
public Image Image
|
||||
{
|
||||
get
|
||||
{
|
||||
return new Image
|
||||
{
|
||||
Source = new BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\garbageCollector.png"))
|
||||
};
|
||||
}
|
||||
}
|
||||
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;
|
||||
|
@ -17,17 +17,21 @@ namespace CzokoŚmieciarka.WPFv2.Models
|
||||
{
|
||||
public Coords Coords { get; set; }
|
||||
public IEnumerable<ATrashCan> TrashCans { get; set; }
|
||||
public Image Image { get {
|
||||
return new Image
|
||||
{
|
||||
Source = new BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\house.png"))
|
||||
};
|
||||
} }
|
||||
public Image Image { get; set; }
|
||||
//{ get {
|
||||
// return new Image
|
||||
// {
|
||||
// Source = new BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\house.png"))
|
||||
// };
|
||||
// } }
|
||||
|
||||
|
||||
public WPFHouse(Coords coords, IEnumerable<ATrashCan> trashCans)
|
||||
{
|
||||
|
||||
Image = new Image()
|
||||
{
|
||||
Source = new BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\house.png"))
|
||||
};
|
||||
TrashCans = trashCans;
|
||||
Coords = coords;
|
||||
}
|
||||
|
@ -13,20 +13,26 @@ namespace CzokoŚmieciarka.WPFv2.Models
|
||||
{
|
||||
class Road : IWPFObject
|
||||
{
|
||||
public Image Image
|
||||
{
|
||||
get
|
||||
{
|
||||
return new Image
|
||||
{
|
||||
Source = new BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\intersection.png"))
|
||||
};
|
||||
}
|
||||
}
|
||||
public Coords Coords { get; set; }
|
||||
public Image Image { get; set; }
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// return new Image
|
||||
// {
|
||||
// Source = new BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\intersection.png"))
|
||||
// };
|
||||
// }
|
||||
//}
|
||||
|
||||
public Road()
|
||||
{
|
||||
}
|
||||
Image = new Image()
|
||||
{
|
||||
Source =
|
||||
new BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\intersection.png"))
|
||||
};
|
||||
}
|
||||
|
||||
public Coords Coords { get; set; }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user