Beispiel #1
0
        private void CheckLink_Click(object sender, EventArgs e)
        {
            CheckLinkTrustworthiness link = new CheckLinkTrustworthiness();

            try
            {
                link.IsLinkValid(URLbox.Text);
            }

            catch (ArgumentException exception)
            {
                MessageBox.Show(exception.Message);
            }

            if (link.CheckLink(URLbox.Text))
            {
                this.Hide();
                // Create instance of form CheckLinkResult and pass the current CheckText as a parameter to the constructer.
                CheckLinkResult CheckLinkResult = new CheckLinkResult(this);
                CheckLinkResult.Show();
            }

            else
            {
                this.Hide();
                //TextSimilarityForm TextSimilarity = new TextSimilarityForm(this);
                //TextSimilarity.Show();
                ChooseTagForm TagsForm = new ChooseTagForm(this);
                TagsForm.Show();
            }
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            //Method1();
            Console.WriteLine("skriv link:");
            string link = Console.ReadLine();
            CheckLinkTrustworthiness checklink = new CheckLinkTrustworthiness();

            try
            {
                checklink.IsLinkValid(link);
            }
            catch (ArgumentException e)
            {
                Console.WriteLine(e.Message);
            }
        }