예제 #1
0
 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.");
     }
 }
예제 #2
0
        /*************************************************************************/
        /* 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.");
                }
            }
        }
예제 #3
0
        /*************************************************************************/
        /* 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.");
                }
            }
        }
예제 #4
0
 private void cmboboxReportFile_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (cmboboxReportFile.SelectedIndex == 0)
     {
         OpenLink.BrokenFileIssue(currentFile);
     }
     else if (cmboboxReportFile.SelectedIndex == 1)
     {
         MessageBox.Show(this, "Please write an email to the application administrator with your appropriate details at [email protected]\n\n Thank you.");
     }
     else if (cmboboxReportFile.SelectedIndex == 2)
     {
         OpenLink.PoorQualityFileIssue(currentFile);
     }
 }
예제 #5
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Label.Length != 0)
            {
                hash ^= Label.GetHashCode();
            }
            if (actionTypeCase_ == ActionTypeOneofCase.OpenLink)
            {
                hash ^= OpenLink.GetHashCode();
            }
            if (actionTypeCase_ == ActionTypeOneofCase.RunFunction)
            {
                hash ^= RunFunction.GetHashCode();
            }
            hash ^= (int)actionTypeCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }