예제 #1
0
 public void AddWallBeam(Graphics graphic, Point ubicationPoint, PriceAndCost priceAndCost)
 {
     if (FreePosition(ubicationPoint))
     {
         WallBeam wallBeam = new WallBeam(ubicationPoint);
         WALLBEAM_HANDLER.Add(this, wallBeam, priceAndCost);
     }
 }
예제 #2
0
        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);
        }
예제 #3
0
        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);
            }
        }
예제 #4
0
        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);
            }
        }
예제 #5
0
        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);
            }
        }
예제 #6
0
        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);
        }
예제 #7
0
        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);
            }
        }
예제 #8
0
        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);
        }
예제 #9
0
 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);
 }