private void PointBClick() { if (this.isPointA) { PointB.Select(); this.isPointA = false; PointA.Deselect(); if (PointB.HasValue()) { if (PointB.Station == null && PointB.CustomPoint == null) { SelectedSearchItemForView = PointB.SearchItem; SelectedStationVisibility = Visibility.Collapsed; SelectedSearchItemVisibility = Visibility.Visible; SelectedCustomPointVisibility = Visibility.Collapsed; } else if (PointB.SearchItem == null && PointB.CustomPoint == null) { SelectedStationForView = PointB.Station; SelectedSearchItemVisibility = Visibility.Collapsed; SelectedStationVisibility = Visibility.Visible; SelectedCustomPointVisibility = Visibility.Collapsed; } else { SelectedCustomPointForView = PointB.CustomPoint; SelectedSearchItemVisibility = Visibility.Collapsed; SelectedStationVisibility = Visibility.Collapsed; SelectedCustomPointVisibility = Visibility.Visible; } PointB.Show(); } else { PointB.Hide(); SelectedStationVisibility = Visibility.Collapsed; SelectedSearchItemVisibility = Visibility.Collapsed; SelectedCustomPointVisibility = Visibility.Collapsed; } } }
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; } }