public RuleSetNode(XmlElement el) { Text = ResNodeName("RuleSet"); OptionPanel = new RuleSetOptionPanel(this); if (el == null) return; if (el.Attributes["name"] != null) { name = el.Attributes["name"].InnerText; Text = name; isRoot = false; } if (name == "") { Text = ResNodeName("RootRuleSet"); isRoot = true; } if (el.Attributes["noescapesequences"] != null) { noEscapeSequences = Boolean.Parse(el.Attributes["noescapesequences"].InnerText); } if (el.Attributes["reference"] != null) { reference = el.Attributes["reference"].InnerText; } if (el.Attributes["ignorecase"] != null) { ignoreCase = Boolean.Parse(el.Attributes["ignorecase"].InnerText); } if (el["Delimiters"] != null) { delimiters = el["Delimiters"].InnerText; } keywordNode = new KeywordListsNode(el); spansNode = new SpansNode(el); prevMarkerNode = new MarkersNode(el, true); // Previous nextMarkerNode = new MarkersNode(el, false); // Next Nodes.Add(keywordNode); Nodes.Add(spansNode); Nodes.Add(prevMarkerNode); Nodes.Add(nextMarkerNode); }
public RuleSetNode(string Name, string Delim, string Ref, bool noEsc, bool noCase) { name = Name; Text = Name; delimiters = Delim; reference = Ref; noEscapeSequences = noEsc; ignoreCase = noCase; keywordNode = new KeywordListsNode(null); spansNode = new SpansNode(null); prevMarkerNode = new MarkersNode(null, true); // Previous nextMarkerNode = new MarkersNode(null, false); // Next Nodes.Add(keywordNode); Nodes.Add(spansNode); Nodes.Add(prevMarkerNode); Nodes.Add(nextMarkerNode); OptionPanel = new RuleSetOptionPanel(this); }