private async void ListView_ItemSelected(object sender, SelectedItemChangedEventArgs e) { var dep = e.SelectedItem as Dependency; var project = await MavenService.GetProjectAsync(dep.GroupId, dep.ArtifactId, dep.Version); if (project != null) { await Navigation.PushAsync(new ArtifactProjectPage(project, dep.Version)); } }
async void Handle_ItemSelected(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e) { var version = e.SelectedItem as ViewModels.ArtifactVersionViewModel; var project = await MavenService.GetProjectAsync(viewModel.MavenArtifact, version.Version); if (project != null) { await Navigation.PushAsync(new ArtifactProjectPage(project, version.Version)); } }
public ArtifactVersionListPage(string groupId, string artifactId) { InitializeComponent(); var mavenArtifact = MavenService.GetArtifact(groupId, artifactId); if (mavenArtifact == null) { return; } Title = mavenArtifact.Id; viewModel = new ViewModels.ArtifactVersionListViewModel(mavenArtifact); BindingContext = viewModel; }
protected override async void OnAppearing() { base.OnAppearing(); try { await MavenService.LoadAsync(); activityIndicator.IsRunning = false; done?.Invoke(); } catch (Exception ex) { Console.WriteLine(ex); await DisplayAlert("Error", "Failed to load Maven Repository!", "OK"); } finally { activityIndicator.IsRunning = false; } }