This commit is contained in:
илья 2024-05-15 17:51:32 +04:00
parent 5f64d7e50c
commit 3d056750c8
3 changed files with 14 additions and 10 deletions

View File

@ -22,7 +22,7 @@ namespace ProjectLocomotive.CollectionGenericObjects
int width = _pictureWidth / _placeSizeWidth;
int height = _pictureHeight / _placeSizeHeight;
Pen pen = new(Color.Black, 2);
for (int i = 0; i < width; i++)
for (int i = 0; i < width + 1; i++)
{
for (int j = 0; j < height + 1; ++j)
{
@ -36,7 +36,7 @@ namespace ProjectLocomotive.CollectionGenericObjects
int width = _pictureWidth / _placeSizeWidth;
int height = _pictureHeight / _placeSizeHeight;
int curWidth = 0;
int curWidth = 2;
int curHeight = 0;
for (int i = 0; i < (_collection?.Count ?? 0); i++)
@ -47,11 +47,11 @@ namespace ProjectLocomotive.CollectionGenericObjects
_collection.Get(i).SetPosition(_placeSizeWidth * curWidth + 10, curHeight * _placeSizeHeight + 10);
}
if (curWidth < width - 1)
curWidth++;
if (curWidth > width - 2)
curWidth--;
else
{
curWidth = 0;
curWidth = 2;
curHeight ++;
}

View File

@ -60,11 +60,11 @@
groupBoxTools.Controls.Add(comboBoxSelectorCompany);
groupBoxTools.Controls.Add(panelCompanyTools);
groupBoxTools.Dock = DockStyle.Right;
groupBoxTools.Location = new Point(510, 0);
groupBoxTools.Location = new Point(536, 0);
groupBoxTools.Margin = new Padding(3, 2, 3, 2);
groupBoxTools.Name = "groupBoxTools";
groupBoxTools.Padding = new Padding(3, 2, 3, 2);
groupBoxTools.Size = new Size(194, 490);
groupBoxTools.Size = new Size(215, 490);
groupBoxTools.TabIndex = 0;
groupBoxTools.TabStop = false;
groupBoxTools.Text = "инструменты";
@ -93,7 +93,7 @@
panelStorage.Location = new Point(3, 18);
panelStorage.Margin = new Padding(3, 2, 3, 2);
panelStorage.Name = "panelStorage";
panelStorage.Size = new Size(188, 212);
panelStorage.Size = new Size(209, 212);
panelStorage.TabIndex = 6;
//
// buttonCollectionDel
@ -116,6 +116,7 @@
listBoxCollection.Name = "listBoxCollection";
listBoxCollection.Size = new Size(163, 79);
listBoxCollection.TabIndex = 5;
listBoxCollection.SelectedIndexChanged += listBoxCollection_SelectedIndexChanged;
//
// buttonCollecctionAdd
//
@ -273,7 +274,7 @@
pictureBoxLocomotive.Location = new Point(0, 0);
pictureBoxLocomotive.Margin = new Padding(3, 2, 3, 2);
pictureBoxLocomotive.Name = "pictureBoxLocomotive";
pictureBoxLocomotive.Size = new Size(510, 490);
pictureBoxLocomotive.Size = new Size(536, 490);
pictureBoxLocomotive.TabIndex = 1;
pictureBoxLocomotive.TabStop = false;
//
@ -281,7 +282,7 @@
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(704, 490);
ClientSize = new Size(751, 490);
Controls.Add(pictureBoxLocomotive);
Controls.Add(groupBoxTools);
Margin = new Padding(3, 2, 3, 2);

View File

@ -255,6 +255,9 @@ namespace ProjectLocomotive
}
private void listBoxCollection_SelectedIndexChanged(object sender, EventArgs e)
{
}
}
}