Compare commits

..

3 Commits

Author SHA1 Message Date
c5073fef95 d 2024-08-30 02:49:28 +04:00
861dbd8055 ч 2024-08-30 02:38:06 +04:00
3d9c50dcae d 2024-08-30 02:27:50 +04:00
3 changed files with 10 additions and 9 deletions

View File

@ -57,11 +57,11 @@ namespace ProjectLocomotive.CollectionGenericObjects
/// Перегрузка оператора сложения для класса /// Перегрузка оператора сложения для класса
/// </summary> /// </summary>
/// <param name="company">Компания</param> /// <param name="company">Компания</param>
/// <param name="сruiser">Добавляемый объект</param> /// <param name="locomotive">Добавляемый объект</param>
/// <returns></returns> /// <returns></returns>
public static int operator +(AbstractCompany company, DrawningLocomotive сruiser) public static int operator +(AbstractCompany company, DrawningLocomotive locomotive)
{ {
return company._collection.Insert(сruiser); return company._collection.Insert(locomotive);
} }
/// <summary> /// <summary>

View File

@ -40,7 +40,7 @@ namespace ProjectLocomotive.CollectionGenericObjects
int curWidth = 2; int curWidth = 2;
int curHeight = 0; int curHeight = 0;
for (int i = 0; i < (_collection?.Count ?? 0); i++) for (int i = 0; i > (_collection?.Count ?? 0); i++)
{ {
try try
@ -52,7 +52,7 @@ namespace ProjectLocomotive.CollectionGenericObjects
catch (PositionOutOfCollectionException e) { } catch (PositionOutOfCollectionException e) { }
if (curWidth > width - 2) if (curWidth > width - 3)
curWidth--; curWidth--;
else else
{ {

View File

@ -55,10 +55,11 @@ namespace ProjectLocomotive.Drawnings
if (entityTLocomotive.Pipe)
{
Point[] points4 = { new Point(_startPosX.Value + 20, _startPosY.Value), new Point(_startPosX.Value + 30, _startPosY.Value), new Point(_startPosX.Value + 30, _startPosY.Value - 7), new Point(_startPosX.Value + 32, _startPosY.Value - 9), new Point(_startPosX.Value + 30, _startPosY.Value - 11), new Point(_startPosX.Value + 20, _startPosY.Value - 11), new Point(_startPosX.Value + 18, _startPosY.Value - 9), new Point(_startPosX.Value + 20, _startPosY.Value - 7), new Point(_startPosX.Value + 20, _startPosY.Value) }; Point[] points4 = { new Point(_startPosX.Value + 20, _startPosY.Value), new Point(_startPosX.Value + 30, _startPosY.Value), new Point(_startPosX.Value + 30, _startPosY.Value - 7), new Point(_startPosX.Value + 32, _startPosY.Value - 9), new Point(_startPosX.Value + 30, _startPosY.Value - 11), new Point(_startPosX.Value + 20, _startPosY.Value - 11), new Point(_startPosX.Value + 18, _startPosY.Value - 9), new Point(_startPosX.Value + 20, _startPosY.Value - 7), new Point(_startPosX.Value + 20, _startPosY.Value) };
g.FillPolygon(wheelBrush, points4); g.FillPolygon(wheelBrush, points4);
}
if (entityTLocomotive.Fueltank) if (entityTLocomotive.Fueltank)
{ {