public bool UpdatePlugin(PluginItem plugin, string operation = "Updating") { var success = false; _appRef.ProgressBox(operation + " " + plugin.Name + "..."); if (InstallPlugin(new RemotePlugin { SourceFilename = plugin.ValidVersions.OrderBy(v => v.version).Last().sourceUrl, Filename = plugin.TargetFilename })) { plugin.UpdateAvailable = false; plugin.UpdatePending = true; plugin.NotifyPropertiesChanged(); WriteToUpdateLog(String.Format("Plug-in {0} Updated to version {1} by user {2}", plugin.Name, plugin.ValidVersions.OrderBy(v => v.version).Last().versionStr, Kernel.CurrentUser.Name)); success = true; } _appRef.ShowMessage = false; _appRef.InstalledPluginsCollection.ResetUpdatesAvailable(); return success; }
public bool UpdatePlugin(PluginItem plugin, string operation = "Updating") { var success = false; _appRef.ProgressBox(operation + " " + plugin.Name + "..."); if (InstallPlugin(new RemotePlugin { SourceFilename = plugin.ValidVersions.OrderBy(v => v.version).Last().sourceUrl, Filename = plugin.TargetFilename })) { plugin.UpdateAvailable = false; plugin.UpdatePending = true; plugin.NotifyPropertiesChanged(); success = true; } _appRef.ShowMessage = false; _appRef.InstalledPluginsCollection.ResetUpdatesAvailable(); return success; }