You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.2 KiB

  1. // Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
  2. // This code is distributed under MIT X11 license (for details please see \doc\license.txt)
  3. using System.Composition;
  4. using System.Windows;
  5. using System.Windows.Media;
  6. using ICSharpCode.AvalonEdit.Highlighting;
  7. using ICSharpCode.ILSpy;
  8. namespace TestPlugin
  9. {
  10. [Export(typeof(IAboutPageAddition))]
  11. [Shared]
  12. public class AboutPageAddition : IAboutPageAddition
  13. {
  14. public void Write(ISmartTextOutput textOutput)
  15. {
  16. textOutput.WriteLine();
  17. textOutput.Write("This is a test.");
  18. textOutput.WriteLine();
  19. textOutput.WriteLine();
  20. textOutput.BeginSpan(new HighlightingColor {
  21. Background = new SimpleHighlightingBrush(Colors.Black),
  22. FontStyle = FontStyles.Italic,
  23. Foreground = new SimpleHighlightingBrush(Colors.Aquamarine)
  24. });
  25. textOutput.Write("DO NOT PRESS THIS BUTTON --> ");
  26. textOutput.AddButton(null, "Test!", (sender, args) => MessageBox.Show("Naughty Naughty!", "Naughty!", MessageBoxButton.OK, MessageBoxImage.Exclamation));
  27. textOutput.Write(" <--");
  28. textOutput.WriteLine();
  29. textOutput.EndSpan();
  30. textOutput.WriteLine();
  31. }
  32. }
  33. }