слияние

This commit is contained in:
Evgeny Egov 2024-01-06 18:18:30 +04:00
commit 751f54dd1d
Failed to extract signature
4 changed files with 13 additions and 4 deletions

View File

@ -2,8 +2,17 @@
namespace ProjectSportCar.CollectionGenericObjects; namespace ProjectSportCar.CollectionGenericObjects;
/// <summary>
/// Реализация абстрактной компании - каршеринг
/// </summary>
public class CarSharingService : AbstractCompany public class CarSharingService : AbstractCompany
{ {
/// <summary>
/// Конструктор
/// </summary>
/// <param name="picWidth"></param>
/// <param name="picHeight"></param>
/// <param name="collection"></param>
public CarSharingService(int picWidth, int picHeight, ICollectionGenericObjects<DrawningCar> collection) : base(picWidth, picHeight, collection) public CarSharingService(int picWidth, int picHeight, ICollectionGenericObjects<DrawningCar> collection) : base(picWidth, picHeight, collection)
{ {
} }

View File

@ -26,7 +26,7 @@ public class EntitySportCar : EntityCar
public bool SportLine { get; private set; } public bool SportLine { get; private set; }
/// <summary> /// <summary>
/// Инициализация полей объекта-класса спортивного автомобиля /// Конструктор сущности
/// </summary> /// </summary>
/// <param name="speed">Скорость</param> /// <param name="speed">Скорость</param>
/// <param name="weight">Вес автомобиля</param> /// <param name="weight">Вес автомобиля</param>
@ -35,7 +35,7 @@ public class EntitySportCar : EntityCar
/// <param name="bodyKit">Признак наличия обвеса</param> /// <param name="bodyKit">Признак наличия обвеса</param>
/// <param name="wing">Признак наличия антикрыла</param> /// <param name="wing">Признак наличия антикрыла</param>
/// <param name="sportLine">Признак наличия гоночной полосы</param> /// <param name="sportLine">Признак наличия гоночной полосы</param>
public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool bodyKit, bool wing, bool sportLine) public EntitySportCar(int speed, double weight, Color bodyColor, Color additionalColor, bool bodyKit, bool wing, bool sportLine) : base(0, 0, Color.Black)
{ {
AdditionalColor = additionalColor; AdditionalColor = additionalColor;
BodyKit = bodyKit; BodyKit = bodyKit;

View File

@ -70,7 +70,7 @@ public partial class FormCarCollection : Form
drawningCar = new DrawningCar(random.Next(100, 300), random.Next(1000, 3000), GetColor(random)); drawningCar = new DrawningCar(random.Next(100, 300), random.Next(1000, 3000), GetColor(random));
break; break;
case nameof(DrawningSportCar): case nameof(DrawningSportCar):
// TODO выбор цветов // TODO вызов диалогового окна для выбора цвета
drawningCar = new DrawningSportCar(random.Next(100, 300), random.Next(1000, 3000), drawningCar = new DrawningSportCar(random.Next(100, 300), random.Next(1000, 3000),
Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)), Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)),
Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)), Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)),

View File

@ -59,7 +59,7 @@ public partial class FormSportCar : Form
} }
/// <summary> /// <summary>
/// Перемешение объекта по форме (нажатие кнопок навигации) /// Перемещение объекта по форме (нажатие кнопок навигации)
/// </summary> /// </summary>
/// <param name="sender"></param> /// <param name="sender"></param>
/// <param name="e"></param> /// <param name="e"></param>