public void Export(string tadFilename, bool exportModified = true) { string tacPath = Path.GetDirectoryName(tadFilename) + "\\" + Path.GetFileName(tadFilename).ToLower().Replace(".tad", ".tac"); string inputFolder = Path.GetDirectoryName(Filename) + Header.RelativeOutputFolder; if (exportModified) { LoadingDialog loadingDialogHash = new LoadingDialog(); loadingDialogHash.SetData(this); Thread threadHash = new Thread(delegate() { CalculateHashes(); }); loadingDialogHash.ShowDialog(threadHash); } TACFile tacFile = new TACFile(); LoadingDialog loadingDialog = new LoadingDialog(); loadingDialog.SetData(tacFile); Thread thread = new Thread(delegate() { tacFile.Pack(tacPath, inputFolder, TADFile); }); loadingDialog.ShowDialog(thread); TADFile.Write(tadFilename); }
public void Pack() { string tacPath = Path.GetDirectoryName(Filename) + Header.RelativeTACPath; string inputFolder = Path.GetDirectoryName(Filename) + Header.RelativeOutputFolder; TACFile tacFile = new TACFile(); LoadingDialog loadingDialog = new LoadingDialog(); loadingDialog.SetData(tacFile); Thread thread = new Thread(delegate() { tacFile.Pack(tacPath, inputFolder, TADFile, false); }); loadingDialog.ShowDialog(thread); string cachePath = Path.GetDirectoryName(tacPath) + "\\" + Path.GetFileName(TADFile.Filename).ToLower().Replace(".tad", ".cache"); Filename = cachePath; Write(cachePath); }