Exemplo n.º 1
0
        public AddPackagesDialog(
            AllPackagesViewModel viewModel,
            string initialSearch,
            IBackgroundPackageActionRunner backgroundActionRunner)
        {
            this.viewModel = viewModel;
            this.backgroundActionRunner = backgroundActionRunner;

            Build();

            UpdatePackageSearchEntryWithInitialText(initialSearch);

            InitializeListView();
            UpdateAddPackagesButton();
            ShowLoadingMessage();
            LoadViewModel(initialSearch);

            this.showPrereleaseCheckBox.Clicked         += ShowPrereleaseCheckBoxClicked;
            this.packageSourceComboBox.SelectionChanged += PackageSourceChanged;
            this.addPackagesButton.Clicked               += AddPackagesButtonClicked;
            this.packageSearchEntry.Changed              += PackageSearchEntryChanged;
            this.packageSearchEntry.Activated            += PackageSearchEntryActivated;
            this.packageVersionComboBox.SelectionChanged += PackageVersionChanged;
            imageLoader.Loaded += ImageLoaded;
        }
Exemplo n.º 2
0
 public AddPackagesDialog(AllPackagesViewModel viewModel, string initialSearch = null)
     : this(
         viewModel,
         initialSearch,
         PackageManagementServices.BackgroundPackageActionRunner)
 {
 }
Exemplo n.º 3
0
        AddPackagesDialog CreateDialog(DotNetProject project, string initialSearch)
        {
            var viewModel = AllPackagesViewModel.Create(project, recentPackagesRepository);

            return(new AddPackagesDialog(
                       viewModel,
                       initialSearch));
        }
Exemplo n.º 4
0
        AddPackagesDialog CreateDialog(string initialSearch)
        {
            var viewModel = AllPackagesViewModel.Create(recentPackagesRepository);

            return(new AddPackagesDialog(
                       viewModel,
                       initialSearch));
        }
        public PackageSearchResultViewModel(
            AllPackagesViewModel parent,
            PackageItemListViewModel viewModel)
        {
            this.parent    = parent;
            this.viewModel = viewModel;

            Versions        = new ObservableCollection <NuGetVersion> ();
            SelectedVersion = Version;
        }
Exemplo n.º 6
0
        protected override void Dispose(bool disposing)
        {
            imageLoader.Loaded -= ImageLoaded;
            imageLoader.Dispose();

            RemoveSelectedPackagePropertyChangedEventHandler();
            viewModel.PropertyChanged -= ViewModelPropertyChanged;
            viewModel.Dispose();
            DisposeExistingTimer();
            DisposePopulatePackageVersionsTimer();
            packageStore.Clear();
            viewModel = null;
            base.Dispose(disposing);
        }