в
This commit is contained in:
parent
7ad41b0bc1
commit
368032237a
@ -29,7 +29,7 @@ namespace ProjectBoat.CollectionGenericObjects
|
||||
protected readonly int _pictureHeight;
|
||||
|
||||
/// <summary>
|
||||
/// Коллекция крейсеров
|
||||
/// Коллекция лодок
|
||||
/// </summary>
|
||||
protected ICollectionGenericObjects<DrawningBoat>? _collection = null;
|
||||
|
||||
|
@ -28,11 +28,11 @@ public class DrawningBoat
|
||||
protected int? _startPosY;
|
||||
|
||||
/// <summary>
|
||||
/// Ширина прорисовки крейсера
|
||||
/// Ширина прорисовки лодки
|
||||
/// </summary>
|
||||
private readonly int _drawningBoatWidth = 150;
|
||||
/// <summary>
|
||||
/// Высота прорисовки крейсера
|
||||
/// Высота прорисовки лодки
|
||||
/// </summary>
|
||||
private readonly int _drawningBoatHeight = 50;
|
||||
private readonly int _drawningEnginesWidth = 3;
|
||||
@ -210,7 +210,7 @@ public class DrawningBoat
|
||||
|
||||
|
||||
|
||||
//границы круисера
|
||||
//границы лодки
|
||||
Point[] points = { new Point(_startPosX.Value, _startPosY.Value), new Point(_startPosX.Value + 105, _startPosY.Value), new Point(_startPosX.Value + 147, _startPosY.Value + 24), new Point(_startPosX.Value + 105, _startPosY.Value + 49), new Point(_startPosX.Value, _startPosY.Value + 49), new Point(_startPosX.Value, _startPosY.Value) };
|
||||
g.FillPolygon(Brush, points);
|
||||
g.DrawPolygon(pen2, points);
|
||||
@ -223,7 +223,7 @@ public class DrawningBoat
|
||||
|
||||
//g.DrawLine(pen, _startPosX.Value, _startPosY.Value, _startPosX.Value, _startPosY.Value + 49);
|
||||
|
||||
//внутренности круисера
|
||||
//внутренности лодки
|
||||
|
||||
g.DrawRectangle(pen2, _startPosX.Value + 25, _startPosY.Value + 10, 80, 30);
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
namespace ProjectBoat.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// Класс-сущность "крейсер"
|
||||
/// Класс-сущность "лодка"
|
||||
/// </summary>
|
||||
public class EntityBoat
|
||||
{
|
||||
@ -27,7 +27,7 @@ public class EntityBoat
|
||||
/// </summary>
|
||||
public double Step => Speed * 100 / Weight;
|
||||
/// <summary>
|
||||
/// Инициализация полей объекта-класса крейсера
|
||||
/// Инициализация полей объекта-класса лодки
|
||||
/// </summary>
|
||||
/// <param name="speed">скорость</param>
|
||||
/// <param name="weight">вес</param>
|
||||
|
@ -169,7 +169,7 @@
|
||||
checkBoxGlass.Name = "checkBoxGlass";
|
||||
checkBoxGlass.Size = new Size(202, 24);
|
||||
checkBoxGlass.TabIndex = 8;
|
||||
checkBoxGlass.Text = "Признак наличие пушки";
|
||||
checkBoxGlass.Text = "Признак наличие стекла";
|
||||
checkBoxGlass.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxOars
|
||||
@ -177,9 +177,9 @@
|
||||
checkBoxOars.AutoSize = true;
|
||||
checkBoxOars.Location = new Point(6, 169);
|
||||
checkBoxOars.Name = "checkBoxOars";
|
||||
checkBoxOars.Size = new Size(215, 24);
|
||||
checkBoxOars.Size = new Size(197, 24);
|
||||
checkBoxOars.TabIndex = 7;
|
||||
checkBoxOars.Text = "Признак наличие шлюпок";
|
||||
checkBoxOars.Text = "Признак наличие весел";
|
||||
checkBoxOars.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxMotor
|
||||
@ -187,9 +187,9 @@
|
||||
checkBoxMotor.AutoSize = true;
|
||||
checkBoxMotor.Location = new Point(6, 123);
|
||||
checkBoxMotor.Name = "checkBoxMotor";
|
||||
checkBoxMotor.Size = new Size(321, 24);
|
||||
checkBoxMotor.Size = new Size(210, 24);
|
||||
checkBoxMotor.TabIndex = 6;
|
||||
checkBoxMotor.Text = "Признак наличие вертолетной площадки";
|
||||
checkBoxMotor.Text = "Признак наличие мотора";
|
||||
checkBoxMotor.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// numericUpDownWeight
|
||||
|
@ -68,21 +68,18 @@
|
||||
groupBoxTools.Controls.Add(comboBoxSelectorCompany);
|
||||
groupBoxTools.Controls.Add(panelCompanyTools);
|
||||
groupBoxTools.Dock = DockStyle.Right;
|
||||
groupBoxTools.Location = new Point(552, 24);
|
||||
groupBoxTools.Margin = new Padding(3, 2, 3, 2);
|
||||
groupBoxTools.Location = new Point(631, 30);
|
||||
groupBoxTools.Name = "groupBoxTools";
|
||||
groupBoxTools.Padding = new Padding(3, 2, 3, 2);
|
||||
groupBoxTools.Size = new Size(194, 492);
|
||||
groupBoxTools.Size = new Size(222, 658);
|
||||
groupBoxTools.TabIndex = 0;
|
||||
groupBoxTools.TabStop = false;
|
||||
groupBoxTools.Text = "инструменты";
|
||||
//
|
||||
// buttonCreateCompany
|
||||
//
|
||||
buttonCreateCompany.Location = new Point(18, 259);
|
||||
buttonCreateCompany.Margin = new Padding(3, 2, 3, 2);
|
||||
buttonCreateCompany.Location = new Point(21, 345);
|
||||
buttonCreateCompany.Name = "buttonCreateCompany";
|
||||
buttonCreateCompany.Size = new Size(163, 20);
|
||||
buttonCreateCompany.Size = new Size(186, 27);
|
||||
buttonCreateCompany.TabIndex = 7;
|
||||
buttonCreateCompany.Text = "Создать компанию";
|
||||
buttonCreateCompany.UseVisualStyleBackColor = true;
|
||||
@ -98,18 +95,16 @@
|
||||
panelStorage.Controls.Add(textBoxCollectionName);
|
||||
panelStorage.Controls.Add(labelCollectionName);
|
||||
panelStorage.Dock = DockStyle.Top;
|
||||
panelStorage.Location = new Point(3, 18);
|
||||
panelStorage.Margin = new Padding(3, 2, 3, 2);
|
||||
panelStorage.Location = new Point(3, 23);
|
||||
panelStorage.Name = "panelStorage";
|
||||
panelStorage.Size = new Size(188, 212);
|
||||
panelStorage.Size = new Size(216, 283);
|
||||
panelStorage.TabIndex = 6;
|
||||
//
|
||||
// buttonCollectionDel
|
||||
//
|
||||
buttonCollectionDel.Location = new Point(15, 185);
|
||||
buttonCollectionDel.Margin = new Padding(3, 2, 3, 2);
|
||||
buttonCollectionDel.Location = new Point(17, 247);
|
||||
buttonCollectionDel.Name = "buttonCollectionDel";
|
||||
buttonCollectionDel.Size = new Size(163, 20);
|
||||
buttonCollectionDel.Size = new Size(186, 27);
|
||||
buttonCollectionDel.TabIndex = 6;
|
||||
buttonCollectionDel.Text = "Удалить коллекцию";
|
||||
buttonCollectionDel.UseVisualStyleBackColor = true;
|
||||
@ -118,19 +113,16 @@
|
||||
// listBoxCollection
|
||||
//
|
||||
listBoxCollection.FormattingEnabled = true;
|
||||
listBoxCollection.ItemHeight = 15;
|
||||
listBoxCollection.Location = new Point(15, 103);
|
||||
listBoxCollection.Margin = new Padding(3, 2, 3, 2);
|
||||
listBoxCollection.Location = new Point(17, 137);
|
||||
listBoxCollection.Name = "listBoxCollection";
|
||||
listBoxCollection.Size = new Size(163, 79);
|
||||
listBoxCollection.Size = new Size(186, 104);
|
||||
listBoxCollection.TabIndex = 5;
|
||||
//
|
||||
// buttonCollecctionAdd
|
||||
//
|
||||
buttonCollecctionAdd.Location = new Point(15, 78);
|
||||
buttonCollecctionAdd.Margin = new Padding(3, 2, 3, 2);
|
||||
buttonCollecctionAdd.Location = new Point(17, 104);
|
||||
buttonCollecctionAdd.Name = "buttonCollecctionAdd";
|
||||
buttonCollecctionAdd.Size = new Size(163, 20);
|
||||
buttonCollecctionAdd.Size = new Size(186, 27);
|
||||
buttonCollecctionAdd.TabIndex = 4;
|
||||
buttonCollecctionAdd.Text = "Добавить коллекцию";
|
||||
buttonCollecctionAdd.UseVisualStyleBackColor = true;
|
||||
@ -139,10 +131,9 @@
|
||||
// radioButtonList
|
||||
//
|
||||
radioButtonList.AutoSize = true;
|
||||
radioButtonList.Location = new Point(108, 56);
|
||||
radioButtonList.Margin = new Padding(3, 2, 3, 2);
|
||||
radioButtonList.Location = new Point(123, 75);
|
||||
radioButtonList.Name = "radioButtonList";
|
||||
radioButtonList.Size = new Size(66, 19);
|
||||
radioButtonList.Size = new Size(80, 24);
|
||||
radioButtonList.TabIndex = 3;
|
||||
radioButtonList.TabStop = true;
|
||||
radioButtonList.Text = "Список";
|
||||
@ -151,10 +142,9 @@
|
||||
// radioButtonMassive
|
||||
//
|
||||
radioButtonMassive.AutoSize = true;
|
||||
radioButtonMassive.Location = new Point(15, 56);
|
||||
radioButtonMassive.Margin = new Padding(3, 2, 3, 2);
|
||||
radioButtonMassive.Location = new Point(17, 75);
|
||||
radioButtonMassive.Name = "radioButtonMassive";
|
||||
radioButtonMassive.Size = new Size(67, 19);
|
||||
radioButtonMassive.Size = new Size(82, 24);
|
||||
radioButtonMassive.TabIndex = 2;
|
||||
radioButtonMassive.TabStop = true;
|
||||
radioButtonMassive.Text = "Массив";
|
||||
@ -162,18 +152,17 @@
|
||||
//
|
||||
// textBoxCollectionName
|
||||
//
|
||||
textBoxCollectionName.Location = new Point(15, 24);
|
||||
textBoxCollectionName.Margin = new Padding(3, 2, 3, 2);
|
||||
textBoxCollectionName.Location = new Point(17, 32);
|
||||
textBoxCollectionName.Name = "textBoxCollectionName";
|
||||
textBoxCollectionName.Size = new Size(163, 23);
|
||||
textBoxCollectionName.Size = new Size(186, 27);
|
||||
textBoxCollectionName.TabIndex = 1;
|
||||
//
|
||||
// labelCollectionName
|
||||
//
|
||||
labelCollectionName.AutoSize = true;
|
||||
labelCollectionName.Location = new Point(23, 7);
|
||||
labelCollectionName.Location = new Point(26, 9);
|
||||
labelCollectionName.Name = "labelCollectionName";
|
||||
labelCollectionName.Size = new Size(122, 15);
|
||||
labelCollectionName.Size = new Size(155, 20);
|
||||
labelCollectionName.TabIndex = 0;
|
||||
labelCollectionName.Text = "Название коллекции";
|
||||
//
|
||||
@ -182,10 +171,9 @@
|
||||
comboBoxSelectorCompany.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||
comboBoxSelectorCompany.FormattingEnabled = true;
|
||||
comboBoxSelectorCompany.Items.AddRange(new object[] { "Хранилище" });
|
||||
comboBoxSelectorCompany.Location = new Point(18, 233);
|
||||
comboBoxSelectorCompany.Margin = new Padding(3, 2, 3, 2);
|
||||
comboBoxSelectorCompany.Location = new Point(21, 311);
|
||||
comboBoxSelectorCompany.Name = "comboBoxSelectorCompany";
|
||||
comboBoxSelectorCompany.Size = new Size(163, 23);
|
||||
comboBoxSelectorCompany.Size = new Size(186, 28);
|
||||
comboBoxSelectorCompany.TabIndex = 0;
|
||||
comboBoxSelectorCompany.SelectedIndexChanged += comboBoxSelectorCompany_SelectedIndexChanged_1;
|
||||
//
|
||||
@ -199,19 +187,17 @@
|
||||
panelCompanyTools.Controls.Add(maskedTextBoxPosision);
|
||||
panelCompanyTools.Controls.Add(buttonGetToTest);
|
||||
panelCompanyTools.Enabled = false;
|
||||
panelCompanyTools.Location = new Point(3, 284);
|
||||
panelCompanyTools.Margin = new Padding(3, 2, 3, 2);
|
||||
panelCompanyTools.Location = new Point(3, 379);
|
||||
panelCompanyTools.Name = "panelCompanyTools";
|
||||
panelCompanyTools.Size = new Size(189, 206);
|
||||
panelCompanyTools.Size = new Size(216, 275);
|
||||
panelCompanyTools.TabIndex = 8;
|
||||
//
|
||||
// buttonSortByColor
|
||||
//
|
||||
buttonSortByColor.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||
buttonSortByColor.Location = new Point(17, 181);
|
||||
buttonSortByColor.Margin = new Padding(3, 2, 3, 2);
|
||||
buttonSortByColor.Location = new Point(19, 241);
|
||||
buttonSortByColor.Name = "buttonSortByColor";
|
||||
buttonSortByColor.Size = new Size(163, 23);
|
||||
buttonSortByColor.Size = new Size(186, 31);
|
||||
buttonSortByColor.TabIndex = 7;
|
||||
buttonSortByColor.Text = "Сортировка по цвету";
|
||||
buttonSortByColor.UseVisualStyleBackColor = true;
|
||||
@ -220,10 +206,9 @@
|
||||
// buttonSortByType
|
||||
//
|
||||
buttonSortByType.Anchor = AnchorStyles.Right;
|
||||
buttonSortByType.Location = new Point(17, 149);
|
||||
buttonSortByType.Margin = new Padding(3, 2, 3, 2);
|
||||
buttonSortByType.Location = new Point(19, 199);
|
||||
buttonSortByType.Name = "buttonSortByType";
|
||||
buttonSortByType.Size = new Size(163, 28);
|
||||
buttonSortByType.Size = new Size(186, 37);
|
||||
buttonSortByType.TabIndex = 6;
|
||||
buttonSortByType.Text = "Сортировка по типу";
|
||||
buttonSortByType.UseVisualStyleBackColor = true;
|
||||
@ -233,22 +218,20 @@
|
||||
//
|
||||
ButtonAddBoat.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
ButtonAddBoat.BackgroundImageLayout = ImageLayout.Center;
|
||||
ButtonAddBoat.Location = new Point(16, 2);
|
||||
ButtonAddBoat.Margin = new Padding(3, 2, 3, 2);
|
||||
ButtonAddBoat.Location = new Point(18, 3);
|
||||
ButtonAddBoat.Name = "ButtonAddBoat";
|
||||
ButtonAddBoat.Size = new Size(163, 39);
|
||||
ButtonAddBoat.Size = new Size(186, 52);
|
||||
ButtonAddBoat.TabIndex = 1;
|
||||
ButtonAddBoat.Text = "добваление артиллерийской установки";
|
||||
ButtonAddBoat.Text = "добавление лодки";
|
||||
ButtonAddBoat.UseVisualStyleBackColor = true;
|
||||
ButtonAddBoat.Click += ButtonAddBoat_Click;
|
||||
//
|
||||
// buttonRefresh
|
||||
//
|
||||
buttonRefresh.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||
buttonRefresh.Location = new Point(17, 123);
|
||||
buttonRefresh.Margin = new Padding(3, 2, 3, 2);
|
||||
buttonRefresh.Location = new Point(19, 164);
|
||||
buttonRefresh.Name = "buttonRefresh";
|
||||
buttonRefresh.Size = new Size(163, 22);
|
||||
buttonRefresh.Size = new Size(186, 29);
|
||||
buttonRefresh.TabIndex = 5;
|
||||
buttonRefresh.Text = "обновить";
|
||||
buttonRefresh.UseVisualStyleBackColor = true;
|
||||
@ -257,32 +240,29 @@
|
||||
// ButtonRemoveBoat
|
||||
//
|
||||
ButtonRemoveBoat.Anchor = AnchorStyles.Right;
|
||||
ButtonRemoveBoat.Location = new Point(17, 74);
|
||||
ButtonRemoveBoat.Margin = new Padding(3, 2, 3, 2);
|
||||
ButtonRemoveBoat.Location = new Point(19, 99);
|
||||
ButtonRemoveBoat.Name = "ButtonRemoveBoat";
|
||||
ButtonRemoveBoat.Size = new Size(163, 21);
|
||||
ButtonRemoveBoat.Size = new Size(186, 28);
|
||||
ButtonRemoveBoat.TabIndex = 3;
|
||||
ButtonRemoveBoat.Text = "удалить установку";
|
||||
ButtonRemoveBoat.Text = "удалить лодку";
|
||||
ButtonRemoveBoat.UseVisualStyleBackColor = true;
|
||||
ButtonRemoveBoat.Click += ButtonRemoveBoat_Click;
|
||||
//
|
||||
// maskedTextBoxPosision
|
||||
//
|
||||
maskedTextBoxPosision.Location = new Point(16, 45);
|
||||
maskedTextBoxPosision.Margin = new Padding(3, 2, 3, 2);
|
||||
maskedTextBoxPosision.Location = new Point(18, 60);
|
||||
maskedTextBoxPosision.Mask = "00";
|
||||
maskedTextBoxPosision.Name = "maskedTextBoxPosision";
|
||||
maskedTextBoxPosision.Size = new Size(164, 23);
|
||||
maskedTextBoxPosision.Size = new Size(187, 27);
|
||||
maskedTextBoxPosision.TabIndex = 2;
|
||||
maskedTextBoxPosision.ValidatingType = typeof(int);
|
||||
//
|
||||
// buttonGetToTest
|
||||
//
|
||||
buttonGetToTest.Anchor = AnchorStyles.Right;
|
||||
buttonGetToTest.Location = new Point(16, 99);
|
||||
buttonGetToTest.Margin = new Padding(3, 2, 3, 2);
|
||||
buttonGetToTest.Location = new Point(18, 132);
|
||||
buttonGetToTest.Name = "buttonGetToTest";
|
||||
buttonGetToTest.Size = new Size(163, 20);
|
||||
buttonGetToTest.Size = new Size(186, 27);
|
||||
buttonGetToTest.TabIndex = 4;
|
||||
buttonGetToTest.Text = "передать на тесты";
|
||||
buttonGetToTest.UseVisualStyleBackColor = true;
|
||||
@ -291,10 +271,9 @@
|
||||
// pictureBoxBoat
|
||||
//
|
||||
pictureBoxBoat.Dock = DockStyle.Fill;
|
||||
pictureBoxBoat.Location = new Point(0, 24);
|
||||
pictureBoxBoat.Margin = new Padding(3, 2, 3, 2);
|
||||
pictureBoxBoat.Location = new Point(0, 30);
|
||||
pictureBoxBoat.Name = "pictureBoxBoat";
|
||||
pictureBoxBoat.Size = new Size(552, 492);
|
||||
pictureBoxBoat.Size = new Size(631, 658);
|
||||
pictureBoxBoat.TabIndex = 1;
|
||||
pictureBoxBoat.TabStop = false;
|
||||
//
|
||||
@ -304,8 +283,8 @@
|
||||
menuStrip.Items.AddRange(new ToolStripItem[] { файлToolStripMenuItem });
|
||||
menuStrip.Location = new Point(0, 0);
|
||||
menuStrip.Name = "menuStrip";
|
||||
menuStrip.Padding = new Padding(5, 2, 0, 2);
|
||||
menuStrip.Size = new Size(746, 24);
|
||||
menuStrip.Padding = new Padding(6, 3, 0, 3);
|
||||
menuStrip.Size = new Size(853, 30);
|
||||
menuStrip.TabIndex = 2;
|
||||
menuStrip.Text = "menuStrip1";
|
||||
//
|
||||
@ -313,14 +292,14 @@
|
||||
//
|
||||
файлToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { saveToolStripMenuItem, loadToolStripMenuItem });
|
||||
файлToolStripMenuItem.Name = "файлToolStripMenuItem";
|
||||
файлToolStripMenuItem.Size = new Size(48, 20);
|
||||
файлToolStripMenuItem.Size = new Size(59, 24);
|
||||
файлToolStripMenuItem.Text = "Файл";
|
||||
//
|
||||
// saveToolStripMenuItem
|
||||
//
|
||||
saveToolStripMenuItem.Name = "saveToolStripMenuItem";
|
||||
saveToolStripMenuItem.ShortcutKeys = Keys.Control | Keys.S;
|
||||
saveToolStripMenuItem.Size = new Size(181, 22);
|
||||
saveToolStripMenuItem.Size = new Size(227, 26);
|
||||
saveToolStripMenuItem.Text = "Сохранение";
|
||||
saveToolStripMenuItem.Click += SaveToolStripMenuItem_Click;
|
||||
//
|
||||
@ -328,7 +307,7 @@
|
||||
//
|
||||
loadToolStripMenuItem.Name = "loadToolStripMenuItem";
|
||||
loadToolStripMenuItem.ShortcutKeys = Keys.Control | Keys.L;
|
||||
loadToolStripMenuItem.Size = new Size(181, 22);
|
||||
loadToolStripMenuItem.Size = new Size(227, 26);
|
||||
loadToolStripMenuItem.Text = "Загрузка";
|
||||
loadToolStripMenuItem.Click += LoadToolStripMenuItem_Click;
|
||||
//
|
||||
@ -342,14 +321,13 @@
|
||||
//
|
||||
// FormBoatsCollection
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(746, 516);
|
||||
ClientSize = new Size(853, 688);
|
||||
Controls.Add(pictureBoxBoat);
|
||||
Controls.Add(groupBoxTools);
|
||||
Controls.Add(menuStrip);
|
||||
MainMenuStrip = menuStrip;
|
||||
Margin = new Padding(3, 2, 3, 2);
|
||||
Name = "FormBoatsCollection";
|
||||
Text = "FormBoatsCollection";
|
||||
Load += FormBoatsCollection_Load;
|
||||
|
@ -41,7 +41,7 @@ namespace ProjectBoat
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Метод прорисовки круисера
|
||||
/// Метод прорисовки лодки
|
||||
/// </summary>
|
||||
private void Draw()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user