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; } } }); }
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; }); }
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); } }); }