public async void Remove(BLVersion v)
        {
            ViewModels.LauncherModel.Default.ShowProgressBar = true;
            ViewModels.LauncherModel.Default.CurrentState = ViewModels.LauncherModel.StateChange.isUninstalling;

            try
            {
                await UnregisterPackage(v, Path.GetFullPath(v.GameDirectory), false);
                Directory.Delete(v.GameDirectory, true);
            }
            catch (Exception ex)
            {
                ErrorScreenShow.exceptionmsg(ex);
            }

            v.UpdateInstallStatus();
            ViewModels.LauncherModel.Default.CurrentState = ViewModels.LauncherModel.StateChange.None;
            ViewModels.LauncherModel.Default.ShowProgressBar = false;
            return;
        }
        private async Task<bool> Download(BLVersion v, bool RunAfterwards)
        {
            System.Diagnostics.Debug.WriteLine("Download start");
            bool wasCanceled = false;

            cancelSource = new CancellationTokenSource();
            ViewModels.LauncherModel.Default.ShowProgressBar = true;
            ViewModels.LauncherModel.Default.AllowCancel = true;
            ViewModels.LauncherModel.Default.CancelCommand = new RelayCommand((o) => Cancel());

            try
            {
                string dlPath = "Minecraft-" + v.Name + ".Appx";
                VersionDownloader downloader = LauncherModel.Default.VersionDownloader;
                if (v.IsBeta) await BetaAuthenticate();
                await DownloadVersion(v, downloader, dlPath, cancelSource);
                await ExtractPackage(v, dlPath, cancelSource);
            }
            catch (TaskCanceledException)
            {
                wasCanceled = true;
            }
            catch (Exception ex)
            {
                ErrorScreenShow.exceptionmsg(ex);
                wasCanceled = true;
            }

            if (!RunAfterwards || wasCanceled) ViewModels.LauncherModel.Default.ShowProgressBar = false;
            ViewModels.LauncherModel.Default.CurrentState = ViewModels.LauncherModel.StateChange.None;
            ViewModels.LauncherModel.Default.AllowCancel = false;
            ViewModels.LauncherModel.Default.CancelCommand = null;
            cancelSource = null;
            v.UpdateInstallStatus();

            return wasCanceled;


        }