コード例 #1
0
        public MapViewModel(IZoneCompletionController zoneController, IZoneService zoneService, IPlayerService playerService,
                            PlayerMarkersViewModel mapMarkers, ZoneItemsViewModel zoneItems, MapUserData userData)
        {
            this.zoneController = zoneController;
            this.zoneService    = zoneService;
            this.userData       = userData;

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

            this.MapMarkers = mapMarkers;
            this.ZoneItems  = zoneItems;

            // Make sure the zone service is ready
            this.zoneService.Initialize();

            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();
        }
コード例 #2
0
ファイル: MapViewModel.cs プロジェクト: SamHurne/gw2pao
        public MapViewModel(IZoneCompletionController zoneController, IZoneService zoneService, IPlayerService playerService,
            PlayerMarkersViewModel mapMarkers, ZoneItemsViewModel zoneItems, MapUserData userData)
        {
            this.zoneController = zoneController;
            this.zoneService = zoneService;
            this.userData = userData;

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

            this.MapMarkers = mapMarkers;
            this.ZoneItems = zoneItems;

            // Make sure the zone service is ready
            this.zoneService.Initialize();

            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();
        }