Permalink
Browse files

Added an About page addition to the test plugin.

  • Loading branch information...
Zastai committed Feb 5, 2018
1 parent 662fd74 commit fbb974fa882932ec17a68472748fca39db669078
Showing with 36 additions and 0 deletions.
  1. +35 −0 TestPlugin/AboutPageAddition.cs
  2. +1 −0 TestPlugin/TestPlugin.csproj
@@ -0,0 +1,35 @@
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under MIT X11 license (for details please see \doc\license.txt)
using System.ComponentModel.Composition;
using System.Windows;
using System.Windows.Media;
using ICSharpCode.AvalonEdit.Highlighting;
using ICSharpCode.ILSpy;
namespace TestPlugin
{
[Export(typeof(IAboutPageAddition))]
public class AboutPageAddition : IAboutPageAddition
{
public void Write(ISmartTextOutput textOutput)
{
textOutput.WriteLine();
textOutput.Write("This is a test.");
textOutput.WriteLine();
textOutput.WriteLine();
textOutput.BeginSpan(new HighlightingColor {
Background = new SimpleHighlightingBrush(Colors.Black),
FontStyle = FontStyles.Italic,
Foreground = new SimpleHighlightingBrush(Colors.Aquamarine)
});
textOutput.Write("DO NOT PRESS THIS BUTTON --> ");
textOutput.AddButton(null, "Test!", (sender, args) => MessageBox.Show("Naughty Naughty!", "Naughty!", MessageBoxButton.OK, MessageBoxImage.Exclamation));
textOutput.Write(" <--");
textOutput.WriteLine();
textOutput.EndSpan();
textOutput.WriteLine();
}
}
}
@@ -41,6 +41,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="AboutPageAddition.cs" />
<Compile Include="ContextMenuCommand.cs" />
<Compile Include="CustomLanguage.cs" />
<Compile Include="CustomOptionPage.xaml.cs">

0 comments on commit fbb974f

Please sign in to comment.