This commit is contained in:
Дима 2024-05-23 02:14:22 +04:00
parent 7e45e6b25a
commit fc50fb687b
2 changed files with 20 additions and 20 deletions

View File

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

View File

@ -51,32 +51,32 @@
groupBoxTools.Controls.Add(ButtonAddArtilleryUnit); groupBoxTools.Controls.Add(ButtonAddArtilleryUnit);
groupBoxTools.Controls.Add(comboBoxSelectorCompany); groupBoxTools.Controls.Add(comboBoxSelectorCompany);
groupBoxTools.Dock = DockStyle.Right; groupBoxTools.Dock = DockStyle.Right;
groupBoxTools.Location = new Point(525, 0); groupBoxTools.Location = new Point(590, 0);
groupBoxTools.Margin = new Padding(3, 2, 3, 2); groupBoxTools.Margin = new Padding(3, 2, 3, 2);
groupBoxTools.Name = "groupBoxTools"; groupBoxTools.Name = "groupBoxTools";
groupBoxTools.Padding = new Padding(3, 2, 3, 2); groupBoxTools.Padding = new Padding(3, 2, 3, 2);
groupBoxTools.Size = new Size(204, 430); groupBoxTools.Size = new Size(177, 430);
groupBoxTools.TabIndex = 0; groupBoxTools.TabIndex = 0;
groupBoxTools.TabStop = false; groupBoxTools.TabStop = false;
groupBoxTools.Text = "инструменты"; groupBoxTools.Text = "инструменты";
// //
// maskedTextBoxPosision // maskedTextBoxPosision
// //
maskedTextBoxPosision.Location = new Point(17, 172); maskedTextBoxPosision.Location = new Point(6, 172);
maskedTextBoxPosision.Margin = new Padding(3, 2, 3, 2); maskedTextBoxPosision.Margin = new Padding(3, 2, 3, 2);
maskedTextBoxPosision.Mask = "00"; maskedTextBoxPosision.Mask = "00";
maskedTextBoxPosision.Name = "maskedTextBoxPosision"; maskedTextBoxPosision.Name = "maskedTextBoxPosision";
maskedTextBoxPosision.Size = new Size(175, 23); maskedTextBoxPosision.Size = new Size(163, 23);
maskedTextBoxPosision.TabIndex = 2; maskedTextBoxPosision.TabIndex = 2;
maskedTextBoxPosision.ValidatingType = typeof(int); maskedTextBoxPosision.ValidatingType = typeof(int);
// //
// buttonRefresh // buttonRefresh
// //
buttonRefresh.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; buttonRefresh.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
buttonRefresh.Location = new Point(17, 358); buttonRefresh.Location = new Point(6, 356);
buttonRefresh.Margin = new Padding(3, 2, 3, 2); buttonRefresh.Margin = new Padding(3, 2, 3, 2);
buttonRefresh.Name = "buttonRefresh"; buttonRefresh.Name = "buttonRefresh";
buttonRefresh.Size = new Size(175, 30); buttonRefresh.Size = new Size(163, 30);
buttonRefresh.TabIndex = 5; buttonRefresh.TabIndex = 5;
buttonRefresh.Text = "обновить"; buttonRefresh.Text = "обновить";
buttonRefresh.UseVisualStyleBackColor = true; buttonRefresh.UseVisualStyleBackColor = true;
@ -85,10 +85,10 @@
// buttonGetToTest // buttonGetToTest
// //
buttonGetToTest.Anchor = AnchorStyles.Right; buttonGetToTest.Anchor = AnchorStyles.Right;
buttonGetToTest.Location = new Point(17, 268); buttonGetToTest.Location = new Point(6, 269);
buttonGetToTest.Margin = new Padding(3, 2, 3, 2); buttonGetToTest.Margin = new Padding(3, 2, 3, 2);
buttonGetToTest.Name = "buttonGetToTest"; buttonGetToTest.Name = "buttonGetToTest";
buttonGetToTest.Size = new Size(175, 30); buttonGetToTest.Size = new Size(163, 30);
buttonGetToTest.TabIndex = 4; buttonGetToTest.TabIndex = 4;
buttonGetToTest.Text = "передать на тесты"; buttonGetToTest.Text = "передать на тесты";
buttonGetToTest.UseVisualStyleBackColor = true; buttonGetToTest.UseVisualStyleBackColor = true;
@ -97,10 +97,10 @@
// ButtonRemoveArtilleryUnit // ButtonRemoveArtilleryUnit
// //
ButtonRemoveArtilleryUnit.Anchor = AnchorStyles.Right; ButtonRemoveArtilleryUnit.Anchor = AnchorStyles.Right;
ButtonRemoveArtilleryUnit.Location = new Point(17, 199); ButtonRemoveArtilleryUnit.Location = new Point(6, 199);
ButtonRemoveArtilleryUnit.Margin = new Padding(3, 2, 3, 2); ButtonRemoveArtilleryUnit.Margin = new Padding(3, 2, 3, 2);
ButtonRemoveArtilleryUnit.Name = "ButtonRemoveArtilleryUnit"; ButtonRemoveArtilleryUnit.Name = "ButtonRemoveArtilleryUnit";
ButtonRemoveArtilleryUnit.Size = new Size(175, 41); ButtonRemoveArtilleryUnit.Size = new Size(163, 41);
ButtonRemoveArtilleryUnit.TabIndex = 3; ButtonRemoveArtilleryUnit.TabIndex = 3;
ButtonRemoveArtilleryUnit.Text = "удалить артиллерийскую установку"; ButtonRemoveArtilleryUnit.Text = "удалить артиллерийскую установку";
ButtonRemoveArtilleryUnit.UseVisualStyleBackColor = true; ButtonRemoveArtilleryUnit.UseVisualStyleBackColor = true;
@ -109,10 +109,10 @@
// ButtonAddMilitaryArtilleryUnit // ButtonAddMilitaryArtilleryUnit
// //
ButtonAddMilitaryArtilleryUnit.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; ButtonAddMilitaryArtilleryUnit.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
ButtonAddMilitaryArtilleryUnit.Location = new Point(17, 130); ButtonAddMilitaryArtilleryUnit.Location = new Point(6, 130);
ButtonAddMilitaryArtilleryUnit.Margin = new Padding(3, 2, 3, 2); ButtonAddMilitaryArtilleryUnit.Margin = new Padding(3, 2, 3, 2);
ButtonAddMilitaryArtilleryUnit.Name = "ButtonAddMilitaryArtilleryUnit"; ButtonAddMilitaryArtilleryUnit.Name = "ButtonAddMilitaryArtilleryUnit";
ButtonAddMilitaryArtilleryUnit.Size = new Size(175, 38); ButtonAddMilitaryArtilleryUnit.Size = new Size(163, 38);
ButtonAddMilitaryArtilleryUnit.TabIndex = 2; ButtonAddMilitaryArtilleryUnit.TabIndex = 2;
ButtonAddMilitaryArtilleryUnit.Text = "добавлене военной артиллерийской установки"; ButtonAddMilitaryArtilleryUnit.Text = "добавлене военной артиллерийской установки";
ButtonAddMilitaryArtilleryUnit.UseVisualStyleBackColor = true; ButtonAddMilitaryArtilleryUnit.UseVisualStyleBackColor = true;
@ -122,10 +122,10 @@
// //
ButtonAddArtilleryUnit.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; ButtonAddArtilleryUnit.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
ButtonAddArtilleryUnit.BackgroundImageLayout = ImageLayout.Center; ButtonAddArtilleryUnit.BackgroundImageLayout = ImageLayout.Center;
ButtonAddArtilleryUnit.Location = new Point(17, 80); ButtonAddArtilleryUnit.Location = new Point(6, 80);
ButtonAddArtilleryUnit.Margin = new Padding(3, 2, 3, 2); ButtonAddArtilleryUnit.Margin = new Padding(3, 2, 3, 2);
ButtonAddArtilleryUnit.Name = "ButtonAddArtilleryUnit"; ButtonAddArtilleryUnit.Name = "ButtonAddArtilleryUnit";
ButtonAddArtilleryUnit.Size = new Size(175, 46); ButtonAddArtilleryUnit.Size = new Size(163, 46);
ButtonAddArtilleryUnit.TabIndex = 1; ButtonAddArtilleryUnit.TabIndex = 1;
ButtonAddArtilleryUnit.Text = "добваление артиллерийской установки"; ButtonAddArtilleryUnit.Text = "добваление артиллерийской установки";
ButtonAddArtilleryUnit.UseVisualStyleBackColor = true; ButtonAddArtilleryUnit.UseVisualStyleBackColor = true;
@ -136,10 +136,10 @@
comboBoxSelectorCompany.DropDownStyle = ComboBoxStyle.DropDownList; comboBoxSelectorCompany.DropDownStyle = ComboBoxStyle.DropDownList;
comboBoxSelectorCompany.FormattingEnabled = true; comboBoxSelectorCompany.FormattingEnabled = true;
comboBoxSelectorCompany.Items.AddRange(new object[] { "хранилище" }); comboBoxSelectorCompany.Items.AddRange(new object[] { "хранилище" });
comboBoxSelectorCompany.Location = new Point(17, 20); comboBoxSelectorCompany.Location = new Point(6, 20);
comboBoxSelectorCompany.Margin = new Padding(3, 2, 3, 2); comboBoxSelectorCompany.Margin = new Padding(3, 2, 3, 2);
comboBoxSelectorCompany.Name = "comboBoxSelectorCompany"; comboBoxSelectorCompany.Name = "comboBoxSelectorCompany";
comboBoxSelectorCompany.Size = new Size(175, 23); comboBoxSelectorCompany.Size = new Size(163, 23);
comboBoxSelectorCompany.TabIndex = 0; comboBoxSelectorCompany.TabIndex = 0;
comboBoxSelectorCompany.SelectedIndexChanged += comboBoxSelectorCompany_SelectedIndexChanged_1; comboBoxSelectorCompany.SelectedIndexChanged += comboBoxSelectorCompany_SelectedIndexChanged_1;
// //
@ -149,7 +149,7 @@
pictureBoxArtilleryUnit.Location = new Point(0, 0); pictureBoxArtilleryUnit.Location = new Point(0, 0);
pictureBoxArtilleryUnit.Margin = new Padding(3, 2, 3, 2); pictureBoxArtilleryUnit.Margin = new Padding(3, 2, 3, 2);
pictureBoxArtilleryUnit.Name = "pictureBoxArtilleryUnit"; pictureBoxArtilleryUnit.Name = "pictureBoxArtilleryUnit";
pictureBoxArtilleryUnit.Size = new Size(525, 430); pictureBoxArtilleryUnit.Size = new Size(590, 430);
pictureBoxArtilleryUnit.TabIndex = 1; pictureBoxArtilleryUnit.TabIndex = 1;
pictureBoxArtilleryUnit.TabStop = false; pictureBoxArtilleryUnit.TabStop = false;
pictureBoxArtilleryUnit.Click += pictureBoxArtilleryUnit_Click; pictureBoxArtilleryUnit.Click += pictureBoxArtilleryUnit_Click;
@ -158,7 +158,7 @@
// //
AutoScaleDimensions = new SizeF(7F, 15F); AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(729, 430); ClientSize = new Size(767, 430);
Controls.Add(pictureBoxArtilleryUnit); Controls.Add(pictureBoxArtilleryUnit);
Controls.Add(groupBoxTools); Controls.Add(groupBoxTools);
Margin = new Padding(3, 2, 3, 2); Margin = new Padding(3, 2, 3, 2);