public UnpackViewModel(IAppxPacker appxPacker, IInteractionService interactionService) : base("Unpack MSIX package", interactionService) { this.appxPacker = appxPacker; this.OutputPath = new ChangeableFolderProperty("Target directory", interactionService, ChangeableFolderProperty.ValidatePath); this.InputPath = new ChangeableFileProperty("Source package path", interactionService, ChangeableFileProperty.ValidatePath) { Filter = new DialogFilterBuilder("*" + FileConstants.MsixExtension, "*" + FileConstants.AppxExtension).BuildFilter() }; this.CreateFolder = new ChangeableProperty <bool>(true); this.InputPath.ValueChanged += this.InputPathOnValueChanged; this.AddChildren(this.InputPath, this.OutputPath, this.CreateFolder); this.RegisterForCommandLineGeneration(this.InputPath, this.OutputPath, this.CreateFolder); }
public PackViewModel( IAppxPacker appxPacker, ISelfElevationProxyProvider <ISigningManager> signingManagerFactory, IConfigurationService configurationService, IInteractionService interactionService) : base("Pack MSIX package", interactionService) { this.appxPacker = appxPacker; this.signingManagerFactory = signingManagerFactory; var signConfig = configurationService.GetCurrentConfiguration().Signing ?? new SigningConfiguration(); var signByDefault = configurationService.GetCurrentConfiguration().Packer?.SignByDefault == true; this.InputPath = new ChangeableFolderProperty("Source directory", interactionService, ChangeableFolderProperty.ValidatePath); this.OutputPath = new ChangeableFileProperty("Target package path", interactionService, ChangeableFileProperty.ValidatePath) { OpenForSaving = true, Filter = new DialogFilterBuilder("*.msix", "*.appx").BuildFilter() }; this.Sign = new ChangeableProperty <bool>(signByDefault); this.Compress = new ChangeableProperty <bool>(true); this.Validate = new ChangeableProperty <bool>(true); this.OverrideSubject = new ChangeableProperty <bool>(true); this.SelectedCertificate = new CertificateSelectorViewModel(interactionService, signingManagerFactory, signConfig) { IsValidated = false }; this.InputPath.ValueChanged += this.InputPathOnValueChanged; this.Sign.ValueChanged += this.SignOnValueChanged; this.TabSource = new ChangeableContainer(this.InputPath, this.OutputPath, this.Sign, this.Compress, this.Validate); this.TabSigning = new ChangeableContainer(this.SelectedCertificate, this.OverrideSubject); this.AddChildren(this.TabSource, this.TabSigning); }
public AppxContentBuilder(IAppxPacker packer) { this.packer = packer; }
public ModificationPackageBuilder(IAppxPacker packer) { this.packer = packer; }