private void buttonStatus_Click(object sender, EventArgs e) { if (!CanConnect()) { using (FormNodes form = new FormNodes(_group)) { form.ShowDialog(); } } }
protected LeafNodeDictionaryEntry ProcessInputNode(HtmlNode n) { var input_types_toWatch = InputTypesToWatch.or(DefaultInputTypesToWatch); LeafNodeDictionaryEntry entry = AddOrGet(n); if (entry.MetaData == null) { var formParentNode = n.GetFirstParent(x => x.Name.Equals("form", StringComparison.InvariantCultureIgnoreCase)); InputFormDefinition inf = null; if (formParentNode != null) { if (!FormNodes.Any(x => x.entry.XPath == formParentNode.XPath)) { LeafNodeDictionaryEntry form_entry = Add(formParentNode); inf = new InputFormDefinition(form_entry, formParentNode); FormNodes.Add(inf); } else { inf = FormNodes.FirstOrDefault(x => x.entry.XPath == formParentNode.XPath); } } InputNodeDefinition ind = new InputNodeDefinition(entry, n); if (input_types_toWatch.Contains(ind.type)) { ind.DoWatch = true; } if (!InputNodes.Any(x => x.xkey == ind.xkey)) { InputNodes.Add(ind); if (inf != null) { inf.Add(ind); } } } return(entry); }