예제 #1
0
        public void ADX(string inputFolder, string outputFolder, List <string> fileList)
        {
            List <string> adxFiles = new List <string>();

            try
            {
                foreach (string file in Directory.GetFiles(inputFolder, "*.ADX", System.IO.SearchOption.AllDirectories))
                {
                    long length = new FileInfo(file).Length;
                    if (length > 540672)
                    {
                        adxFiles.Add(file);
                    }
                }

                Randomize.Files(adxFiles, fileList, outputFolder);
            }
            catch
            {
                MessageBox.Show("Make sure you selected a valid input and output folder!", "Something went wrong", MessageBoxButtons.OK);
            }
        }
        private void RandomizeFiles()
        {
            lbl_Status.Text = "Randomizing file data...";
            Randomize randomize = new Randomize();
            int       i         = combobox_Mode.SelectedIndex;

            if (game == "Persona 3")
            {
                switch (i)
                {
                case 0:     //BGM
                    randomize.ADX(inputFolder, outputFolder, p3files.BGM);
                    break;

                case 1:     //BUSTUP
                    randomize.BIN(inputFolder, outputFolder, p3files.BUSTUP);
                    break;

                case 2:     //FIELD/RMD
                    randomize.RMD(inputFolder, outputFolder, p3files.FIELDRMD);
                    break;

                case 3:     //FACILITYP
                    randomize.RMD(inputFolder, outputFolder, p3files.FACILITYP);
                    break;

                case 4:     //FIELD
                    randomize.RMD(inputFolder, outputFolder, p3files.FIELD);
                    break;

                case 5:     //NPC
                    randomize.RMD(inputFolder, outputFolder, p3files.NPC);
                    break;

                case 6:     //PERSONA
                    randomize.RMD(inputFolder, outputFolder, p3files.PERSONA);
                    break;

                case 7:     //SYMBOL
                    randomize.RMD(inputFolder, outputFolder, p3files.SYMBOL);
                    break;

                case 8:     //WEAPON
                    randomize.RMD(inputFolder, outputFolder, p3files.WEAPON);
                    break;
                }
            }
            else if (game == "Persona 4")
            {
                switch (i)
                {
                case 0:     //BGM
                    randomize.ADX(inputFolder, outputFolder, p4files.BGM);
                    break;

                case 1:     //BUSTUP
                    randomize.BIN(inputFolder, outputFolder, p4files.BUSTUP);
                    break;

                case 2:     //FIELD/RMD
                    randomize.RMD(inputFolder, outputFolder, p4files.FIELDRMD);
                    break;

                case 3:     //FACILITYP
                    randomize.RMD(inputFolder, outputFolder, p4files.FACILITYP);
                    break;

                case 4:     //FIELD
                    randomize.RMD(inputFolder, outputFolder, p4files.FIELD);
                    break;

                case 5:     //NPC
                    randomize.RMD(inputFolder, outputFolder, p4files.NPC);
                    break;

                case 6:     //NPC2
                    randomize.RMD(inputFolder, outputFolder, p4files.NPC2);
                    break;

                case 7:     //SYMBOL
                    randomize.RMD(inputFolder, outputFolder, p4files.SYMBOL);
                    break;

                case 8:     //WEAPON
                    randomize.RMD(inputFolder, outputFolder, p4files.WEAPON);
                    break;

                case 9:     //WEAPON
                    randomize.RMD(inputFolder, outputFolder, p4files.PERSONA);
                    break;
                }
            }
        }