/// <summary> /// Force updates the specified mod(s). /// </summary> private void UpdateMods() { var instance = ModUpdateHandler.Instance; if (instance.IsUpdating) { PUIElements.ShowMessageDialog(null, ModUpdateDateStrings.UPDATE_INPROGRESS); } else { instance.StartModUpdate(this); } }
/// <summary> /// Checks the autosave status on the UI thread. /// </summary> /// <returns>true if save completed, or false otherwise.</returns> public bool CheckSaveStatus() { var status = this.status; bool done = false; switch (status) { case SaveStatus.Done: done = true; break; case SaveStatus.Failed: // Generic error done = true; PUIElements.ShowMessageDialog(GameScreenManager.Instance.ssOverlayCanvas. gameObject, string.Format(STRINGS.UI.CRASHSCREEN.SAVEFAILED, "Autosave failed!")); break; case SaveStatus.IOError: // I/O error, raise a dialog done = true; PUIElements.ShowMessageDialog(GameScreenManager.Instance.ssOverlayCanvas. gameObject, string.Format(STRINGS.UI.CRASHSCREEN.SAVEFAILED, "IOException. You may not have enough free space!")); break; case SaveStatus.InProgress: break; default: // NotStarted, time to throw throw new InvalidOperationException("Save not started"); } return(done); }
/// <summary> /// Shows a dialog when unsubscribing from a mod fails. /// </summary> private void OnUnsubFailed() { PUIElements.ShowMessageDialog(gameObject, UI.UNSUBFAILEDDIALOG.TEXT); }
private void OnModifyFailed() { PUIElements.ShowMessageDialog(parent, string.Format(UI.MODIFYFAILEDDIALOG.TEXT, mod.label.title)); Dispose(); }
private void OnModifyComplete() { PUIElements.ShowMessageDialog(parent, string.Format(UI.MODIFYDIALOG.SUCCESS, mod.label.title)); Dispose(); }