From aa62dc46fa48fccba76a6958530a439a9591fcfd Mon Sep 17 00:00:00 2001 From: allllen4a Date: Tue, 5 Dec 2023 12:19:49 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=B5=D0=B4=D1=8C=D0=BC=D0=B0=D1=8F=20?= =?UTF-8?q?=D0=BB=D0=B0=D0=B1=D0=BE=D1=80=D0=B0=D1=82=D0=BE=D1=80=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F=20=D1=80=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 --- .../projectDoubleDeckerBus/BusNotFoundException.cs | 1 - .../projectDoubleDeckerBus/BusesGenericCollection.cs | 5 +---- .../projectDoubleDeckerBus/BusesGenericStorage.cs | 3 --- .../projectDoubleDeckerBus/FormBusCollection.cs | 2 +- projectDoubleDeckerBus/projectDoubleDeckerBus/Program.cs | 1 - .../projectDoubleDeckerBus/StorageOverflowException.cs | 1 - 6 files changed, 2 insertions(+), 11 deletions(-) diff --git a/projectDoubleDeckerBus/projectDoubleDeckerBus/BusNotFoundException.cs b/projectDoubleDeckerBus/projectDoubleDeckerBus/BusNotFoundException.cs index e893960..dab788b 100644 --- a/projectDoubleDeckerBus/projectDoubleDeckerBus/BusNotFoundException.cs +++ b/projectDoubleDeckerBus/projectDoubleDeckerBus/BusNotFoundException.cs @@ -14,7 +14,6 @@ namespace projectDoubleDeckerBus.Exceptions public BusNotFoundException(int i) : base($"Не найден объект по позиции { i}") { } public BusNotFoundException() : base() { } public BusNotFoundException(string message) : base(message) { } - public BusNotFoundException(string message, Exception exception) : base(message, exception) { } diff --git a/projectDoubleDeckerBus/projectDoubleDeckerBus/BusesGenericCollection.cs b/projectDoubleDeckerBus/projectDoubleDeckerBus/BusesGenericCollection.cs index 1d4912c..54725ad 100644 --- a/projectDoubleDeckerBus/projectDoubleDeckerBus/BusesGenericCollection.cs +++ b/projectDoubleDeckerBus/projectDoubleDeckerBus/BusesGenericCollection.cs @@ -52,8 +52,7 @@ namespace projectDoubleDeckerBus /// /// /// - /// - + /// public static bool operator +(BusesGenericCollection collect, T? obj) { @@ -73,13 +72,11 @@ namespace projectDoubleDeckerBus } return obj; } - // получение объекта imoveableObj public U? GetU(int pos) { return (U?)_collection[pos]?.GetMoveableObject; } - /// /// Вывод всего набора объектов /// diff --git a/projectDoubleDeckerBus/projectDoubleDeckerBus/BusesGenericStorage.cs b/projectDoubleDeckerBus/projectDoubleDeckerBus/BusesGenericStorage.cs index 820f06d..8628586 100644 --- a/projectDoubleDeckerBus/projectDoubleDeckerBus/BusesGenericStorage.cs +++ b/projectDoubleDeckerBus/projectDoubleDeckerBus/BusesGenericStorage.cs @@ -17,7 +17,6 @@ namespace projectDoubleDeckerBus.Generics public List Keys => _busStorages.Keys.ToList(); private readonly int _pictureWidth; private readonly int _pictureHeight; - private static readonly char _separatorForKeyValue = '|'; /// /// Разделитель для записей коллекции данных в файл @@ -55,8 +54,6 @@ namespace projectDoubleDeckerBus.Generics return null; } } - - public void SaveData(string filename) { if (File.Exists(filename)) diff --git a/projectDoubleDeckerBus/projectDoubleDeckerBus/FormBusCollection.cs b/projectDoubleDeckerBus/projectDoubleDeckerBus/FormBusCollection.cs index 40e6400..7463a3a 100644 --- a/projectDoubleDeckerBus/projectDoubleDeckerBus/FormBusCollection.cs +++ b/projectDoubleDeckerBus/projectDoubleDeckerBus/FormBusCollection.cs @@ -215,7 +215,7 @@ namespace projectDoubleDeckerBus -private void SaveToolStripMenuItem_Click(object sender, EventArgs e) + private void SaveToolStripMenuItem_Click(object sender, EventArgs e) { if (saveFileDialog.ShowDialog() == DialogResult.OK) { diff --git a/projectDoubleDeckerBus/projectDoubleDeckerBus/Program.cs b/projectDoubleDeckerBus/projectDoubleDeckerBus/Program.cs index 83616a8..0413e79 100644 --- a/projectDoubleDeckerBus/projectDoubleDeckerBus/Program.cs +++ b/projectDoubleDeckerBus/projectDoubleDeckerBus/Program.cs @@ -21,7 +21,6 @@ namespace projectDoubleDeckerBus Application.Run(serviceProvider.GetRequiredService()); } } - private static void ConfigureServices(ServiceCollection services) { services.AddSingleton().AddLogging(option => diff --git a/projectDoubleDeckerBus/projectDoubleDeckerBus/StorageOverflowException.cs b/projectDoubleDeckerBus/projectDoubleDeckerBus/StorageOverflowException.cs index 3db63df..4da1f71 100644 --- a/projectDoubleDeckerBus/projectDoubleDeckerBus/StorageOverflowException.cs +++ b/projectDoubleDeckerBus/projectDoubleDeckerBus/StorageOverflowException.cs @@ -6,7 +6,6 @@ using System.Threading.Tasks; using System.Runtime.Serialization; namespace projectDoubleDeckerBus.Exceptions - { [Serializable] internal class StorageOverflowException : ApplicationException