Исправлена сортировка

This commit is contained in:
Данияр Аглиуллов 2022-10-31 07:29:26 +04:00
parent 88ccde9c4d
commit 087813f8fb
3 changed files with 5 additions and 5 deletions

View File

@ -18,9 +18,9 @@
{
return -1;
}
if (xAirplane.GetType().Name != yAirplane.Airplane.GetType().Name)
if (xAirplane.Airplane.GetType().Name != yAirplane.Airplane.GetType().Name)
{
if (xAirplane.Airplane.GetType().Name == "DrawningAirplane")
if (xAirplane.Airplane.GetType() == typeof(DrawningAirplane))
{
return -1;
}

View File

@ -298,7 +298,7 @@
this.buttonSortByColor.TabIndex = 11;
this.buttonSortByColor.Text = "Отсортировать по цвету";
this.buttonSortByColor.UseVisualStyleBackColor = true;
this.buttonSortByColor.Click += new System.EventHandler(this.ButtonSortByType_Click);
this.buttonSortByColor.Click += new System.EventHandler(this.ButtonSortByColor_Click);
//
// buttonSortByType
//
@ -308,7 +308,7 @@
this.buttonSortByType.TabIndex = 12;
this.buttonSortByType.Text = "Отсортировать по типу";
this.buttonSortByType.UseVisualStyleBackColor = true;
this.buttonSortByType.Click += new System.EventHandler(this.ButtonSortByColor_Click);
this.buttonSortByType.Click += new System.EventHandler(this.ButtonSortByType_Click);
//
// FormMapWithSetAirplanes
//

View File

@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace AirBomber
{
internal class MapWithSetAirplanesGeneric<T, U>
where T : class, IDrawningObject
where T : class, IEquatable<T>, IDrawningObject
where U : AbstractMap
{
/// <summary>