diff --git a/Cruiser/Cruiser/CruiserCollectionInfo.cs b/Cruiser/Cruiser/CruiserCollectionInfo.cs index 6e73f15..358556c 100644 --- a/Cruiser/Cruiser/CruiserCollectionInfo.cs +++ b/Cruiser/Cruiser/CruiserCollectionInfo.cs @@ -21,4 +21,4 @@ namespace Cruiser return this.Name.GetHashCode(); } } -} +} \ No newline at end of file diff --git a/Cruiser/Cruiser/CruiserCompareByColor.cs b/Cruiser/Cruiser/CruiserCompareByColor.cs index dca7265..3ff6f8c 100644 --- a/Cruiser/Cruiser/CruiserCompareByColor.cs +++ b/Cruiser/Cruiser/CruiserCompareByColor.cs @@ -26,7 +26,6 @@ namespace Cruiser.Generics var speedCompare = x.EntityCruiser.Speed.CompareTo(y.EntityCruiser.Speed); if (speedCompare != 0) return speedCompare; - return x.EntityCruiser.Weight.CompareTo(y.EntityCruiser.Weight); } } diff --git a/Cruiser/Cruiser/CruiserCompareByType.cs b/Cruiser/Cruiser/CruiserCompareByType.cs index ead86d1..e4a3731 100644 --- a/Cruiser/Cruiser/CruiserCompareByType.cs +++ b/Cruiser/Cruiser/CruiserCompareByType.cs @@ -22,7 +22,6 @@ namespace Cruiser.Generics var speedCompare = x.EntityCruiser.Speed.CompareTo(y.EntityCruiser.Speed); if (speedCompare != 0) return speedCompare; - return x.EntityCruiser.Weight.CompareTo(y.EntityCruiser.Weight); } } diff --git a/Cruiser/Cruiser/DrawingCruiserEqutables .cs b/Cruiser/Cruiser/DrawningCruiserEqutables .cs similarity index 99% rename from Cruiser/Cruiser/DrawingCruiserEqutables .cs rename to Cruiser/Cruiser/DrawningCruiserEqutables .cs index 9ee3f0e..2432c14 100644 --- a/Cruiser/Cruiser/DrawingCruiserEqutables .cs +++ b/Cruiser/Cruiser/DrawningCruiserEqutables .cs @@ -50,7 +50,6 @@ namespace Cruiser } return true; } - public int GetHashCode([DisallowNull] DrawningCruiser? obj) { return obj.GetHashCode(); diff --git a/Cruiser/Cruiser/FormCruiserCollection.cs b/Cruiser/Cruiser/FormCruiserCollection.cs index 75386f1..bca253a 100644 --- a/Cruiser/Cruiser/FormCruiserCollection.cs +++ b/Cruiser/Cruiser/FormCruiserCollection.cs @@ -203,11 +203,11 @@ namespace Cruiser } } } - private void ButtonSortByType_Click(object sender, EventArgs e) => ComparePlanes(new CruiserCompareByType()); + private void ButtonSortByType_Click(object sender, EventArgs e) => CompareCruiser(new CruiserCompareByType()); - private void ButtonSortByColor_Click(object sender, EventArgs e) => ComparePlanes(new CruiserCompareByColor()); + private void ButtonSortByColor_Click(object sender, EventArgs e) => CompareCruiser(new CruiserCompareByColor()); - private void ComparePlanes(IComparer comparer) + private void CompareCruiser(IComparer comparer) { if (listBoxStorages.SelectedIndex == -1) { @@ -223,4 +223,4 @@ namespace Cruiser pictureBoxCruiser.Image = obj.ShowCruisers(); } } -} +} \ No newline at end of file diff --git a/Cruiser/Cruiser/SetGeneric.cs b/Cruiser/Cruiser/SetGeneric.cs index b7cf03b..ac2185c 100644 --- a/Cruiser/Cruiser/SetGeneric.cs +++ b/Cruiser/Cruiser/SetGeneric.cs @@ -29,7 +29,6 @@ namespace Cruiser.Generics throw new StorageOverflowException(_maxCount); Insert(cruiser, 0, equal); } - public void Insert(T cruiser, int position, IEqualityComparer? equal = null) { if (_places.Count == _maxCount)