Готовая 5 лаба

This commit is contained in:
Камилия Сафиулова 2023-11-22 10:19:45 +04:00
parent 814b0b8252
commit 737d77ac68
3 changed files with 8 additions and 5 deletions

View File

@ -146,6 +146,8 @@ namespace Catamaran.Generics
}
if (catamaran != null)
{
catamaran._pictureWidth = _pictureWidth;
catamaran._pictureHeight = _pictureHeight;
catamaran.SetPosition(i % width * _placeSizeWidth + _placeSizeWidth / 40,
(height - diff) * _placeSizeHeight + _placeSizeHeight / 15);
catamaran.DrawTransport(g);

View File

@ -20,11 +20,11 @@ namespace Catamaran.DrawningObjects
/// <summary>
/// Ширина окна
/// </summary>
private int _pictureWidth;
public int _pictureWidth;
/// <summary>
/// Высота окна
/// </summary>
private int _pictureHeight;
public int _pictureHeight;
/// <summary>
/// Левая координата прорисовки катамарана
/// </summary>

View File

@ -118,7 +118,7 @@ namespace Catamaran
case "labelModifiedObject":
_catamaran = new DrawningSailCatamaran((int)numericUpDownSpeed.Value,
(int)numericUpDownWeight.Value, Color.White, Color.Black, checkBoxSail.Checked,
checkBoxFloatDetails.Checked, pictureBoxObject.Width,
checkBoxFloatDetails.Checked, pictureBoxObject.Width,
pictureBoxObject.Height);
break;
}
@ -164,6 +164,7 @@ namespace Catamaran
EventAddCatamaran?.Invoke(_catamaran);
Close();
}
};
};
}
}