From b5810b8a71cadf50f6148e395c85e4da32dc7f8c Mon Sep 17 00:00:00 2001 From: Anastasia Date: Tue, 15 Nov 2022 11:30:15 +0400 Subject: [PATCH 1/3] =?UTF-8?q?=D0=A0=D0=B5=D0=B0=D0=BB=D0=B8=D0=B7=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D1=8F=20=D1=81=D0=BE=D1=85=D1=80=D0=B0=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F=20=D0=B8=20=D0=B7=D0=B0=D0=B3=D1=80=D1=83?= =?UTF-8?q?=D0=B7=D0=BA=D0=B8=20=D0=B4=D0=B0=D0=BD=D0=BD=D1=8B=D1=85=20?= =?UTF-8?q?=D0=BF=D0=BE=20=D0=B2=D1=81=D0=B5=D0=BC=20=D0=BE=D0=B1=D1=8A?= =?UTF-8?q?=D0=B5=D0=BA=D1=82=D0=B0=D0=BC.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DrawingObjectAirplane.cs | 3 + .../AirplaneWithRadar/ExtentionAirplane.cs | 53 +++++++++++ .../FormMapWithSetAirplanes.Designer.cs | 69 +++++++++++++-- .../FormMapWithSetAirplanes.cs | 40 +++++++++ .../FormMapWithSetAirplanes.resx | 9 ++ .../AirplaneWithRadar/IDrawingObject.cs | 5 ++ .../MapWithSetAirplanesGeneric.cs | 25 ++++++ .../AirplaneWithRadar/MapsCollection.cs | 88 ++++++++++++++++++- 8 files changed, 283 insertions(+), 9 deletions(-) create mode 100644 AirplaneWithRadar/AirplaneWithRadar/ExtentionAirplane.cs diff --git a/AirplaneWithRadar/AirplaneWithRadar/DrawingObjectAirplane.cs b/AirplaneWithRadar/AirplaneWithRadar/DrawingObjectAirplane.cs index fcd2c62..252c1bd 100644 --- a/AirplaneWithRadar/AirplaneWithRadar/DrawingObjectAirplane.cs +++ b/AirplaneWithRadar/AirplaneWithRadar/DrawingObjectAirplane.cs @@ -30,5 +30,8 @@ namespace AirplaneWithRadar { _airplane.DrawTransport(g); } + public string GetInfo() => _airplane?.GetDataForSave(); + public static IDrawingObject Create(string data) => new DrawingObjectAirplane(data.CreateDrawingAirplane()); + } } diff --git a/AirplaneWithRadar/AirplaneWithRadar/ExtentionAirplane.cs b/AirplaneWithRadar/AirplaneWithRadar/ExtentionAirplane.cs new file mode 100644 index 0000000..0125813 --- /dev/null +++ b/AirplaneWithRadar/AirplaneWithRadar/ExtentionAirplane.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AirplaneWithRadar +{ + /// + /// Расширение для класса DrawningCar + /// + internal static class ExtentionAirplane + { + /// + /// Разделитель для записи информации по объекту в файл + /// + private static readonly char _separatorForObject = ':'; + /// + /// Создание объекта из строки + /// + /// + /// + public static DrawingAirplane CreateDrawingAirplane(this string info) + { + string[] strs = info.Split(_separatorForObject); + if (strs.Length == 3) + { + return new DrawingAirplane(Convert.ToInt32(strs[0]),Convert.ToInt32(strs[1]), Color.FromName(strs[2])); + } + if (strs.Length == 6) + { + return new DrawingAirplaneWithRadar(Convert.ToInt32(strs[0]), Convert.ToInt32(strs[1]), Color.FromName(strs[2]), Color.FromName(strs[3]), Convert.ToBoolean(strs[4]), Convert.ToBoolean(strs[5])); + } + return null; + } + /// + /// Получение данных для сохранения в файл + /// + /// + /// + public static string GetDataForSave(this DrawingAirplane drawingAirplane) + { + var airplane = drawingAirplane.Airplane; + var str = $"{airplane.Speed}{_separatorForObject}{airplane.Weight}{_separatorForObject}{airplane.BodyColor.Name}"; + if (airplane is not EntityAirplaneWithRadar airplaneWithRadar) + { + return str; + } + return $"{str}{_separatorForObject}{airplaneWithRadar.DopColor.Name}{_separatorForObject}{airplaneWithRadar.Radar}{_separatorForObject}{airplaneWithRadar.ExtraFuelTank}"; + } + + } +} diff --git a/AirplaneWithRadar/AirplaneWithRadar/FormMapWithSetAirplanes.Designer.cs b/AirplaneWithRadar/AirplaneWithRadar/FormMapWithSetAirplanes.Designer.cs index 49520fa..7cc1fa7 100644 --- a/AirplaneWithRadar/AirplaneWithRadar/FormMapWithSetAirplanes.Designer.cs +++ b/AirplaneWithRadar/AirplaneWithRadar/FormMapWithSetAirplanes.Designer.cs @@ -45,9 +45,16 @@ this.maskedTextBoxPosition = new System.Windows.Forms.MaskedTextBox(); this.buttonAddAirplane = new System.Windows.Forms.Button(); this.pictureBox = new System.Windows.Forms.PictureBox(); + this.menuStrip = new System.Windows.Forms.MenuStrip(); + this.FileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.SaveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.LoadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); + this.saveFileDialog = new System.Windows.Forms.SaveFileDialog(); this.groupBox.SuspendLayout(); this.groupBoxMaps.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit(); + this.menuStrip.SuspendLayout(); this.SuspendLayout(); // // groupBox @@ -63,9 +70,9 @@ this.groupBox.Controls.Add(this.maskedTextBoxPosition); this.groupBox.Controls.Add(this.buttonAddAirplane); this.groupBox.Dock = System.Windows.Forms.DockStyle.Right; - this.groupBox.Location = new System.Drawing.Point(896, 0); + this.groupBox.Location = new System.Drawing.Point(901, 33); this.groupBox.Name = "groupBox"; - this.groupBox.Size = new System.Drawing.Size(257, 754); + this.groupBox.Size = new System.Drawing.Size(257, 750); this.groupBox.TabIndex = 0; this.groupBox.TabStop = false; this.groupBox.Text = "Инструменты"; @@ -228,19 +235,62 @@ // pictureBox // this.pictureBox.Dock = System.Windows.Forms.DockStyle.Fill; - this.pictureBox.Location = new System.Drawing.Point(0, 0); + this.pictureBox.Location = new System.Drawing.Point(0, 33); this.pictureBox.Name = "pictureBox"; - this.pictureBox.Size = new System.Drawing.Size(896, 754); + this.pictureBox.Size = new System.Drawing.Size(901, 750); this.pictureBox.TabIndex = 1; this.pictureBox.TabStop = false; // + // menuStrip + // + this.menuStrip.ImageScalingSize = new System.Drawing.Size(24, 24); + this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.FileToolStripMenuItem}); + this.menuStrip.Location = new System.Drawing.Point(0, 0); + this.menuStrip.Name = "menuStrip"; + this.menuStrip.Size = new System.Drawing.Size(1158, 33); + this.menuStrip.TabIndex = 2; + // + // FileToolStripMenuItem + // + this.FileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.SaveToolStripMenuItem, + this.LoadToolStripMenuItem}); + this.FileToolStripMenuItem.Name = "FileToolStripMenuItem"; + this.FileToolStripMenuItem.Size = new System.Drawing.Size(69, 29); + this.FileToolStripMenuItem.Text = "Файл"; + // + // SaveToolStripMenuItem + // + this.SaveToolStripMenuItem.Name = "SaveToolStripMenuItem"; + this.SaveToolStripMenuItem.Size = new System.Drawing.Size(200, 34); + this.SaveToolStripMenuItem.Text = "Сохранить"; + this.SaveToolStripMenuItem.Click += new System.EventHandler(this.SaveToolStripMenuItem_Click); + // + // LoadToolStripMenuItem + // + this.LoadToolStripMenuItem.Name = "LoadToolStripMenuItem"; + this.LoadToolStripMenuItem.Size = new System.Drawing.Size(200, 34); + this.LoadToolStripMenuItem.Text = "Загрузить"; + this.LoadToolStripMenuItem.Click += new System.EventHandler(this.LoadToolStripMenuItem_Click); + // + // openFileDialog + // + this.openFileDialog.Filter = "txt file | *.txt"; + // + // saveFileDialog + // + this.saveFileDialog.Filter = "txt file | *.txt"; + // // FormMapWithSetAirplanes // this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 25F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1153, 754); + this.ClientSize = new System.Drawing.Size(1158, 783); this.Controls.Add(this.pictureBox); this.Controls.Add(this.groupBox); + this.Controls.Add(this.menuStrip); + this.MainMenuStrip = this.menuStrip; this.Name = "FormMapWithSetAirplanes"; this.Text = "FormMapWithSetAirplanes"; this.groupBox.ResumeLayout(false); @@ -248,7 +298,10 @@ this.groupBoxMaps.ResumeLayout(false); this.groupBoxMaps.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit(); + this.menuStrip.ResumeLayout(false); + this.menuStrip.PerformLayout(); this.ResumeLayout(false); + this.PerformLayout(); } @@ -271,5 +324,11 @@ private ListBox listBoxMaps; private Button buttonAddMap; private TextBox textBoxNewMapName; + private MenuStrip menuStrip; + private ToolStripMenuItem FileToolStripMenuItem; + private ToolStripMenuItem SaveToolStripMenuItem; + private ToolStripMenuItem LoadToolStripMenuItem; + private OpenFileDialog openFileDialog; + private SaveFileDialog saveFileDialog; } } \ No newline at end of file diff --git a/AirplaneWithRadar/AirplaneWithRadar/FormMapWithSetAirplanes.cs b/AirplaneWithRadar/AirplaneWithRadar/FormMapWithSetAirplanes.cs index 33a4229..21ad8a5 100644 --- a/AirplaneWithRadar/AirplaneWithRadar/FormMapWithSetAirplanes.cs +++ b/AirplaneWithRadar/AirplaneWithRadar/FormMapWithSetAirplanes.cs @@ -214,5 +214,45 @@ namespace AirplaneWithRadar } pictureBox.Image = _mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty].MoveObject(dir); } + /// + /// Обработка нажатия "Сохранить" + /// + /// + /// + private void SaveToolStripMenuItem_Click(object sender, EventArgs e) + { + if (saveFileDialog.ShowDialog() == DialogResult.OK) + { + if (_mapsCollection.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 (_mapsCollection.LoadData(openFileDialog.FileName)) + { + MessageBox.Show("Загрузка прошла успешно", "Результат", MessageBoxButtons.OK, MessageBoxIcon.Information); + ReloadMaps(); + } + else + { + MessageBox.Show("Не удалось загрузить", "Результат", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + } } } + diff --git a/AirplaneWithRadar/AirplaneWithRadar/FormMapWithSetAirplanes.resx b/AirplaneWithRadar/AirplaneWithRadar/FormMapWithSetAirplanes.resx index f298a7b..0034e6c 100644 --- a/AirplaneWithRadar/AirplaneWithRadar/FormMapWithSetAirplanes.resx +++ b/AirplaneWithRadar/AirplaneWithRadar/FormMapWithSetAirplanes.resx @@ -57,4 +57,13 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 17, 17 + + + 163, 17 + + + 357, 17 + \ No newline at end of file diff --git a/AirplaneWithRadar/AirplaneWithRadar/IDrawingObject.cs b/AirplaneWithRadar/AirplaneWithRadar/IDrawingObject.cs index 0dcd348..35c63ab 100644 --- a/AirplaneWithRadar/AirplaneWithRadar/IDrawingObject.cs +++ b/AirplaneWithRadar/AirplaneWithRadar/IDrawingObject.cs @@ -32,5 +32,10 @@ /// /// (float Left, float Right, float Top, float Bottom) GetCurrentPosition(); + /// + /// Получение информации по объекту + /// + /// + string GetInfo(); } } diff --git a/AirplaneWithRadar/AirplaneWithRadar/MapWithSetAirplanesGeneric.cs b/AirplaneWithRadar/AirplaneWithRadar/MapWithSetAirplanesGeneric.cs index 82e92ae..20d539d 100644 --- a/AirplaneWithRadar/AirplaneWithRadar/MapWithSetAirplanesGeneric.cs +++ b/AirplaneWithRadar/AirplaneWithRadar/MapWithSetAirplanesGeneric.cs @@ -114,6 +114,31 @@ namespace AirplaneWithRadar return new(_pictureWidth, _pictureHeight); } /// + /// Получение данных в виде строки + /// + /// + /// + public string GetData(char separatorType, char separatorData) + { + string data = $"{_map.GetType().Name}{separatorType}"; + foreach (var airplane in _setAirplanes.GetAirplanes()) + { + data += $"{airplane.GetInfo()}{separatorData}"; + } + return data; + } + /// + /// Загрузка списка из массива строк + /// + /// + public void LoadData(string[] records) + { + foreach (var rec in records) + { + _setAirplanes.Insert(DrawingObjectAirplane.Create(rec) as T); + } + } + /// /// "Взбалтываем" набор, чтобы все элементы оказались в начале /// private void Shaking() diff --git a/AirplaneWithRadar/AirplaneWithRadar/MapsCollection.cs b/AirplaneWithRadar/AirplaneWithRadar/MapsCollection.cs index 13d0079..91c02a4 100644 --- a/AirplaneWithRadar/AirplaneWithRadar/MapsCollection.cs +++ b/AirplaneWithRadar/AirplaneWithRadar/MapsCollection.cs @@ -14,7 +14,7 @@ namespace AirplaneWithRadar /// /// Словарь (хранилище) с картами /// - readonly Dictionary> _mapStorages; + readonly Dictionary> _mapStorages; /// /// Возвращение списка названий карт /// @@ -28,13 +28,21 @@ namespace AirplaneWithRadar /// private readonly int _pictureHeight; /// + /// Разделитель для записи информации по элементу словаря в файл + /// + private readonly char separatorDict = '|'; + /// + /// Разделитель для записей коллекции данных в файл + /// + private readonly char separatorData = ';'; + /// /// Конструктор /// /// /// public MapsCollection(int pictureWidth, int pictureHeight) { - _mapStorages = new Dictionary>(); + _mapStorages = new Dictionary>(); _pictureWidth = pictureWidth; _pictureHeight = pictureHeight; } @@ -48,7 +56,7 @@ namespace AirplaneWithRadar // TODO Прописать логику для добавления if (!Keys.Contains(name)) { - _mapStorages.Add(name, new MapWithSetAirplanesGeneric(_pictureWidth, _pictureHeight, map)); + _mapStorages.Add(name, new MapWithSetAirplanesGeneric(_pictureWidth, _pictureHeight, map)); } } /// @@ -68,7 +76,7 @@ namespace AirplaneWithRadar /// /// /// - public MapWithSetAirplanesGeneric this[string ind] + public MapWithSetAirplanesGeneric this[string ind] { get { @@ -80,5 +88,77 @@ namespace AirplaneWithRadar return null; } } + /// + /// Метод записи информации в файл + /// + /// Строка, которую следует записать + /// Поток для записи + private static void WriteToFile(string text, FileStream stream) + { + byte[] info = new UTF8Encoding(true).GetBytes(text); + stream.Write(info, 0, info.Length); + } + /// + /// Сохранение информации по автомобилям в хранилище в файл + /// + /// Путь и имя файла + /// + public bool SaveData(string filename) + { + if (File.Exists(filename)) + { + File.Delete(filename); + } + using (StreamWriter sw = new(filename)) + { + sw.Write($"MapsCollection{Environment.NewLine}"); + foreach (var storage in _mapStorages) + { + sw.Write($"{storage.Key}{separatorDict}{storage.Value.GetData(separatorDict, separatorData)}{Environment.NewLine}"); + } + } + return true; + } + /// + /// Загрузка нформации по автомобилям на парковках из файла + /// + /// + /// + public bool LoadData(string filename) + { + if (!File.Exists(filename)) + { + return false; + } + using (StreamReader sr = new(filename)) + { + string strFromFile = ""; + if ((strFromFile = sr.ReadLine()) == null || !strFromFile.Contains("MapsCollection")) + { + return false; + } + _mapStorages.Clear(); + while ((strFromFile = sr.ReadLine()) != null) + { + var elem = strFromFile.Split(separatorDict); + AbstractMap map = null; + switch (elem[1]) + { + case "SimpleMap": + map = new SimpleMap(); + break; + case "BlockMap": + map = new BlockMap(); + break; + case "LineMap": + map = new LineMap(); + break; + } + _mapStorages.Add(elem[0], new MapWithSetAirplanesGeneric(_pictureWidth, _pictureHeight, map)); + _mapStorages[elem[0]].LoadData(elem[2].Split(separatorData, StringSplitOptions.RemoveEmptyEntries)); + } + } + return true; + } } } -- 2.25.1 From 42cc3bdf2eeb3c6fd4f2e5e448c87dd239a29995 Mon Sep 17 00:00:00 2001 From: Anastasia Date: Thu, 8 Dec 2022 20:31:33 +0400 Subject: [PATCH 2/3] =?UTF-8?q?=D0=A0=D0=B5=D0=B0=D0=BB=D0=B8=D0=B7=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D1=8F=20=D0=B7=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=BA?= =?UTF-8?q?=D0=B8=20=D0=B8=20=D1=81=D0=BE=D1=85=D1=80=D0=B0=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F=20=D0=B4=D0=B0=D0=BD=D0=BD=D1=8B=D1=85=20?= =?UTF-8?q?=D0=BF=D0=BE=20=D0=B2=D1=81=D0=B5=D0=BC=20=D0=BE=D0=B1=D1=8A?= =?UTF-8?q?=D0=B5=D0=BA=D1=82=D0=B0=D0=BC.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AirplaneWithRadar/MapWithSetAirplanesGeneric.cs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/AirplaneWithRadar/AirplaneWithRadar/MapWithSetAirplanesGeneric.cs b/AirplaneWithRadar/AirplaneWithRadar/MapWithSetAirplanesGeneric.cs index 20d539d..8096c26 100644 --- a/AirplaneWithRadar/AirplaneWithRadar/MapWithSetAirplanesGeneric.cs +++ b/AirplaneWithRadar/AirplaneWithRadar/MapWithSetAirplanesGeneric.cs @@ -169,17 +169,6 @@ namespace AirplaneWithRadar /// Метод отрисовки фона /// /// - private void DrawHangar(Graphics g, int x, int y, int width, int height) - { - Pen pen = new(Color.Black, 3); - g.DrawLine(pen, x, y, x + width, y); - g.DrawLine(pen, x, y, x, y + height + 20); - g.DrawLine(pen, x, y + height + 20, x + width, y + height + 20); - } - /// - /// Метод отрисовки фона - /// - /// private void DrawBackground(Graphics g) { Pen pen = new(Color.White, 5); -- 2.25.1 From f27fce51ac0887398bb7c073eaf1920d35e5cb58 Mon Sep 17 00:00:00 2001 From: Anastasia Date: Sun, 18 Dec 2022 12:20:10 +0400 Subject: [PATCH 3/3] =?UTF-8?q?=D0=93=D0=BE=D1=82=D0=BE=D0=B2=D0=B0=D1=8F?= =?UTF-8?q?=20=D1=88=D0=B5=D1=81=D1=82=D0=B0=D1=8F=20=D0=BB=D0=B0=D0=B1?= =?UTF-8?q?=D0=BE=D1=80=D0=B0=D1=82=D0=BE=D1=80=D0=BD=D0=B0=D1=8F=20=D1=80?= =?UTF-8?q?=D0=B0=D0=B1=D0=BE=D1=82=D0=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AirplaneWithRadar/ExtentionAirplane.cs | 2 +- .../AirplaneWithRadar/FormAirplaneConfig.cs | 3 +-- .../AirplaneWithRadar/MapsCollection.cs | 14 ++------------ AirplaneWithRadar/EntityAirplaneWithRadar.cs | 8 -------- 4 files changed, 4 insertions(+), 23 deletions(-) delete mode 100644 AirplaneWithRadar/EntityAirplaneWithRadar.cs diff --git a/AirplaneWithRadar/AirplaneWithRadar/ExtentionAirplane.cs b/AirplaneWithRadar/AirplaneWithRadar/ExtentionAirplane.cs index 0125813..c71ceb4 100644 --- a/AirplaneWithRadar/AirplaneWithRadar/ExtentionAirplane.cs +++ b/AirplaneWithRadar/AirplaneWithRadar/ExtentionAirplane.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; namespace AirplaneWithRadar { /// - /// Расширение для класса DrawningCar + /// Расширение для класса DrawingAirplane /// internal static class ExtentionAirplane { diff --git a/AirplaneWithRadar/AirplaneWithRadar/FormAirplaneConfig.cs b/AirplaneWithRadar/AirplaneWithRadar/FormAirplaneConfig.cs index 30374d5..99d54f2 100644 --- a/AirplaneWithRadar/AirplaneWithRadar/FormAirplaneConfig.cs +++ b/AirplaneWithRadar/AirplaneWithRadar/FormAirplaneConfig.cs @@ -155,7 +155,6 @@ namespace AirplaneWithRadar /// private void LabelDopColor_DragDrop(object sender, DragEventArgs e) { - // TODO Call method from object _car if _car is DrawningSportCar and set dop color Color ModifColor = (Color)e.Data.GetData(typeof(Color)); if (_airplane is DrawingAirplaneWithRadar airplaneWithRadar) { @@ -164,7 +163,7 @@ namespace AirplaneWithRadar } } /// - /// Добавление машины + /// Добавление самолета /// /// /// diff --git a/AirplaneWithRadar/AirplaneWithRadar/MapsCollection.cs b/AirplaneWithRadar/AirplaneWithRadar/MapsCollection.cs index 91c02a4..9064678 100644 --- a/AirplaneWithRadar/AirplaneWithRadar/MapsCollection.cs +++ b/AirplaneWithRadar/AirplaneWithRadar/MapsCollection.cs @@ -89,17 +89,7 @@ namespace AirplaneWithRadar } } /// - /// Метод записи информации в файл - /// - /// Строка, которую следует записать - /// Поток для записи - private static void WriteToFile(string text, FileStream stream) - { - byte[] info = new UTF8Encoding(true).GetBytes(text); - stream.Write(info, 0, info.Length); - } - /// - /// Сохранение информации по автомобилям в хранилище в файл + /// Сохранение информации по самолетам в хранилище в файл /// /// Путь и имя файла /// @@ -120,7 +110,7 @@ namespace AirplaneWithRadar return true; } /// - /// Загрузка нформации по автомобилям на парковках из файла + /// Загрузка нформации по самолетам на парковках из файла /// /// /// diff --git a/AirplaneWithRadar/EntityAirplaneWithRadar.cs b/AirplaneWithRadar/EntityAirplaneWithRadar.cs deleted file mode 100644 index d555ecb..0000000 --- a/AirplaneWithRadar/EntityAirplaneWithRadar.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System; - -public class Class1 -{ - public Class1() - { - } -} -- 2.25.1