/*************************************************************************/ /* Submit Tab */ /*************************************************************************/ private void buttonSubmitUrl_ClickButtonArea(object Sender, MouseEventArgs e) { if (textBoxSubmitLink.Text != "") { if (!Path.HasExtension(textBoxSubmitLink.Text)) { if (Uri.IsWellFormedUriString(textBoxSubmitLink.Text, UriKind.Absolute)) { string formattedText = textBoxSubmitLink.Text; if (!textBoxSubmitLink.Text.EndsWith("/")) { formattedText = textBoxSubmitLink.Text + "/"; } OpenLink.SubmitLink(new Uri(formattedText)); textBoxSubmitLink.Text = ""; } else { MessageBox.Show(this, "This isn't a public web directory."); } } else { MessageBox.Show(this, "This isn't a public web directory."); } } }
private void buttonSubmit_Click(object sender, EventArgs e) { if (!Path.HasExtension(textBoxWebsite.Text)) { if (Uri.IsWellFormedUriString(textBoxWebsite.Text, UriKind.Absolute)) { // Add a '/' if not present var formattedText = textBoxWebsite.Text; if (!textBoxWebsite.Text.EndsWith("/")) { formattedText = textBoxWebsite.Text + "/"; } OpenLink.SubmitLink(new Uri(formattedText)); Close(); } else { MessageBox.Show(this, "This isn't a public web directory."); } } else { MessageBox.Show(this, "This isn't a public web directory."); } }
/*************************************************************************/ /* Submit Tab */ /*************************************************************************/ // Submit URL button private void buttonSubmitUrl_ClickButtonArea(object Sender, MouseEventArgs e) { // If textbox isn't blank, isn't a file and is a uri string, open new issue template on GitHub if (textBoxSubmitLink.Text != "") { if (!Path.HasExtension(textBoxSubmitLink.Text)) { if (Uri.IsWellFormedUriString(textBoxSubmitLink.Text, UriKind.Absolute)) { // Add a '/' if not present var formattedText = textBoxSubmitLink.Text; if (!textBoxSubmitLink.Text.EndsWith("/")) { formattedText = textBoxSubmitLink.Text + "/"; } OpenLink.SubmitLink(new Uri(formattedText)); textBoxSubmitLink.Text = ""; } else { MessageBox.Show(this, "This isn't a public web directory."); } } else { MessageBox.Show(this, "This isn't a public web directory."); } } }