public ChocolateySourcesViewModel(ISourcesManager sourcesManager, IChocolateyFeedFactory feedFactory) { this._sourcesManager = sourcesManager; this._feedFactory = feedFactory; this.Sources = new ObservableCollection<ChocolateySource>(); this.AddSourceCommand = new RelayCommand(this.AddSource, this.ValidateNewSource); this.RemoveSourceCommand = new RelayCommand<ChocolateySource>(this.RemoveSource, source => source != null); this.AddNewSourceCommand = new RelayCommand(() => this.SelectedChocolateySource = null); }
public ChocolateySourcesViewModel(ISourcesManager sourcesManager, IChocolateyFeedFactory feedFactory) { this._sourcesManager = sourcesManager; this._feedFactory = feedFactory; this.Sources = new ObservableCollection <ChocolateySource>(); this.AddSourceCommand = new RelayCommand(this.AddSource, this.ValidateNewSource); this.RemoveSourceCommand = new RelayCommand <ChocolateySource>(this.RemoveSource, source => source != null); this.AddNewSourceCommand = new RelayCommand(() => this.SelectedChocolateySource = null); }
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"; }