Третья лабораторная работа

This commit is contained in:
10Г Егор Романов 2022-10-10 19:53:02 +03:00
parent acb396e653
commit 08123fb4d5
2 changed files with 7 additions and 6 deletions

View File

@ -49,14 +49,14 @@ namespace HoistingCrane
{
return;
}
var formHoistingCraneConfig = new FormHoistingCraneConfig();
formHoistingCraneConfig.AddEvent(AddHoistingCrane);
formHoistingCraneConfig.Show();
}
private void AddHoistingCrane(DrawingHoistingCrane drawingHoistingCrane)
FormHoistingCrane form = new();
if (form.ShowDialog() == DialogResult.OK)
{
DrawingObjectHoistingCrane hoistingCrane = new(form.SelectedHoistingCrane);
if (_mapHoistingCraneCollectionGeneric + hoistingCrane == 1)
{
MessageBox.Show("Объект добавлен");
pictureBox.Image = _mapHoistingCraneCollectionGeneric.ShowSet();
}
else
{

View File

@ -42,7 +42,7 @@ namespace HoistingCrane
Bitmap bmp = new(_pictureWidth, _pictureWidth);
Graphics gr = Graphics.FromImage(bmp);
DrawBackground(gr);
DrawHoistingCranes(gr);
DrawBulldozers(gr);
return bmp;
}
@ -107,6 +107,7 @@ namespace HoistingCrane
}
}
private void DrawBulldozers(Graphics gr)
{
int heightEl = _pictureHeight / _placeSizeHeight;
int widthEl = _pictureWidth / _placeSizeWidth;