public AppInfo ReadManifestFromZip(string filePath) { AppInfo inf = new AppInfo(); FileStream fileStream1 = new FileStream(filePath, FileMode.Open, FileAccess.Read); try { XapDeployer.ZipArchive zipArchive1 = new XapDeployer.ZipArchive(fileStream1); Stream stream1 = zipArchive1.GetFileStream("WMAppManifest.xml"); try { return(ReadManifestFromStream(stream1)); } finally { if (stream1 != null) { stream1.Dispose(); } } } finally { if (fileStream1 != null) { fileStream1.Dispose(); } } return(null); }
internal string ExtractIconFile() { bool flag; Info.TempIconFileName = null; try { FileStream fileStream1 = new FileStream(XapPath, FileMode.Open, FileAccess.Read); try { XapDeployer.ZipArchive zipArchive1 = new XapDeployer.ZipArchive(fileStream1); Stream stream1 = zipArchive1.GetFileStream(Info.IconPath); flag = stream1 == null; if (flag) { Assembly assembly1 = Assembly.GetExecutingAssembly(); stream1 = assembly1.GetManifestResourceStream("ApplicationIcon.png"); flag = stream1 == null; if (flag) { return(null); } } string TempFileName = Path.GetTempFileName(); FileStream fileStream2 = new FileStream(TempFileName, FileMode.Create); try { stream1.CopyTo(fileStream2); } finally { flag = fileStream2 != null; if (flag) { fileStream2.Dispose(); } } Info.TempIconFileName = TempFileName; return(TempFileName); } finally { flag = fileStream1 != null; if (flag) { fileStream1.Dispose(); } } } catch (Exception e) { return(null); } return(null); }
internal string ExtractIconFile() { bool flag; Info.TempIconFileName = null; try { FileStream fileStream1 = new FileStream(XapPath, FileMode.Open, FileAccess.Read); try { XapDeployer.ZipArchive zipArchive1 = new XapDeployer.ZipArchive(fileStream1); Stream stream1 = zipArchive1.GetFileStream(Info.IconPath); flag = stream1 == null; if (flag) { Assembly assembly1 = Assembly.GetExecutingAssembly(); stream1 = assembly1.GetManifestResourceStream("ApplicationIcon.png"); flag = stream1 == null; if (flag) { return null; } } string TempFileName = Path.GetTempFileName(); FileStream fileStream2 = new FileStream(TempFileName, FileMode.Create); try { stream1.CopyTo(fileStream2); } finally { flag = fileStream2 != null; if (flag) fileStream2.Dispose(); } Info.TempIconFileName = TempFileName; return TempFileName; } finally { flag = fileStream1 != null; if (flag) fileStream1.Dispose(); } } catch (Exception e) { return null; } return null; }
public AppInfo ReadManifestFromZip(string filePath) { AppInfo inf = new AppInfo(); FileStream fileStream1 = new FileStream(filePath, FileMode.Open, FileAccess.Read); try { XapDeployer.ZipArchive zipArchive1 = new XapDeployer.ZipArchive(fileStream1); Stream stream1 = zipArchive1.GetFileStream("WMAppManifest.xml"); try { return ReadManifestFromStream(stream1); } finally { if (stream1 != null) stream1.Dispose(); } } finally { if (fileStream1 != null) fileStream1.Dispose(); } return null; }