Третья лабораторная работа
This commit is contained in:
parent
acb396e653
commit
08123fb4d5
@ -49,14 +49,14 @@ namespace HoistingCrane
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var formHoistingCraneConfig = new FormHoistingCraneConfig();
|
FormHoistingCrane form = new();
|
||||||
formHoistingCraneConfig.AddEvent(AddHoistingCrane);
|
if (form.ShowDialog() == DialogResult.OK)
|
||||||
formHoistingCraneConfig.Show();
|
|
||||||
}
|
|
||||||
private void AddHoistingCrane(DrawingHoistingCrane drawingHoistingCrane)
|
|
||||||
{
|
{
|
||||||
|
DrawingObjectHoistingCrane hoistingCrane = new(form.SelectedHoistingCrane);
|
||||||
|
if (_mapHoistingCraneCollectionGeneric + hoistingCrane == 1)
|
||||||
{
|
{
|
||||||
MessageBox.Show("Объект добавлен");
|
MessageBox.Show("Объект добавлен");
|
||||||
|
pictureBox.Image = _mapHoistingCraneCollectionGeneric.ShowSet();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -42,7 +42,7 @@ namespace HoistingCrane
|
|||||||
Bitmap bmp = new(_pictureWidth, _pictureWidth);
|
Bitmap bmp = new(_pictureWidth, _pictureWidth);
|
||||||
Graphics gr = Graphics.FromImage(bmp);
|
Graphics gr = Graphics.FromImage(bmp);
|
||||||
DrawBackground(gr);
|
DrawBackground(gr);
|
||||||
DrawHoistingCranes(gr);
|
DrawBulldozers(gr);
|
||||||
return bmp;
|
return bmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,6 +107,7 @@ namespace HoistingCrane
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void DrawBulldozers(Graphics gr)
|
||||||
{
|
{
|
||||||
int heightEl = _pictureHeight / _placeSizeHeight;
|
int heightEl = _pictureHeight / _placeSizeHeight;
|
||||||
int widthEl = _pictureWidth / _placeSizeWidth;
|
int widthEl = _pictureWidth / _placeSizeWidth;
|
||||||
|
Loading…
Reference in New Issue
Block a user