Методы DragDrop для установки цветов
This commit is contained in:
parent
5859a15b9d
commit
df129f6eab
@ -151,7 +151,10 @@ namespace ArmoredCar
|
||||
/// <param name="e"></param>
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
@ -161,7 +164,12 @@ namespace ArmoredCar
|
||||
/// <param name="e"></param>
|
||||
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();
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Добавление бронемашины
|
||||
|
Loading…
Reference in New Issue
Block a user