public void IdolMailReadTest(string mailName, string infoName, string xlsxName) { using XlsxWriter xlsx = new XlsxWriter(xlsxName, true); using FileStream mailStream = new FileStream(mailName, FileMode.Open, FileAccess.Read); using FileStream infoStream = new FileStream(infoName, FileMode.Open, FileAccess.Read); IdolMail.ReadFile(mailStream, infoStream, xlsx); }
private void AddIdolMail(XlsxReader xlsx, IProgress <string> progress) { const string idolMailName = "parameter/mail_idol_par/_dlc01_mail_idol.bin"; if (!HasFile(idolMailName) && IdolMail.allMailSheetNames.Any(sheetName => xlsx.Sheets.Descendants <Sheet>().Any(sheet => sheet.Name == sheetName))) { progress?.Report(string.Format("Adding {0}", idolMailName)); ZipArchiveEntry entry = zipArchive.CreateEntry(idolMailName); using Stream entryStream = entry.Open(); IdolMail.WriteFile(entryStream, xlsx); _entries.Add(new PatchZipEntry(entry)); } }
public void IdolMailWriteTest(string mailName, string xlsxName) { using XlsxReader xlsx = new XlsxReader(xlsxName); using FileStream stream = new FileStream(mailName, FileMode.Create, FileAccess.Write); IdolMail.WriteFile(stream, xlsx); }