2024-10-08 18:33:19 +03:00
|
|
|
|
using GtaVUsersInfo.Controls;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
|
|
namespace GtaVUsersInfo
|
2024-10-08 09:53:24 +03:00
|
|
|
|
{
|
|
|
|
|
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; }
|
2024-10-10 13:47:29 +03:00
|
|
|
|
public Color color { get; set; }
|
2024-10-08 18:33:19 +03:00
|
|
|
|
|
|
|
|
|
public Car() { }
|
|
|
|
|
|
|
|
|
|
public Car(Car car)
|
|
|
|
|
{
|
|
|
|
|
Name = car.Name;
|
|
|
|
|
Price = car.Price;
|
|
|
|
|
Photo = car.Photo;
|
|
|
|
|
Manufacturer = car.Manufacturer;
|
|
|
|
|
Class = car.Class;
|
|
|
|
|
Model = car.Model;
|
2024-10-10 13:47:29 +03:00
|
|
|
|
color = car.color;
|
2024-10-08 18:33:19 +03:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static List<Car> ConvertToCarList(List<CarControl> cars)
|
|
|
|
|
{
|
|
|
|
|
return cars.Select(car => new Car(car.Car)).ToList();
|
|
|
|
|
}
|
2024-10-08 09:53:24 +03:00
|
|
|
|
}
|
|
|
|
|
}
|