GtaVUsersInfo/Car.cs

34 lines
835 B
C#

using GtaVUsersInfo.Controls;
using System.Collections.Generic;
using System.Linq;
namespace GtaVUsersInfo
{
public class Car
{
public string Name { get; set; }
public int Price { get; set; }
public string Photo { get; set; }
public string Manufacturer { get; set; }
public string Class { get; set; }
public string Model { get; set; }
public Car() { }
public Car(Car car)
{
Name = car.Name;
Price = car.Price;
Photo = car.Photo;
Manufacturer = car.Manufacturer;
Class = car.Class;
Model = car.Model;
}
public static List<Car> ConvertToCarList(List<CarControl> cars)
{
return cars.Select(car => new Car(car.Car)).ToList();
}
}
}