Beispiel #1
0
        public override async Task <DialogResult> ShowModal()
        {
            foreach (var package in await session.SuggestPackagesToAdd())
            {
                if (Filter == null || Filter(package))
                {
                    Packages.Add(package);
                }
            }

            selectedPackages.Clear();

            await base.ShowModal();

            if (Result == Presentation.Services.DialogResult.Ok)
            {
                selectedPackages.AddRange(PackageListBox.SelectedItems.Cast <PickablePackageViewModel>());
            }
            return(Result);
        }