ВЫполнено добавление по варианту

This commit is contained in:
Павел Ладягин 2024-03-16 15:50:37 +04:00
parent 0d20d952a8
commit 1e2f2fb603
3 changed files with 10 additions and 10 deletions

View File

@ -15,7 +15,7 @@ namespace ProjectAirplaneWithRadar.CollectionGenericObjects
/// <summary> /// <summary>
/// Размер места (высота) /// Размер места (высота)
/// </summary> /// </summary>
protected readonly int _placeSizeHeight = 100; protected readonly int _placeSizeHeight = 110;
/// <summary> /// <summary>
/// Ширина окна /// Ширина окна

View File

@ -29,7 +29,7 @@ namespace ProjectAirplaneWithRadar.CollectionGenericObjects
int width = _pictureWidth / _placeSizeWidth; int width = _pictureWidth / _placeSizeWidth;
int height = _pictureHeight / _placeSizeHeight; int height = _pictureHeight / _placeSizeHeight;
int curWidth = 0; int curWidth = width - 1;
int curHeight = 0; int curHeight = 0;
for (int i = 0; i < (_collection?.Count ?? 0); i++) for (int i = 0; i < (_collection?.Count ?? 0); i++)
@ -37,14 +37,14 @@ namespace ProjectAirplaneWithRadar.CollectionGenericObjects
if (_collection.Get(i) != null) if (_collection.Get(i) != null)
{ {
_collection.Get(i).SetPictureSize(_pictureWidth, _pictureHeight); _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) if (curWidth > 0)
curWidth++; curWidth--;
else else
{ {
curWidth = 0; curWidth = width - 1;
curHeight++; curHeight++;
} }
if (curHeight > height) if (curHeight > height)

View File

@ -51,9 +51,9 @@
groupBoxTools.Controls.Add(buttonAddAirplane); groupBoxTools.Controls.Add(buttonAddAirplane);
groupBoxTools.Controls.Add(comboBoxSelectorCompany); groupBoxTools.Controls.Add(comboBoxSelectorCompany);
groupBoxTools.Dock = DockStyle.Right; groupBoxTools.Dock = DockStyle.Right;
groupBoxTools.Location = new Point(657, 0); groupBoxTools.Location = new Point(888, 0);
groupBoxTools.Name = "groupBoxTools"; groupBoxTools.Name = "groupBoxTools";
groupBoxTools.Size = new Size(200, 546); groupBoxTools.Size = new Size(200, 542);
groupBoxTools.TabIndex = 0; groupBoxTools.TabIndex = 0;
groupBoxTools.TabStop = false; groupBoxTools.TabStop = false;
groupBoxTools.Text = "Инструменты"; groupBoxTools.Text = "Инструменты";
@ -139,7 +139,7 @@
pictureBox.Dock = DockStyle.Fill; pictureBox.Dock = DockStyle.Fill;
pictureBox.Location = new Point(0, 0); pictureBox.Location = new Point(0, 0);
pictureBox.Name = "pictureBox"; pictureBox.Name = "pictureBox";
pictureBox.Size = new Size(657, 546); pictureBox.Size = new Size(888, 542);
pictureBox.TabIndex = 1; pictureBox.TabIndex = 1;
pictureBox.TabStop = false; pictureBox.TabStop = false;
// //
@ -147,7 +147,7 @@
// //
AutoScaleDimensions = new SizeF(7F, 15F); AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(857, 546); ClientSize = new Size(1088, 542);
Controls.Add(pictureBox); Controls.Add(pictureBox);
Controls.Add(groupBoxTools); Controls.Add(groupBoxTools);
Name = "FormAirplaneCollection"; Name = "FormAirplaneCollection";