public static ColorSheme LoadFrom(XmlReader reader) { var result = new ColorSheme(); 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 (ColorSheme style) { if (style.GetChunkStyle (Color) == null) { System.Console.WriteLine("color:" + Color + " not found."); return false; } return true; }
public virtual bool GetIsValid(ColorSheme style) { if (style.GetChunkStyle(Color) == null) { System.Console.WriteLine("color:" + Color + " not found."); return(false); } return(true); }
public virtual bool GetIsValid(ColorSheme style) { return(style.GetChunkStyle(Color) != null); }
public virtual bool GetIsValid (ColorSheme style) { return style.GetChunkStyle (Color) != null; }
public void SetSheme (ColorSheme style) { if (style == null) throw new ArgumentNullException ("style"); this.fileName = Mono.TextEditor.Highlighting.SyntaxModeService.GetFileNameForStyle (style); this.colorSheme = style; this.entryName.Text = style.Name; this.entryDescription.Text = style.Description; this.textEditor.Document.MimeType = "text/x-csharp"; this.textEditor.GetTextEditorData ().ColorStyle = style; this.textEditor.Text = @"using System; // This is an example class Example { public static void Main (string[] args) { Console.WriteLine (""Hello World""); } }"; foreach (var data in metaData) { colorStore.AppendValues (data.Description, style.GetChunkStyle (data.Name), data); } Stylechanged (null, null); }
public virtual bool GetIsValid(ColorSheme 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 ChunkStyle GetChunkStyle (ColorSheme style) { if (style == null) return null; return style.GetChunkStyle (Style); }
public static ColorSheme LoadFrom (XmlReader reader) { var result = new ColorSheme (); 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 (ColorSheme style) { return (string.IsNullOrEmpty (Color) || style.GetChunkStyle (Color) != null) && (string.IsNullOrEmpty (TagColor) || style.GetChunkStyle (TagColor) != null) && (string.IsNullOrEmpty (NextColor) || style.GetChunkStyle (NextColor) != null); }