forked from s434786/DINO_SCRUM
96 lines
1.5 KiB
C#
96 lines
1.5 KiB
C#
using Magazyn.Tools;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
using System.Windows.Media.Imaging;
|
|
|
|
namespace Magazyn.DataModels
|
|
{
|
|
public class Fruit
|
|
{
|
|
int id;
|
|
string name;
|
|
int quantity;
|
|
int quantityMax;
|
|
float price;
|
|
string imageLink;
|
|
|
|
BitmapImage imageSource;
|
|
|
|
|
|
public int Id
|
|
{
|
|
get
|
|
{
|
|
return id;
|
|
}
|
|
}
|
|
|
|
public string Name
|
|
{
|
|
get
|
|
{
|
|
return name;
|
|
}
|
|
}
|
|
|
|
public int Quantity
|
|
{
|
|
get
|
|
{
|
|
return quantity;
|
|
}
|
|
}
|
|
|
|
public int QuantityMax
|
|
{
|
|
get
|
|
{
|
|
return quantityMax;
|
|
}
|
|
}
|
|
|
|
|
|
public float Price
|
|
{
|
|
get
|
|
{
|
|
return price;
|
|
}
|
|
}
|
|
|
|
public string ImageLink
|
|
{
|
|
get
|
|
{
|
|
return imageLink;
|
|
}
|
|
}
|
|
|
|
public BitmapImage ImageSource
|
|
{
|
|
get
|
|
{
|
|
return imageSource;
|
|
}
|
|
|
|
}
|
|
|
|
public Fruit(int id, string name, int quantity, int quantityMax, float price, string imageLink)
|
|
{
|
|
|
|
this.id = id;
|
|
this.name = name;
|
|
this.quantity = quantity;
|
|
this.quantityMax = quantityMax;
|
|
this.price = price;
|
|
this.imageLink = imageLink;
|
|
|
|
imageSource = CacheImage.GetImageSource(new Uri(imageLink));
|
|
}
|
|
}
|
|
}
|