Лабораторная работа№6

This commit is contained in:
nezui1 2024-05-06 18:57:29 +04:00
parent 5d662983bd
commit 9bf206eff5

View File

@ -156,10 +156,12 @@ public partial class FormWarPlaneConfig : Form
}
private void labelAdditionalColor_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(typeof(Color)))
if (_warPlane?.EntityWarPlane is EntityAirFighter _airFighter) {
if (e.Data.GetDataPresent(typeof(Color)))
e.Effect = DragDropEffects.Copy;
else
e.Effect = DragDropEffects.None;
}
}
private void buttonAdd_Click(object sender, EventArgs e)