ВЫполнено добавление по варианту
This commit is contained in:
parent
0d20d952a8
commit
1e2f2fb603
@ -15,7 +15,7 @@ namespace ProjectAirplaneWithRadar.CollectionGenericObjects
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Размер места (высота)
|
/// Размер места (высота)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected readonly int _placeSizeHeight = 100;
|
protected readonly int _placeSizeHeight = 110;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Ширина окна
|
/// Ширина окна
|
||||||
|
@ -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)
|
||||||
|
@ -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";
|
||||||
|
Loading…
Reference in New Issue
Block a user