// Redownload a fresh copy of Components.json. private void resetComponentsjsonToolStripMenuItem_Click(object sender, EventArgs e) { if (File.Exists(PrgmSelfCheck.ComponentsJson) == true) { File.Delete(PrgmSelfCheck.ComponentsJson); DownloadProgress downloadProgress = new DownloadProgress("https://raw.githubusercontent.com/GreenJamesDev/RsMapper/master/RsMapper/Components.json", PrgmSelfCheck.ComponentsJson); downloadProgress.ShowDialog(); downloadProgress.Dispose(); } MessageBox.Show("You must restart RsMapper for these changes to take effect.", "Restart Required", MessageBoxButtons.OK, MessageBoxIcon.Information); }
/// <summary> /// Check for any missing files that are required to start the program. /// </summary> public async void CheckAll() { // Components.json if (File.Exists(ComponentsJson) == false) { Directory.CreateDirectory(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "RsMapper")); DownloadProgress downloadProgress = new DownloadProgress("https://raw.githubusercontent.com/GreenJamesDev/RsMapper/master/RsMapper/Components.json", ComponentsJson); downloadProgress.ShowDialog(); downloadProgress.Dispose(); } // Modpacks folder. if (Directory.Exists(Modpacks) == false) { Directory.CreateDirectory(Modpacks); } }
void ReleaseDesignerOutlets() { if (BuyButton != null) { BuyButton.Dispose(); BuyButton = null; } if (ItemDescription != null) { ItemDescription.Dispose(); ItemDescription = null; } if (ItemImage != null) { ItemImage.Dispose(); ItemImage = null; } if (ItemPrice != null) { ItemPrice.Dispose(); ItemPrice = null; } if (ItemTitle != null) { ItemTitle.Dispose(); ItemTitle = null; } if (DownloadProgress != null) { DownloadProgress.Dispose(); DownloadProgress = null; } }