From 7cfe9ebc7a071ec03eb415f9b5c14a953806001f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B8=D0=BC=D0=B0?= Date: Tue, 21 May 2024 12:34:32 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BoatDockingService.cs | 2 +- .../ProjectBus/DrawningMilitaryCruiser.cs | 67 --------- .../ProjectBus/Drawnings/DrawningMBoat.cs | 15 +- ProjectBus/ProjectBus/Entities/EntityBoat.cs | 5 +- ProjectBus/ProjectBus/Entities/EntityMBoat.cs | 5 +- .../ProjectBus/FormBoatConfing.Designer.cs | 130 ++++++++++-------- ProjectBus/ProjectBus/FormBoatConfing.cs | 4 +- .../FormBoatsCollection.Designer.cs | 99 +++++++------ 8 files changed, 158 insertions(+), 169 deletions(-) delete mode 100644 ProjectBus/ProjectBus/DrawningMilitaryCruiser.cs diff --git a/ProjectBus/ProjectBus/CollectionGenericObjects/BoatDockingService.cs b/ProjectBus/ProjectBus/CollectionGenericObjects/BoatDockingService.cs index 549b9eb..cc989c0 100644 --- a/ProjectBus/ProjectBus/CollectionGenericObjects/BoatDockingService.cs +++ b/ProjectBus/ProjectBus/CollectionGenericObjects/BoatDockingService.cs @@ -22,7 +22,7 @@ namespace ProjectBoat.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) { diff --git a/ProjectBus/ProjectBus/DrawningMilitaryCruiser.cs b/ProjectBus/ProjectBus/DrawningMilitaryCruiser.cs deleted file mode 100644 index ee1b56f..0000000 --- a/ProjectBus/ProjectBus/DrawningMilitaryCruiser.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System.Drawing.Drawing2D; -using ProjectBoat.Entities; - -namespace ProjectBoat.Drawnings -{ - public class DrawningMBoat : DrawningBoat - { - /// - /// Конструктор - /// - /// Скорость - /// Вес - /// Основной цвет - /// Дополнительный цвет - /// Признак наличия вертолетной площадки - /// Признак наличия шлюпок - /// Признак наличия пушки - - public DrawningMBoat(int speed, double weight, Color bodyColor, Color additionalColor, bool helicopterArea, bool boat, bool weapon) - : base(150, 50) - { - EntityBoat = new EntityMBoat(speed, weight, bodyColor, additionalColor, helicopterArea, boat, weapon); - } - - public override void DrawTransport(Graphics g) - { - if (EntityBoat == null || EntityBoat is not EntityMBoat entityMBoat || !_startPosX.HasValue || - !_startPosY.HasValue) - { - return; - } - - Pen pen = new(entityMBoat.BodyColor, 2); - Brush additionalBrush = new SolidBrush(Color.Black); - Brush weaponBrush = new SolidBrush(Color.Black); - Brush weaponBrush2 = new SolidBrush(entityMBoat.AdditionalColor); - Brush helicopterAreaBrush = new HatchBrush(HatchStyle.ZigZag, entityMBoat.AdditionalColor, Color.FromArgb(163, 163, 163)); - Brush boatBrush = new SolidBrush(entityMBoat.AdditionalColor); - - base.DrawTransport(g); - - if (entityMBoat.HelicopterArea) - { - g.FillEllipse(helicopterAreaBrush, _startPosX.Value + 5, _startPosY.Value + 9, 25, 30); - g.DrawEllipse(pen, _startPosX.Value + 5, _startPosY.Value + 9, 25, 30); - } - - if (entityMBoat.Boat) - { - g.DrawEllipse(pen, _startPosX.Value + 34, _startPosY.Value + 2, 30, 7); - g.FillEllipse(boatBrush, _startPosX.Value + 34, _startPosY.Value + 2, 30, 7); - - g.DrawEllipse(pen, _startPosX.Value + 34, _startPosY.Value + 39, 30, 7); - g.FillEllipse(boatBrush, _startPosX.Value + 34, _startPosY.Value + 39, 30, 7); - } - - if (entityMBoat.Weapon) - { - g.DrawEllipse(pen, _startPosX.Value + 97, _startPosY.Value + 36, 10, 10); - g.FillEllipse(weaponBrush2, _startPosX.Value + 97, _startPosY.Value + 36, 10, 10); - - g.FillRectangle(weaponBrush, _startPosX.Value + 107, _startPosY.Value + 40, 15, 5); - } - - } - } -} diff --git a/ProjectBus/ProjectBus/Drawnings/DrawningMBoat.cs b/ProjectBus/ProjectBus/Drawnings/DrawningMBoat.cs index 77a8c86..28e4c32 100644 --- a/ProjectBus/ProjectBus/Drawnings/DrawningMBoat.cs +++ b/ProjectBus/ProjectBus/Drawnings/DrawningMBoat.cs @@ -41,12 +41,18 @@ namespace ProjectBoat.Drawnings base.DrawTransport(g); - - g.FillRectangle(motorBrush, _startPosX.Value - 3, _startPosY.Value + 15, 20, 17); - + if (entityMBoat.Motor) + { + g.DrawRectangle(pen2, _startPosX.Value + 25, _startPosY.Value + 10, 80, 30); + g.FillRectangle(Brush, _startPosX.Value + 25, _startPosY.Value + 10, 80, 30); + g.FillRectangle(motorBrush, _startPosX.Value - 3, _startPosY.Value + 15, 20, 17); + } if (entityMBoat.Oars) { + g.DrawRectangle(pen2, _startPosX.Value + 25, _startPosY.Value + 10, 80, 30); + g.FillRectangle(Brush, _startPosX.Value + 25, _startPosY.Value + 10, 80, 30); + g.DrawEllipse(pen, _startPosX.Value + 45, _startPosY.Value - 15, 10, 13); g.FillEllipse(oarsBrush, _startPosX.Value + 45, _startPosY.Value - 15, 10, 13); g.FillRectangle(motorBrush, _startPosX.Value + 49, _startPosY.Value - 1, 2, 20); @@ -58,6 +64,9 @@ namespace ProjectBoat.Drawnings if (entityMBoat.Glass) { + g.DrawRectangle(pen2, _startPosX.Value + 25, _startPosY.Value + 10, 80, 30); + g.FillRectangle(Brush, _startPosX.Value + 25, _startPosY.Value + 10, 80, 30); + g.FillRectangle(glassBrush, _startPosX.Value + 100, _startPosY.Value + 7, 10, 36); diff --git a/ProjectBus/ProjectBus/Entities/EntityBoat.cs b/ProjectBus/ProjectBus/Entities/EntityBoat.cs index fb9c284..a2993c9 100644 --- a/ProjectBus/ProjectBus/Entities/EntityBoat.cs +++ b/ProjectBus/ProjectBus/Entities/EntityBoat.cs @@ -18,7 +18,10 @@ public class EntityBoat /// Основной цвет /// public Color BodyColor { get; private set; } - + public void setBodyColor(Color color) + { + BodyColor = color; + } /// /// Шаг перемещения автомобиля /// diff --git a/ProjectBus/ProjectBus/Entities/EntityMBoat.cs b/ProjectBus/ProjectBus/Entities/EntityMBoat.cs index 6db1ff3..0819158 100644 --- a/ProjectBus/ProjectBus/Entities/EntityMBoat.cs +++ b/ProjectBus/ProjectBus/Entities/EntityMBoat.cs @@ -18,7 +18,10 @@ /// Дополнительный цвет (для опциональных элементов) /// public Color AdditionalColor { get; private set; } - + public void setAdditionalColor(Color color) + { + AdditionalColor = color; + } public EntityMBoat(int speed, double weight, Color bodyColor, Color additionalColor, bool motor, bool oars, bool glass) : base(speed, weight, bodyColor) { AdditionalColor = additionalColor; diff --git a/ProjectBus/ProjectBus/FormBoatConfing.Designer.cs b/ProjectBus/ProjectBus/FormBoatConfing.Designer.cs index 5b6e688..89cc168 100644 --- a/ProjectBus/ProjectBus/FormBoatConfing.Designer.cs +++ b/ProjectBus/ProjectBus/FormBoatConfing.Designer.cs @@ -75,8 +75,10 @@ groupBoxConfing.Controls.Add(labelSimpleObject); groupBoxConfing.Dock = DockStyle.Left; groupBoxConfing.Location = new Point(0, 0); + groupBoxConfing.Margin = new Padding(3, 2, 3, 2); groupBoxConfing.Name = "groupBoxConfing"; - groupBoxConfing.Size = new Size(626, 262); + groupBoxConfing.Padding = new Padding(3, 2, 3, 2); + groupBoxConfing.Size = new Size(548, 196); groupBoxConfing.TabIndex = 0; groupBoxConfing.TabStop = false; groupBoxConfing.Text = "Параметры"; @@ -91,9 +93,11 @@ groupBoxColors.Controls.Add(panelBlue); groupBoxColors.Controls.Add(panelGreen); groupBoxColors.Controls.Add(panelRed); - groupBoxColors.Location = new Point(327, 26); + groupBoxColors.Location = new Point(286, 20); + groupBoxColors.Margin = new Padding(3, 2, 3, 2); groupBoxColors.Name = "groupBoxColors"; - groupBoxColors.Size = new Size(280, 154); + groupBoxColors.Padding = new Padding(3, 2, 3, 2); + groupBoxColors.Size = new Size(245, 116); groupBoxColors.TabIndex = 9; groupBoxColors.TabStop = false; groupBoxColors.Text = "Цвета"; @@ -101,141 +105,154 @@ // panelPurple // panelPurple.BackColor = Color.Purple; - panelPurple.Location = new Point(217, 96); + panelPurple.Location = new Point(190, 72); + panelPurple.Margin = new Padding(3, 2, 3, 2); panelPurple.Name = "panelPurple"; - panelPurple.Size = new Size(48, 47); + panelPurple.Size = new Size(42, 35); panelPurple.TabIndex = 1; // // panelBlack // panelBlack.BackColor = Color.Black; - panelBlack.Location = new Point(149, 96); + panelBlack.Location = new Point(130, 72); + panelBlack.Margin = new Padding(3, 2, 3, 2); panelBlack.Name = "panelBlack"; - panelBlack.Size = new Size(48, 47); + panelBlack.Size = new Size(42, 35); panelBlack.TabIndex = 1; // // panelGray // panelGray.BackColor = Color.Gray; - panelGray.Location = new Point(82, 96); + panelGray.Location = new Point(72, 72); + panelGray.Margin = new Padding(3, 2, 3, 2); panelGray.Name = "panelGray"; - panelGray.Size = new Size(48, 47); + panelGray.Size = new Size(42, 35); panelGray.TabIndex = 1; // // panelWhite // panelWhite.BackColor = Color.White; - panelWhite.Location = new Point(17, 96); + panelWhite.Location = new Point(15, 72); + panelWhite.Margin = new Padding(3, 2, 3, 2); panelWhite.Name = "panelWhite"; - panelWhite.Size = new Size(48, 47); + panelWhite.Size = new Size(42, 35); panelWhite.TabIndex = 1; // // panelYellow // panelYellow.BackColor = Color.Yellow; - panelYellow.Location = new Point(217, 31); + panelYellow.Location = new Point(190, 23); + panelYellow.Margin = new Padding(3, 2, 3, 2); panelYellow.Name = "panelYellow"; - panelYellow.Size = new Size(48, 47); + panelYellow.Size = new Size(42, 35); panelYellow.TabIndex = 1; // // panelBlue // panelBlue.BackColor = Color.Blue; - panelBlue.Location = new Point(149, 31); + panelBlue.Location = new Point(130, 23); + panelBlue.Margin = new Padding(3, 2, 3, 2); panelBlue.Name = "panelBlue"; - panelBlue.Size = new Size(48, 47); + panelBlue.Size = new Size(42, 35); panelBlue.TabIndex = 1; // // panelGreen // panelGreen.BackColor = Color.Green; - panelGreen.Location = new Point(82, 31); + panelGreen.Location = new Point(72, 23); + panelGreen.Margin = new Padding(3, 2, 3, 2); panelGreen.Name = "panelGreen"; - panelGreen.Size = new Size(48, 47); + panelGreen.Size = new Size(42, 35); panelGreen.TabIndex = 1; // // panelRed // panelRed.BackColor = Color.Red; - panelRed.Location = new Point(17, 31); + panelRed.Location = new Point(15, 23); + panelRed.Margin = new Padding(3, 2, 3, 2); panelRed.Name = "panelRed"; - panelRed.Size = new Size(48, 47); + panelRed.Size = new Size(42, 35); panelRed.TabIndex = 0; // // checkBoxWeapon // checkBoxWeapon.AutoSize = true; - checkBoxWeapon.Location = new Point(6, 217); + checkBoxWeapon.Location = new Point(5, 163); + checkBoxWeapon.Margin = new Padding(3, 2, 3, 2); checkBoxWeapon.Name = "checkBoxWeapon"; - checkBoxWeapon.Size = new Size(202, 24); + checkBoxWeapon.Size = new Size(162, 19); checkBoxWeapon.TabIndex = 8; - checkBoxWeapon.Text = "Признак наличие пушки"; + checkBoxWeapon.Text = "Признак наличие стекла"; checkBoxWeapon.UseVisualStyleBackColor = true; // // checkBoxBoat // checkBoxBoat.AutoSize = true; - checkBoxBoat.Location = new Point(6, 169); + checkBoxBoat.Location = new Point(5, 127); + checkBoxBoat.Margin = new Padding(3, 2, 3, 2); checkBoxBoat.Name = "checkBoxBoat"; - checkBoxBoat.Size = new Size(215, 24); + checkBoxBoat.Size = new Size(157, 19); checkBoxBoat.TabIndex = 7; - checkBoxBoat.Text = "Признак наличие шлюпок"; + checkBoxBoat.Text = "Признак наличие весел"; checkBoxBoat.UseVisualStyleBackColor = true; // // checkBoxHelicopterArea // checkBoxHelicopterArea.AutoSize = true; - checkBoxHelicopterArea.Location = new Point(6, 123); + checkBoxHelicopterArea.Location = new Point(5, 92); + checkBoxHelicopterArea.Margin = new Padding(3, 2, 3, 2); checkBoxHelicopterArea.Name = "checkBoxHelicopterArea"; - checkBoxHelicopterArea.Size = new Size(321, 24); + checkBoxHelicopterArea.Size = new Size(167, 19); checkBoxHelicopterArea.TabIndex = 6; - checkBoxHelicopterArea.Text = "Признак наличие вертолетной площадки"; + checkBoxHelicopterArea.Text = "Признак наличие мотора"; checkBoxHelicopterArea.UseVisualStyleBackColor = true; // // numericUpDownWeight // - numericUpDownWeight.Location = new Point(94, 68); + numericUpDownWeight.Location = new Point(82, 51); + numericUpDownWeight.Margin = new Padding(3, 2, 3, 2); numericUpDownWeight.Maximum = new decimal(new int[] { 1000, 0, 0, 0 }); numericUpDownWeight.Minimum = new decimal(new int[] { 100, 0, 0, 0 }); numericUpDownWeight.Name = "numericUpDownWeight"; - numericUpDownWeight.Size = new Size(114, 27); + numericUpDownWeight.Size = new Size(100, 23); numericUpDownWeight.TabIndex = 5; numericUpDownWeight.Value = new decimal(new int[] { 100, 0, 0, 0 }); // // labelWeight // labelWeight.AutoSize = true; - labelWeight.Location = new Point(27, 70); + labelWeight.Location = new Point(24, 52); labelWeight.Name = "labelWeight"; - labelWeight.Size = new Size(36, 20); + labelWeight.Size = new Size(29, 15); labelWeight.TabIndex = 4; labelWeight.Text = "Вес:"; // // numericUpDownSpeed // - numericUpDownSpeed.Location = new Point(94, 32); + numericUpDownSpeed.Location = new Point(82, 24); + numericUpDownSpeed.Margin = new Padding(3, 2, 3, 2); numericUpDownSpeed.Maximum = new decimal(new int[] { 1000, 0, 0, 0 }); numericUpDownSpeed.Minimum = new decimal(new int[] { 100, 0, 0, 0 }); numericUpDownSpeed.Name = "numericUpDownSpeed"; - numericUpDownSpeed.Size = new Size(114, 27); + numericUpDownSpeed.Size = new Size(100, 23); numericUpDownSpeed.TabIndex = 3; numericUpDownSpeed.Value = new decimal(new int[] { 100, 0, 0, 0 }); // // labelSpeed // labelSpeed.AutoSize = true; - labelSpeed.Location = new Point(12, 32); + labelSpeed.Location = new Point(10, 24); labelSpeed.Name = "labelSpeed"; - labelSpeed.Size = new Size(76, 20); + labelSpeed.Size = new Size(62, 15); labelSpeed.TabIndex = 2; labelSpeed.Text = "Скорость:"; // // labelModifiedObject // labelModifiedObject.BorderStyle = BorderStyle.FixedSingle; - labelModifiedObject.Location = new Point(476, 203); + labelModifiedObject.Location = new Point(416, 152); labelModifiedObject.Name = "labelModifiedObject"; - labelModifiedObject.Size = new Size(131, 44); + labelModifiedObject.Size = new Size(115, 34); labelModifiedObject.TabIndex = 1; labelModifiedObject.Text = "Продвинутый"; labelModifiedObject.TextAlign = ContentAlignment.MiddleCenter; @@ -244,9 +261,9 @@ // labelSimpleObject // labelSimpleObject.BorderStyle = BorderStyle.FixedSingle; - labelSimpleObject.Location = new Point(327, 203); + labelSimpleObject.Location = new Point(286, 152); labelSimpleObject.Name = "labelSimpleObject"; - labelSimpleObject.Size = new Size(130, 44); + labelSimpleObject.Size = new Size(114, 34); labelSimpleObject.TabIndex = 0; labelSimpleObject.Text = "Простой"; labelSimpleObject.TextAlign = ContentAlignment.MiddleCenter; @@ -254,17 +271,19 @@ // // pictureBoxObject // - pictureBoxObject.Location = new Point(11, 56); + pictureBoxObject.Location = new Point(10, 42); + pictureBoxObject.Margin = new Padding(3, 2, 3, 2); pictureBoxObject.Name = "pictureBoxObject"; - pictureBoxObject.Size = new Size(183, 125); + pictureBoxObject.Size = new Size(160, 94); pictureBoxObject.TabIndex = 1; pictureBoxObject.TabStop = false; // // buttonAdd // - buttonAdd.Location = new Point(632, 212); + buttonAdd.Location = new Point(553, 159); + buttonAdd.Margin = new Padding(3, 2, 3, 2); buttonAdd.Name = "buttonAdd"; - buttonAdd.Size = new Size(94, 29); + buttonAdd.Size = new Size(82, 22); buttonAdd.TabIndex = 2; buttonAdd.Text = "Добавить"; buttonAdd.UseVisualStyleBackColor = true; @@ -272,9 +291,10 @@ // // buttonCancel // - buttonCancel.Location = new Point(740, 212); + buttonCancel.Location = new Point(648, 159); + buttonCancel.Margin = new Padding(3, 2, 3, 2); buttonCancel.Name = "buttonCancel"; - buttonCancel.Size = new Size(94, 29); + buttonCancel.Size = new Size(82, 22); buttonCancel.TabIndex = 3; buttonCancel.Text = "Отмена"; buttonCancel.UseVisualStyleBackColor = true; @@ -285,9 +305,10 @@ panelObject.Controls.Add(labelAdditionalColor); panelObject.Controls.Add(labelBodyColor); panelObject.Controls.Add(pictureBoxObject); - panelObject.Location = new Point(632, 12); + panelObject.Location = new Point(553, 9); + panelObject.Margin = new Padding(3, 2, 3, 2); panelObject.Name = "panelObject"; - panelObject.Size = new Size(205, 194); + panelObject.Size = new Size(179, 146); panelObject.TabIndex = 4; panelObject.DragDrop += PanelObject_DragDrop; panelObject.DragEnter += PanelObject_DragEnter; @@ -296,9 +317,9 @@ // labelAdditionalColor.AllowDrop = true; labelAdditionalColor.BorderStyle = BorderStyle.FixedSingle; - labelAdditionalColor.Location = new Point(108, 11); + labelAdditionalColor.Location = new Point(94, 8); labelAdditionalColor.Name = "labelAdditionalColor"; - labelAdditionalColor.Size = new Size(83, 36); + labelAdditionalColor.Size = new Size(73, 28); labelAdditionalColor.TabIndex = 3; labelAdditionalColor.Text = "Доп. цвет"; labelAdditionalColor.TextAlign = ContentAlignment.MiddleCenter; @@ -309,9 +330,9 @@ // labelBodyColor.AllowDrop = true; labelBodyColor.BorderStyle = BorderStyle.FixedSingle; - labelBodyColor.Location = new Point(11, 11); + labelBodyColor.Location = new Point(10, 8); labelBodyColor.Name = "labelBodyColor"; - labelBodyColor.Size = new Size(83, 36); + labelBodyColor.Size = new Size(73, 28); labelBodyColor.TabIndex = 2; labelBodyColor.Text = "Цвет"; labelBodyColor.TextAlign = ContentAlignment.MiddleCenter; @@ -320,13 +341,14 @@ // // FormBoatConfing // - AutoScaleDimensions = new SizeF(8F, 20F); + AutoScaleDimensions = new SizeF(7F, 15F); AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(838, 262); + ClientSize = new Size(733, 196); Controls.Add(panelObject); Controls.Add(buttonCancel); Controls.Add(buttonAdd); Controls.Add(groupBoxConfing); + Margin = new Padding(3, 2, 3, 2); Name = "FormBoatConfing"; Text = "Создание объекта"; groupBoxConfing.ResumeLayout(false); diff --git a/ProjectBus/ProjectBus/FormBoatConfing.cs b/ProjectBus/ProjectBus/FormBoatConfing.cs index 48a4862..f7c5e8d 100644 --- a/ProjectBus/ProjectBus/FormBoatConfing.cs +++ b/ProjectBus/ProjectBus/FormBoatConfing.cs @@ -152,9 +152,9 @@ namespace ProjectBoat private void labelAdditionalColor_DragDrop(object sender, DragEventArgs e) { - if (_boat.EntityBoat is EntityMBoat militaryBoat) + if (_boat.EntityBoat is EntityMBoat mBoat) { - militaryBoat.setAdditionalColor((Color)e.Data.GetData(typeof(Color))); + mBoat.setAdditionalColor((Color)e.Data.GetData(typeof(Color))); } DrawObject(); } diff --git a/ProjectBus/ProjectBus/FormBoatsCollection.Designer.cs b/ProjectBus/ProjectBus/FormBoatsCollection.Designer.cs index f86b4e0..abb36c9 100644 --- a/ProjectBus/ProjectBus/FormBoatsCollection.Designer.cs +++ b/ProjectBus/ProjectBus/FormBoatsCollection.Designer.cs @@ -59,18 +59,21 @@ groupBoxTools.Controls.Add(comboBoxSelectorCompany); groupBoxTools.Controls.Add(panelCompanyTools); groupBoxTools.Dock = DockStyle.Right; - groupBoxTools.Location = new Point(583, 0); + groupBoxTools.Location = new Point(510, 0); + groupBoxTools.Margin = new Padding(3, 2, 3, 2); groupBoxTools.Name = "groupBoxTools"; - groupBoxTools.Size = new Size(222, 653); + groupBoxTools.Padding = new Padding(3, 2, 3, 2); + groupBoxTools.Size = new Size(194, 490); groupBoxTools.TabIndex = 0; groupBoxTools.TabStop = false; groupBoxTools.Text = "инструменты"; // // buttonCreateCompany // - buttonCreateCompany.Location = new Point(21, 345); + buttonCreateCompany.Location = new Point(18, 259); + buttonCreateCompany.Margin = new Padding(3, 2, 3, 2); buttonCreateCompany.Name = "buttonCreateCompany"; - buttonCreateCompany.Size = new Size(186, 27); + buttonCreateCompany.Size = new Size(163, 20); buttonCreateCompany.TabIndex = 7; buttonCreateCompany.Text = "Создать компанию"; buttonCreateCompany.UseVisualStyleBackColor = true; @@ -86,16 +89,18 @@ panelStorage.Controls.Add(textBoxCollectionName); panelStorage.Controls.Add(labelCollectionName); panelStorage.Dock = DockStyle.Top; - panelStorage.Location = new Point(3, 23); + panelStorage.Location = new Point(3, 18); + panelStorage.Margin = new Padding(3, 2, 3, 2); panelStorage.Name = "panelStorage"; - panelStorage.Size = new Size(216, 283); + panelStorage.Size = new Size(188, 212); panelStorage.TabIndex = 6; // // buttonCollectionDel // - buttonCollectionDel.Location = new Point(17, 247); + buttonCollectionDel.Location = new Point(15, 185); + buttonCollectionDel.Margin = new Padding(3, 2, 3, 2); buttonCollectionDel.Name = "buttonCollectionDel"; - buttonCollectionDel.Size = new Size(186, 27); + buttonCollectionDel.Size = new Size(163, 20); buttonCollectionDel.TabIndex = 6; buttonCollectionDel.Text = "Удалить коллекцию"; buttonCollectionDel.UseVisualStyleBackColor = true; @@ -104,17 +109,19 @@ // listBoxCollection // listBoxCollection.FormattingEnabled = true; - listBoxCollection.ItemHeight = 20; - listBoxCollection.Location = new Point(17, 137); + listBoxCollection.ItemHeight = 15; + listBoxCollection.Location = new Point(15, 103); + listBoxCollection.Margin = new Padding(3, 2, 3, 2); listBoxCollection.Name = "listBoxCollection"; - listBoxCollection.Size = new Size(186, 104); + listBoxCollection.Size = new Size(163, 79); listBoxCollection.TabIndex = 5; // // buttonCollecctionAdd // - buttonCollecctionAdd.Location = new Point(17, 104); + buttonCollecctionAdd.Location = new Point(15, 78); + buttonCollecctionAdd.Margin = new Padding(3, 2, 3, 2); buttonCollecctionAdd.Name = "buttonCollecctionAdd"; - buttonCollecctionAdd.Size = new Size(186, 27); + buttonCollecctionAdd.Size = new Size(163, 20); buttonCollecctionAdd.TabIndex = 4; buttonCollecctionAdd.Text = "Добавить коллекцию"; buttonCollecctionAdd.UseVisualStyleBackColor = true; @@ -123,9 +130,10 @@ // radioButtonList // radioButtonList.AutoSize = true; - radioButtonList.Location = new Point(123, 75); + radioButtonList.Location = new Point(108, 56); + radioButtonList.Margin = new Padding(3, 2, 3, 2); radioButtonList.Name = "radioButtonList"; - radioButtonList.Size = new Size(80, 24); + radioButtonList.Size = new Size(66, 19); radioButtonList.TabIndex = 3; radioButtonList.TabStop = true; radioButtonList.Text = "Список"; @@ -134,9 +142,10 @@ // radioButtonMassive // radioButtonMassive.AutoSize = true; - radioButtonMassive.Location = new Point(17, 75); + radioButtonMassive.Location = new Point(15, 56); + radioButtonMassive.Margin = new Padding(3, 2, 3, 2); radioButtonMassive.Name = "radioButtonMassive"; - radioButtonMassive.Size = new Size(82, 24); + radioButtonMassive.Size = new Size(67, 19); radioButtonMassive.TabIndex = 2; radioButtonMassive.TabStop = true; radioButtonMassive.Text = "Массив"; @@ -144,17 +153,18 @@ // // textBoxCollectionName // - textBoxCollectionName.Location = new Point(17, 32); + textBoxCollectionName.Location = new Point(15, 24); + textBoxCollectionName.Margin = new Padding(3, 2, 3, 2); textBoxCollectionName.Name = "textBoxCollectionName"; - textBoxCollectionName.Size = new Size(186, 27); + textBoxCollectionName.Size = new Size(163, 23); textBoxCollectionName.TabIndex = 1; // // labelCollectionName // labelCollectionName.AutoSize = true; - labelCollectionName.Location = new Point(26, 9); + labelCollectionName.Location = new Point(23, 7); labelCollectionName.Name = "labelCollectionName"; - labelCollectionName.Size = new Size(155, 20); + labelCollectionName.Size = new Size(122, 15); labelCollectionName.TabIndex = 0; labelCollectionName.Text = "Название коллекции"; // @@ -163,9 +173,10 @@ comboBoxSelectorCompany.DropDownStyle = ComboBoxStyle.DropDownList; comboBoxSelectorCompany.FormattingEnabled = true; comboBoxSelectorCompany.Items.AddRange(new object[] { "Хранилище" }); - comboBoxSelectorCompany.Location = new Point(21, 311); + comboBoxSelectorCompany.Location = new Point(18, 233); + comboBoxSelectorCompany.Margin = new Padding(3, 2, 3, 2); comboBoxSelectorCompany.Name = "comboBoxSelectorCompany"; - comboBoxSelectorCompany.Size = new Size(186, 28); + comboBoxSelectorCompany.Size = new Size(163, 23); comboBoxSelectorCompany.TabIndex = 0; comboBoxSelectorCompany.SelectedIndexChanged += comboBoxSelectorCompany_SelectedIndexChanged_1; // @@ -177,29 +188,32 @@ panelCompanyTools.Controls.Add(maskedTextBoxPosision); panelCompanyTools.Controls.Add(buttonGetToTest); panelCompanyTools.Enabled = false; - panelCompanyTools.Location = new Point(3, 379); + panelCompanyTools.Location = new Point(3, 284); + panelCompanyTools.Margin = new Padding(3, 2, 3, 2); panelCompanyTools.Name = "panelCompanyTools"; - panelCompanyTools.Size = new Size(216, 274); + panelCompanyTools.Size = new Size(189, 206); panelCompanyTools.TabIndex = 8; // // ButtonAddBoat // ButtonAddBoat.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; ButtonAddBoat.BackgroundImageLayout = ImageLayout.Center; - ButtonAddBoat.Location = new Point(18, 3); + ButtonAddBoat.Location = new Point(16, 2); + ButtonAddBoat.Margin = new Padding(3, 2, 3, 2); ButtonAddBoat.Name = "ButtonAddBoat"; - ButtonAddBoat.Size = new Size(186, 40); + ButtonAddBoat.Size = new Size(163, 30); 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(18, 227); + buttonRefresh.Location = new Point(16, 170); + buttonRefresh.Margin = new Padding(3, 2, 3, 2); buttonRefresh.Name = "buttonRefresh"; - buttonRefresh.Size = new Size(186, 41); + buttonRefresh.Size = new Size(163, 31); buttonRefresh.TabIndex = 5; buttonRefresh.Text = "обновить"; buttonRefresh.UseVisualStyleBackColor = true; @@ -208,29 +222,32 @@ // ButtonRemoveBoat // ButtonRemoveBoat.Anchor = AnchorStyles.Right; - ButtonRemoveBoat.Location = new Point(18, 138); + ButtonRemoveBoat.Location = new Point(16, 104); + ButtonRemoveBoat.Margin = new Padding(3, 2, 3, 2); ButtonRemoveBoat.Name = "ButtonRemoveBoat"; - ButtonRemoveBoat.Size = new Size(186, 40); + ButtonRemoveBoat.Size = new Size(163, 30); ButtonRemoveBoat.TabIndex = 3; - ButtonRemoveBoat.Text = "удалить крейсер"; + ButtonRemoveBoat.Text = "удалить лодку"; ButtonRemoveBoat.UseVisualStyleBackColor = true; ButtonRemoveBoat.Click += ButtonRemoveBoat_Click; // // maskedTextBoxPosision // - maskedTextBoxPosision.Location = new Point(17, 105); + maskedTextBoxPosision.Location = new Point(15, 79); + maskedTextBoxPosision.Margin = new Padding(3, 2, 3, 2); maskedTextBoxPosision.Mask = "00"; maskedTextBoxPosision.Name = "maskedTextBoxPosision"; - maskedTextBoxPosision.Size = new Size(187, 27); + maskedTextBoxPosision.Size = new Size(164, 23); maskedTextBoxPosision.TabIndex = 2; maskedTextBoxPosision.ValidatingType = typeof(int); // // buttonGetToTest // buttonGetToTest.Anchor = AnchorStyles.Right; - buttonGetToTest.Location = new Point(18, 184); + buttonGetToTest.Location = new Point(16, 138); + buttonGetToTest.Margin = new Padding(3, 2, 3, 2); buttonGetToTest.Name = "buttonGetToTest"; - buttonGetToTest.Size = new Size(186, 40); + buttonGetToTest.Size = new Size(163, 30); buttonGetToTest.TabIndex = 4; buttonGetToTest.Text = "передать на тесты"; buttonGetToTest.UseVisualStyleBackColor = true; @@ -240,18 +257,20 @@ // pictureBoxBoat.Dock = DockStyle.Fill; pictureBoxBoat.Location = new Point(0, 0); + pictureBoxBoat.Margin = new Padding(3, 2, 3, 2); pictureBoxBoat.Name = "pictureBoxBoat"; - pictureBoxBoat.Size = new Size(583, 653); + pictureBoxBoat.Size = new Size(510, 490); pictureBoxBoat.TabIndex = 1; pictureBoxBoat.TabStop = false; // // FormBoatsCollection // - AutoScaleDimensions = new SizeF(8F, 20F); + AutoScaleDimensions = new SizeF(7F, 15F); AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(805, 653); + ClientSize = new Size(704, 490); Controls.Add(pictureBoxBoat); Controls.Add(groupBoxTools); + Margin = new Padding(3, 2, 3, 2); Name = "FormBoatsCollection"; Text = "FormBoatsCollection"; groupBoxTools.ResumeLayout(false);