Exemple #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);
     }
 }
Exemple #2
0
        public void RemoveWall(Wall wall)
        {
            WallBeam startWallBeam = GetWallBeam(wall.startUbicationPoint);
            WallBeam endWallBeam   = GetWallBeam(wall.endUbicationPoint);

            DeleteElementsInAWall(wall);
            WALL_HANDLER.Remove(this, wall);
            RemoveWallBeam(startWallBeam);
            RemoveWallBeam(endWallBeam);
        }
Exemple #3
0
        public override bool Equals(object wallBeamObject)
        {
            bool isEqual = false;

            if (wallBeamObject != null && this.GetType().Equals(wallBeamObject.GetType()))
            {
                WallBeam wallBeam = (WallBeam)wallBeamObject;
                if (this.UbicationPoint.Equals(wallBeam.UbicationPoint))
                {
                    isEqual = true;
                }
            }
            return(isEqual);
        }
Exemple #4
0
        public void RemoveWallBeam(WallBeam wallBeam)
        {
            List <Wall> useAWallBeam = new List <Wall>();

            foreach (Wall wall in WALL_HANDLER.GetList(this))
            {
                if (ContainsPoint(wall.Path, wallBeam.UbicationPoint))
                {
                    useAWallBeam.Add(wall);
                }
            }
            if (useAWallBeam.Count.Equals(0))
            {
                WALLBEAM_HANDLER.Remove(this, wallBeam);
            }
        }