Exemplo n.º 1
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (mpupThread != null)
            {
                if (mpupThread.IsAlive)
                {
                    updateLogs();
                }
                else
                {
                    updateLogs();
                    mpup       = null;
                    mpupThread = null;
                }
            }

            if (spupThread != null)
            {
                if (spupThread.IsAlive)
                {
                    updateLogs();
                }
                else
                {
                    updateLogs();
                    spup       = null;
                    spupThread = null;
                }
            }
        }
Exemplo n.º 2
0
        private void RepackTextures()
        {
            LogMessage("Repacking textures.");

            string[] directoriesToRepack = new string[gameFileDirectories.Length];
            for (int i = 0; i < gameFileDirectories.Length; i++)
            {
                directoriesToRepack[i] = gameDirectory + "\\" + gameFileDirectories[i];
            }

            mpup       = new MPUP();
            mpupThread = new Thread(() => mpup.Repack(directoriesToRepack, threadCount, gameDirectory, gameDirectory + @"\TextSoundRando\Temp\Textures"));
            mpupThread.Start();
            mpupThread.Join();
        }
Exemplo n.º 3
0
        private void UnpackTextures()
        {
            string unpackDirectory = gameDirectory + "\\TextSoundRando\\Unpack\\Textures";

            if (!Directory.Exists(unpackDirectory))
            {
                Directory.CreateDirectory(unpackDirectory);
            }

            string[] directoriesToUnpack = new string[gameFileDirectories.Length];
            for (int i = 0; i < gameFileDirectories.Length; i++)
            {
                directoriesToUnpack[i] = gameDirectory + "\\" + gameFileDirectories[i];
            }

            mpup       = new MPUP();
            mpupThread = new Thread(() => mpup.Unpack(directoriesToUnpack, threadCount, gameDirectory, unpackDirectory));
            mpupThread.Start();
            mpupThread.Join();
        }