From acb396e653f958142a066e68c19fe08b347a63d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?10=D0=93=20=D0=95=D0=B3=D0=BE=D1=80=20=D0=A0=D0=BE=D0=BC?= =?UTF-8?q?=D0=B0=D0=BD=D0=BE=D0=B2?= Date: Mon, 10 Oct 2022 19:53:02 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A2=D1=80=D0=B5=D1=82=D1=8C=D1=8F=20=D0=BB?= =?UTF-8?q?=D0=B0=D0=B1=D0=BE=D1=80=D0=B0=D1=82=D0=BE=D1=80=D0=BD=D0=B0?= =?UTF-8?q?=D1=8F=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FormMapWithSetHoistingCrane.cs | 19 +++++++++---------- .../MapWithSetHoistingCraneGeneric.cs | 1 - 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/HoistingCrane/HoistingCrane/FormMapWithSetHoistingCrane.cs b/HoistingCrane/HoistingCrane/FormMapWithSetHoistingCrane.cs index 9f485cf..1f0d713 100644 --- a/HoistingCrane/HoistingCrane/FormMapWithSetHoistingCrane.cs +++ b/HoistingCrane/HoistingCrane/FormMapWithSetHoistingCrane.cs @@ -30,7 +30,7 @@ namespace HoistingCrane break; case "Вторая карта": map = new SecondMap(); - break; + break; } if (map != null) { @@ -54,18 +54,17 @@ namespace HoistingCrane formHoistingCraneConfig.Show(); } private void AddHoistingCrane(DrawingHoistingCrane drawingHoistingCrane) - { - DrawingObjectHoistingCrane hoistingCrane = new DrawingObjectHoistingCrane(drawingHoistingCrane); - if (_mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty] + hoistingCrane != -1) { - MessageBox.Show("Объект добавлен"); - pictureBox.Image = _mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty].ShowSet(); - } - else - { - MessageBox.Show("Не удалось добавить объект"); + { + MessageBox.Show("Объект добавлен"); + } + else + { + MessageBox.Show("Не удалось добавить объект"); + } } } + private void ButtonRemoveHoistingCrane_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(maskedTextBoxPosition.Text)) diff --git a/HoistingCrane/HoistingCrane/MapWithSetHoistingCraneGeneric.cs b/HoistingCrane/HoistingCrane/MapWithSetHoistingCraneGeneric.cs index efa7298..6704aac 100644 --- a/HoistingCrane/HoistingCrane/MapWithSetHoistingCraneGeneric.cs +++ b/HoistingCrane/HoistingCrane/MapWithSetHoistingCraneGeneric.cs @@ -107,7 +107,6 @@ namespace HoistingCrane } } - private void DrawHoistingCranes(Graphics gr) { int heightEl = _pictureHeight / _placeSizeHeight; int widthEl = _pictureWidth / _placeSizeWidth;