public SelectProjectsDialog(SelectProjectsViewModel viewModel)
 {
     this.Build();
     this.viewModel = viewModel;
     InitializeTreeView();
     AddProjectsToTreeView();
 }
		public SelectProjectsDialog (SelectProjectsViewModel viewModel)
		{
			this.Build ();
			this.viewModel = viewModel;
			InitializeTreeView ();
			AddProjectsToTreeView ();
		}
예제 #3
0
        public SelectProjectsDialog(SelectProjectsViewModel viewModel)
        {
            this.viewModel = viewModel;

            Build();

            UpdateTopLabel(viewModel.Projects.Count());

            AddProjects();
        }
예제 #4
0
        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);
		}