public static void CheckForTLS12ThenUpdate(String ReturnVal, Int32 InstallMode) { if (!ReturnVal.Equals("0.0.0.0")) { if (!Properties.Settings.Default.TLS12Missing) { Forms.DLEngine frm = new Forms.DLEngine(ReturnVal, String.Format("Downloading update {0}...", ReturnVal, @"{0}"), null, null, InstallMode); frm.StartPosition = FormStartPosition.CenterScreen; frm.ShowDialog(); } else { Process.Start(String.Format(UpdatePage, ReturnVal)); } } }
private void UDBLi_Click(object sender, EventArgs e) { try { DialogResult dialogResultR = MessageBox.Show("Do you want to update/restore the default blacklist?", "Restore the default blacklist", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dialogResultR == DialogResult.Yes) { string dbl = "https://raw.githubusercontent.com/KeppySoftware/OmniMIDI/master/output/OmniMIDI.dbl"; Forms.DLEngine frm = new Forms.DLEngine(null, "Downloading the default blacklist...", dbl, Path.GetDirectoryName(DefBlacklistPath), UpdateSystem.USERFOLDER_PATH); frm.StartPosition = FormStartPosition.CenterScreen; frm.ShowDialog(); } } catch (Exception ex) { MessageBox.Show("There was an error while saving the blacklist!\n\n.NET error:\n" + ex.Message.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }