public async Task ModUninstall(IMod mod) { if (mod == null) { throw new ArgumentNullException(nameof(mod)); } LibraryVM.ActiveItem = mod; var report = !(await _dialogManager.MessageBox( new MessageBoxDialogParams($"You are about to uninstall {mod.Name}\nare you sure?", "Are you sure you want to uninstall the Modification?", SixMessageBoxButton.YesNo) { IgnoreContent = false, GreenContent = "delete", RedContent = "keep" })).IsYes(); if (report) { return; } try { await _updateManager.Value.HandleUninstall().ConfigureAwait(false); } catch (BusyStateHandler.BusyException) { _dialogManager.BusyDialog(); } }
public async Task DownloadMission(Mission mission) { try { await _updateManager.DownloadMission(mission).ConfigureAwait(false); } catch (BusyStateHandler.BusyException) { _dialogManager.BusyDialog(); } }
async Task HanldePwsUrl(string p) { try { await _contentManager.Value.HandlePwsUrl(p).ConfigureAwait(false); } catch (BusyStateHandler.BusyException) { _dialogManager.BusyDialog(); } }
async Task <RecoveryOptionResult> BusyDialog(BusyUserError busyUserError) { await Dispatcher.InvokeAsync(() => _dialogManager.BusyDialog()); return(RecoveryOptionResult.CancelOperation); }