Beispiel #1
0
        public static Style LoadFrom(XmlReader reader)
        {
            Style result = new Style();

            XmlReadHelper.ReadList(reader, "EditorStyle", delegate() {
                switch (reader.LocalName)
                {
                case "EditorStyle":
                    result.Name        = reader.GetAttribute(NameAttribute);
                    result.Description = reader.GetAttribute("_description");
                    return(true);

                case "Color":
                    result.customPalette[reader.GetAttribute("name")] = reader.GetAttribute("value");
                    return(true);

                case "Style":
                    ReadStyleTree(reader, result, null, null, null, null);
                    return(true);
                }
                return(false);
            });
            result.GetChunkStyle(DefaultString).ChunkProperties |= ChunkProperties.TransparentBackground;
            return(result);
        }
		public virtual bool GetIsValid (Style style)
		{
			if (style.GetChunkStyle (Color) == null) {
				System.Console.WriteLine("color:" + Color + " not found.");
				return false;
			}
			return true;
		}
Beispiel #3
0
 public virtual bool GetIsValid(Style style)
 {
     if (style.GetChunkStyle(Color) == null)
     {
         System.Console.WriteLine("color:" + Color + " not found.");
         return(false);
     }
     return(true);
 }
		public static Style LoadFrom (XmlReader reader)
		{
			Style result = new Style ();
			XmlReadHelper.ReadList (reader, "EditorStyle", delegate () {
				switch (reader.LocalName) {
				case "EditorStyle":
					result.Name        = reader.GetAttribute (NameAttribute);
					result.Description = reader.GetAttribute ("_description");
					return true;
				case "Color":
					result.customPalette[reader.GetAttribute ("name")] = reader.GetAttribute ("value");
					return true;
				case "Style":
					ReadStyleTree (reader, result, null, null, null, null);
					return true;
				}
				return false;
			});
			result.GetChunkStyle (DefaultString).ChunkProperties |= ChunkProperties.TransparentBackground;
			return result;
		}
Beispiel #5
0
 public virtual bool GetIsValid(Style style)
 {
     return(style.GetChunkStyle(Color) != null);
 }
		public virtual bool GetIsValid (Style style)
		{
			return (string.IsNullOrEmpty (Color) || style.GetChunkStyle (Color) != null) && 
			        (string.IsNullOrEmpty (TagColor) || style.GetChunkStyle (TagColor) != null) && 
			        (string.IsNullOrEmpty (NextColor) || style.GetChunkStyle (NextColor) != null);
		}
		public virtual bool GetIsValid (Style style)
		{
			return style.GetChunkStyle (Color) != null;
		}
Beispiel #8
0
 public virtual bool GetIsValid(Style style)
 {
     return((string.IsNullOrEmpty(Color) || style.GetChunkStyle(Color) != null) &&
            (string.IsNullOrEmpty(TagColor) || style.GetChunkStyle(TagColor) != null) &&
            (string.IsNullOrEmpty(NextColor) || style.GetChunkStyle(NextColor) != null));
 }
Beispiel #9
0
		public virtual ChunkStyle GetChunkStyle (Style style)
		{
			if (style == null)
				return null;
			return style.GetChunkStyle (Style);
		}