PIbd14.Boyko.M.S.LabWork01 Easy #1

Closed
LivelyPuer wants to merge 6 commits from lab1-develop into master
Showing only changes of commit 3db77b7282 - Show all commits

View File

@ -84,9 +84,24 @@ public class DrawingElectroTrans
{
return;
}
if (x < 40)
{
x = 40;
}else if (x > Config.screenSize.Width - 40)
{
x = Config.screenSize.Width - 40;
}
if (y < 40)
{
y = 40;
}
else if (y > Config.screenSize.Height - 40)
{
y = Config.screenSize.Height - 40;
}
// TODO если при установке объекта в эти координаты, он будет "выходить" за границы формы
// то надо изменить координаты, чтобы он оставался в этих границах
_startPosX = x;
_startPosY = y;
}