Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5583 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61pull/1/head
13 changed files with 275 additions and 114 deletions
@ -0,0 +1,50 @@
@@ -0,0 +1,50 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <author name="Daniel Grunwald"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using System.Globalization; |
||||
using System.Windows; |
||||
using System.Windows.Data; |
||||
|
||||
namespace ICSharpCode.AvalonEdit.AddIn.Options |
||||
{ |
||||
sealed class BooleanToBoldConverter : IValueConverter |
||||
{ |
||||
public static readonly BooleanToBoldConverter Instance = new BooleanToBoldConverter(); |
||||
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) |
||||
{ |
||||
if ((bool)value) |
||||
return FontWeights.Bold; |
||||
else |
||||
return FontWeights.Normal; |
||||
} |
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) |
||||
{ |
||||
throw new NotSupportedException(); |
||||
} |
||||
} |
||||
|
||||
sealed class BooleanToDefaultStringConverter : IValueConverter |
||||
{ |
||||
public static readonly BooleanToDefaultStringConverter Instance = new BooleanToDefaultStringConverter(); |
||||
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) |
||||
{ |
||||
if ((bool)value) |
||||
return "(Default)"; |
||||
else |
||||
return null; |
||||
} |
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) |
||||
{ |
||||
throw new NotSupportedException(); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,68 @@
@@ -0,0 +1,68 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <author name="Daniel Grunwald"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using System.ComponentModel; |
||||
using System.Windows.Media; |
||||
|
||||
using ICSharpCode.AvalonEdit.Editing; |
||||
using ICSharpCode.AvalonEdit.Highlighting; |
||||
|
||||
namespace ICSharpCode.AvalonEdit.AddIn.Options |
||||
{ |
||||
sealed class SimpleHighlightingItem : IHighlightingItem |
||||
{ |
||||
readonly Action<TextArea> onShowExample; |
||||
|
||||
public SimpleHighlightingItem(string name, Action<TextArea> onShowExample) |
||||
{ |
||||
this.Name = name; |
||||
this.onShowExample = onShowExample; |
||||
} |
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged { add {} remove {} } |
||||
|
||||
public string Name { get; private set; } |
||||
public bool Bold { get; set; } |
||||
public bool Italic { get; set; } |
||||
|
||||
public Color Foreground { get; set; } |
||||
public bool UseDefaultForeground { get; set; } |
||||
public Color Background { get; set; } |
||||
public bool UseDefaultBackground { get; set; } |
||||
|
||||
public bool CanUseDefaultColors { get; set; } |
||||
|
||||
public bool CanSetForeground { |
||||
get { return false; } |
||||
} |
||||
|
||||
public bool CanSetBackground { |
||||
get { return false; } |
||||
} |
||||
|
||||
public bool CanSetFont { |
||||
get { return false; } |
||||
} |
||||
|
||||
public bool IsCustomized { |
||||
get { return false; } |
||||
} |
||||
|
||||
public IHighlightingDefinition ParentDefinition { get; set; } |
||||
|
||||
public void Reset() |
||||
{ |
||||
} |
||||
|
||||
public void ShowExample(TextArea exampleTextArea) |
||||
{ |
||||
if (onShowExample != null) |
||||
onShowExample(exampleTextArea); |
||||
} |
||||
} |
||||
} |
@ -1,32 +0,0 @@
@@ -1,32 +0,0 @@
|
||||
<?xml version="1.0"?> |
||||
|
||||
<!-- syntaxdefinition for BAT 2000 by Mike Krueger --> |
||||
<SyntaxDefinition name = "BAT" extensions = ".bat"> |
||||
|
||||
<Environment> |
||||
<Default color = "Yellow" bgcolor = "Black"/> |
||||
<Selection color = "White" bgcolor = "Purple"/> |
||||
<VRuler color = "Green"/> |
||||
<InvalidLines color = "Red"/> |
||||
<CaretMarker color = "Yellow"/> |
||||
|
||||
<LineNumbers color = "Gray" bgcolor = "Black"/> |
||||
|
||||
<FoldLine color = "Cyan" bgcolor = "Black"/> |
||||
<FoldMarker color = "Cyan" bgcolor = "White"/> |
||||
<SelectedFoldLine color = "Green" bgcolor="Black"/> |
||||
|
||||
<EOLMarkers color = "#E0E0E5"/> |
||||
<SpaceMarkers color = "#E0E0E5"/> |
||||
<TabMarkers color = "#E0E0E5"/> |
||||
</Environment> |
||||
|
||||
<Digits name = "Digits" bold = "false" italic = "false" color = "Yellow"/> |
||||
|
||||
<RuleSets> |
||||
<RuleSet ignorecase = "false"> |
||||
<Delimiters> </Delimiters> |
||||
</RuleSet> |
||||
</RuleSets> |
||||
|
||||
</SyntaxDefinition> |
Loading…
Reference in new issue