Esempio n. 1
0
        public ZoneItemsViewModel(ZoneItemsStore zoneItemsStore, IZoneCompletionController zoneController, MapUserData userData)
        {
            this.zoneItemsStore = zoneItemsStore;
            this.zoneController = zoneController;
            this.userData = userData;

            this.ShowHeartQuests = true;
            this.ShowHeroPoints = true;
            this.ShowPOIs = true;
            this.ShowVistas = true;
            this.ShowWaypoints = true;
            this.ShowDungeons = true;

            ((INotifyPropertyChanged)this.zoneController).PropertyChanged += (o, e) =>
            {
                if (!this.userData.ShowEntireContinent && e.PropertyName.ToLower().Contains("map"))
                {
                    this.OnPropertyChanged(() => this.Waypoints);
                    this.OnPropertyChanged(() => this.POIs);
                    this.OnPropertyChanged(() => this.Vistas);
                    this.OnPropertyChanged(() => this.HeartQuests);
                    this.OnPropertyChanged(() => this.HeroPoints);
                    this.OnPropertyChanged(() => this.Dungeons);
                }
            };

            this.zoneItemsStore.DataLoaded += (o, e) =>
            {
                this.OnPropertyChanged(() => this.Waypoints);
                this.OnPropertyChanged(() => this.POIs);
                this.OnPropertyChanged(() => this.Vistas);
                this.OnPropertyChanged(() => this.HeartQuests);
                this.OnPropertyChanged(() => this.HeroPoints);
                this.OnPropertyChanged(() => this.Dungeons);
            };
        }
Esempio n. 2
0
        /// <summary>
        /// Constructs a new ZoneItemsViewModel object
        /// </summary>
        public ZoneItemsViewModel(ZoneItemsStore zoneItemsStore)
        {
            this.zoneItemsStore = zoneItemsStore;

            this.ShowHeartQuests = true;
            this.ShowHeroPoints = true;
            this.ShowPOIs = true;
            this.ShowVistas = true;
            this.ShowWaypoints = true;
            this.ShowDungeons = true;
        }
Esempio n. 3
0
        public MapViewModel(IZoneCompletionController zoneController, IZoneService zoneService, IPlayerService playerService,
            ZoneItemsStore zoneItemsStore, MapUserData userData)
        {
            this.zoneController = zoneController;
            this.zoneService = zoneService;
            this.userData = userData;

            this.CharacterPointer = new CharacterPointerViewModel(zoneController, userData);
            this.CharacterPointer.PropertyChanged += CharacterPointer_PropertyChanged;

            this.MapMarkers = new MarkersViewModel(userData);
            this.ZoneItems = new ZoneItemsViewModel(zoneItemsStore);

            if (playerService.HasValidMapId)
                this.ContinentData = this.zoneService.GetContinentByMap(playerService.MapId);
            else
                this.ContinentData = this.zoneService.GetContinent(DEFAULT_CONTINENT_ID);

            this.FloorId = 1;

            ((INotifyPropertyChanged)this.zoneController).PropertyChanged += ZoneControllerPropertyChanged;
            this.zoneController.Start();
        }