예제 #1
0
        /// <summary>
        /// Satisfies IMapObserver. Used by QuadrantPanel but disabled in
        /// TopViewPanelParent.
        /// </summary>
        /// <param name="args"></param>
        public virtual void OnLocationSelectedObserver(LocationSelectedEventArgs args)
        {
            //XCom.LogFile.WriteLine("");
            //XCom.LogFile.WriteLine("MapObserverControl1.OnLocationSelectedObserver");

//			Refresh();
        }
예제 #2
0
        async void HandleSelectCurrentLocationAsync(object sender, EventArgs e)
        {
            await Navigation.PopAsync();

            var selection = viewModel.ParentItem;
            var args      = new LocationSelectedEventArgs(selection);

            LocationSelected(this, args);
        }
예제 #3
0
        /// <summary>
        /// Inherited from IMapObserver through MapObserverControl0.
        /// </summary>
        /// <param name="args"></param>
        public override void OnLocationSelectedObserver(LocationSelectedEventArgs args)
        {
            //LogFile.WriteLine("");
            //LogFile.WriteLine("QuadrantPanel.OnLocationSelectedObserver");

            _tile     = args.SelectedTile as XCMapTile;
            _location = args.Location;
            Refresh();
        }
        /// <summary>
        /// Called when the user selects an address from the bing search results.
        /// </summary>
        void OnSearchLocationResultViewModelLocationSelected(object sender, LocationSelectedEventArgs e)
        {
            ResetSelectedResult();

            this.selectedResult = sender as SearchLocationResultViewModel;

            var locationSelected = this.LocationSelected;

            if (locationSelected != null)
            {
                locationSelected(this, e);
            }
        }
예제 #5
0
        async void LocationSelectedEventHandler(object sender, LocationSelectedEventArgs args)
        {
            // Generate the basic hierarchy string
            var parentItem = viewModel.ParentItem;

            if (parentItem != null)
            {
                var locStr = args.LocationString;
                locStr = parentItem.Name + "→" + locStr;
                args.LocationString = locStr;
            }

            await Navigation.PopAsync();

            LocationSelected(this, args);
        }
예제 #6
0
        /// <summary>
        /// Fires when a location is selected in MainView.
        /// </summary>
        /// <param name="args"></param>
        internal void OnLocationSelectedMain(LocationSelectedEventArgs args)
        {
            //LogFile.WriteLine("");
            //LogFile.WriteLine("MainViewOverlay.OnLocationSelectedMain");

            FirstClick        = true;
            _suppressTargeter = false;

            _col = args.Location.Col;
            _row = args.Location.Row;
            _lev = args.Location.Lev;
            //LogFile.WriteLine(". " + _col + "," + _row + "," + _lev);

            XCMainWindow.Instance.StatusBarPrintPosition(
                _col, _row,
                MapBase.MapSize.Levs - _lev);
        }
        /// <summary>
        /// Called when the user selects a location as the search result. Show all of the routes that are near this stop.
        /// </summary>
        /// <param name="sender">SearchResultsControlViewModel</param>
        /// <param name="e">SearchLocationResultViewModel</param>
        private async void OnSearchResultsControlViewModelLocationSelected(object sender, LocationSelectedEventArgs e)
        {
            this.MapControlViewModel.BusStops = null;
            this.MapControlViewModel.Shapes   = null;

            var point = new OneBusAway.Model.Point(e.Location.Point.Coordinates[0], e.Location.Point.Coordinates[1]);

            this.MapControlViewModel.UserLocation = point;
            this.MapControlViewModel.MapView      = new MapView(point, Constants.ZoomedInMapZoom, true);

            // Find all the bus stops at this location and then show the routes for this address:
            await this.MapControlViewModel.RefreshStopsForLocationAsync();

            // Find all of the unique routes for this location:
            await this.SearchResultsControlViewModel.SelectSpecificRoutesAsync((from stop in this.MapControlViewModel.BusStops
                                                                                from route in stop.Routes
                                                                                select route.Id).Distinct());
        }
        /// <summary>
        /// Called when the user selects an address from the bing search results.
        /// </summary>
        void OnSearchLocationResultViewModelLocationSelected(object sender, LocationSelectedEventArgs e)
        {
            ResetSelectedResult();

            this.selectedResult = sender as SearchLocationResultViewModel;

            var locationSelected = this.LocationSelected;
            if (locationSelected != null)
            {
                locationSelected(this, e);
            }
        }
예제 #9
0
        void LocationChangedEventHandler(Object sender, LocationSelectedEventArgs args)
        {
            var location = args.SelectedLocation;

            viewModel.SelectedLocation = location;
        }
        /// <summary>
        /// Satisfies IMapObserver. Used by QuadrantPanel but disabled in
        /// TopViewPanelParent.
        /// </summary>
        /// <param name="args"></param>
        public virtual void OnLocationSelectedObserver(LocationSelectedEventArgs args)
        {
//			Refresh();
        }
        /// <summary>
        /// Called when the user selects a location as the search result. Show all of the routes that are near this stop.
        /// </summary>
        /// <param name="sender">SearchResultsControlViewModel</param>
        /// <param name="e">SearchLocationResultViewModel</param>
        private async void OnSearchResultsControlViewModelLocationSelected(object sender, LocationSelectedEventArgs e)
        {
            this.MapControlViewModel.BusStops = null;
            this.MapControlViewModel.Shapes = null;
            
            var point = new OneBusAway.Model.Point(e.Location.Point.Coordinates[0], e.Location.Point.Coordinates[1]);
            this.MapControlViewModel.UserLocation = point;
            this.MapControlViewModel.MapView = new MapView(point, ViewModelConstants.ZoomedInMapZoom, true);            

            // Find all the bus stops at this location and then show the routes for this address:
            await this.MapControlViewModel.RefreshStopsForLocationAsync();

            // Find all of the unique routes for this location:
            await this.SearchResultsControlViewModel.SelectSpecificRoutesAsync((from stop in this.MapControlViewModel.BusStops
                                                                                from route in stop.Routes
                                                                                select route.Id).Distinct());
        } 
 void LocationChangedEventHandler(Object sender, LocationSelectedEventArgs args)
 {
     updateLocationInfo(args.SelectedLocation, args.LocationString);
 }