Ejemplo n.º 1
0
 private void GetAnimalsCount()
 {
     Test_MultiChoice.Data.GetAnimalsInterface loader = new Test_MultiChoice.Data.GetAnimalsImplementation(Dispatcher);
     loader.GetAnimalsCount((GetAnimalsCountResponse response) =>
     {
         if (response != null)
         {// TODO MVVM
             List <Model.AnimalCount> data = response.Data;
             lock (ListView_AnimalCounts)
             {
                 ListView_AnimalCounts.ItemsSource = null;
                 ListView_AnimalCounts.ItemsSource = data;
             }
         }
     });
 }
Ejemplo n.º 2
0
        private void GetAnimalsCountPerGroup()
        {
            ButtonGraph.Visibility = Visibility.Collapsed;
            LabelGraph.Visibility  = Visibility.Visible;

            Test_MultiChoice.Data.GetAnimalsInterface loader = new Test_MultiChoice.Data.GetAnimalsImplementation(Dispatcher);
            loader.GetAnimalsCountPerGroup((GetAnimalsCountPerGroupResponse response) =>
            {
                if (response != null)
                {// TODO MVVM
                    List <Model.AnimalCountPerGroup> data = response.Data;
                    new ExcelTool().CreateExcelGraph_AnimalsCountPerGroup(data);
                }
                ButtonGraph.Visibility = Visibility.Visible;
                LabelGraph.Visibility  = Visibility.Collapsed;
            });
        }
Ejemplo n.º 3
0
 public void GetAnimals()
 {
     Test_MultiChoice.Data.GetAnimalsInterface loader = new Test_MultiChoice.Data.GetAnimalsImplementation(Dispatcher);
     loader.GetAnimals((GetAnimalsResponse response) =>
     {
         if (response != null)
         {
             List <Model.Animal> animals = new List <Model.Animal>();
             _gMapsWrapper.Clean();
             foreach (Model.Animal animal in response.Data)
             {
                 animals.Add(animal);
                 double x = animal.Longitude;
                 double y = animal.Latitude;
                 AddAnimalMarker(y, x);
             }
             UpdateLocations(animals);
         }
     });
 }