From 740b975dc77801d10c9cd1448a2b296402fabc6a Mon Sep 17 00:00:00 2001 From: ksenianeva <95441235+ksenianeva@users.noreply.github.com> Date: Tue, 15 Nov 2022 12:55:13 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=B4=D0=BE=D0=BF.=20=D0=B7=D0=B0=D0=B4=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F=204=20=D0=BB=D0=B0=D0=B1=D0=BE=D1=80=D0=B0=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=BD=D0=BE=D0=B9.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ContainerShip/ContainerShip/FormMapWithSetShips.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ContainerShip/ContainerShip/FormMapWithSetShips.cs b/ContainerShip/ContainerShip/FormMapWithSetShips.cs index 52785df..42c141b 100644 --- a/ContainerShip/ContainerShip/FormMapWithSetShips.cs +++ b/ContainerShip/ContainerShip/FormMapWithSetShips.cs @@ -46,9 +46,9 @@ namespace ContainerShip int index = listBoxMaps.SelectedIndex; listBoxMaps.Items.Clear(); - foreach (string key in _mapsCollection.Keys) + for (int i = 0; i < _mapsCollection.Keys.Count; i++) { - listBoxMaps.Items.Add(key); + listBoxMaps.Items.Add(_mapsCollection.Keys[i]); } if (listBoxMaps.Items.Count > 0 && (index == -1 || index >= listBoxMaps.Items.Count))