public IMosaicItem AddNeighbor(Screen screen, DirectionEnum direction)
        {
            var neighbor = GetNeighbor(direction);

            if (neighbor != null)
            {
                throw new ApplicationException("Neighbor Exist. Not is posible add node");
            }

            var item = new MosaicItem(screen);

            return(AddNeighbor(item, direction));
        }
示例#2
0
        public Mosaic AddNeighbor(Screen screenNew)
        {
            if (Items.Any())
            {
                throw new ApplicationException("Mosaic exist. ");
            }

            var item = new MosaicItem(screenNew);

            Items.Add(item);

            Maker();
            return(this);
        }