public GetPackagesHandler(
     IMsixHeroCommandExecutor commandExecutor,
     IBusyManager busyManager,
     IEventAggregator eventAggregator,
     IRunningAppsDetector detector,
     ISelfElevationProxyProvider <IAppxPackageQuery> packageQueryProvider)
 {
     detector.Subscribe(this);
     this.commandExecutor      = commandExecutor;
     this.busyManager          = busyManager;
     this.eventAggregator      = eventAggregator;
     this.detector             = detector;
     this.packageQueryProvider = packageQueryProvider;
 }
Example #2
0
        public MsixHeroCommandExecutor(
            IModuleManager moduleManager,
            IRegionManager regionManager,
            IEventAggregator eventAggregator,
            IConfigurationService configurationService,
            ISelfElevationProxyProvider <IAppxPackageManager> packageManagerProvider,
            ISelfElevationProxyProvider <IAppxLogManager> logManagerProvider,
            ISelfElevationProxyProvider <IAppxVolumeManager> volumeManagerProvider,
            IRunningAppsDetector detector) : base(eventAggregator)
        {
            this.moduleManager          = moduleManager;
            this.regionManager          = regionManager;
            this.eventAggregator        = eventAggregator;
            this.configurationService   = configurationService;
            this.packageManagerProvider = packageManagerProvider;
            this.logManagerProvider     = logManagerProvider;
            this.volumeManagerProvider  = volumeManagerProvider;
            this.detector = detector;

            detector.Subscribe(this);

            this.Handlers[typeof(SetToolFilterCommand)] = (command, token, progress) => this.SetToolFilter((SetToolFilterCommand)command);

            this.Handlers[typeof(SetEventViewerFilterCommand)]  = (command, token, progress) => this.SetEventViewerFilter((SetEventViewerFilterCommand)command);
            this.Handlers[typeof(SetEventViewerSortingCommand)] = (command, token, progress) => this.SetEventViewerSorting((SetEventViewerSortingCommand)command);

            this.Handlers[typeof(GetVolumesCommand)]      = (command, token, progress) => this.GetVolumes((GetVolumesCommand)command, token, progress);
            this.Handlers[typeof(SelectVolumesCommand)]   = (command, token, progress) => this.SelectVolumes((SelectVolumesCommand)command);
            this.Handlers[typeof(SetVolumeFilterCommand)] = (command, token, progress) => this.SetVolumeFilter((SetVolumeFilterCommand)command);

            this.Handlers[typeof(GetPackagesCommand)]     = (command, token, progress) => this.GetPackages((GetPackagesCommand)command, token, progress);
            this.Handlers[typeof(StopPackageCommand)]     = (command, token, progress) => this.StopPackage((StopPackageCommand)command, token);
            this.Handlers[typeof(CheckForUpdatesCommand)] = (command, token, progress) => this.CheckForUpdates((CheckForUpdatesCommand)command, token);
            this.Handlers[typeof(SelectPackagesCommand)]  = (command, token, progress) => this.SelectPackages((SelectPackagesCommand)command);

            this.Handlers[typeof(GetLogsCommand)]         = (command, token, progress) => this.GetLogs((GetLogsCommand)command, token, progress);
            this.Handlers[typeof(SelectLogCommand)]       = (command, token, progress) => this.SelectLog((SelectLogCommand)command);
            this.Handlers[typeof(OpenEventViewerCommand)] = (command, token, progress) => this.OpenEventViewer((OpenEventViewerCommand)command, token, progress);

            this.Handlers[typeof(SetPackageFilterCommand)]            = (command, token, progress) => this.SetPackageFilter((SetPackageFilterCommand)command);
            this.Handlers[typeof(SetCurrentModeCommand)]              = (command, token, progress) => this.SetCurrentMode((SetCurrentModeCommand)command);
            this.Handlers[typeof(SetPackageSortingCommand)]           = (command, token, progress) => this.SetPackageSorting((SetPackageSortingCommand)command);
            this.Handlers[typeof(SetPackageGroupingCommand)]          = (command, token, progress) => this.SetPackageGrouping((SetPackageGroupingCommand)command);
            this.Handlers[typeof(SetPackageSidebarVisibilityCommand)] = (command, token, progress) => this.SetPackageSidebarVisibility((SetPackageSidebarVisibilityCommand)command);
        }
Example #3
0
        public PackageExpertViewModel(
            string packagePath,
            IInterProcessCommunicationManager interProcessCommunicationManager,
            ISelfElevationProxyProvider <IAppxPackageManager> appxPackageManagerProvider,
            ISelfElevationProxyProvider <IAppxVolumeManager> appxVolumeManagerProvider,
            ISelfElevationProxyProvider <ISigningManager> signManager,
            IInteractionService interactionService,
            IRunningAppsDetector runningDetector,
            IDialogService dialogService)
        {
            this.interProcessCommunicationManager = interProcessCommunicationManager;
            this.appxPackageManagerProvider       = appxPackageManagerProvider;
            this.appxVolumeManagerProvider        = appxVolumeManagerProvider;
            this.runningDetector = runningDetector;
            this.packagePath     = packagePath;
            this.dialogService   = dialogService;

            this.Trust = new TrustViewModel(packagePath, interactionService, signManager);
        }
Example #4
0
        public PackageExpertControl(IEventAggregator eventAggregator,
                                    IInterProcessCommunicationManager ipcManager,
                                    ISelfElevationProxyProvider <IAppxPackageManager> packageManagerProvider,
                                    ISelfElevationProxyProvider <IAppxVolumeManager> volumeManagerProvider,
                                    ISelfElevationProxyProvider <ISigningManager> signingManagerProvider,
                                    IRunningAppsDetector runningDetector,
                                    IInteractionService interactionService,
                                    IDialogService dialogService,
                                    IConfigurationService configurationService
                                    )
        {
            this.context = RegionContext.GetObservableContext(this);
            this.context.PropertyChanged += this.OnPropertyChanged;
            this.ipcManager             = ipcManager;
            this.packageManagerProvider = packageManagerProvider;
            this.volumeManagerProvider  = volumeManagerProvider;
            this.runningDetector        = runningDetector;
            this.interactionService     = interactionService;
            this.signingManagerProvider = signingManagerProvider;
            this.dialogService          = dialogService;
            this.configurationService   = configurationService;

            eventAggregator.GetEvent <ToolsChangedEvent>().Subscribe(this.CreateTools, ThreadOption.UIThread);
        }