private void loadModuleDescription() { Cursor.Current = Cursors.WaitCursor; var installedModule = manager.GetInstalledModule(currentItem); webBrowser1.Navigate(new Uri(currentItem.Description, UriKind.Absolute)); modInfo.SetInfo(currentItem.Name, currentItem.Author, currentItem.Version, (installedModule != null ? installedModule.Version : "N/A")); if (installedModule != null) { if (installedModule.Version != currentItem.Version) { moduleDownloadButton.Enabled = true; moduleDownloadButton.Text = "Update " + currentItem.Type; moduleDownloadInstallButton.Text = "Update and Install" + currentItem.Type; } else { moduleDownloadButton.Enabled = false; moduleDownloadButton.Text = currentItem.Type + " Up-To-Date"; moduleDownloadInstallButton.Text = "Install " + currentItem.Type; } } else { moduleDownloadButton.Enabled = true; moduleDownloadButton.Text = "Download " + currentItem.Type; moduleDownloadInstallButton.Text = "Download and Install " + currentItem.Type; } moduleDownloadInstallButton.Enabled = true; }
private void loadModuleDescription() { Cursor.Current = Cursors.WaitCursor; var installedModule = manager.GetInstalledModule(currentItem); loadingDescription++; webBrowser1.Navigate(new Uri(currentItem.Description, UriKind.Absolute)); moduleDescriptionBrowser.DocumentText = String.Format("<html style='background-color:#d20014;color:#ffffff;'>" + "<body background='https://hakchiresources.com/wp-content/uploads/2018/04/bg-1.png' style='width:273px;'>" + "<span style='font-family: Arial, Helvetica, sans-serif;'>" + "<b>Module Name:</b><br /><span style='font-size:75%;'>{0}</span><br />" + "<b>Author:</b><br /><span style='font-size:75%;'>{1}</span><br />" + "<b>Latest Version:</b><br /><span style='font-size:75%;'>{2}</span><br />" + "<b>Installed Version:</b><br /><span style='font-size:75%;'>{3}</span>" + "</span>" + "</body>" + "</html>", currentItem.Name, currentItem.Author, currentItem.Version, (installedModule != null) ? installedModule.Version : "N/A"); if (installedModule != null) { if (installedModule.Version != currentItem.Version) { moduleDownloadButton.Enabled = true; moduleDownloadButton.Text = "Update " + currentItem.Type; moduleDownloadInstallButton.Text = "Update and Install" + currentItem.Type; } else { moduleDownloadButton.Enabled = false; moduleDownloadButton.Text = currentItem.Type + " Up-To-Date"; moduleDownloadInstallButton.Text = "Install " + currentItem.Type; } } else { moduleDownloadButton.Enabled = true; moduleDownloadButton.Text = "Download " + currentItem.Type; moduleDownloadInstallButton.Text = "Download and Install " + currentItem.Type; } }