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);
        }
示例#2
0
		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 MarkersOptionPanel(MarkersNode parent, bool prev) : base(parent)
		{
			SetupFromXmlFile(System.IO.Path.Combine(PropertyService.DataDirectory, 
			                          @"resources\panels\HighlightingEditor\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(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);
        }
示例#5
0
		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);
		}