логикa ButtonSortByColor_Click

This commit is contained in:
VictoriaPresnyakova 2022-12-04 18:17:59 +04:00
parent 9619d8ea89
commit 932cb15b7f
2 changed files with 7 additions and 1 deletions

View File

@ -343,6 +343,12 @@ namespace Catamaran
private void ButtonSortByColor_Click(object sender, EventArgs e) private void ButtonSortByColor_Click(object sender, EventArgs e)
{ {
// TODO прописать логику // TODO прописать логику
if (listBoxMaps.SelectedIndex == -1)
{
return;
}
_mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty].Sort(new BoatCompareByColor());
pictureBox.Image = _mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty].ShowSet();
} }
} }
} }

View File

@ -156,6 +156,6 @@ namespace Catamaran
return; return;
} }
_places.Sort(comparer); _places.Sort(comparer);
}чч }
} }
} }