Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public virtual ChunkStyle GetChunkStyle(ColorSheme style)
 {
     if (style == null)
     {
         return(null);
     }
     return(style.GetChunkStyle(Style));
 }