From 077f39a55a4a4cee0a90c583c0b95e4e046d9cc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=B7=D0=B0=D0=BC=D0=B0=D1=82=20=D0=98=D1=88=D1=82?= =?UTF-8?q?=D1=83=D0=B3=D0=B0=D0=BD=D0=BE=D0=B2?= Date: Tue, 23 Apr 2024 00:08:07 +0400 Subject: [PATCH] =?UTF-8?q?6=20=D0=BB=D0=B0=D0=B1=D0=BE=D1=80=D0=B0=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=BD=D0=B0=D1=8F=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AbstractCompany.cs | 2 +- .../ICollectionGenericObjects.cs | 16 +- .../ListGenericObjects.cs | 29 +++- .../MassiveGenericObjects.cs | 20 ++- .../StorageCollection.cs | 159 ++++++++++++++++-- MotorBoat/MotorBoat/Drawnings/DrawningBoat.cs | 9 + .../MotorBoat/Drawnings/DrawningMotorBoat.cs | 11 ++ .../Drawnings/ExtentionDrawningBoat.cs | 50 ++++++ MotorBoat/MotorBoat/Entities/EntityBoat.cs | 23 +++ .../MotorBoat/Entities/EntityMotorBoat.cs | 28 ++- .../MotorBoat/FormBoatCollection.Designer.cs | 69 +++++++- MotorBoat/MotorBoat/FormBoatCollection.cs | 47 +++++- MotorBoat/MotorBoat/FormBoatCollection.resx | 9 + 13 files changed, 442 insertions(+), 30 deletions(-) create mode 100644 MotorBoat/MotorBoat/Drawnings/ExtentionDrawningBoat.cs diff --git a/MotorBoat/MotorBoat/CollectionGenericObjects/AbstractCompany.cs b/MotorBoat/MotorBoat/CollectionGenericObjects/AbstractCompany.cs index cd85cfa..626a9df 100644 --- a/MotorBoat/MotorBoat/CollectionGenericObjects/AbstractCompany.cs +++ b/MotorBoat/MotorBoat/CollectionGenericObjects/AbstractCompany.cs @@ -41,7 +41,7 @@ public abstract class AbstractCompany _pictureWidth = picWidth; _pictureHeight = picHeight; _collection = collection; - _collection.SetMaxCount = GetMaxCount; + _collection.MaxCount = GetMaxCount; } /// /// Перегрузка оператора сложения для класса diff --git a/MotorBoat/MotorBoat/CollectionGenericObjects/ICollectionGenericObjects.cs b/MotorBoat/MotorBoat/CollectionGenericObjects/ICollectionGenericObjects.cs index 79993da..a0b9bad 100644 --- a/MotorBoat/MotorBoat/CollectionGenericObjects/ICollectionGenericObjects.cs +++ b/MotorBoat/MotorBoat/CollectionGenericObjects/ICollectionGenericObjects.cs @@ -1,5 +1,4 @@ namespace MotorBoat.CollectionGenericObjects; - /// /// Интерфейс описания действий для набора хранимых объектов /// @@ -14,7 +13,7 @@ public interface ICollectionGenericObjects /// /// Установка максимального количества элементов /// - int SetMaxCount { set; } + int MaxCount { get; set; } /// /// Добавление объекта в коллекцию /// @@ -40,4 +39,15 @@ public interface ICollectionGenericObjects /// Позиция /// Объект T? Get(int position); -} + + /// + /// Получение типа коллекции + /// + CollectionType GetCollectionType { get; } + + /// + /// Получение объектов коллекции по одному + /// + /// Поэлементый вывод элементов коллекции + IEnumerable GetItems(); +} \ No newline at end of file diff --git a/MotorBoat/MotorBoat/CollectionGenericObjects/ListGenericObjects.cs b/MotorBoat/MotorBoat/CollectionGenericObjects/ListGenericObjects.cs index 5c05942..586a1d1 100644 --- a/MotorBoat/MotorBoat/CollectionGenericObjects/ListGenericObjects.cs +++ b/MotorBoat/MotorBoat/CollectionGenericObjects/ListGenericObjects.cs @@ -1,4 +1,5 @@ -namespace MotorBoat.CollectionGenericObjects; + +namespace MotorBoat.CollectionGenericObjects; /// /// Параметризованный набор объектов @@ -18,7 +19,23 @@ public class ListGenericObjects : ICollectionGenericObjects public int Count => _collection.Count; - public int SetMaxCount { set { if (value > 0) { _maxCount = value; } } } + public int MaxCount + { + get + { + return _collection.Count; + } + set + { + if (value > 0) + { + _maxCount = value; + } + } + } + + public CollectionType GetCollectionType => CollectionType.List; + /// /// Конструктор /// @@ -57,4 +74,12 @@ public class ListGenericObjects : ICollectionGenericObjects _collection.RemoveAt(position); return temp; } + + public IEnumerable GetItems() + { + for (int i = 0; i < _collection.Count; ++i) + { + yield return _collection[i]; + } + } } diff --git a/MotorBoat/MotorBoat/CollectionGenericObjects/MassiveGenericObjects.cs b/MotorBoat/MotorBoat/CollectionGenericObjects/MassiveGenericObjects.cs index b484231..6469559 100644 --- a/MotorBoat/MotorBoat/CollectionGenericObjects/MassiveGenericObjects.cs +++ b/MotorBoat/MotorBoat/CollectionGenericObjects/MassiveGenericObjects.cs @@ -1,4 +1,5 @@ -namespace MotorBoat.CollectionGenericObjects; + +namespace MotorBoat.CollectionGenericObjects; public class MassiveGenericObjects : ICollectionGenericObjects where T : class @@ -8,8 +9,12 @@ public class MassiveGenericObjects : ICollectionGenericObjects /// private T?[] _collection; public int Count => _collection.Length; - public int SetMaxCount + public int MaxCount { + get + { + return _collection.Length; + } set { if (value > 0) @@ -25,6 +30,9 @@ public class MassiveGenericObjects : ICollectionGenericObjects } } } + + public CollectionType GetCollectionType => CollectionType.Massive; + public MassiveGenericObjects() { _collection = Array.Empty(); @@ -83,4 +91,12 @@ public class MassiveGenericObjects : ICollectionGenericObjects _collection[position] = null; return myObject; } + + public IEnumerable GetItems() + { + for (int i = 0; i < _collection.Length; ++i) + { + yield return _collection[i]; + } + } } diff --git a/MotorBoat/MotorBoat/CollectionGenericObjects/StorageCollection.cs b/MotorBoat/MotorBoat/CollectionGenericObjects/StorageCollection.cs index 509b72e..ca01a3d 100644 --- a/MotorBoat/MotorBoat/CollectionGenericObjects/StorageCollection.cs +++ b/MotorBoat/MotorBoat/CollectionGenericObjects/StorageCollection.cs @@ -1,17 +1,34 @@ -namespace MotorBoat.CollectionGenericObjects; +using MotorBoat.Drawnings; + +namespace MotorBoat.CollectionGenericObjects; /// /// Класс-хранилище коллекций /// /// public class StorageCollection - where T : class + where T : DrawningBoat { /// /// Словарь (хранилище) с коллекциями /// readonly Dictionary> _storages; + /// + /// Ключевое слово, с которого должен начинаться файл + /// + private readonly string _collectionKey = "CollectionsStorage"; + + /// + /// Разделитель для записей коллекции данных в файл + /// + private readonly string _separatorItems = ";"; + + /// + /// Разделитель для записи ключа и значения элемента словаря + /// + private readonly string _separatorForKeyValue = "|"; + /// /// Возвращение списка названий коллекций /// @@ -24,7 +41,6 @@ public class StorageCollection { _storages = new Dictionary>(); } - /// /// Добавление коллекции в хранилище /// @@ -32,12 +48,9 @@ public class StorageCollection /// тип коллекции public void AddCollection(string name, CollectionType collectionType) { - // TODO проверка, что name не пустой и нет в словаре записи с таким ключом - // TODO Прописать логику для добавления - - if (name == null || _storages.ContainsKey(name)) { return; } + if (name == null || _storages.ContainsKey(name)) + return; switch (collectionType) - { case CollectionType.None: return; @@ -47,8 +60,8 @@ public class StorageCollection case CollectionType.List: _storages[name] = new ListGenericObjects(); return; + default: break; } - } /// @@ -57,11 +70,8 @@ public class StorageCollection /// Название коллекции public void DelCollection(string name) { - // TODO Прописать логику для удаления коллекции if (_storages.ContainsKey(name)) - { _storages.Remove(name); - } } /// @@ -73,8 +83,129 @@ public class StorageCollection { get { - if (name == null || !_storages.ContainsKey(name)) { return null; } - return _storages[name]; + if (_storages.ContainsKey(name)) + return _storages[name]; + return null; } } + + /// + /// Сохранение информации по автомобилям в хранилище в файл + /// + /// + /// + public bool SaveData(string filename) + { + if (_storages.Count == 0) + { + return false; + } + if (File.Exists(filename)) + { + File.Delete(filename); + } + using (StreamWriter writer = new(filename)) + { + writer.Write(_collectionKey); + foreach (KeyValuePair> value in _storages) + { + writer.Write(Environment.NewLine); + // не сохраняем пустые коллекции + if (value.Value.Count == 0) + { + continue; + } + writer.Write(value.Key); + writer.Write(_separatorForKeyValue); + writer.Write(value.Value.GetCollectionType); + writer.Write(_separatorForKeyValue); + writer.Write(value.Value.MaxCount); + writer.Write(_separatorForKeyValue); + + foreach (T? item in value.Value.GetItems()) + { + string data = item?.GetDataForSave() ?? string.Empty; + if (string.IsNullOrEmpty(data)) + { + continue; + } + writer.Write(data); + writer.Write(_separatorItems); + } + } + } + return true; + } + + /// + /// Загрузка информации по автомобилям в хранилище из файла + /// + /// >Путь и имя файла + /// true - загрузка прошла успешно, false - ошибка при загрузке данных + public bool LoadData(string filename) + { + if (!File.Exists(filename)) + { + return false; + } + using (StreamReader reader = new(filename)) + { + string line = reader.ReadLine(); + if (line == null || line.Length == 0) + { + return false; + } + if (!line.Equals(_collectionKey)) + { + //если нет такой записи, то это не те данные + return false; + } + _storages.Clear(); + while ((line = reader.ReadLine()) != null) + { + string[] record = line.Split(_separatorForKeyValue, + StringSplitOptions.RemoveEmptyEntries); + if (record.Length != 4) + { + continue; + } + CollectionType collectionType = (CollectionType)Enum.Parse(typeof(CollectionType), record[1]); + ICollectionGenericObjects? collection = StorageCollection.CreateCollection(collectionType); + if (collection == null) + { + return false; + } + collection.MaxCount = Convert.ToInt32(record[2]); + string[] set = record[3].Split(_separatorItems, + StringSplitOptions.RemoveEmptyEntries); + foreach (string elem in set) + { + if (elem?.CreateDrawningBoat() is T boat) + { + if (collection.Insert(boat) == -1) + { + return false; + } + } + } + _storages.Add(record[0], collection); + } + } + return true; + } + + /// + /// Создание коллекции по типу + /// + /// + /// + private static ICollectionGenericObjects? CreateCollection(CollectionType collectionType) + { + return collectionType switch + { + CollectionType.Massive => new MassiveGenericObjects(), + CollectionType.List => new ListGenericObjects(), + _ => null, + }; + } } diff --git a/MotorBoat/MotorBoat/Drawnings/DrawningBoat.cs b/MotorBoat/MotorBoat/Drawnings/DrawningBoat.cs index ec1a9a8..00dd63e 100644 --- a/MotorBoat/MotorBoat/Drawnings/DrawningBoat.cs +++ b/MotorBoat/MotorBoat/Drawnings/DrawningBoat.cs @@ -85,6 +85,15 @@ namespace MotorBoat.Drawnings _drawningBoatHeight = drawningBoatHeight; } /// + /// Новый конструктор + /// + /// + public DrawningBoat(EntityBoat? boat) : this() + { + if (boat == null) return; + EntityBoat = new EntityBoat(boat.Speed, boat.Weight, boat.BodyColor); + } + /// /// Установка границ поля /// /// Ширина поля diff --git a/MotorBoat/MotorBoat/Drawnings/DrawningMotorBoat.cs b/MotorBoat/MotorBoat/Drawnings/DrawningMotorBoat.cs index 81d3781..b54f309 100644 --- a/MotorBoat/MotorBoat/Drawnings/DrawningMotorBoat.cs +++ b/MotorBoat/MotorBoat/Drawnings/DrawningMotorBoat.cs @@ -21,6 +21,17 @@ namespace MotorBoat.Drawnings { EntityBoat = new EntityMotorBoat(speed, weight, bodyColor, additionalColor, protectiveGlass, engine); } + + /// + /// Конструктор для Extention + /// + /// + public DrawningMotorBoat(EntityMotorBoat motorBoat) : base(153, 75) + { + if (motorBoat == null) return; + EntityBoat = new EntityMotorBoat(motorBoat.Speed, motorBoat.Weight, motorBoat.BodyColor, + motorBoat.AdditionalColor, motorBoat.ProtectiveGlass, motorBoat.Engine); + } /// /// Прорисовка объекта /// diff --git a/MotorBoat/MotorBoat/Drawnings/ExtentionDrawningBoat.cs b/MotorBoat/MotorBoat/Drawnings/ExtentionDrawningBoat.cs new file mode 100644 index 0000000..a9c4d56 --- /dev/null +++ b/MotorBoat/MotorBoat/Drawnings/ExtentionDrawningBoat.cs @@ -0,0 +1,50 @@ +using MotorBoat.Entities; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MotorBoat.Drawnings; + +/// +/// Расширение для класса EntityBoat +/// +public static class ExtentionDrawningBoat +{ + /// + /// Разделитель для записи информации по объекту в файл + /// + private static readonly string _separatorForObject = ":"; + + public static DrawningBoat? CreateDrawningBoat(this string info) + { + string[] strs = info.Split(_separatorForObject); + EntityBoat? boat = EntityMotorBoat.CreateEntityMotorBoat(strs); + if (boat != null) + { + return new DrawningMotorBoat((EntityMotorBoat)boat); + } + boat = EntityBoat.CreateEntityBoat(strs); + if (boat != null) + { + return new DrawningBoat(boat); + } + return null; + } + + /// + /// Получение данных для сохранения в файл + /// + /// + /// + public static string GetDataForSave(this DrawningBoat drawningBoat) + { + string[]? array = drawningBoat?.EntityBoat?.GetStringRepresentation(); + if (array == null) + { + return string.Empty; + } + return string.Join(_separatorForObject, array); + } +} diff --git a/MotorBoat/MotorBoat/Entities/EntityBoat.cs b/MotorBoat/MotorBoat/Entities/EntityBoat.cs index 4f45ac5..fa9e75f 100644 --- a/MotorBoat/MotorBoat/Entities/EntityBoat.cs +++ b/MotorBoat/MotorBoat/Entities/EntityBoat.cs @@ -44,5 +44,28 @@ namespace MotorBoat.Entities Weight = weight; BodyColor = bodyColor; } + + /// + /// Получение строк со значениями свойств объекта класса-сущности + /// + /// + public virtual string[] GetStringRepresentation() + { + return new[] { nameof(EntityBoat), Speed.ToString(), Weight.ToString(), BodyColor.Name }; + } + + /// + /// Создание объекта из массива строк + /// + /// + /// + public static EntityBoat? CreateEntityBoat(string[] strs) + { + if (strs.Length != 4 || strs[0] != nameof(EntityBoat)) + { + return null; + } + return new EntityBoat(Convert.ToInt32(strs[1]), Convert.ToDouble(strs[2]), Color.FromName(strs[3])); + } } } diff --git a/MotorBoat/MotorBoat/Entities/EntityMotorBoat.cs b/MotorBoat/MotorBoat/Entities/EntityMotorBoat.cs index 423736c..1267adf 100644 --- a/MotorBoat/MotorBoat/Entities/EntityMotorBoat.cs +++ b/MotorBoat/MotorBoat/Entities/EntityMotorBoat.cs @@ -1,4 +1,6 @@ -namespace MotorBoat.Entities +using System.Threading.Tasks; + +namespace MotorBoat.Entities { /// /// Класс-сущность "Моторная лодка" @@ -42,5 +44,29 @@ ProtectiveGlass = protectiveGlass; Engine = engine; } + + /// + /// Получение строк со значениями свойств продвинутого объекта класса-сущности + /// + /// + public override string[] GetStringRepresentation() + { + return new[] { nameof(EntityMotorBoat), Speed.ToString(), Weight.ToString(), BodyColor.Name, AdditionalColor.Name, + ProtectiveGlass.ToString(), Engine.ToString()}; + } + /// + /// Создание продвинутого объекта из массива строк + /// + /// + /// + public static EntityMotorBoat? CreateEntityMotorBoat(string[] strs) + { + if (strs.Length != 7 || strs[0] != nameof(EntityMotorBoat)) + { + return null; + } + return new EntityMotorBoat(Convert.ToInt32(strs[1]), Convert.ToDouble(strs[2]), Color.FromName(strs[3]), + Color.FromName(strs[4]), Convert.ToBoolean(strs[5]), Convert.ToBoolean(strs[6])); + } } } diff --git a/MotorBoat/MotorBoat/FormBoatCollection.Designer.cs b/MotorBoat/MotorBoat/FormBoatCollection.Designer.cs index 756f4ce..ba88c2a 100644 --- a/MotorBoat/MotorBoat/FormBoatCollection.Designer.cs +++ b/MotorBoat/MotorBoat/FormBoatCollection.Designer.cs @@ -46,10 +46,17 @@ labelCollectionName = new Label(); comboBoxSelectorCompany = new ComboBox(); pictureBox = new PictureBox(); + menuStrip = new MenuStrip(); + FileToolStripMenuItem = new ToolStripMenuItem(); + saveToolStripMenuItem = new ToolStripMenuItem(); + loadToolStripMenuItem = new ToolStripMenuItem(); + saveFileDialog = new SaveFileDialog(); + openFileDialog = new OpenFileDialog(); groupBoxTools.SuspendLayout(); panelCompanyTools.SuspendLayout(); panelStorage.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureBox).BeginInit(); + menuStrip.SuspendLayout(); SuspendLayout(); // // groupBoxTools @@ -59,9 +66,9 @@ groupBoxTools.Controls.Add(panelStorage); groupBoxTools.Controls.Add(comboBoxSelectorCompany); groupBoxTools.Dock = DockStyle.Right; - groupBoxTools.Location = new Point(630, 0); + groupBoxTools.Location = new Point(630, 24); groupBoxTools.Name = "groupBoxTools"; - groupBoxTools.Size = new Size(170, 509); + groupBoxTools.Size = new Size(170, 512); groupBoxTools.TabIndex = 0; groupBoxTools.TabStop = false; groupBoxTools.Text = "Инструменты"; @@ -239,19 +246,62 @@ // pictureBox // pictureBox.Dock = DockStyle.Fill; - pictureBox.Location = new Point(0, 0); + pictureBox.Location = new Point(0, 24); pictureBox.Name = "pictureBox"; - pictureBox.Size = new Size(630, 509); + pictureBox.Size = new Size(630, 512); pictureBox.TabIndex = 1; pictureBox.TabStop = false; // + // menuStrip + // + menuStrip.Items.AddRange(new ToolStripItem[] { FileToolStripMenuItem }); + menuStrip.Location = new Point(0, 0); + menuStrip.Name = "menuStrip"; + menuStrip.Size = new Size(800, 24); + menuStrip.TabIndex = 2; + menuStrip.Text = "menuStrip"; + // + // FileToolStripMenuItem + // + FileToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { saveToolStripMenuItem, loadToolStripMenuItem }); + FileToolStripMenuItem.Name = "FileToolStripMenuItem"; + FileToolStripMenuItem.Size = new Size(48, 20); + FileToolStripMenuItem.Text = "Файл"; + // + // saveToolStripMenuItem + // + saveToolStripMenuItem.Name = "saveToolStripMenuItem"; + saveToolStripMenuItem.ShortcutKeys = Keys.Control | Keys.S; + saveToolStripMenuItem.Size = new Size(181, 22); + saveToolStripMenuItem.Text = "Сохранение"; + saveToolStripMenuItem.Click += SaveToolStripMenuItem_Click; + // + // loadToolStripMenuItem + // + loadToolStripMenuItem.Name = "loadToolStripMenuItem"; + loadToolStripMenuItem.ShortcutKeys = Keys.Control | Keys.L; + loadToolStripMenuItem.Size = new Size(181, 22); + loadToolStripMenuItem.Text = "Загрузка"; + loadToolStripMenuItem.Click += LoadToolStripMenuItem_Click; + // + // saveFileDialog + // + saveFileDialog.Filter = "txt file | *.txt"; + // + // openFileDialog + // + openFileDialog.FileName = "openFileDialog1"; + openFileDialog.Filter = "txt file | *.txt"; + // // FormBoatCollection // AutoScaleDimensions = new SizeF(7F, 15F); AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(800, 509); + ClientSize = new Size(800, 536); Controls.Add(pictureBox); Controls.Add(groupBoxTools); + Controls.Add(menuStrip); + MainMenuStrip = menuStrip; Name = "FormBoatCollection"; Text = "Коллекция лодок"; groupBoxTools.ResumeLayout(false); @@ -260,7 +310,10 @@ panelStorage.ResumeLayout(false); panelStorage.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureBox).EndInit(); + menuStrip.ResumeLayout(false); + menuStrip.PerformLayout(); ResumeLayout(false); + PerformLayout(); } #endregion @@ -283,5 +336,11 @@ private Button buttonCollectionDel; private ListBox listBoxCollection; private Panel panelCompanyTools; + private MenuStrip menuStrip; + private ToolStripMenuItem FileToolStripMenuItem; + private ToolStripMenuItem saveToolStripMenuItem; + private ToolStripMenuItem loadToolStripMenuItem; + private SaveFileDialog saveFileDialog; + private OpenFileDialog openFileDialog; } } \ No newline at end of file diff --git a/MotorBoat/MotorBoat/FormBoatCollection.cs b/MotorBoat/MotorBoat/FormBoatCollection.cs index b9ced0c..9160d85 100644 --- a/MotorBoat/MotorBoat/FormBoatCollection.cs +++ b/MotorBoat/MotorBoat/FormBoatCollection.cs @@ -39,7 +39,7 @@ public partial class FormBoatCollection : Form /// /// /// - private void ButtonAddBoat_Click(object sender, EventArgs e) + private void ButtonAddBoat_Click(object sender, EventArgs e) { if (_company == null) { @@ -54,7 +54,7 @@ public partial class FormBoatCollection : Form /// Добавление лодки в коллекцию /// /// - private void SetBoat(DrawningBoat boat) + private void SetBoat(DrawningBoat boat) { if (_company == null || boat == null) { @@ -236,4 +236,47 @@ public partial class FormBoatCollection : Form panelCompanyTools.Enabled = true; RerfreshListBoxItems(); } + + /// + /// Обработка нажатия "Сохранение" + /// + /// + /// + private void SaveToolStripMenuItem_Click(object sender, EventArgs e) + { + if (saveFileDialog.ShowDialog() == DialogResult.OK) + { + if (_storageCollection.SaveData(saveFileDialog.FileName)) + { + MessageBox.Show("Сохранение прошло успешно", + "Результат", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + else + { + MessageBox.Show("Не сохранилось", "Результат", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + } + + /// + /// Обработка нажатия "Загрузка" + /// + /// + /// + private void LoadToolStripMenuItem_Click(object sender, EventArgs e) + { + if (openFileDialog.ShowDialog() == DialogResult.OK) + { + if (_storageCollection.LoadData(openFileDialog.FileName)) + { + MessageBox.Show("Загрузка прошла успешно", "Результат", MessageBoxButtons.OK, MessageBoxIcon.Information); + RerfreshListBoxItems(); + } + else + { + MessageBox.Show("Не удалось сохранить", "Результат", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + } } diff --git a/MotorBoat/MotorBoat/FormBoatCollection.resx b/MotorBoat/MotorBoat/FormBoatCollection.resx index af32865..8b1dfa1 100644 --- a/MotorBoat/MotorBoat/FormBoatCollection.resx +++ b/MotorBoat/MotorBoat/FormBoatCollection.resx @@ -117,4 +117,13 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 17, 17 + + + 126, 17 + + + 261, 17 + \ No newline at end of file -- 2.25.1