diff --git a/ArmoredCar/ArmoredCar/FormArmoredCarConfig.cs b/ArmoredCar/ArmoredCar/FormArmoredCarConfig.cs
index 11684a1..fe55d99 100644
--- a/ArmoredCar/ArmoredCar/FormArmoredCarConfig.cs
+++ b/ArmoredCar/ArmoredCar/FormArmoredCarConfig.cs
@@ -151,7 +151,10 @@ namespace ArmoredCar
///
private void LabelBaseColor_DragDrop(object sender, DragEventArgs e)
{
- // TODO Call method from object _car and set color
+ if (_armoredCar != null) {
+ _armoredCar.setColor((Color)e.Data.GetData(typeof(Color)));
+ DrawArmoredCar();
+ }
}
///
@@ -161,7 +164,12 @@ namespace ArmoredCar
///
private void LabelDopColor_DragDrop(object sender, DragEventArgs e)
{
- // TODO Call method from object _car if _car is DrawningSportCar and set dop color
+ if (_armoredCar is not DrawningTank tank)
+ return;
+
+ tank.setDopColor((Color)e.Data.GetData(typeof(Color)));
+ DrawArmoredCar();
+
}
///
/// Добавление бронемашины