public PackageSourceSettingControl() { CreateWarningAndErrorValidatorForViewModel = true; SkipSearchingForInfoBarMessageControl = false; AccentColorHelper.CreateAccentColorResourceDictionary(); InitializeComponent(); }
public PackageBatchViewModel(PackagesBatch packagesBatch, IPackageCommandService packageCommandService, IPackageOperationContextService packageOperationContextService) { Argument.IsNotNull(() => packagesBatch); Argument.IsNotNull(() => packageCommandService); Argument.IsNotNull(() => packageOperationContextService); _packageCommandService = packageCommandService; _packageOperationContextService = packageOperationContextService; PackagesBatch = packagesBatch; AccentColorHelper.CreateAccentColorResourceDictionary(); ActionName = _packageCommandService.GetActionName(packagesBatch.OperationType); PluralActionName = _packageCommandService.GetPluralActionName(packagesBatch.OperationType); PackageAction = new Command(OnPackageActionExecute, OnPackageActionCanExecute); ApplyAll = new Command(OnApplyAllExecute, OnApplyAllCanExecute); }
public ExplorerViewModel(IRepositoryNavigatorService repositoryNavigatorService, ISearchSettingsService searchSettingsService, IPackageCommandService packageCommandService, IPleaseWaitService pleaseWaitService, IPackageQueryService packageQueryService, ISearchResultService searchResultService, IDispatcherService dispatcherService, IPackagesUpdatesSearcherService packagesUpdatesSearcherService, IPackageBatchService packageBatchService, INuGetConfigurationService nuGetConfigurationService, IConfigurationService configurationService) { Argument.IsNotNull(() => repositoryNavigatorService); Argument.IsNotNull(() => searchSettingsService); Argument.IsNotNull(() => packageCommandService); Argument.IsNotNull(() => pleaseWaitService); Argument.IsNotNull(() => packageQueryService); Argument.IsNotNull(() => searchResultService); Argument.IsNotNull(() => dispatcherService); Argument.IsNotNull(() => packagesUpdatesSearcherService); Argument.IsNotNull(() => packageBatchService); Argument.IsNotNull(() => nuGetConfigurationService); Argument.IsNotNull(() => configurationService); _repositoryNavigatorService = repositoryNavigatorService; _packageCommandService = packageCommandService; _pleaseWaitService = pleaseWaitService; _packageQueryService = packageQueryService; _dispatcherService = dispatcherService; _packagesUpdatesSearcherService = packagesUpdatesSearcherService; _packageBatchService = packageBatchService; _nuGetConfigurationService = nuGetConfigurationService; _configurationService = configurationService; SearchSettings = searchSettingsService.SearchSettings; SearchResult = searchResultService.SearchResult; AvailableUpdates = new ObservableCollection <IPackageDetails>(); PackageAction = new TaskCommand <IPackageDetails>(OnPackageActionExecuteAsync, OnPackageActionCanExecute); CheckForUpdates = new TaskCommand(OnCheckForUpdatesExecute); OpenUpdateWindow = new TaskCommand(OnOpenUpdateWindowExecuteAsync); AccentColorHelper.CreateAccentColorResourceDictionary(); }