Exemple #1
0
        public ChocolateyPackagesViewModel(
            IChocolateyFeedFactory feedFactory,
            ChocolateySourcesViewModel sourcesViewModel,
            ConsoleViewModel consoleViewModel,
            IChocolateyInstaller installer,
            InstalledPackagesViewModel installedPackagesViewModel,
            InstallListViewModel installListView)
        {
            this._sourcesViewModel           = sourcesViewModel;
            this._feedFactory                = feedFactory;
            this._consoleViewModel           = consoleViewModel;
            this._installer                  = installer;
            this._installedPackagesViewModel = installedPackagesViewModel;
            this._installListViewModel       = installListView;

            this._sourcesViewModel.SelectedSourceChanged += async newSource => await this.HandleSelectedSourceChanged(newSource);

            this.RegisterCommands();

            this.IsWorking        = false;
            this.CanSelectPackage = false;
            this.StatusMessage    = "Ready";
        }
        public ChocolateyPackagesViewModel(
            IChocolateyFeedFactory feedFactory,
            ChocolateySourcesViewModel sourcesViewModel,
            ConsoleViewModel consoleViewModel,
            IChocolateyInstaller installer,
            InstalledPackagesViewModel installedPackagesViewModel,
            InstallListViewModel installListView)
        {
            this._sourcesViewModel = sourcesViewModel;
            this._feedFactory = feedFactory;
            this._consoleViewModel = consoleViewModel;
            this._installer = installer;
            this._installedPackagesViewModel = installedPackagesViewModel;
            this._installListViewModel = installListView;

            this._sourcesViewModel.SelectedSourceChanged += async newSource => await this.HandleSelectedSourceChanged(newSource);

            this.RegisterCommands();

            this.IsWorking = false;
            this.CanSelectPackage = false;
            this.StatusMessage = "Ready";
        }