From 5fb2d43e03b97a6426cd64665732d239cc21790f Mon Sep 17 00:00:00 2001 From: YourDax Date: Tue, 17 Oct 2023 01:29:52 +0400 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=BD=D0=B0=D0=B7=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=BA=D0=BB?= =?UTF-8?q?=D0=B0=D1=81=D1=81=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AntiAirCraftGun/FormAntiAirCraftGunCollection.cs | 4 ++-- ...cCollection.cs => AntiAirCraftGunGenericCollection.cs} | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) rename AntiAirCraftGun/AntiAirCraftGun/Generics/{ZenitsGenericCollection.cs => AntiAirCraftGunGenericCollection.cs} (95%) diff --git a/AntiAirCraftGun/AntiAirCraftGun/FormAntiAirCraftGunCollection.cs b/AntiAirCraftGun/AntiAirCraftGun/FormAntiAirCraftGunCollection.cs index 4adbc08..0a15fc1 100644 --- a/AntiAirCraftGun/AntiAirCraftGun/FormAntiAirCraftGunCollection.cs +++ b/AntiAirCraftGun/AntiAirCraftGun/FormAntiAirCraftGunCollection.cs @@ -15,11 +15,11 @@ namespace AntiAircraftGun { public partial class FormAntiAirCraftGunCollection : Form { - private readonly ZenitsGenericCollection _zenits; + private readonly AntiAirCraftGunGenericCollection _zenits; public FormAntiAirCraftGunCollection() { InitializeComponent(); - _zenits = new ZenitsGenericCollection(pictureBoxCollection.Width, pictureBoxCollection.Height); } diff --git a/AntiAirCraftGun/AntiAirCraftGun/Generics/ZenitsGenericCollection.cs b/AntiAirCraftGun/AntiAirCraftGun/Generics/AntiAirCraftGunGenericCollection.cs similarity index 95% rename from AntiAirCraftGun/AntiAirCraftGun/Generics/ZenitsGenericCollection.cs rename to AntiAirCraftGun/AntiAirCraftGun/Generics/AntiAirCraftGunGenericCollection.cs index aa41922..20b9208 100644 --- a/AntiAirCraftGun/AntiAirCraftGun/Generics/ZenitsGenericCollection.cs +++ b/AntiAirCraftGun/AntiAirCraftGun/Generics/AntiAirCraftGunGenericCollection.cs @@ -8,7 +8,7 @@ using System.Threading.Tasks; namespace AntiAircraftGun.Generics { - internal class ZenitsGenericCollection + internal class AntiAirCraftGunGenericCollection where T : BaseDrawingAntiAirCraftGun where U : IMoveableObject { @@ -37,7 +37,7 @@ namespace AntiAircraftGun.Generics /// /// /// - 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 /// /// /// - public static bool operator +(ZenitsGenericCollection collect, T? + public static bool operator +(AntiAirCraftGunGenericCollection collect, T? obj) { if (obj == null) @@ -67,7 +67,7 @@ namespace AntiAircraftGun.Generics /// /// /// - public static T? operator -(ZenitsGenericCollection collect, int + public static T? operator -(AntiAirCraftGunGenericCollection collect, int pos) { T? obj = collect._collection.Get(pos);