public EventViewerViewModel( IMsixHeroApplication application, PrismServices prismServices) { this.application = application; this.prismServices = prismServices; application.EventAggregator.GetEvent <UiExecutedEvent <SelectLogCommand> >().Subscribe(this.OnSelectLogCommand); }
public VolumeManagementViewModel( IMsixHeroApplication application, PrismServices prismServices) { this.application = application; this.prismServices = prismServices; application.EventAggregator.GetEvent <UiExecutedEvent <SelectVolumesCommand> >().Subscribe(this.OnSelectVolumes, ThreadOption.UIThread); }
public PackagesManagementCommandHandler( IMsixHeroApplication application, IInteractionService interactionService, IConfigurationService configurationService, PrismServices prismServices, ISelfElevationProxyProvider <IAppxPackageRunner> packageRunnerProvider, ISelfElevationProxyProvider <IAppxPackageInstaller> packageInstallerProvider, ISelfElevationProxyProvider <IRegistryManager> registryManagerProvider, IBusyManager busyManager) { this.application = application; this.interactionService = interactionService; this.configurationService = configurationService; this.dialogService = prismServices.DialogService; this.moduleManager = prismServices.ModuleManager; this.packageRunnerProvider = packageRunnerProvider; this.packageInstallerProvider = packageInstallerProvider; this.registryManagerProvider = registryManagerProvider; this.busyManager = busyManager; this.fileInvoker = new FileInvoker(this.interactionService, this.configurationService); this.Refresh = new DelegateCommand(this.OnRefresh, this.CanRefresh); this.AddPackage = new DelegateCommand <object>(this.OnAddPackage, this.CanAddPackage); this.OpenExplorer = new DelegateCommand(this.OnOpenExplorer, this.CanOpenExplorer); this.OpenUserExplorer = new DelegateCommand(this.OnOpenUserExplorer, this.CanOpenUserExplorer); this.OpenManifest = new DelegateCommand(this.OnOpenManifest, this.CanOpenManifest); this.OpenConfigJson = new DelegateCommand(this.OnOpenConfigJson, this.CanOpenPsfConfig); this.OpenStore = new DelegateCommand(this.OnOpenStore, this.CanOpenStore); this.CheckUpdates = new DelegateCommand(this.OnCheckUpdates, this.CanCheckUpdates); this.RunTool = new DelegateCommand <object>(this.OnRunTool, this.CanRunTool); this.RemovePackage = new DelegateCommand(this.OnRemovePackage, this.CanRemovePackage); this.Copy = new DelegateCommand <object>(this.OnCopy, this.CanCopy); this.ViewDependencies = new DelegateCommand(this.OnViewDependencies, this.CanViewDependencies); this.ChangeVolume = new DelegateCommand(this.OnChangeVolume, this.CanChangeVolume); this.ShowAppInstallerDialog = new DelegateCommand <object>(this.OnShowAppInstallerDialog); this.ShowModificationPackageDialog = new DelegateCommand <object>(this.OnShowModificationPackageDialog); this.ShowWingetDialog = new DelegateCommand <object>(this.OnShowWingetDialog); this.MountRegistry = new DelegateCommand(this.OnMountRegistry, this.CanMountRegistry); this.DismountRegistry = new DelegateCommand(this.OnDismountRegistry, this.CanDismountRegistry); this.StartApp = new DelegateCommand <object>(this.OnStartApp, this.CanStartApp); this.StopApp = new DelegateCommand(this.OnStopApp, this.CanStopApp); this.Settings = new DelegateCommand(this.OnSettings); }
public PackageManagementViewModel( IMsixHeroApplication application, IInteractionService interactionService, ISelfElevationProxyProvider <IAppxPackageManager> packageManagerProvider, ISelfElevationProxyProvider <IRegistryManager> registryManagerProvider, PrismServices prismServices, IBusyManager busyManager, IConfigurationService configurationService) { this.application = application; this.prismServices = prismServices; this.CommandHandler = new PackagesManagementCommandHandler( application, interactionService, configurationService, prismServices, packageManagerProvider, registryManagerProvider, busyManager); application.EventAggregator.GetEvent <UiExecutedEvent <SelectPackagesCommand> >().Subscribe(this.OnSelectPackages, ThreadOption.UIThread); }