public SelectProjectsDialog(SelectProjectsViewModel viewModel) { this.Build(); this.viewModel = viewModel; InitializeTreeView(); AddProjectsToTreeView(); }
public SelectProjectsDialog (SelectProjectsViewModel viewModel) { this.Build (); this.viewModel = viewModel; InitializeTreeView (); AddProjectsToTreeView (); }
public SelectProjectsDialog(SelectProjectsViewModel viewModel) { this.viewModel = viewModel; Build(); UpdateTopLabel(viewModel.Projects.Count()); AddProjects(); }
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> ()); } } }
SelectProjectsDialog CreateSelectProjectsDialog(IEnumerable <IPackageManagementSelectedProject> projects) { var viewModel = new SelectProjectsViewModel(projects); return(new SelectProjectsDialog(viewModel)); }
SelectProjectsDialog CreateSelectProjectsDialog(IEnumerable<IPackageManagementSelectedProject> projects) { var viewModel = new SelectProjectsViewModel(projects); return new SelectProjectsDialog(viewModel); }