Done
This commit is contained in:
parent
0f3e9f9a46
commit
72dcd86427
@ -21,4 +21,4 @@ namespace Cruiser
|
||||
return this.Name.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -50,7 +50,6 @@ namespace Cruiser
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public int GetHashCode([DisallowNull] DrawningCruiser? obj)
|
||||
{
|
||||
return obj.GetHashCode();
|
@ -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<DrawningCruiser?> comparer)
|
||||
private void CompareCruiser(IComparer<DrawningCruiser?> comparer)
|
||||
{
|
||||
if (listBoxStorages.SelectedIndex == -1)
|
||||
{
|
||||
@ -223,4 +223,4 @@ namespace Cruiser
|
||||
pictureBoxCruiser.Image = obj.ShowCruisers();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -29,7 +29,6 @@ namespace Cruiser.Generics
|
||||
throw new StorageOverflowException(_maxCount);
|
||||
Insert(cruiser, 0, equal);
|
||||
}
|
||||
|
||||
public void Insert(T cruiser, int position, IEqualityComparer<T>? equal = null)
|
||||
{
|
||||
if (_places.Count == _maxCount)
|
||||
|
Loading…
Reference in New Issue
Block a user