Ну все, готовая лаба 4
This commit is contained in:
parent
34bd3079ab
commit
25d0161b03
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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)
|
||||||
{
|
{
|
||||||
|
@ -72,5 +72,4 @@ namespace AircraftCarrier.Generics
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user