diff --git a/WarmlyShip/WarmlyShip/CollectionGenericObjects/AbstractCompany.cs b/WarmlyShip/WarmlyShip/CollectionGenericObjects/AbstractCompany.cs new file mode 100644 index 0000000..0a04782 --- /dev/null +++ b/WarmlyShip/WarmlyShip/CollectionGenericObjects/AbstractCompany.cs @@ -0,0 +1,74 @@ +using WarmlyShip.CollectionGenericObjects; +using WarmlyShip.Drawnings; + +namespace WarmlyShip.CollectionGenericObjects; + + +public abstract class AbstractCompany +{ + + protected readonly int _placeSizeWidth = 150; + + protected readonly int _placeSizeHeight = 80; + + + protected readonly int _pictureWidth; + + + protected readonly int _pictureHeight; + + + protected ICollectionGenericObjects _collection = null; + + + private int GetMaxCount => _pictureWidth * _pictureHeight / ((_placeSizeWidth + _placeSizeWidth /2) * _placeSizeHeight) - 1; + + + public AbstractCompany(int picWidth, int picHeight, ICollectionGenericObjects collection) + { + _pictureWidth = picWidth; + _pictureHeight = picHeight; + _collection = collection; + _collection.SetMaxCount = GetMaxCount; + } + + + public static int operator +(AbstractCompany company, DrawningShip ship) + { + return company._collection.Insert(ship); + } + + public static DrawningShip operator -(AbstractCompany company, int position) + { + return company._collection.Remove(position); + } + + + public DrawningShip? GetRandomObject() + { + Random rnd = new(); + return _collection?.Get(rnd.Next(GetMaxCount)); + } + + + public Bitmap? Show() + { + Bitmap bitmap = new(_pictureWidth, _pictureHeight); + Graphics graphics = Graphics.FromImage(bitmap); + DrawBackgroud(graphics); + + SetObjectPosition(); + for (int i = 0; i < (_collection?.Count ?? 0); i++) + { + DrawningShip? obj = _collection?.Get(i); + obj?.DrawTransport(graphics); + } + + return bitmap; + } + + protected abstract void DrawBackgroud(Graphics g); + + + protected abstract void SetObjectPosition(); +} diff --git a/WarmlyShip/WarmlyShip/CollectionGenericObjects/ICollectionGenericObjects.cs b/WarmlyShip/WarmlyShip/CollectionGenericObjects/ICollectionGenericObjects.cs new file mode 100644 index 0000000..85b342a --- /dev/null +++ b/WarmlyShip/WarmlyShip/CollectionGenericObjects/ICollectionGenericObjects.cs @@ -0,0 +1,24 @@ +namespace WarmlyShip.CollectionGenericObjects; + + +public interface ICollectionGenericObjects + where T : class +{ + + int Count { get; } + + + int SetMaxCount { set; } + + + int Insert(T obj); + + + int Insert(T obj, int position); + + + T Remove(int position); + + + T? Get(int position); +} diff --git a/WarmlyShip/WarmlyShip/CollectionGenericObjects/MassiveGenericObjects.cs b/WarmlyShip/WarmlyShip/CollectionGenericObjects/MassiveGenericObjects.cs new file mode 100644 index 0000000..4eec586 --- /dev/null +++ b/WarmlyShip/WarmlyShip/CollectionGenericObjects/MassiveGenericObjects.cs @@ -0,0 +1,117 @@ +namespace WarmlyShip.CollectionGenericObjects; + +public class MassiveGenericObjects : ICollectionGenericObjects + where T : class +{ + + private T?[] _collection; + + public int Count => _collection.Length; + + public int SetMaxCount + { + set + { + if (value > 0) + { + if (Count > 0) + { + Array.Resize(ref _collection, value); + } + else + { + _collection = new T?[value]; + } + } + } + } + + + public MassiveGenericObjects() + { + _collection = Array.Empty(); + } + + public T? Get(int position) + { + // TODO проверка позиции + if (position < 0 || position > Count) + { + return null; + } + + return _collection[position]; + } + + public int Insert(T obj) + { + // TODO вставка в свободное место набора + for (int i = 0; i < Count; i++) + { + if (_collection[i] == null) + { + _collection[i] = obj; + return i; + } + } + + return -1; + } + + public int Insert(T obj, int position) + { + // TODO проверка позиции + // TODO проверка, что элемент массима по этой позиции пустой, + // если элемент массима по этой позиции не пустой, + // найти свободное место после этой позиции, если не найдено, + // то искать до + // TODO вставка + if (position < 0 || position >= Count) + { + return -1; + } + + if (_collection[position] == null) + { + _collection[position] = obj; + return position; + } + else + { + for (int i = position + 1; i < Count; i++) + { + if (_collection[i] == null) + { + _collection[i] = obj; + return i; + } + } + + for (int i = position; i >= 0; i--) + { + if (_collection[i] == null) + { + _collection[i] = obj; + return i; + } + } + } + + return -1; + } + + public T Remove(int position) + { + // TODO проверка позиции + // TODO удаление объекта из массива, + // присвоив элементу массива значение null + if (position >= Count || position < 0) + { + return null; + } + + T obj = _collection[position]; + _collection[position] = null; + return obj; + } +} diff --git a/WarmlyShip/WarmlyShip/CollectionGenericObjects/PortForShips.cs b/WarmlyShip/WarmlyShip/CollectionGenericObjects/PortForShips.cs new file mode 100644 index 0000000..3da5b2b --- /dev/null +++ b/WarmlyShip/WarmlyShip/CollectionGenericObjects/PortForShips.cs @@ -0,0 +1,53 @@ +using WarmlyShip.CollectionGenericObjects; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WarmlyShip.Drawnings; + +namespace WarmlyShip.CollectionGenericObjects +{ + public class PortForShips : AbstractCompany + { + public PortForShips(int picWidth, int picHeight, ICollectionGenericObjects collection) : base(picWidth, picHeight, collection) + { + } + protected override void DrawBackgroud(Graphics g) + { + int _placeWidth = _placeSizeWidth + _placeSizeWidth / 2; + int _placeHeight = _placeSizeHeight; + for (int x = 2; x < _pictureWidth - _placeSizeWidth; x += _placeWidth) + { + for (int y = 2; y < _pictureHeight - _placeSizeHeight; y += _placeHeight) + { + Pen pen = new Pen(Color.Black, 3); + Point[] points = + { + new Point(x + _placeSizeWidth, y), + new Point(x, y), + new Point(x, y + _placeSizeHeight), + new Point(x + _placeSizeWidth, y + _placeSizeHeight) + }; + g.DrawLines(pen, points); + } + } + } + + protected override void SetObjectPosition() + { + int countOfHorizontal = _pictureWidth / (_placeSizeWidth + _placeSizeWidth / 2) + 1; + int countOfVertical = _pictureHeight / _placeSizeHeight; + + for (int i = 1; i < _collection.Count; i++) + { + if (_collection.Get(i) != null) + { + _collection.Get(i)?.SetPictureSize(_pictureWidth, _pictureHeight); + _collection.Get(i)?.SetPosition((_placeSizeWidth + _placeSizeWidth / 2) * (i % countOfHorizontal - 1) + 5, + _placeSizeHeight * (i / countOfHorizontal - 1) + 5); + } + } + } + } +} diff --git a/WarmlyShip/WarmlyShip/Drawnings/DrawningShip.cs b/WarmlyShip/WarmlyShip/Drawnings/DrawningShip.cs index be183a8..6aa4819 100644 --- a/WarmlyShip/WarmlyShip/Drawnings/DrawningShip.cs +++ b/WarmlyShip/WarmlyShip/Drawnings/DrawningShip.cs @@ -151,7 +151,7 @@ public class DrawningShip return; } - + // нарисовать корабль Pen pen = new(Color.Black, 2); Brush brMain = new SolidBrush(EntityShip.BodyColor); diff --git a/WarmlyShip/WarmlyShip/FormShipCollection.Designer.cs b/WarmlyShip/WarmlyShip/FormShipCollection.Designer.cs new file mode 100644 index 0000000..b490aef --- /dev/null +++ b/WarmlyShip/WarmlyShip/FormShipCollection.Designer.cs @@ -0,0 +1,170 @@ +namespace WarmlyShip +{ + partial class FormShipCollection + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + groupBoxTools = new GroupBox(); + buttonRefresh = new Button(); + buttonGoToCheck = new Button(); + buttonRemoveShip = new Button(); + maskedTextBoxPosition = new MaskedTextBox(); + buttonAddWarmlyShip = new Button(); + buttonAddShip = new Button(); + comboBoxSelectorCompany = new ComboBox(); + pictureBox = new PictureBox(); + groupBoxTools.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)pictureBox).BeginInit(); + SuspendLayout(); + // + // groupBoxTools + // + groupBoxTools.Controls.Add(buttonRefresh); + groupBoxTools.Controls.Add(buttonGoToCheck); + groupBoxTools.Controls.Add(buttonRemoveShip); + groupBoxTools.Controls.Add(maskedTextBoxPosition); + groupBoxTools.Controls.Add(buttonAddWarmlyShip); + groupBoxTools.Controls.Add(buttonAddShip); + groupBoxTools.Controls.Add(comboBoxSelectorCompany); + groupBoxTools.Dock = DockStyle.Right; + groupBoxTools.Location = new Point(961, 0); + groupBoxTools.Name = "groupBoxTools"; + groupBoxTools.Size = new Size(187, 521); + groupBoxTools.TabIndex = 0; + groupBoxTools.TabStop = false; + groupBoxTools.Text = "Инструменты"; + // + // buttonRefresh + // + buttonRefresh.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; + buttonRefresh.Location = new Point(6, 473); + buttonRefresh.Name = "buttonRefresh"; + buttonRefresh.Size = new Size(175, 36); + buttonRefresh.TabIndex = 7; + buttonRefresh.Text = "Обновить"; + buttonRefresh.UseVisualStyleBackColor = true; + buttonRefresh.Click += ButtonRefresh_Click; + // + // buttonGoToCheck + // + buttonGoToCheck.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; + buttonGoToCheck.Location = new Point(6, 290); + buttonGoToCheck.Name = "buttonGoToCheck"; + buttonGoToCheck.Size = new Size(175, 36); + buttonGoToCheck.TabIndex = 6; + buttonGoToCheck.Text = "Передать на тесты"; + buttonGoToCheck.UseVisualStyleBackColor = true; + buttonGoToCheck.Click += ButtonGoToCheck_Click; + // + // buttonRemoveShip + // + buttonRemoveShip.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; + buttonRemoveShip.Location = new Point(6, 191); + buttonRemoveShip.Name = "buttonRemoveShip"; + buttonRemoveShip.Size = new Size(175, 36); + buttonRemoveShip.TabIndex = 5; + buttonRemoveShip.Text = "Удаление судна"; + buttonRemoveShip.UseVisualStyleBackColor = true; + buttonRemoveShip.Click += ButtonRemoveShip_Click; + // + // maskedTextBoxPosition + // + maskedTextBoxPosition.Location = new Point(6, 152); + maskedTextBoxPosition.Mask = "00"; + maskedTextBoxPosition.Name = "maskedTextBoxPosition"; + maskedTextBoxPosition.Size = new Size(181, 23); + maskedTextBoxPosition.TabIndex = 4; + maskedTextBoxPosition.ValidatingType = typeof(int); + // + // buttonAddWarmlyShip + // + buttonAddWarmlyShip.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; + buttonAddWarmlyShip.Location = new Point(6, 90); + buttonAddWarmlyShip.Name = "buttonAddWarmlyShip"; + buttonAddWarmlyShip.Size = new Size(175, 36); + buttonAddWarmlyShip.TabIndex = 2; + buttonAddWarmlyShip.Text = "Добавление парохода"; + buttonAddWarmlyShip.UseVisualStyleBackColor = true; + buttonAddWarmlyShip.Click += ButtonAddWarmlyShip_Click; + // + // buttonAddShip + // + buttonAddShip.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; + buttonAddShip.Location = new Point(6, 48); + buttonAddShip.Name = "buttonAddShip"; + buttonAddShip.Size = new Size(175, 36); + buttonAddShip.TabIndex = 1; + buttonAddShip.Text = "Добавление корабля"; + buttonAddShip.UseVisualStyleBackColor = true; + buttonAddShip.Click += ButtonAddShip_Click; + // + // comboBoxSelectorCompany + // + comboBoxSelectorCompany.Items.AddRange(new object[] { "Хранилище" }); + comboBoxSelectorCompany.Location = new Point(6, 22); + comboBoxSelectorCompany.Name = "comboBoxSelectorCompany"; + comboBoxSelectorCompany.Size = new Size(175, 23); + comboBoxSelectorCompany.TabIndex = 8; + comboBoxSelectorCompany.SelectedIndexChanged += ComboBoxSelectorCompany_SelectedIndexChanged; + // + // pictureBox + // + pictureBox.Dock = DockStyle.Fill; + pictureBox.Location = new Point(0, 0); + pictureBox.Name = "pictureBox"; + pictureBox.Size = new Size(961, 521); + pictureBox.TabIndex = 3; + pictureBox.TabStop = false; + // + // FormShipCollection + // + AutoScaleDimensions = new SizeF(7F, 15F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(1148, 521); + Controls.Add(pictureBox); + Controls.Add(groupBoxTools); + Name = "FormShipCollection"; + Text = "Коллекция кораблей"; + groupBoxTools.ResumeLayout(false); + groupBoxTools.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)pictureBox).EndInit(); + ResumeLayout(false); + } + + #endregion + + private GroupBox groupBoxTools; + private ComboBox comboBoxSelectorCompany; + private Button buttonAddWarmlyShip; + private Button buttonAddShip; + private PictureBox pictureBox; + private Button buttonRemoveShip; + private MaskedTextBox maskedTextBoxPosition; + private Button buttonRefresh; + private Button buttonGoToCheck; + } +} \ No newline at end of file diff --git a/WarmlyShip/WarmlyShip/FormShipCollection.cs b/WarmlyShip/WarmlyShip/FormShipCollection.cs new file mode 100644 index 0000000..f9315fb --- /dev/null +++ b/WarmlyShip/WarmlyShip/FormShipCollection.cs @@ -0,0 +1,144 @@ +using WarmlyShip.CollectionGenericObjects; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using WarmlyShip.Drawnings; + +namespace WarmlyShip +{ + public partial class FormShipCollection : Form + { + public FormShipCollection() + { + InitializeComponent(); + } + private AbstractCompany? _company = null; + + private void ComboBoxSelectorCompany_SelectedIndexChanged(Object sender, EventArgs e) + { + switch (comboBoxSelectorCompany.Text) + { + case "Хранилище": + _company = new PortForShips(pictureBox.Width, pictureBox.Height, new MassiveGenericObjects()); + break; + } + } + + private void CreateObject(string type) + { + if (_company == null) + { + return; + } + + Random random = new(); + DrawningShip drawningShip; + + switch (type) + { + case nameof(DrawningShip): + drawningShip = new DrawningShip(random.Next(100, 300), random.Next(1000, 3000), GetColor(random)); + break; + case nameof(DrawningWarmlyShip): + drawningShip = new DrawningWarmlyShip(random.Next(100, 300), random.Next(1000, 3000), + GetColor(random), GetColor(random), true, true); + break; + default: + return; + } + + if (_company + drawningShip != -1) + { + MessageBox.Show("Объект добавлен"); + pictureBox.Image = _company.Show(); + } + else + { + MessageBox.Show("Не удалось добавить объект"); + } + } + + + private void ButtonAddShip_Click(object sender, EventArgs e) => CreateObject(nameof(DrawningShip)); + + private void ButtonAddWarmlyShip_Click(object sender, EventArgs e) => CreateObject(nameof(DrawningWarmlyShip)); + + private static Color GetColor(Random random) + { + Color color = Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)); + ColorDialog dialog = new(); + if (dialog.ShowDialog() == DialogResult.OK) + { + color = dialog.Color; + } + + return color; + } + + private void ButtonRemoveShip_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(maskedTextBoxPosition.Text) || _company == null) + { + return; + } + + if (MessageBox.Show("Удалить объект?", "Удаление", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes) + { + return; + } + + int pos = Convert.ToInt32(maskedTextBoxPosition.Text); + if (_company - pos != null) + { + MessageBox.Show("Объект удален"); + pictureBox.Image = _company.Show(); + } + else + { + MessageBox.Show("Не удалось удалить объект"); + } + } + + private void ButtonGoToCheck_Click(object sender, EventArgs e) + { + if (_company == null) + { + return; + } + + DrawningShip? ship = null; + int counter = 100; + while (ship == null) + { + ship = _company.GetRandomObject(); + counter--; + if (counter <= 0) + { + break; + } + } + + if (ship == null) + { + return; + } + + FormShips form = new() + { + SetShip = ship + }; + form.ShowDialog(); + } + + private void ButtonRefresh_Click(object sender, EventArgs e) + { + + } + } +} diff --git a/WarmlyShip/WarmlyShip/FormShipCollection.resx b/WarmlyShip/WarmlyShip/FormShipCollection.resx new file mode 100644 index 0000000..af32865 --- /dev/null +++ b/WarmlyShip/WarmlyShip/FormShipCollection.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/WarmlyShip/WarmlyShip/FormShips.Designer.cs b/WarmlyShip/WarmlyShip/FormShips.Designer.cs index 9f0cff8..499523d 100644 --- a/WarmlyShip/WarmlyShip/FormShips.Designer.cs +++ b/WarmlyShip/WarmlyShip/FormShips.Designer.cs @@ -33,8 +33,6 @@ buttonUp = new Button(); buttonRight = new Button(); buttonLeft = new Button(); - buttonCreateWarmlyShip = new Button(); - buttonCreateShip = new Button(); comboBoxStrategy = new ComboBox(); buttonStrategyStep = new Button(); ((System.ComponentModel.ISupportInitialize)pictureBoxShips).BeginInit(); @@ -97,28 +95,6 @@ buttonLeft.UseVisualStyleBackColor = true; buttonLeft.Click += ButtonMove_Click; // - // buttonCreateWarmlyShip - // - buttonCreateWarmlyShip.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; - buttonCreateWarmlyShip.Location = new Point(12, 458); - buttonCreateWarmlyShip.Name = "buttonCreateWarmlyShip"; - buttonCreateWarmlyShip.Size = new Size(161, 23); - buttonCreateWarmlyShip.TabIndex = 6; - buttonCreateWarmlyShip.Text = "создать пароход"; - buttonCreateWarmlyShip.UseVisualStyleBackColor = true; - buttonCreateWarmlyShip.Click += buttonCreate_Click; - // - // buttonCreateShip - // - buttonCreateShip.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; - buttonCreateShip.Location = new Point(179, 458); - buttonCreateShip.Name = "buttonCreateShip"; - buttonCreateShip.Size = new Size(161, 23); - buttonCreateShip.TabIndex = 11; - buttonCreateShip.Text = "создать лодку"; - buttonCreateShip.UseVisualStyleBackColor = true; - buttonCreateShip.Click += buttonCreateShip_Click; - // // comboBoxStrategy // comboBoxStrategy.DropDownStyle = ComboBoxStyle.DropDownList; @@ -146,12 +122,10 @@ ClientSize = new Size(854, 493); Controls.Add(buttonStrategyStep); Controls.Add(comboBoxStrategy); - Controls.Add(buttonCreateShip); Controls.Add(buttonDown); Controls.Add(buttonUp); Controls.Add(buttonRight); Controls.Add(buttonLeft); - Controls.Add(buttonCreateWarmlyShip); Controls.Add(pictureBoxShips); Name = "FormShips"; StartPosition = FormStartPosition.CenterScreen; @@ -167,8 +141,6 @@ private Button buttonUp; private Button buttonRight; private Button buttonLeft; - private Button buttonCreateWarmlyShip; - private Button buttonCreateShip; private ComboBox comboBoxStrategy; private Button buttonStrategyStep; } diff --git a/WarmlyShip/WarmlyShip/FormShips.cs b/WarmlyShip/WarmlyShip/FormShips.cs index 4142bd6..f1522a8 100644 --- a/WarmlyShip/WarmlyShip/FormShips.cs +++ b/WarmlyShip/WarmlyShip/FormShips.cs @@ -18,6 +18,19 @@ namespace WarmlyShip private DrawningShip? _drawningShip; private AbstractStrategy? _strategy; + + public DrawningShip SetShip + { + set + { + _drawningShip = value; + _drawningShip.SetPictureSize(pictureBoxShips.Width, pictureBoxShips.Height); + comboBoxStrategy.Enabled = true; + _strategy = null; + Draw(); + } + } + public FormShips() { InitializeComponent(); @@ -38,36 +51,7 @@ namespace WarmlyShip pictureBoxShips.Image = bmp; } - private void CreateObject(string type) - { - Random random = new(); - switch (type) - { - case nameof(DrawningShip): - _drawningShip = new DrawningShip(random.Next(100, 300), random.Next(1000, 3000), - Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256))); - break; - case nameof(DrawningWarmlyShip): - _drawningShip = new DrawningWarmlyShip(random.Next(100, 300), random.Next(1000, 3000), - Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)), - Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)), - Convert.ToBoolean(random.Next(0, 2)), Convert.ToBoolean(random.Next(0, 2))); - break; - default: - return; - } - _strategy = null; - _drawningShip.SetPictureSize(pictureBoxShips.Width, pictureBoxShips.Height); - _drawningShip.SetPosition(random.Next(10, 100), random.Next(10, 100)); - comboBoxStrategy.Enabled = true; - Draw(); - } - - - private void buttonCreate_Click(object sender, EventArgs e) => CreateObject(nameof(DrawningWarmlyShip)); - - private void buttonCreateShip_Click(object sender, EventArgs e) => CreateObject(nameof(DrawningShip)); - + private void ButtonMove_Click(object sender, EventArgs e) { diff --git a/WarmlyShip/WarmlyShip/MovementStrategy/MoveableShip.cs b/WarmlyShip/WarmlyShip/MovementStrategy/MoveableShip.cs index 2da10c1..f3e4d6b 100644 --- a/WarmlyShip/WarmlyShip/MovementStrategy/MoveableShip.cs +++ b/WarmlyShip/WarmlyShip/MovementStrategy/MoveableShip.cs @@ -1,6 +1,6 @@ using WarmlyShip.MovementStrategy; using WarmlyShip.Drawnings; -using WarmlyShip.MovementStrategy; + namespace ProjectShip.MovementStrategy; diff --git a/WarmlyShip/WarmlyShip/Program.cs b/WarmlyShip/WarmlyShip/Program.cs index 5b85e85..2dda87b 100644 --- a/WarmlyShip/WarmlyShip/Program.cs +++ b/WarmlyShip/WarmlyShip/Program.cs @@ -11,7 +11,7 @@ namespace WarmlyShip // To customize application configuration such as set high DPI settings or default font, // see https://aka.ms/applicationconfiguration. ApplicationConfiguration.Initialize(); - Application.Run(new FormShips()); + Application.Run(new FormShipCollection()); } } } \ No newline at end of file diff --git a/WarmlyShip/WarmlyShip/WarmlyShip.csproj b/WarmlyShip/WarmlyShip/WarmlyShip.csproj index b2d041e..244387d 100644 --- a/WarmlyShip/WarmlyShip/WarmlyShip.csproj +++ b/WarmlyShip/WarmlyShip/WarmlyShip.csproj @@ -8,12 +8,6 @@ enable - - - - - - True