diff --git a/ILSpy/CSharpLanguage.cs b/ILSpy/CSharpLanguage.cs
index af2a6d707..0c4c39f5f 100644
--- a/ILSpy/CSharpLanguage.cs
+++ b/ILSpy/CSharpLanguage.cs
@@ -31,6 +31,10 @@ namespace ICSharpCode.ILSpy
get { return "C#"; }
}
+ public override string FileExtension {
+ get { return ".cs"; }
+ }
+
public override void DecompileMethod(MethodDefinition method, ITextOutput output, DecompilationOptions options)
{
throw new NotImplementedException();
diff --git a/ILSpy/ILLanguage.cs b/ILSpy/ILLanguage.cs
index 2b1984524..069e6b39a 100644
--- a/ILSpy/ILLanguage.cs
+++ b/ILSpy/ILLanguage.cs
@@ -39,8 +39,8 @@ namespace ICSharpCode.ILSpy
get { return detectControlStructure ? "IL (structured)" : "IL"; }
}
- public override ICSharpCode.AvalonEdit.Highlighting.IHighlightingDefinition SyntaxHighlighting {
- get { return ICSharpCode.AvalonEdit.Highlighting.HighlightingManager.Instance.GetDefinition("ILAsm"); }
+ public override string FileExtension {
+ get { return ".il"; }
}
public override void DecompileMethod(MethodDefinition method, ITextOutput output, DecompilationOptions options)
diff --git a/ILSpy/ILSpy.csproj b/ILSpy/ILSpy.csproj
index 309936e65..5e947cc24 100644
--- a/ILSpy/ILSpy.csproj
+++ b/ILSpy/ILSpy.csproj
@@ -101,6 +101,8 @@
+
+
@@ -111,8 +113,10 @@
+
+
@@ -204,8 +208,5 @@
-
-
-
\ No newline at end of file
diff --git a/ILSpy/Images/Images.cs b/ILSpy/Images/Images.cs
index 56313f3f7..30e987862 100644
--- a/ILSpy/Images/Images.cs
+++ b/ILSpy/Images/Images.cs
@@ -15,6 +15,9 @@ namespace ICSharpCode.ILSpy
return image;
}
+ public static readonly BitmapImage ViewCode = LoadBitmap("ViewCode");
+ public static readonly BitmapImage Save = LoadBitmap("SaveFile");
+
public static readonly BitmapImage Assembly = LoadBitmap("Assembly");
public static readonly BitmapImage AssemblyWarning = LoadBitmap("AssemblyWarning");
public static readonly BitmapImage Library = LoadBitmap("Library");
diff --git a/ILSpy/Images/SaveFile.png b/ILSpy/Images/SaveFile.png
new file mode 100644
index 000000000..81acdcb98
Binary files /dev/null and b/ILSpy/Images/SaveFile.png differ
diff --git a/ILSpy/Images/ViewCode.png b/ILSpy/Images/ViewCode.png
new file mode 100644
index 000000000..1b8949fb6
Binary files /dev/null and b/ILSpy/Images/ViewCode.png differ
diff --git a/ILSpy/Language.cs b/ILSpy/Language.cs
index 92ac30b07..903f32159 100644
--- a/ILSpy/Language.cs
+++ b/ILSpy/Language.cs
@@ -30,9 +30,10 @@ namespace ICSharpCode.ILSpy
public abstract class Language
{
public abstract string Name { get; }
+ public abstract string FileExtension { get; }
public virtual ICSharpCode.AvalonEdit.Highlighting.IHighlightingDefinition SyntaxHighlighting {
- get { return ICSharpCode.AvalonEdit.Highlighting.HighlightingManager.Instance.GetDefinition(this.Name); }
+ get { return ICSharpCode.AvalonEdit.Highlighting.HighlightingManager.Instance.GetDefinitionByExtension(this.FileExtension); }
}
public virtual void DecompileMethod(MethodDefinition method, ITextOutput output, DecompilationOptions options)
diff --git a/ILSpy/MainWindow.xaml b/ILSpy/MainWindow.xaml
index f08f929b4..05e70539f 100644
--- a/ILSpy/MainWindow.xaml
+++ b/ILSpy/MainWindow.xaml
@@ -25,6 +25,12 @@
+
+