Esempio n. 1
0
        //Tag the point at which the team is
        private static void TagPoint_Click(object sender, RoutedEventArgs e)
        {
            MenuItem    mi      = (MenuItem)sender;
            ContextMenu cm      = (ContextMenu)mi.Parent;
            TeamPin     teamPin = (TeamPin)cm.PlacementTarget;

            GPSLocation.referencePoints.Add(new GPSLocation(teamPin.getTeam().getGPSLocation().getLattitude(), teamPin.getTeam().getGPSLocation().getLongitude(), teamPin.getX() * GPSLocation.xRatio, teamPin.getY() * GPSLocation.yRatio));
            MessageBox.Show("Point tagged");
            if (GPSLocation.referencePoints.Count == 2)
            {
                MessageBox.Show("Setup completed");

                GPSLocation.setConfigured(true);     //Change flag to signify that the setup is successfully done
                mapSection.Update();                 //Readding all the pins to the map
                setupOngoing = false;
                gpsStatusCallbacks.SetupCompleted(); //Notifying caller
            }
        }