From f000dd4b4065790cb3c7ce428f099de8349b00ef Mon Sep 17 00:00:00 2001 From: Anya Date: Mon, 17 Jun 2024 01:24:22 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BB=D0=B0=D0=B1=207=20=D0=B3=D0=BE=D1=82?= =?UTF-8?q?=D0=BE=D0=B2=D0=B0=D1=8F=20=D0=BF=D0=BE=D0=BB=D0=BD=D0=BE=D1=81?= =?UTF-8?q?=D1=82=D1=8C=D1=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lab_0/FormSimpleBusCollection.cs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/lab_0/FormSimpleBusCollection.cs b/lab_0/FormSimpleBusCollection.cs index f782e15..d3fd8a5 100644 --- a/lab_0/FormSimpleBusCollection.cs +++ b/lab_0/FormSimpleBusCollection.cs @@ -39,7 +39,7 @@ public partial class FormSimpleBusCollection : Form { switch (comboBoxSelectorCompany.Text) { - case "Хранилище": + case "хранилище": _company = new BusStation(pictureBox.Width, pictureBox.Height, new MassiveGenericObjects()); break; @@ -169,15 +169,12 @@ public partial class FormSimpleBusCollection : Form /// private void ButtonRefresh_Click(object sender, EventArgs e) { - listBoxCollection.Items.Clear(); - for (int i = 0; i < _storageCollection.Keys?.Count; ++i) + if (_company == null) { - string? colName = _storageCollection.Keys?[i]; - if (!string.IsNullOrEmpty(colName)) - { - listBoxCollection.Items.Add(colName); - } + return; } + + pictureBox.Image = _company.Show(); } /// @@ -320,7 +317,7 @@ public partial class FormSimpleBusCollection : Form switch (comboBoxSelectorCompany.Text) { - case "Хранилище": + case "хранилище": _company = new BusStation(pictureBox.Width, pictureBox.Height, collection); _logger.LogInformation("Компания создана"); break;