Ejemplo n.º 1
0
        public SpanNode(string Name)
        {
            name  = Name;
            color = new EditorHighlightColor();
            UpdateNodeText();

            panel = new SpanOptionPanel(this);
        }
Ejemplo n.º 2
0
        public SpanNode(XmlElement el)
        {
            Text = ResNodeName("Span");

            panel = new SpanOptionPanel(this);

            if (el == null)
            {
                return;
            }

            color = new EditorHighlightColor(el);

            if (el.Attributes["rule"] != null)
            {
                rule = el.Attributes["rule"].InnerText;
            }

            if (el.Attributes["escapecharacter"] != null)
            {
                escapeCharacter = el.Attributes["escapecharacter"].Value[0];
            }

            name = el.Attributes["name"].InnerText;
            if (el.HasAttribute("stopateol"))
            {
                stopEOL = Boolean.Parse(el.Attributes["stopateol"].InnerText);
            }
            else
            {
                stopEOL = true;
            }
            XmlElement beginElement = el["Begin"];

            begin      = beginElement.InnerText;
            beginColor = new EditorHighlightColor(beginElement);
            if (beginElement.HasAttribute("singleword"))
            {
                isBeginSingleWord = Boolean.Parse(beginElement.GetAttribute("singleword"));
            }

            XmlElement endElement = el["End"];

            if (endElement != null)
            {
                end      = endElement.InnerText;
                endColor = new EditorHighlightColor(endElement);
                if (endElement.HasAttribute("singleword"))
                {
                    isEndSingleWord = Boolean.Parse(endElement.GetAttribute("singleword"));
                }
            }

            UpdateNodeText();
        }
Ejemplo n.º 3
0
		public SpanNode(XmlElement el)
		{
			Text = ResNodeName("Span");
			
			panel = new SpanOptionPanel(this);

			if (el == null) return;
			
			color   = new EditorHighlightColor(el);
			
			if (el.Attributes["rule"] != null) {
				rule = el.Attributes["rule"].InnerText;
			}
			
			if (el.Attributes["escapecharacter"] != null) {
				escapeCharacter = el.Attributes["escapecharacter"].Value[0];
			}
			
			name    = el.Attributes["name"].InnerText;
			if (el.HasAttribute("stopateol")) {
				stopEOL = Boolean.Parse(el.Attributes["stopateol"].InnerText);
			} else {
				stopEOL = true;
			}
			XmlElement beginElement = el["Begin"];
			begin = beginElement.InnerText;
			beginColor = new EditorHighlightColor(beginElement);
			if (beginElement.HasAttribute("singleword")) {
				isBeginSingleWord = Boolean.Parse(beginElement.GetAttribute("singleword"));
			}
			
			XmlElement endElement = el["End"];
			if (endElement != null) {
				end  = endElement.InnerText;
				endColor = new EditorHighlightColor(endElement);
				if (endElement.HasAttribute("singleword")) {
					isEndSingleWord = Boolean.Parse(endElement.GetAttribute("singleword"));
				}
			}
			
			UpdateNodeText();
			
		}
Ejemplo n.º 4
0
		public SpanNode(string Name)
		{
			name = Name;
			color = new EditorHighlightColor();
			UpdateNodeText();
			
			panel = new SpanOptionPanel(this);
		}