/// <summary>Disables a mod and returns the new location of the mod</summary> public void DisableMod(Mod mod) { var source = mod.FullFolderPath; var destination = Path.Combine(DisabledModPath, mod.Folder); Directory.Move(source, destination); InvalidateCache(); mod.IsEnabled = false; mod.FullFolderPath = destination; mod.IconPath = ModScanner.FindModImagePath(destination); }
/// <summary>Enables a mod and returns the new location of the mod</summary> public void EnableMod(Mod mod) { var source = mod.FullFolderPath; var destination = Path.Combine(settings.Get().CCInstallDirectory, mod.Folder); Directory.Move(source, destination); InvalidateCache(); mod.IsEnabled = true; mod.FullFolderPath = destination; mod.IconPath = ModScanner.FindModImagePath(destination); }