diff --git a/AntiAircraftGun/AntiAircraftGun/FormGunConfig.cs b/AntiAircraftGun/AntiAircraftGun/FormGunConfig.cs index 94425a8..8116aab 100644 --- a/AntiAircraftGun/AntiAircraftGun/FormGunConfig.cs +++ b/AntiAircraftGun/AntiAircraftGun/FormGunConfig.cs @@ -102,7 +102,7 @@ public partial class FormGunConfig : Form private void Panel_MouseDown(object? sender, MouseEventArgs e) { // TODO реализовать выбор цвета - (sender as Control)?.DoDragDrop((sender as Control).BackColor, DragDropEffects.Move | DragDropEffects.Copy); + (sender as Control)?.DoDragDrop((sender as Control)?.BackColor ?? Color.Black, DragDropEffects.Move | DragDropEffects.Copy); } /// /// Передача объекта