public TextSimilarityForm(ChooseTagForm pastForm) { InitializeComponent(); // Setting the instance of checkText equel to the parameter that is passed in the constructer. pastFormInstance = pastForm; }
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(); } }