/// <summary> /// Check for any update available and run the plugin installer /// </summary> /// <param name="viewInvoker">An <see cref="IViewInvokerService"/></param> /// <param name="processRunner">An <see cref="IProcessRunnerService"/></param> /// <returns>An Assert whether the IME have to shut down</returns> public static bool CheckInstallAndVerifyIfTheImeShallShutdown(IViewInvokerService viewInvoker = null, IProcessRunnerService processRunner = null) { var imeUpdate = CheckForImeUpdate(); if (imeUpdate != null && (viewInvoker ?? new ViewInvokerService()).ShowMessageBox(ImeNewVersionMessage, "IME Update", MessageBoxButton.YesNo, MessageBoxImage.Information) == MessageBoxResult.Yes) { RunInstaller(imeUpdate, processRunner); return(true); } var updatablePlugins = PluginUtilities.GetDownloadedInstallablePluginUpdate().ToList(); if (updatablePlugins.Any()) { var pluginInstallerView = new UpdateDownloaderInstaller() { DataContext = new UpdateDownloaderInstallerViewModel(updatablePlugins) }; (viewInvoker ?? new ViewInvokerService()).ShowDialog(pluginInstallerView); } return(false); }