public void RepackHOGs() { foreach (string s in Directory.GetDirectories(Path.GetDirectoryName(PATH))) { Directory.CreateDirectory(Path.Combine(Path.GetDirectoryName(PATH), "TMP")); HOG hog; if (File.Exists(Path.Combine(s, "HOGInfo.xml"))) { hog = new HOG(Path.Combine(s, "HOGInfo.xml")); hog.Repack(Path.Combine(Path.GetDirectoryName(PATH), "TMP")); } } }
private void UnpackHOGs() { string path = Path.Combine(Path.GetDirectoryName(PATH), Path.GetFileNameWithoutExtension(PATH)); HOG hog; foreach (string name in NAMES) { if (Path.GetExtension(name) == ".HOG") { hog = new HOG(Path.Combine(path, name)); hog.Unpack(); } } }
private void btnHOGUnpack_Click(object sender, EventArgs e) { if (HOGUnpackFiles == null || HOGUnpackFiles.Length <= 0) { MessageBox.Show("Select a file to Unpack!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } HOG hog; foreach (string s in HOGUnpackFiles) { hog = new HOG(s); hog.Unpack(); } MessageBox.Show("Sucefully Unpacked!", "Success!", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); CleanHOGUnpack(); }
private void btnHOGRepack_Click(object sender, EventArgs e) { if (HOGRepackFile == String.Empty || HOGRepackFile == null) { MessageBox.Show("Select a file to Repack!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } if (HOGRepackSave == String.Empty || HOGRepackSave == null) { MessageBox.Show("Select a folder to save the file!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } HOG hog = new HOG(HOGRepackFile); hog.Repack(HOGRepackSave); MessageBox.Show("Sucefully Repacked!", "Success!", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); CleanHOGRepack(); }