2023-01-07 18:46:26 +00:00
|
|
|
|
using Playnite.SDK;
|
|
|
|
|
using Playnite.SDK.Models;
|
|
|
|
|
using Playnite.SDK.Plugins;
|
|
|
|
|
using LANCommander.SDK.Extensions;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using ICSharpCode.SharpZipLib.Zip;
|
|
|
|
|
using ICSharpCode.SharpZipLib.Core;
|
|
|
|
|
|
2023-01-08 18:09:57 +00:00
|
|
|
|
namespace LANCommander.PlaynitePlugin
|
2023-01-07 18:46:26 +00:00
|
|
|
|
{
|
|
|
|
|
public class LANCommanderUninstallController : UninstallController
|
|
|
|
|
{
|
|
|
|
|
private PlayniteLibraryPlugin Plugin;
|
|
|
|
|
|
|
|
|
|
public LANCommanderUninstallController(PlayniteLibraryPlugin plugin, Game game) : base(game)
|
|
|
|
|
{
|
|
|
|
|
Name = "Uninstall LANCommander Game";
|
|
|
|
|
Plugin = plugin;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void Uninstall(UninstallActionArgs args)
|
|
|
|
|
{
|
2023-01-07 20:32:52 +00:00
|
|
|
|
if (!String.IsNullOrWhiteSpace(Game.InstallDirectory) && Directory.Exists(Game.InstallDirectory))
|
|
|
|
|
Directory.Delete(Game.InstallDirectory, true);
|
2023-01-07 18:46:26 +00:00
|
|
|
|
|
|
|
|
|
InvokeOnUninstalled(new GameUninstalledEventArgs());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|