public StorePresenter(MapPresenter.IView mapPresenterView, IView view, GameContext gameContext, INotificationView notificationView)
 {
     _mapPresenterView = mapPresenterView;
     _view = view;
     _gameContext = gameContext;
     _notificationView = notificationView;
     _visibleStores = new List<StoreNode>();
     _gameContext.UserMoved += new EventHandler(_gameContext_UserMoved);
     _gameContext.HotZoneIdChanged += new EventHandler(_gameContext_HotZoneIdChanged);
     _gameContext.UserInventoryChanged += new EventHandler<UserInventoryChangedEventArgs>(_gameContext_UserInventoryChanged);
 }
 public HotZonePresenter(MapPresenter.IView mapPresenterView, IView view, GameContext gameContext)
 {
     _gameContext = gameContext;
     _gameContext.UserMoved += new EventHandler(_gameContext_UserMoved);
     _gameContext.ZombiePackDestroyed += new EventHandler<ZombiePackDestroyedEventArgs>(_gameContext_ZombiePackDestroyed);
     _gameContext.ZoomLevelChanged += new EventHandler<ZoomLevelChangedEventArgs>(_gameContext_ZoomLevelChanged);
     _gameContext.UserInitalized += new EventHandler(_gameContext_UserInitalized);
     _mapPresenterView = mapPresenterView;
     _zombiePackCounts = new List<KeyValuePair<Guid, int>>();
     _currentHotZoneId = Guid.Empty;
     _view = view;
 }
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="view"></param>
        /// <param name="gameContext"></param>
        public HuntPresenter(MapPresenter.IView mapPresenterView, IView view, GameContext gameContext, INotificationView notificationView)
        {
            //set the view and the game context
            _view = view;
            _mapPresenterView = mapPresenterView;
            _gameContext = gameContext;
            _currentZombiePackId = Guid.Empty;
            _notificationView = notificationView;
            _visibleZombiePacks = new List<Node>();


            //wire up to the user moved event for the game context
            _gameContext.UserAttackPowerChanged += new EventHandler(_gameContext_UserAttackPowerChanged);
            _gameContext.HotZoneIdChanged += new EventHandler(_gameContext_HotZoneIdChanged);
            _gameContext.UserMoved += new EventHandler(_gameContext_UserMoved);
        }
        public MainPage()
        {
            App.MapPresenterView = this;
            App.NotificationView = this;
            InitializeComponent();

            if (App.IsNotInDesignMode(this))
            {
                _baseUri = App.GameContext.BaseUri;

                //initialize the presenter with the base uri and the user id.
                _presenter = new UserPresenter(this, this, App.GameContext, App.NotificationView);
                _mapPresenter = new MapPresenter(this, App.GameContext);

                //delay execution set up for loading the presenter
                _delayExecution = new DelayExecution();

                //raise event when the bing map is loaded.
                mapUndeadEarth.Loaded += new RoutedEventHandler(mapUndeadEarth_Loaded);
                mapUndeadEarth.ViewChangeEnd += new EventHandler<MapEventArgs>(mapUndeadEarth_ViewChangeEnd);

                _zomebiePackUserControls = new Dictionary<Guid, ZombiePackUserControl>();

                _hotZoneUserControls = new Dictionary<Guid, HotZoneUserControl>();

                _storeUserControls = new Dictionary<Guid, StoreUserControl>();

                _safeHouseUserControls = new Dictionary<Guid, SafeHouseUserControl>();

                if (_moveIcon == null)
                {
                    string uri = String.Concat(_baseUri, "Content/", "images/", "move.png");
                    _moveIcon = new BitmapImage(new Uri(uri));
                }

                achievementUserControl.Visibility = Visibility.Collapsed;

                Application.Current.Host.Content.FullScreenChanged += new EventHandler(Content_FullScreenChanged);


                mapUndeadEarth.Width = 675;
                mapUndeadEarth.Height = 350;
                gridLocationDetails.Width = 675;
            }
        }