From b877c5e45cfa54103b9aa66fb7029ca2690c6c24 Mon Sep 17 00:00:00 2001 From: Yunusov_Niyaz Date: Thu, 21 Dec 2023 01:43:04 +0400 Subject: [PATCH 1/3] Lab8 --- Trolleybus/Trolleybus/BusCompareByColor.cs | 34 +++++++++++ Trolleybus/Trolleybus/BusCompareByType.cs | 36 +++++++++++ Trolleybus/Trolleybus/BusesCollectionInfo.cs | 30 ++++++++++ .../Trolleybus/BusesGenericCollection.cs | 4 +- Trolleybus/Trolleybus/BusesGenericStorage.cs | 23 +++---- Trolleybus/Trolleybus/DrawingBusEqutables.cs | 60 +++++++++++++++++++ .../Trolleybus/FormBusCollection.Designer.cs | 44 +++++++++++--- Trolleybus/Trolleybus/FormBusCollection.cs | 25 ++++++-- Trolleybus/Trolleybus/SetGeneric.cs | 15 +++-- 9 files changed, 241 insertions(+), 30 deletions(-) create mode 100644 Trolleybus/Trolleybus/BusCompareByColor.cs create mode 100644 Trolleybus/Trolleybus/BusCompareByType.cs create mode 100644 Trolleybus/Trolleybus/BusesCollectionInfo.cs create mode 100644 Trolleybus/Trolleybus/DrawingBusEqutables.cs diff --git a/Trolleybus/Trolleybus/BusCompareByColor.cs b/Trolleybus/Trolleybus/BusCompareByColor.cs new file mode 100644 index 0000000..d9ca3b5 --- /dev/null +++ b/Trolleybus/Trolleybus/BusCompareByColor.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ProjectTrolleybus.DrawingObjects; + +namespace ProjectTrolleybus.Generics +{ + internal class BusCompareByColor : IComparer + { + public int Compare(DrawingBus? x, DrawingBus? y) + { + if (x == null || x.EntityBus == null) + throw new ArgumentNullException(nameof(x)); + + if (y == null || y.EntityBus == null) + { + throw new ArgumentNullException(nameof(y)); + } + + if (x.EntityBus.BodyColor.Name != y.EntityBus.BodyColor.Name) + { + return x.EntityBus.BodyColor.Name.CompareTo(y.EntityBus.BodyColor.Name); + } + + var speedCompare = x.EntityBus.Speed.CompareTo(y.EntityBus.Speed); + if (speedCompare != 0) + return speedCompare; + + return x.EntityBus.Weight.CompareTo(y.EntityBus.Weight); + } + } +} diff --git a/Trolleybus/Trolleybus/BusCompareByType.cs b/Trolleybus/Trolleybus/BusCompareByType.cs new file mode 100644 index 0000000..e2a5083 --- /dev/null +++ b/Trolleybus/Trolleybus/BusCompareByType.cs @@ -0,0 +1,36 @@ +using ProjectTrolleybus.DrawingObjects; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectTrolleybus.Generics +{ + internal class BusCompareByType : IComparer + { + public int Compare(DrawingBus? x, DrawingBus? y) + { + if (x == null || x.EntityBus == null) + { + throw new ArgumentNullException(nameof(x)); + } + if (y == null || y.EntityBus == null) + { + throw new ArgumentNullException(nameof(y)); + } + if (x.GetType().Name != y.GetType().Name) + { + return x.GetType().Name.CompareTo(y.GetType().Name); + } + var speedCompare = + x.EntityBus.Speed.CompareTo(y.EntityBus.Speed); + if (speedCompare != 0) + { + return speedCompare; + } + return x.EntityBus.Weight.CompareTo(y.EntityBus.Weight); + } + + } +} diff --git a/Trolleybus/Trolleybus/BusesCollectionInfo.cs b/Trolleybus/Trolleybus/BusesCollectionInfo.cs new file mode 100644 index 0000000..a5b7eb3 --- /dev/null +++ b/Trolleybus/Trolleybus/BusesCollectionInfo.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectTrolleybus.Generics +{ + internal class BusesCollectionInfo : IEquatable + { + public string Name { get; private set; } + public string Description { get; private set; } + public BusesCollectionInfo(string name, string description) + { + Name = name; + Description = description; + } + public bool Equals(BusesCollectionInfo? other) + { + if (other == null) + return false; + return Name == other.Name; + throw new NotImplementedException(); + } + public override int GetHashCode() + { + return this.Name.GetHashCode(); + } + } +} diff --git a/Trolleybus/Trolleybus/BusesGenericCollection.cs b/Trolleybus/Trolleybus/BusesGenericCollection.cs index 9d1db1f..6f6f367 100644 --- a/Trolleybus/Trolleybus/BusesGenericCollection.cs +++ b/Trolleybus/Trolleybus/BusesGenericCollection.cs @@ -55,7 +55,7 @@ namespace ProjectTrolleybus.Generics { if (obj == null || collect == null) return false; - collect?._collection.Insert(obj); + collect?._collection.Insert(obj, new DrawingBusEqutables()); return true; } /// @@ -130,5 +130,7 @@ namespace ProjectTrolleybus.Generics } } public IEnumerable GetBuses => _collection.GetBuses(); + public void Sort(IComparer comparer) => _collection.SortSet(comparer); + } } \ No newline at end of file diff --git a/Trolleybus/Trolleybus/BusesGenericStorage.cs b/Trolleybus/Trolleybus/BusesGenericStorage.cs index e690b59..889eec2 100644 --- a/Trolleybus/Trolleybus/BusesGenericStorage.cs +++ b/Trolleybus/Trolleybus/BusesGenericStorage.cs @@ -13,12 +13,12 @@ namespace ProjectTrolleybus.Generics /// /// Словарь (хранилище) /// - readonly Dictionary> _busStorages; /// /// Возвращение списка названий наборов /// - public List Keys => _busStorages.Keys.ToList(); + public List Keys => _busStorages.Keys.ToList(); /// /// Ширина окна отрисовки /// @@ -46,7 +46,7 @@ namespace ProjectTrolleybus.Generics /// public BusesGenericStorage(int pictureWidth, int pictureHeight) { - _busStorages = new Dictionary>(); + _busStorages = new Dictionary>(); _pictureWidth = pictureWidth; _pictureHeight = pictureHeight; } @@ -56,7 +56,7 @@ namespace ProjectTrolleybus.Generics /// Название набора public void AddSet(string name) { - _busStorages.Add(name, new BusesGenericCollection(_pictureWidth, _pictureHeight)); } /// @@ -65,9 +65,9 @@ namespace ProjectTrolleybus.Generics /// Название набора public void DelSet(string name) { - if (!_busStorages.ContainsKey(name)) + if (!_busStorages.ContainsKey(new BusesCollectionInfo(name, string.Empty))) return; - _busStorages.Remove(name); + _busStorages.Remove(new BusesCollectionInfo(name, string.Empty)); } /// /// Доступ к набору @@ -78,8 +78,9 @@ namespace ProjectTrolleybus.Generics { get { - if (_busStorages.ContainsKey(ind)) - return _busStorages[ind]; + BusesCollectionInfo indObj = new BusesCollectionInfo(ind, string.Empty); + if (_busStorages.ContainsKey(indObj)) + return _busStorages[indObj]; return null; } } @@ -95,7 +96,7 @@ namespace ProjectTrolleybus.Generics File.Delete(filename); } StringBuilder data = new(); - foreach (KeyValuePair> record in _busStorages) { StringBuilder records = new(); @@ -103,7 +104,7 @@ namespace ProjectTrolleybus.Generics { records.Append($"{elem?.GetDataForSave(_separatorForObject)}{_separatorRecords}"); } - data.AppendLine($"{record.Key}{_separatorForKeyValue}{records}"); + data.AppendLine($"{record.Key.Name}{_separatorForKeyValue}{records}"); } if (data.Length == 0) { @@ -161,7 +162,7 @@ namespace ProjectTrolleybus.Generics } } } - _busStorages.Add(record[0], collection); + _busStorages.Add(new BusesCollectionInfo(record[0], string.Empty), collection); str = streamReader.ReadLine(); } while (str != null); } diff --git a/Trolleybus/Trolleybus/DrawingBusEqutables.cs b/Trolleybus/Trolleybus/DrawingBusEqutables.cs new file mode 100644 index 0000000..68c042c --- /dev/null +++ b/Trolleybus/Trolleybus/DrawingBusEqutables.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ProjectTrolleybus.DrawingObjects; +using ProjectTrolleybus.Entities; +using System.Diagnostics.CodeAnalysis; + + +namespace ProjectTrolleybus +{ + internal class DrawingBusEqutables : IEqualityComparer + { + public bool Equals(DrawingBus? x, DrawingBus? y) + { + if (x == null || x.EntityBus == null) + { + throw new ArgumentNullException(nameof(x)); + } + if (y == null || y.EntityBus == null) + { + throw new ArgumentNullException(nameof(y)); + } + if (x.GetType().Name != y.GetType().Name) + { + return false; + } + if (x.EntityBus.Speed != y.EntityBus.Speed) + { + return false; + } + if (x.EntityBus.Weight != y.EntityBus.Weight) + { + return false; + } + if (x.EntityBus.BodyColor != y.EntityBus.BodyColor) + { + return false; + } + if (x is DrawingTrolleybus && y is DrawingTrolleybus) + { + EntityTrolleybus EntityX = (EntityTrolleybus)x.EntityBus; + EntityTrolleybus EntityY = (EntityTrolleybus)y.EntityBus; + if (EntityX.Roga != EntityY.Roga) + return false; + if (EntityX.Battery != EntityY.Battery) + return false; + if (EntityX.AdditionalColor != EntityY.AdditionalColor) + return false; + } + return true; + } + + public int GetHashCode([DisallowNull] DrawingBus? obj) + { + return obj.GetHashCode(); + } + } +} diff --git a/Trolleybus/Trolleybus/FormBusCollection.Designer.cs b/Trolleybus/Trolleybus/FormBusCollection.Designer.cs index a18e5ce..db8c489 100644 --- a/Trolleybus/Trolleybus/FormBusCollection.Designer.cs +++ b/Trolleybus/Trolleybus/FormBusCollection.Designer.cs @@ -29,6 +29,8 @@ private void InitializeComponent() { groupBoxTrolleybus = new GroupBox(); + ButtonSortByColor = new Button(); + ButtonSortByType = new Button(); groupBoxSets = new GroupBox(); textBoxStorageName = new TextBox(); buttonDelObject = new Button(); @@ -53,6 +55,8 @@ // // groupBoxTrolleybus // + groupBoxTrolleybus.Controls.Add(ButtonSortByColor); + groupBoxTrolleybus.Controls.Add(ButtonSortByType); groupBoxTrolleybus.Controls.Add(groupBoxSets); groupBoxTrolleybus.Controls.Add(buttonUpdateCollection); groupBoxTrolleybus.Controls.Add(buttonDeleteBus); @@ -67,6 +71,26 @@ groupBoxTrolleybus.TabStop = false; groupBoxTrolleybus.Text = "Инструменты"; // + // ButtonSortByColor + // + ButtonSortByColor.Location = new Point(11, 361); + ButtonSortByColor.Name = "ButtonSortByColor"; + ButtonSortByColor.Size = new Size(273, 33); + ButtonSortByColor.TabIndex = 6; + ButtonSortByColor.Text = "Сортировка по цвету"; + ButtonSortByColor.UseVisualStyleBackColor = true; + ButtonSortByColor.Click += ButtonSortByColor_Click; + // + // ButtonSortByType + // + ButtonSortByType.Location = new Point(11, 320); + ButtonSortByType.Name = "ButtonSortByType"; + ButtonSortByType.Size = new Size(275, 35); + ButtonSortByType.TabIndex = 5; + ButtonSortByType.Text = "Сортировка по типу"; + ButtonSortByType.UseVisualStyleBackColor = true; + ButtonSortByType.Click += ButtonSortByType_Click; + // // groupBoxSets // groupBoxSets.Anchor = AnchorStyles.Top | AnchorStyles.Right; @@ -78,14 +102,14 @@ groupBoxSets.Margin = new Padding(3, 4, 3, 4); groupBoxSets.Name = "groupBoxSets"; groupBoxSets.Padding = new Padding(3, 4, 3, 4); - groupBoxSets.Size = new Size(280, 312); + groupBoxSets.Size = new Size(280, 286); groupBoxSets.TabIndex = 4; groupBoxSets.TabStop = false; groupBoxSets.Text = "Наборы"; // // textBoxStorageName // - textBoxStorageName.Location = new Point(7, 29); + textBoxStorageName.Location = new Point(7, 28); textBoxStorageName.Margin = new Padding(3, 4, 3, 4); textBoxStorageName.Name = "textBoxStorageName"; textBoxStorageName.Size = new Size(266, 27); @@ -93,7 +117,7 @@ // // buttonDelObject // - buttonDelObject.Location = new Point(7, 259); + buttonDelObject.Location = new Point(7, 238); buttonDelObject.Margin = new Padding(3, 4, 3, 4); buttonDelObject.Name = "buttonDelObject"; buttonDelObject.Size = new Size(266, 40); @@ -106,7 +130,7 @@ // listBoxStorages.FormattingEnabled = true; listBoxStorages.ItemHeight = 20; - listBoxStorages.Location = new Point(7, 125); + listBoxStorages.Location = new Point(8, 106); listBoxStorages.Margin = new Padding(3, 4, 3, 4); listBoxStorages.Name = "listBoxStorages"; listBoxStorages.Size = new Size(266, 124); @@ -116,7 +140,7 @@ // buttonAddObject // buttonAddObject.Anchor = AnchorStyles.Top | AnchorStyles.Right; - buttonAddObject.Location = new Point(7, 83); + buttonAddObject.Location = new Point(8, 63); buttonAddObject.Margin = new Padding(3, 4, 3, 4); buttonAddObject.Name = "buttonAddObject"; buttonAddObject.Size = new Size(266, 35); @@ -127,7 +151,7 @@ // // buttonUpdateCollection // - buttonUpdateCollection.Location = new Point(11, 499); + buttonUpdateCollection.Location = new Point(11, 523); buttonUpdateCollection.Margin = new Padding(3, 4, 3, 4); buttonUpdateCollection.Name = "buttonUpdateCollection"; buttonUpdateCollection.Size = new Size(275, 37); @@ -138,7 +162,7 @@ // // buttonDeleteBus // - buttonDeleteBus.Location = new Point(11, 439); + buttonDeleteBus.Location = new Point(11, 476); buttonDeleteBus.Margin = new Padding(3, 4, 3, 4); buttonDeleteBus.Name = "buttonDeleteBus"; buttonDeleteBus.Size = new Size(275, 39); @@ -149,7 +173,7 @@ // // maskedTextBoxNumber // - maskedTextBoxNumber.Location = new Point(74, 404); + maskedTextBoxNumber.Location = new Point(73, 446); maskedTextBoxNumber.Margin = new Padding(3, 4, 3, 4); maskedTextBoxNumber.Name = "maskedTextBoxNumber"; maskedTextBoxNumber.Size = new Size(131, 27); @@ -158,7 +182,7 @@ // buttonAddBus // buttonAddBus.Anchor = AnchorStyles.Top | AnchorStyles.Right; - buttonAddBus.Location = new Point(11, 348); + buttonAddBus.Location = new Point(11, 401); buttonAddBus.Margin = new Padding(3, 4, 3, 4); buttonAddBus.Name = "buttonAddBus"; buttonAddBus.Size = new Size(275, 37); @@ -261,5 +285,7 @@ private ToolStripMenuItem LoadToolStripMenuItem; private OpenFileDialog openFileDialog; private SaveFileDialog saveFileDialog; + private Button ButtonSortByColor; + private Button ButtonSortByType; } } \ No newline at end of file diff --git a/Trolleybus/Trolleybus/FormBusCollection.cs b/Trolleybus/Trolleybus/FormBusCollection.cs index 2f8ae47..9955009 100644 --- a/Trolleybus/Trolleybus/FormBusCollection.cs +++ b/Trolleybus/Trolleybus/FormBusCollection.cs @@ -32,7 +32,7 @@ namespace ProjectTrolleybus listBoxStorages.Items.Clear(); for (int i = 0; i < _storage.Keys.Count; i++) { - listBoxStorages.Items.Add(_storage.Keys[i]); + listBoxStorages.Items.Add(_storage.Keys[i].Name); } if (listBoxStorages.Items.Count > 0 && (index == -1 || index >= listBoxStorages.Items.Count)) @@ -97,10 +97,10 @@ namespace ProjectTrolleybus pictureBoxCollection.Image = obj.ShowBuses(); Log.Information($"Добавлен объект в коллекцию {listBoxStorages.SelectedItem.ToString() ?? string.Empty}"); } - catch (StorageOverflowException ex) + catch (ArgumentException) { - Log.Warning($"Коллекция {listBoxStorages.SelectedItem.ToString() ?? string.Empty} переполнена"); - MessageBox.Show(ex.Message); + Log.Warning($"Добавляемый объект уже существует в коллекции {listBoxStorages.SelectedItem.ToString() ?? string.Empty}"); + MessageBox.Show("Добавляемый объект уже сущесвует в коллекции"); } }); form.AddEvent(busDelegate); @@ -194,5 +194,22 @@ namespace ProjectTrolleybus } } } + private void ButtonSortByType_Click(object sender, EventArgs e) => CompareBuses(new BusCompareByType()); + private void ButtonSortByColor_Click(object sender, EventArgs e) => CompareBuses(new BusCompareByColor()); + private void CompareBuses(IComparer comparer) + { + if (listBoxStorages.SelectedIndex == -1) + { + return; + } + var obj = _storage[listBoxStorages.SelectedItem.ToString() ?? + string.Empty]; + if (obj == null) + { + return; + } + obj.Sort(comparer); + pictureBoxCollection.Image = obj.ShowBuses(); + } } } diff --git a/Trolleybus/Trolleybus/SetGeneric.cs b/Trolleybus/Trolleybus/SetGeneric.cs index 29c2c3f..fd80d3c 100644 --- a/Trolleybus/Trolleybus/SetGeneric.cs +++ b/Trolleybus/Trolleybus/SetGeneric.cs @@ -21,21 +21,26 @@ namespace ProjectTrolleybus.Generics _maxCount = count; _places = new List(count); } - - public void Insert(T trolleybus) + public void SortSet(IComparer comparer) => _places.Sort(comparer); + public void Insert(T bus, IEqualityComparer? equal = null) { if (_places.Count == _maxCount) throw new StorageOverflowException(_maxCount); - Insert(trolleybus, 0); + Insert(bus, 0, equal); } - public void Insert(T trolleybus, int position) + public void Insert(T bus, int position, IEqualityComparer? equal = null) { if (_places.Count == _maxCount) throw new StorageOverflowException(_maxCount); if (!(position >= 0 && position <= Count)) throw new Exception("Неверная позиция для вставки"); - _places.Insert(position, trolleybus); + if (equal != null) + { + if (_places.Contains(bus, equal)) + throw new ArgumentException(nameof(bus)); + } + _places.Insert(position, bus); } public void Remove(int position) -- 2.25.1 From f629e43cea55cd6163ac2d23c3b67fbc1ca60732 Mon Sep 17 00:00:00 2001 From: Yunusov_Niyaz Date: Fri, 22 Dec 2023 09:25:23 +0400 Subject: [PATCH 2/3] =?UTF-8?q?Lab8=20=D0=BF=D0=BE=D1=87=D1=82=D0=B8=20?= =?UTF-8?q?=D0=BF=D1=83=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Trolleybus/Trolleybus/BusesGenericCollection.cs | 2 +- .../{DrawingBusEqutables.cs => DrawingBusEquality.cs} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename Trolleybus/Trolleybus/{DrawingBusEqutables.cs => DrawingBusEquality.cs} (96%) diff --git a/Trolleybus/Trolleybus/BusesGenericCollection.cs b/Trolleybus/Trolleybus/BusesGenericCollection.cs index 6f6f367..c28bb54 100644 --- a/Trolleybus/Trolleybus/BusesGenericCollection.cs +++ b/Trolleybus/Trolleybus/BusesGenericCollection.cs @@ -55,7 +55,7 @@ namespace ProjectTrolleybus.Generics { if (obj == null || collect == null) return false; - collect?._collection.Insert(obj, new DrawingBusEqutables()); + collect?._collection.Insert(obj, new DrawingBusEquality()); return true; } /// diff --git a/Trolleybus/Trolleybus/DrawingBusEqutables.cs b/Trolleybus/Trolleybus/DrawingBusEquality.cs similarity index 96% rename from Trolleybus/Trolleybus/DrawingBusEqutables.cs rename to Trolleybus/Trolleybus/DrawingBusEquality.cs index 68c042c..8085728 100644 --- a/Trolleybus/Trolleybus/DrawingBusEqutables.cs +++ b/Trolleybus/Trolleybus/DrawingBusEquality.cs @@ -10,7 +10,7 @@ using System.Diagnostics.CodeAnalysis; namespace ProjectTrolleybus { - internal class DrawingBusEqutables : IEqualityComparer + internal class DrawingBusEquality : IEqualityComparer { public bool Equals(DrawingBus? x, DrawingBus? y) { -- 2.25.1 From 405afb65a96d28226a264dfd460d27571efb056f Mon Sep 17 00:00:00 2001 From: Yunusov_Niyaz Date: Fri, 22 Dec 2023 18:35:02 +0400 Subject: [PATCH 3/3] Lab8 pull --- Trolleybus/Trolleybus/BusesCollectionInfo.cs | 7 ++- .../Trolleybus/BusesGenericCollection.cs | 2 +- ...gBusEquality.cs => DrawingBusEqutables.cs} | 3 +- .../Trolleybus/FormBusCollection.Designer.cs | 44 +++++++++---------- 4 files changed, 27 insertions(+), 29 deletions(-) rename Trolleybus/Trolleybus/{DrawingBusEquality.cs => DrawingBusEqutables.cs} (96%) diff --git a/Trolleybus/Trolleybus/BusesCollectionInfo.cs b/Trolleybus/Trolleybus/BusesCollectionInfo.cs index a5b7eb3..a8ddeee 100644 --- a/Trolleybus/Trolleybus/BusesCollectionInfo.cs +++ b/Trolleybus/Trolleybus/BusesCollectionInfo.cs @@ -17,10 +17,9 @@ namespace ProjectTrolleybus.Generics } public bool Equals(BusesCollectionInfo? other) { - if (other == null) - return false; - return Name == other.Name; - throw new NotImplementedException(); + if (Name == other?.Name) + return true; + return false; } public override int GetHashCode() { diff --git a/Trolleybus/Trolleybus/BusesGenericCollection.cs b/Trolleybus/Trolleybus/BusesGenericCollection.cs index c28bb54..6f6f367 100644 --- a/Trolleybus/Trolleybus/BusesGenericCollection.cs +++ b/Trolleybus/Trolleybus/BusesGenericCollection.cs @@ -55,7 +55,7 @@ namespace ProjectTrolleybus.Generics { if (obj == null || collect == null) return false; - collect?._collection.Insert(obj, new DrawingBusEquality()); + collect?._collection.Insert(obj, new DrawingBusEqutables()); return true; } /// diff --git a/Trolleybus/Trolleybus/DrawingBusEquality.cs b/Trolleybus/Trolleybus/DrawingBusEqutables.cs similarity index 96% rename from Trolleybus/Trolleybus/DrawingBusEquality.cs rename to Trolleybus/Trolleybus/DrawingBusEqutables.cs index 8085728..d256bba 100644 --- a/Trolleybus/Trolleybus/DrawingBusEquality.cs +++ b/Trolleybus/Trolleybus/DrawingBusEqutables.cs @@ -7,10 +7,9 @@ using ProjectTrolleybus.DrawingObjects; using ProjectTrolleybus.Entities; using System.Diagnostics.CodeAnalysis; - namespace ProjectTrolleybus { - internal class DrawingBusEquality : IEqualityComparer + internal class DrawingBusEqutables : IEqualityComparer { public bool Equals(DrawingBus? x, DrawingBus? y) { diff --git a/Trolleybus/Trolleybus/FormBusCollection.Designer.cs b/Trolleybus/Trolleybus/FormBusCollection.Designer.cs index db8c489..695fbb0 100644 --- a/Trolleybus/Trolleybus/FormBusCollection.Designer.cs +++ b/Trolleybus/Trolleybus/FormBusCollection.Designer.cs @@ -29,8 +29,8 @@ private void InitializeComponent() { groupBoxTrolleybus = new GroupBox(); - ButtonSortByColor = new Button(); - ButtonSortByType = new Button(); + buttonSortByColor = new Button(); + buttonSortByType = new Button(); groupBoxSets = new GroupBox(); textBoxStorageName = new TextBox(); buttonDelObject = new Button(); @@ -55,8 +55,8 @@ // // groupBoxTrolleybus // - groupBoxTrolleybus.Controls.Add(ButtonSortByColor); - groupBoxTrolleybus.Controls.Add(ButtonSortByType); + groupBoxTrolleybus.Controls.Add(buttonSortByColor); + groupBoxTrolleybus.Controls.Add(buttonSortByType); groupBoxTrolleybus.Controls.Add(groupBoxSets); groupBoxTrolleybus.Controls.Add(buttonUpdateCollection); groupBoxTrolleybus.Controls.Add(buttonDeleteBus); @@ -71,25 +71,25 @@ groupBoxTrolleybus.TabStop = false; groupBoxTrolleybus.Text = "Инструменты"; // - // ButtonSortByColor + // buttonSortByColor // - ButtonSortByColor.Location = new Point(11, 361); - ButtonSortByColor.Name = "ButtonSortByColor"; - ButtonSortByColor.Size = new Size(273, 33); - ButtonSortByColor.TabIndex = 6; - ButtonSortByColor.Text = "Сортировка по цвету"; - ButtonSortByColor.UseVisualStyleBackColor = true; - ButtonSortByColor.Click += ButtonSortByColor_Click; + buttonSortByColor.Location = new Point(11, 361); + buttonSortByColor.Name = "buttonSortByColor"; + buttonSortByColor.Size = new Size(273, 33); + buttonSortByColor.TabIndex = 6; + buttonSortByColor.Text = "Сортировка по цвету"; + buttonSortByColor.UseVisualStyleBackColor = true; + buttonSortByColor.Click += ButtonSortByColor_Click; // - // ButtonSortByType + // buttonSortByType // - ButtonSortByType.Location = new Point(11, 320); - ButtonSortByType.Name = "ButtonSortByType"; - ButtonSortByType.Size = new Size(275, 35); - ButtonSortByType.TabIndex = 5; - ButtonSortByType.Text = "Сортировка по типу"; - ButtonSortByType.UseVisualStyleBackColor = true; - ButtonSortByType.Click += ButtonSortByType_Click; + buttonSortByType.Location = new Point(11, 320); + buttonSortByType.Name = "buttonSortByType"; + buttonSortByType.Size = new Size(275, 35); + buttonSortByType.TabIndex = 5; + buttonSortByType.Text = "Сортировка по типу"; + buttonSortByType.UseVisualStyleBackColor = true; + buttonSortByType.Click += ButtonSortByType_Click; // // groupBoxSets // @@ -285,7 +285,7 @@ private ToolStripMenuItem LoadToolStripMenuItem; private OpenFileDialog openFileDialog; private SaveFileDialog saveFileDialog; - private Button ButtonSortByColor; - private Button ButtonSortByType; + private Button buttonSortByColor; + private Button buttonSortByType; } } \ No newline at end of file -- 2.25.1