public void Set_Current_GameVersionSettings_GameExeLocation() { string newFilePath = ""; IOManagement.GetFilePath(ref newFilePath, "Exe Files (.exe)|*.exe", "Select the Game Executable File"); if (File.Exists(newFilePath)) { current_GameVersionSettings.Game_Location = Path.GetDirectoryName(newFilePath); current_GameVersionSettings.Game_LocationExe = newFilePath; } }
//------------------------- MAIN ACTIONS ------------------------- //------------------------- MAIN ACTIONS ------------------------- //------------------------- MAIN ACTIONS ------------------------- /// <summary> /// Adds a mod to the mod manager. /// <para>Will prompt the user with a file browser to select a mod file (.zip)</para> /// </summary> public void AddMod() { //create a temporary string to contain the path string filePath = ""; //prompt the user with a file browser dialog IOManagement.GetFilePath(ref filePath, "ZIP files|*.zip", "Select a Mod File"); //if the string is not empty (meaning the user has chosen their path) read the zip file for a modinfo.json if (String.IsNullOrEmpty(filePath) == false) { ReadModZipFile(filePath); } }