36 lines
907 B
C#
36 lines
907 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 Color color { 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;
|
|
color = car.color;
|
|
}
|
|
|
|
public static List<Car> ConvertToCarList(List<CarControl> cars)
|
|
{
|
|
return cars.Select(car => new Car(car.Car)).ToList();
|
|
}
|
|
}
|
|
}
|