public void AddWallBeam(Graphics graphic, Point ubicationPoint, PriceAndCost priceAndCost) { if (FreePosition(ubicationPoint)) { WallBeam wallBeam = new WallBeam(ubicationPoint); WALLBEAM_HANDLER.Add(this, wallBeam, priceAndCost); } }
private void AddWallIfCutting(Graphics graphic, Wall wall, PriceAndCost priceAndCost) { Point intersection = this.FirstIntersection(wall); BreakAndInsertWall(wall, intersection, graphic, priceAndCost); Wall anotherWall = new Wall(intersection, wall.endUbicationPoint); AddWall(graphic, anotherWall); }
public void AddWindow(Graphics graphic, Point startPoint, Point endPoint, string sense) { PriceAndCost priceAndCost = PRICE_AND_COST_HANDLER.GetPriceAndCostWindow(); if (FreePosition(startPoint)) { Window window = new Window(startPoint, endPoint, sense); WINDOW_HANDLER.Add(this, window, priceAndCost); } }
public void AddDecorativeColumn(Graphics graphic, Point ubicationPoint) { PriceAndCost priceAndCost = PRICE_AND_COST_HANDLER.GetPriceAndCostDecorativeColumn(); if (FreePosition(ubicationPoint)) { DecorativeColumn decorativeColumn = new DecorativeColumn(ubicationPoint); DECORATIVECOLUMN_HANDLER.Add(this, decorativeColumn, priceAndCost); } }
public void AddDoor(Graphics graphic, Point startPoint, Point endPoint, string sense) { PriceAndCost priceAndCost = PRICE_AND_COST_HANDLER.GetPriceAndCostDoor(); OnTheWall(startPoint); if (FreePosition(startPoint)) { Door door = new Door(startPoint, endPoint, sense); DOOR_HANDLER.Add(this, door, priceAndCost); } }
private void AddWallIfSizeGreaterThanMaximum(Graphics graphic, Wall wall, PriceAndCost priceAndCost) { Point calculatedPoint = wall.CalculateLocationPoint(MaxMeters); Wall anotherWall = new Wall(wall.startUbicationPoint, calculatedPoint); AddWallBeam(graphic, anotherWall.startUbicationPoint, priceAndCost); AddWallBeam(graphic, anotherWall.endUbicationPoint, priceAndCost); WALL_HANDLER.Add(this, anotherWall, priceAndCost); Wall newWall = new Wall(calculatedPoint, wall.endUbicationPoint); AddWall(graphic, newWall); }
public void AddWall(Graphics graphic, Wall wall) { PriceAndCost priceAndCost = PRICE_AND_COST_HANDLER.GetPriceAndCostWall(); if (IsCuttingAWallBeforeMaximum(wall)) { AddWallIfCutting(graphic, wall, priceAndCost); } else if (wall.SizeGreaterThanMaximum()) { AddWallIfSizeGreaterThanMaximum(graphic, wall, priceAndCost); } else { AddWallNormal(graphic, wall, priceAndCost); } }
public void BreakAndInsertWall(Wall wall, Point intersection, Graphics graphic, PriceAndCost priceAndCost) { Wall newWall = new Wall(wall.startUbicationPoint, intersection); WALL_HANDLER.Add(this, newWall, priceAndCost); AddWallBeam(graphic, newWall.startUbicationPoint, priceAndCost); AddWallBeam(graphic, newWall.endUbicationPoint, priceAndCost); }
private void AddWallNormal(Graphics graphic, Wall wall, PriceAndCost priceAndCost) { WALL_HANDLER.Add(this, wall, priceAndCost); AddWallBeam(graphic, wall.startUbicationPoint, priceAndCost); AddWallBeam(graphic, wall.endUbicationPoint, priceAndCost); }