예제 #1
0
 public GetDirectionsView()
 {
     this.InitializeComponent();
     myMap.ZoomLevel = 14;
     myMap.Center    = new Location(staticObjects.CurrentLatitude, staticObjects.CurrentLongitude);
     GPS.GetDirections(myMap, RouteResults);
 }
예제 #2
0
 void btnGetDirections_Click(object sender, EventArgs e)
 {
     if (lstRedZones.SelectedItem != null)
     {
         RedZone eli = lstRedZones.SelectedItem as RedZone;
         GPS.GetDirections(new GeoCoordinate(eli.Latitude, eli.Longitude));
     }
     else
     {
         MessageBox.Show(AppResources.RedZone_SelectedItemError, AppResources.GPS_GetDirections, MessageBoxButton.OK);
     }
 }
예제 #3
0
 void btnGetDirections_Click(object sender, EventArgs e)
 {
     if (lstPositions.SelectedItem != null)
     {
         Position selectedPosition = lstPositions.SelectedItem as Position;
         GPS.GetDirections(new GeoCoordinate(selectedPosition.Latitude, selectedPosition.Longitude));
     }
     else
     {
         MessageBox.Show(AppResources.PositionSelectedError, AppResources.GPS_GetDirections, MessageBoxButton.OK);
     }
 }
예제 #4
0
 void btnGetDirections_Click(object sender, EventArgs e)
 {
     if (lstFriends.SelectedItem != null)
     {
         Friend selectedFriend = lstFriends.SelectedItem as Friend;
         GPS.GetDirections(new GeoCoordinate(selectedFriend.LastPosition.Latitude, selectedFriend.LastPosition.Longitude));
     }
     else
     {
         MessageBox.Show(AppResources.FriendsView_SelectedItemError, AppResources.GPS_GetDirections, MessageBoxButton.OK);
     }
 }
예제 #5
0
        void GetDirections(object sender, System.Windows.Input.GestureEventArgs e)
        {
            RedZone eli = (sender as MenuItem).DataContext as RedZone;

            GPS.GetDirections(new GeoCoordinate(eli.Latitude, eli.Longitude));
        }
예제 #6
0
        private void GetDirections(object sender, System.Windows.Input.GestureEventArgs e)
        {
            Friend selected = (sender as MenuItem).DataContext as Friend;

            GPS.GetDirections(new GeoCoordinate(selected.LastPosition.Latitude, selected.LastPosition.Longitude));
        }