public RuleSetNode(XmlElement el) { Text = ResNodeName("RuleSet"); panel = 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["escapecharacter"] != null) { escapeCharacter = el.Attributes["escapecharacter"].InnerText[0]; } 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 override void LoadSettings() { MarkersNode node = (MarkersNode)parent; listView.Items.Clear(); foreach (MarkerNode rn in node.Nodes) { ListViewItem lv = new ListViewItem(rn.What); lv.Tag = rn; listView.Items.Add(lv); } }
public MarkersOptionPanel(MarkersNode parent, bool prev) : base(parent) { SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.Markers.xfrm")); addBtn = (Button)ControlDictionary["addBtn"]; addBtn.Click += new EventHandler(addClick); removeBtn = (Button)ControlDictionary["removeBtn"]; removeBtn.Click += new EventHandler(removeClick); listView = (ListView)ControlDictionary["listView"]; previous = prev; ControlDictionary["label"].Text = ResourceService.GetString(previous ? "Dialog.HighlightingEditor.Markers.Previous" : "Dialog.HighlightingEditor.Markers.Next"); }
public RuleSetNode(XmlElement el) { Text = ResNodeName("RuleSet"); panel = 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["escapecharacter"] != null) { escapeCharacter = el.Attributes["escapecharacter"].InnerText[0]; } 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, char escChar, bool noCase) { name = Name; Text = Name; delimiters = Delim; reference = Ref; escapeCharacter = escChar; 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); panel = new RuleSetOptionPanel(this); }