public DirectoryInfo GetModpackDirectory(string modpackId) { if (Modpacks == null) { return(null); } ModpackPath path = Modpacks.Where(m => m.ModpackID == modpackId).FirstOrDefault(); if (path == null) { return(null); } return(new DirectoryInfo(path.Path)); }
public void SetModpackDirectory(ModpackPath modpackPath) { if (Modpacks == null) { Modpacks = new List <ModpackPath>(); } ModpackPath path = Modpacks.Where(m => m.ModpackID == modpackPath.ModpackID).FirstOrDefault(); if (path == null) { Modpacks.Add(modpackPath); } else { path.Path = modpackPath.Path; } }