правки

This commit is contained in:
xom9kxom9k 2024-04-02 09:21:56 +04:00
parent 3f805425f1
commit fc76dcda45

View File

@ -26,7 +26,7 @@ public partial class FormCarConfig : Form
panelGray.MouseDown += Panel_MouseDown;
panelBlack.MouseDown += Panel_MouseDown;
panelPurple.MouseDown += Panel_MouseDown;
// TODO buttonCancel.Click привязать анонимный метод через lambda с закрытием формы
buttonCancel.Click += (sender, e) => Close();
@ -126,9 +126,9 @@ public partial class FormCarConfig : Form
private void labelAdditionalColor_DragDrop(object sender, DragEventArgs e)
{
if (_armoredCar?.EntityAircraftGun is EntityAntiAircraftGun _airbus)
if (_armoredCar?.EntityAircraftGun is EntityAntiAircraftGun _car)
{
_airbus.setAdditionalColor((Color)e.Data.GetData(typeof(Color)));
_car.setAdditionalColor((Color)e.Data.GetData(typeof(Color)));
}
DrawObject();
}