public bool SelectProjects(IEnumerable <IPackageManagementSelectedProject> projects) { using (SelectProjectsDialog dialog = CreateSelectProjectsDialog(projects)) { int result = MessageService.ShowCustomDialog(dialog); return(result == (int)Gtk.ResponseType.Ok); } }
IEnumerable <IDotNetProject> SelectProjects(IEnumerable <ManagePackagesSearchResultViewModel> packageViewModels) { if (!viewModel.IsManagingSolution) { return(viewModel.DotNetProjects); } var selectProjectsViewModel = new SelectProjectsViewModel( GetFilteredDotNetProjectsToSelect(packageViewModels), GetPackagesCountForAddPackagesButtonLabel(), viewModel.PageSelected); using (var dialog = new SelectProjectsDialog(selectProjectsViewModel)) { Command result = dialog.ShowWithParent(); if (result == Command.Ok) { return(dialog.GetSelectedProjects()); } else { return(Enumerable.Empty <IDotNetProject> ()); } } }