ПИбд-23 Тихоненков А.Е. Лабораторная №3 #10

Closed
YourDax wants to merge 8 commits from Lab3 into Lab2
2 changed files with 6 additions and 6 deletions
Showing only changes of commit 5fb2d43e03 - Show all commits

View File

@ -15,11 +15,11 @@ namespace AntiAircraftGun
{
public partial class FormAntiAirCraftGunCollection : Form
{
private readonly ZenitsGenericCollection<BaseDrawingAntiAirCraftGun,DrawingObjectAntiAirCraftGun> _zenits;
private readonly AntiAirCraftGunGenericCollection<BaseDrawingAntiAirCraftGun,DrawingObjectAntiAirCraftGun> _zenits;
public FormAntiAirCraftGunCollection()
{
InitializeComponent();
_zenits = new ZenitsGenericCollection<BaseDrawingAntiAirCraftGun,
_zenits = new AntiAirCraftGunGenericCollection<BaseDrawingAntiAirCraftGun,
DrawingObjectAntiAirCraftGun>(pictureBoxCollection.Width, pictureBoxCollection.Height);
}

View File

@ -8,7 +8,7 @@ using System.Threading.Tasks;
namespace AntiAircraftGun.Generics
{
internal class ZenitsGenericCollection<T,U>
internal class AntiAirCraftGunGenericCollection<T,U>
where T : BaseDrawingAntiAirCraftGun
where U : IMoveableObject
{
@ -37,7 +37,7 @@ namespace AntiAircraftGun.Generics
/// </summary>
/// <param name="picWidth"></param>
/// <param name="picHeight"></param>
public ZenitsGenericCollection(int picWidth, int picHeight)
public AntiAirCraftGunGenericCollection(int picWidth, int picHeight)
{
int width = picWidth / _placeSizeWidth;
int height = picHeight / _placeSizeHeight;
@ -51,7 +51,7 @@ namespace AntiAircraftGun.Generics
/// <param name="collect"></param>
/// <param name="obj"></param>
/// <returns></returns>
public static bool operator +(ZenitsGenericCollection<T, U> collect, T?
public static bool operator +(AntiAirCraftGunGenericCollection<T, U> collect, T?
Outdated
Review

Требовалось поменять тип возвращаемого значения

Требовалось поменять тип возвращаемого значения
obj)
{
if (obj == null)
@ -67,7 +67,7 @@ namespace AntiAircraftGun.Generics
/// <param name="collect"></param>
/// <param name="pos"></param>
/// <returns></returns>
public static T? operator -(ZenitsGenericCollection<T, U> collect, int
public static T? operator -(AntiAirCraftGunGenericCollection<T, U> collect, int
Outdated
Review

Требовалось поменять тип возвращаемого значения

Требовалось поменять тип возвращаемого значения
pos)
{
T? obj = collect._collection.Get(pos);