Beispiel #1
0
        protected override void OnStartup()
        {
            _resourceDictionary = new ResourceDictionary { Source = new Uri("pack://application:,,,/TestExtension/ResourceDictionary.xaml", UriKind.RelativeOrAbsolute) };
            EditorHelper.RegisterResources(_resourceDictionary);

            AddCommandItems();
            AddToolBarNodes();

            AddOptionsNodes();

            _extensionDescription = new EditorExtensionDescription
            {
                Name = "TestExtension0",
                Description = "This is a simple test extension.",
                Icon = MultiColorGlyphs.Plugin,
                Version = "1.0.0.0",
            };
            Editor.Services.GetInstance<IAboutService>()?.ExtensionDescriptions.Add(_extensionDescription);
        }
Beispiel #2
0
 private void RemoveExtensionDescription()
 {
     var aboutService = Editor.Services.GetInstance<IAboutService>();
     if (aboutService != null)
     {
         aboutService.ExtensionDescriptions.Remove(_extensionDescription);
         _extensionDescription = null;
     }
 }
Beispiel #3
0
 private void AddExtensionDescription()
 {
     var aboutService = Editor.Services.GetInstance<IAboutService>();
     if (aboutService != null)
     {
         // Get version of current assembly.
         var version = Assembly.GetAssembly(typeof(TextExtension)).GetName().Version;
         _extensionDescription = new EditorExtensionDescription
         {
             Name = "DigitalRune Text Extension",
             Description = "The DigitalRune Text Extension provides functions for editing text files." + LegalInfo.Text,
             Version = Invariant($"{version.Major}.{version.Minor}.{version.Build}.{version.Revision}"),
             //Icon = new BitmapImage(new Uri("pack://application:,,,/DigitalRune.Editor;component/Resources/Images/TextEditor.ico", UriKind.RelativeOrAbsolute)),
         };
         aboutService.ExtensionDescriptions.Add(_extensionDescription);
     }
 }