From 1e2f2fb60339e9455505faf1984c3bd00e90d32e Mon Sep 17 00:00:00 2001 From: F1rsTTeaM Date: Sat, 16 Mar 2024 15:50:37 +0400 Subject: [PATCH] =?UTF-8?q?=D0=92=D0=AB=D0=BF=D0=BE=D0=BB=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=BF=D0=BE=20=D0=B2=D0=B0=D1=80=D0=B8=D0=B0?= =?UTF-8?q?=D0=BD=D1=82=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CollectionGenericObjects/AbstractCompany.cs | 2 +- .../CollectionGenericObjects/PlaneSharingService.cs | 10 +++++----- .../FormAirplaneCollection.Designer.cs | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/AirplaneWithRadar/ProjectAirplaneWithRadar/CollectionGenericObjects/AbstractCompany.cs b/AirplaneWithRadar/ProjectAirplaneWithRadar/CollectionGenericObjects/AbstractCompany.cs index c675298..a95236d 100644 --- a/AirplaneWithRadar/ProjectAirplaneWithRadar/CollectionGenericObjects/AbstractCompany.cs +++ b/AirplaneWithRadar/ProjectAirplaneWithRadar/CollectionGenericObjects/AbstractCompany.cs @@ -15,7 +15,7 @@ namespace ProjectAirplaneWithRadar.CollectionGenericObjects /// /// Размер места (высота) /// - protected readonly int _placeSizeHeight = 100; + protected readonly int _placeSizeHeight = 110; /// /// Ширина окна diff --git a/AirplaneWithRadar/ProjectAirplaneWithRadar/CollectionGenericObjects/PlaneSharingService.cs b/AirplaneWithRadar/ProjectAirplaneWithRadar/CollectionGenericObjects/PlaneSharingService.cs index 4a210f3..b52a323 100644 --- a/AirplaneWithRadar/ProjectAirplaneWithRadar/CollectionGenericObjects/PlaneSharingService.cs +++ b/AirplaneWithRadar/ProjectAirplaneWithRadar/CollectionGenericObjects/PlaneSharingService.cs @@ -29,7 +29,7 @@ namespace ProjectAirplaneWithRadar.CollectionGenericObjects int width = _pictureWidth / _placeSizeWidth; int height = _pictureHeight / _placeSizeHeight; - int curWidth = 0; + int curWidth = width - 1; int curHeight = 0; for (int i = 0; i < (_collection?.Count ?? 0); i++) @@ -37,14 +37,14 @@ namespace ProjectAirplaneWithRadar.CollectionGenericObjects if (_collection.Get(i) != null) { _collection.Get(i).SetPictureSize(_pictureWidth, _pictureHeight); - _collection.Get(i).SetPosition(_placeSizeWidth * curWidth + 10, curHeight * _placeSizeHeight); + _collection.Get(i).SetPosition(_placeSizeWidth * curWidth + 10, curHeight * _placeSizeHeight + 5); } - if (curWidth < width - 1) - curWidth++; + if (curWidth > 0) + curWidth--; else { - curWidth = 0; + curWidth = width - 1; curHeight++; } if (curHeight > height) diff --git a/AirplaneWithRadar/ProjectAirplaneWithRadar/FormAirplaneCollection.Designer.cs b/AirplaneWithRadar/ProjectAirplaneWithRadar/FormAirplaneCollection.Designer.cs index 4cbd16b..dcf8015 100644 --- a/AirplaneWithRadar/ProjectAirplaneWithRadar/FormAirplaneCollection.Designer.cs +++ b/AirplaneWithRadar/ProjectAirplaneWithRadar/FormAirplaneCollection.Designer.cs @@ -51,9 +51,9 @@ groupBoxTools.Controls.Add(buttonAddAirplane); groupBoxTools.Controls.Add(comboBoxSelectorCompany); groupBoxTools.Dock = DockStyle.Right; - groupBoxTools.Location = new Point(657, 0); + groupBoxTools.Location = new Point(888, 0); groupBoxTools.Name = "groupBoxTools"; - groupBoxTools.Size = new Size(200, 546); + groupBoxTools.Size = new Size(200, 542); groupBoxTools.TabIndex = 0; groupBoxTools.TabStop = false; groupBoxTools.Text = "Инструменты"; @@ -139,7 +139,7 @@ pictureBox.Dock = DockStyle.Fill; pictureBox.Location = new Point(0, 0); pictureBox.Name = "pictureBox"; - pictureBox.Size = new Size(657, 546); + pictureBox.Size = new Size(888, 542); pictureBox.TabIndex = 1; pictureBox.TabStop = false; // @@ -147,7 +147,7 @@ // AutoScaleDimensions = new SizeF(7F, 15F); AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(857, 546); + ClientSize = new Size(1088, 542); Controls.Add(pictureBox); Controls.Add(groupBoxTools); Name = "FormAirplaneCollection";