예제 #1
0
        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);
        }
예제 #2
0
		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);
			
		}
예제 #3
0
        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);
        }
예제 #4
0
		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);
		}