Exemplo n.º 1
0
        private void RegisterToMap(Models.Custom.Map mapInfo)
        {
            if (mapInfo == null)
            {
                return;
            }

            mapInfo.Doors.CollectionChanged            += MapDoorCollectionChanged;
            mapInfo.Walls.CollectionChanged            += MapWallCollectionChanged;
            mapInfo.PointOfInterests.CollectionChanged += MapPointOfInterestCollectionChanged;
            mapInfo.Characters.CollectionChanged       += MapCharacterCollectionChanged;
            mapInfo.Blocks.CollectionChanged           += MapBlockCollectionChanged;
            mapInfo.Effects.CollectionChanged          += MapEffectCollectionChanged;
        }
Exemplo n.º 2
0
        private void UnRegisterFromMap(Models.Custom.Map mapInfo)
        {
            if (mapInfo == null)
            {
                return;
            }

            mapInfo.Doors.CollectionChanged            -= MapDoorCollectionChanged;
            mapInfo.Walls.CollectionChanged            -= MapWallCollectionChanged;
            mapInfo.PointOfInterests.CollectionChanged -= MapPointOfInterestCollectionChanged;
            mapInfo.Characters.CollectionChanged       -= MapCharacterCollectionChanged;
            mapInfo.Blocks.CollectionChanged           -= MapBlockCollectionChanged;
            mapInfo.Effects.CollectionChanged          -= MapEffectCollectionChanged;

            MAP.Children.Clear();
        }