Beispiel #1
0
        // event handler for the TargetListView on the Target Control Panel
        private void TargetListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            NotificationListItem selectedIncident = (sender as ListView).SelectedItem as NotificationListItem;

            if (selectedIncident != null)
            {
                SelectedIncident = selectedIncident;

                //NotifyUser(String.Format("{0} Attack Selected", selectedAttack.TargetCity), NotifyType.StatusMessage);

                DeleteEnableSwitch.IsEnabled = true;

                FlytoButton.IsEnabled = true;
            }
        }
Beispiel #2
0
        // tells the map to fly to the target from either the  Flyto button
        private async Task SetMapScene(NotificationListItem atkObj)
        {
            if (null != atkObj && mapControl.Is3DSupported)
            {
                mapControl.Style = MapStyle.Aerial3DWithRoads;

                Geopoint detonationPoint = new Geopoint(new BasicGeoposition()
                {
                    Latitude = atkObj.Details.Lat, Longitude = atkObj.Details.Long
                });

                MapScene detonationScene = MapScene.CreateFromLocationAndRadius(detonationPoint,
                                                                                500,   /* show this many meters around */
                                                                                0,     /* looking at it north */
                                                                                70 /* degrees pitch */);
                await mapControl.TrySetSceneAsync(detonationScene);
            }
            else
            {
                //string status = "3D views are not supported on this device.";
                //ViewModel.NotifyUser(status, NotifyType.ErrorMessage);
            }
        }
Beispiel #3
0
 public static NotificationListItem CreateNotificationListItem(int ID)
 {
     NotificationListItem notificationListItem = new NotificationListItem();
     notificationListItem.Id = ID;
     return notificationListItem;
 }
Beispiel #4
0
 public void AddToNotificationList(NotificationListItem notificationListItem)
 {
     base.AddObject("NotificationList", notificationListItem);
 }