изменения

This commit is contained in:
Daria 2024-05-27 12:09:57 +04:00
parent 22f080fa4f
commit 0ba01e0bd8
5 changed files with 27 additions and 18 deletions

View File

@ -36,7 +36,7 @@ public abstract class AbstractCompany
/// <summary>
/// Вычисление максимального количества элементов, который можно разместить в окне
/// </summary>
private int GetMaxCount => _pictureWidth * _pictureHeight / (_placeSizeWidth * _placeSizeHeight);
private int GetMaxCount =>( _pictureWidth * _pictureHeight) / (_placeSizeWidth * _placeSizeHeight);
/// <summary>
/// Конструктор

View File

@ -45,8 +45,10 @@ public class Garage(int picWidth, int picHeight, ICollectionGenericObjects<Drawn
{
try
{
int r = i / width;
int s = width - 1 - (i % width);
_collection.Get(i).SetPictureSize(_pictureWidth, _pictureHeight);
_collection.Get(i).SetPosition(_placeSizeWidth * curWidth + 10, curHeight * _placeSizeHeight + 10);
_collection.Get(i).SetPosition(s * _placeSizeWidth + t, (r * _placeSizeHeight * 2) + t);
}
catch (ObjectNotFoundException) { }
catch (PositionOutOfCollectionException e) { }
@ -65,3 +67,5 @@ public class Garage(int picWidth, int picHeight, ICollectionGenericObjects<Drawn
}
}
}

View File

@ -66,9 +66,9 @@
groupBox1.Controls.Add(panelStorage);
groupBox1.Controls.Add(comboBoxSelectorCompany);
groupBox1.Dock = DockStyle.Right;
groupBox1.Location = new Point(939, 28);
groupBox1.Location = new Point(843, 28);
groupBox1.Name = "groupBox1";
groupBox1.Size = new Size(221, 778);
groupBox1.Size = new Size(221, 781);
groupBox1.TabIndex = 0;
groupBox1.TabStop = false;
groupBox1.Text = "Инструменты";
@ -82,9 +82,9 @@
panelCompanyTools.Controls.Add(buttonDelExcavator);
panelCompanyTools.Dock = DockStyle.Bottom;
panelCompanyTools.Enabled = false;
panelCompanyTools.Location = new Point(3, 476);
panelCompanyTools.Location = new Point(3, 510);
panelCompanyTools.Name = "panelCompanyTools";
panelCompanyTools.Size = new Size(215, 299);
panelCompanyTools.Size = new Size(215, 268);
panelCompanyTools.TabIndex = 9;
//
// buttonAddTrackedVehicle
@ -101,7 +101,7 @@
// buttonRefresh
//
buttonRefresh.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
buttonRefresh.Location = new Point(18, 221);
buttonRefresh.Location = new Point(18, 196);
buttonRefresh.Name = "buttonRefresh";
buttonRefresh.Size = new Size(176, 45);
buttonRefresh.TabIndex = 6;
@ -112,7 +112,7 @@
// buttonGoToCheck
//
buttonGoToCheck.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
buttonGoToCheck.Location = new Point(18, 170);
buttonGoToCheck.Location = new Point(18, 145);
buttonGoToCheck.Name = "buttonGoToCheck";
buttonGoToCheck.Size = new Size(171, 45);
buttonGoToCheck.TabIndex = 5;
@ -122,7 +122,7 @@
//
// maskedTextBox
//
maskedTextBox.Location = new Point(10, 75);
maskedTextBox.Location = new Point(10, 61);
maskedTextBox.Mask = "00";
maskedTextBox.Name = "maskedTextBox";
maskedTextBox.Size = new Size(191, 27);
@ -132,7 +132,7 @@
// buttonDelExcavator
//
buttonDelExcavator.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
buttonDelExcavator.Location = new Point(18, 119);
buttonDelExcavator.Location = new Point(18, 94);
buttonDelExcavator.Name = "buttonDelExcavator";
buttonDelExcavator.Size = new Size(171, 45);
buttonDelExcavator.TabIndex = 4;
@ -142,7 +142,7 @@
//
// buttonCreateCompany
//
buttonCreateCompany.Location = new Point(24, 441);
buttonCreateCompany.Location = new Point(24, 374);
buttonCreateCompany.Name = "buttonCreateCompany";
buttonCreateCompany.Size = new Size(180, 29);
buttonCreateCompany.TabIndex = 8;
@ -162,12 +162,12 @@
panelStorage.Dock = DockStyle.Top;
panelStorage.Location = new Point(3, 23);
panelStorage.Name = "panelStorage";
panelStorage.Size = new Size(215, 362);
panelStorage.Size = new Size(215, 311);
panelStorage.TabIndex = 7;
//
// buttonCollectionDel
//
buttonCollectionDel.Location = new Point(15, 287);
buttonCollectionDel.Location = new Point(15, 271);
buttonCollectionDel.Name = "buttonCollectionDel";
buttonCollectionDel.Size = new Size(180, 29);
buttonCollectionDel.TabIndex = 6;
@ -237,7 +237,7 @@
comboBoxSelectorCompany.DropDownStyle = ComboBoxStyle.DropDownList;
comboBoxSelectorCompany.FormattingEnabled = true;
comboBoxSelectorCompany.Items.AddRange(new object[] { "Хранилище" });
comboBoxSelectorCompany.Location = new Point(18, 402);
comboBoxSelectorCompany.Location = new Point(18, 340);
comboBoxSelectorCompany.Name = "comboBoxSelectorCompany";
comboBoxSelectorCompany.Size = new Size(191, 28);
comboBoxSelectorCompany.TabIndex = 0;
@ -246,9 +246,9 @@
// pictureBox
//
pictureBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
pictureBox.Location = new Point(1, 27);
pictureBox.Location = new Point(1, 28);
pictureBox.Name = "pictureBox";
pictureBox.Size = new Size(938, 773);
pictureBox.Size = new Size(842, 773);
pictureBox.TabIndex = 1;
pictureBox.TabStop = false;
//
@ -258,7 +258,7 @@
menuStrip.Items.AddRange(new ToolStripItem[] { файлToolStripMenuItem });
menuStrip.Location = new Point(0, 0);
menuStrip.Name = "menuStrip";
menuStrip.Size = new Size(1160, 28);
menuStrip.Size = new Size(1064, 28);
menuStrip.TabIndex = 2;
menuStrip.Text = "menuStrip1";
//
@ -298,7 +298,7 @@
//
AutoScaleDimensions = new SizeF(8F, 20F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(1160, 806);
ClientSize = new Size(1064, 809);
Controls.Add(pictureBox);
Controls.Add(groupBox1);
Controls.Add(menuStrip);

View File

@ -311,5 +311,7 @@ public partial class FormTrackedVehicleCollection : Form
}
}
}
}

View File

@ -126,4 +126,7 @@
<metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>310, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>25</value>
</metadata>
</root>