Example #1
0
        private void btnFind_Click(object sender, RoutedEventArgs e)
        {
            myMap.Children.Clear();
            int[] i;
            bool  allFlag = false;

            if (cboxDay.Text == "All")
            {
                allFlag = true;
            }

            try { i = BackendStuff.FindDateUFO(data, cboxDay.Text, cboxMonth.Text, cboxYear.Text, allFlag); }
            catch
            {
                MessageBox.Show("There are no UFO sightings under these constraints");
                return;
            }
            for (int x = i[0]; x <= i[1]; x++)
            {
                if (!string.IsNullOrEmpty(cboxShape.Text) && data[x].shape != cboxShape.Text && cboxShape.Text != "All")
                {
                    continue;
                }
                Location loc = new Location();
                Pushpin  pin = new Pushpin();
                loc.Latitude  = data[x].latitude;
                loc.Longitude = data[x].longitude;
                pin.Location  = loc;
                myMap.Children.Add(pin);
            }
        }
Example #2
0
 public void InitializeWindow()
 {
     try { data = BackendStuff.IntializeUFO(App.ufo_path); }
     catch
     {
         FilePathWin verifyWindow = new FilePathWin();
         verifyWindow.Show();
         Hide();
     }
 }
Example #3
0
        //Partly implemented
        private void cboxShape_Loaded(object sender, RoutedEventArgs e)
        {
            List <string> shapes = BackendStuff.Shapes();

            foreach (string shape in shapes)
            {
                cboxShape.Items.Add(shape);
            }
            cboxShape.Items.Add("All");
        }