private void autoTOCToolStripMenuItem_Click(object sender, EventArgs e) { var form = new AutoTOC.AutoTOC(); OpenMaximized(form); taskbar.AddTool(form, Properties.Resources.autotoc_64x64); }
public static void UpdateTOCs(string pathBIOGame, int WhichGame, string DLCPath, List<string> modifiedDLC = null) { DebugOutput.PrintLn("Updating Basegame..."); AutoTOC.AutoTOC toc = new AutoTOC.AutoTOC(); DLCEditor2.DLCEditor2 dlcedit2 = new DLCEditor2.DLCEditor2(); // KFreon: Format filenames List<string> FileNames = toc.GetFiles(pathBIOGame + "\\"); List<string> tet = new List<string>(pathBIOGame.Split('\\')); tet.RemoveAt(tet.Count - 1); string remov = String.Join("\\", tet.ToArray()); for (int i = 0; i < FileNames.Count; i++) FileNames[i] = FileNames[i].Substring(remov.Length + 1); // KFreon: Format basepath string[] ts = pathBIOGame.Split('\\'); tet.Clear(); tet.AddRange(ts); tet.RemoveAt(tet.Count - 1); string basepath = String.Join("\\", tet.ToArray()) + '\\'; string tocfile = pathBIOGame + "\\PCConsoleTOC.bin"; Console.WriteLine("BasePath: " + basepath); Console.WriteLine("Tocfile: " + tocfile); toc.CreateTOC(basepath, tocfile, FileNames.ToArray()); // KFreon: Update pcconsole.bin - not updated by WV's code. //tocUpdater(pathBIOGame + "\\PCConsoleTOC.bin"); DebugOutput.PrintLn("Basegame updated."); // KFreon: Update DLC TOCs // Updated by MrFob - crude for now as a TOC.bin update should be enough but it works. if (WhichGame == 3) { List<string> files = new List<string>(Directory.EnumerateFiles(DLCPath, "Default.sfar", SearchOption.AllDirectories)); DebugOutput.PrintLn("Updating DLC..."); dlcedit2.ExtractAllDLC(); DebugOutput.PrintLn("DLC Updated."); } }