Ну все, готовая лаба 4

This commit is contained in:
Extrimal 2023-11-14 15:27:41 +03:00
parent 34bd3079ab
commit 25d0161b03
3 changed files with 0 additions and 5 deletions

View File

@ -32,7 +32,6 @@ namespace AircraftCarrier.Generics
_collection = new SetGeneric<T>(width * height); _collection = new SetGeneric<T>(width * height);
} }
/// Перегрузка оператора сложения /// Перегрузка оператора сложения
public static int operator +(AircraftsGenericCollection<T, U> collect, T? public static int operator +(AircraftsGenericCollection<T, U> collect, T?
obj) obj)
{ {
@ -94,7 +93,6 @@ namespace AircraftCarrier.Generics
{ {
if (aircraft != null) if (aircraft != null)
{ {
aircraft.SetPosition(i % Width * _placeSizeWidth + 3, (Height - i / Width - 1) * _placeSizeHeight +5); aircraft.SetPosition(i % Width * _placeSizeWidth + 3, (Height - i / Width - 1) * _placeSizeHeight +5);
aircraft.DrawTransport(g); aircraft.DrawTransport(g);
} }

View File

@ -72,13 +72,11 @@ namespace AircraftCarrier
{ {
return; return;
} }
var obj = _storage[listBoxStorage.SelectedItem.ToString() ?? string.Empty]; var obj = _storage[listBoxStorage.SelectedItem.ToString() ?? string.Empty];
if (obj == null) if (obj == null)
{ {
return; return;
} }
FormAircraftCarrier form = new(); FormAircraftCarrier form = new();
if (form.ShowDialog() == DialogResult.OK) if (form.ShowDialog() == DialogResult.OK)
{ {

View File

@ -72,5 +72,4 @@ namespace AircraftCarrier.Generics
} }
} }
} }
} }