Beispiel #1
0
 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 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();
        }