in AppInstallerFileBuilder/AppInstallerFileBuilder/Views/ModificationPackageView.xaml.cs [83:152]
private async void PackageInfoButton_Click(object sender, RoutedEventArgs e)
{
FileOpenPicker openPicker = new FileOpenPicker
{
ViewMode = PickerViewMode.Thumbnail,
SuggestedStartLocation = PickerLocationId.Desktop
};
openPicker.FileTypeFilter.Add(".msix");
openPicker.FileTypeFilter.Add(".msixbundle");
openPicker.FileTypeFilter.Add(".appx");
openPicker.FileTypeFilter.Add(".appxbundle");
StorageFile file = await openPicker.PickSingleFileAsync();
if (file != null && (file.FileType.Equals(".msix", StringComparison.OrdinalIgnoreCase) || file.FileType.Equals(".appx", StringComparison.OrdinalIgnoreCase)))
{
// Application now has read/write access to the picked file
IRandomAccessStream randomAccessStream = await file.OpenReadAsync();
AppxMetadata appPackage = new AppxMetadata(randomAccessStream);
//_filePathTextBox.Text = file.Path;
_modificationPackage.FilePath = file.Path;
//_nameTextBox.Text = appPackage.PackageName;
_modificationPackage.Name = appPackage.PackageName;
//_publisherTextBox.Text = appPackage.Publisher;
_modificationPackage.Publisher = appPackage.Publisher;
//_versionTextBox.Text = appPackage.Version.ToString();
_modificationPackage.Version = appPackage.Version.ToString();
//_resourceIdTextBox.Text = appPackage.ResourceId;
//_mainPackage.ResourceId = appPackage.ResourceId;
//_processorArchTextBox.Text = appPackage.Architecture;
_modificationPackage.ProcessorArchitecture = appPackage.Architecture;
//_uriPathTextBox.Text = file.Path;
_modificationPackage.FullUriPath = file.Path;
_modificationPackage.PackageType = PackageType.MSIX;
}
else if (file != null && (file.FileType.Equals(".msixbundle", StringComparison.OrdinalIgnoreCase) || file.FileType.Equals(".appxbundle", StringComparison.OrdinalIgnoreCase)))
{
IRandomAccessStream randomAccessStream = await file.OpenReadAsync();
AppxBundleMetadata appBundle = new AppxBundleMetadata(randomAccessStream);
//_filePathTextBox.Text = file.Path;
_modificationPackage.FilePath = file.Path;
//_nameTextBox.Text = appBundle.PackageName;
_modificationPackage.Name = appBundle.PackageName;
//_publisherTextBox.Text = appBundle.Publisher;
_modificationPackage.Publisher = appBundle.Publisher;
//_versionTextBox.Text = appBundle.Version.ToString();
_modificationPackage.Version = appBundle.Version.ToString();
//_uriPathTextBox.Text = file.Path;
_modificationPackage.FullUriPath = file.Path;
_modificationPackage.PackageType = PackageType.MSIXBUNDLE;
}
_reloadViews();
_save();
}