diff --git a/Catamaran/FormMapWithSetBoats.cs b/Catamaran/FormMapWithSetBoats.cs index 5962ca7..bdf8cfb 100644 --- a/Catamaran/FormMapWithSetBoats.cs +++ b/Catamaran/FormMapWithSetBoats.cs @@ -343,6 +343,12 @@ namespace Catamaran private void ButtonSortByColor_Click(object sender, EventArgs e) { // TODO прописать логику + if (listBoxMaps.SelectedIndex == -1) + { + return; + } + _mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty].Sort(new BoatCompareByColor()); + pictureBox.Image = _mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty].ShowSet(); } } } diff --git a/Catamaran/SetBoatsGeneric.cs b/Catamaran/SetBoatsGeneric.cs index 00ed9a9..500620d 100644 --- a/Catamaran/SetBoatsGeneric.cs +++ b/Catamaran/SetBoatsGeneric.cs @@ -156,6 +156,6 @@ namespace Catamaran return; } _places.Sort(comparer); - }чч + } } }