示例#1
0
        private void PointAClick()
        {
            if (!this.isPointA)
            {
                PointA.Select();

                this.isPointA = true;

                PointB.Deselect();

                if (PointA.HasValue())
                {
                    if (PointA.Station == null && PointA.CustomPoint == null)
                    {
                        SelectedSearchItemForView = PointA.SearchItem;

                        SelectedStationVisibility     = Visibility.Collapsed;
                        SelectedCustomPointVisibility = Visibility.Collapsed;
                        SelectedSearchItemVisibility  = Visibility.Visible;
                    }
                    else if (PointA.SearchItem == null && PointA.CustomPoint == null)
                    {
                        SelectedStationForView = PointA.Station;

                        SelectedSearchItemVisibility  = Visibility.Collapsed;
                        SelectedCustomPointVisibility = Visibility.Collapsed;
                        SelectedStationVisibility     = Visibility.Visible;
                    }
                    else
                    {
                        SelectedCustomPointForView = PointA.CustomPoint;

                        SelectedSearchItemVisibility  = Visibility.Collapsed;
                        SelectedStationVisibility     = Visibility.Collapsed;
                        SelectedCustomPointVisibility = Visibility.Visible;
                    }

                    PointA.Show();
                }
                else
                {
                    PointA.Hide();
                    SelectedStationVisibility     = Visibility.Collapsed;
                    SelectedSearchItemVisibility  = Visibility.Collapsed;
                    SelectedCustomPointVisibility = Visibility.Collapsed;
                }
            }
        }
示例#2
0
        private void SetSelectionMode(StationsAndPlacesOfInterestModeMessage mode)
        {
            ClearPoints();

            fromWhereTo = mode.FromWhereTo;

            switch (mode.Reason)
            {
            case Messages.Enums.StationsAndPlacesOfInterestModeReason.SearchPointA:
                PointA.Select();

                this.isPointA = true;

                PointB.Deselect();

                SwitchToList();

                LoadSearch();
                break;

            case Messages.Enums.StationsAndPlacesOfInterestModeReason.SearchPointB:
                PointB.Select();

                this.isPointA = false;

                PointA.Deselect();

                SwitchToList();

                LoadSearch();
                break;

            case Messages.Enums.StationsAndPlacesOfInterestModeReason.StationsPointA:
                PointA.Select();

                this.isPointA = true;

                PointB.Deselect();

                SwitchToList();

                LoadStations();
                break;

            case Messages.Enums.StationsAndPlacesOfInterestModeReason.StationsPointB:
                PointB.Select();

                this.isPointA = false;

                PointA.Deselect();

                SwitchToList();

                LoadStations();
                break;

            case Messages.Enums.StationsAndPlacesOfInterestModeReason.MapPointA:
                PointA.Select();

                this.isPointA = true;

                PointB.Deselect();

                SwitchToMap();

                LoadStations();
                break;

            case Messages.Enums.StationsAndPlacesOfInterestModeReason.MapPointB:
                PointB.Select();

                this.isPointA = false;

                PointA.Deselect();

                SwitchToMap();

                LoadStations();
                break;
            }
        }