Download spriteraddinsample.zip, last updated 10/09/2011 (7.84 KB)

Download
  • md5: ab1f57172df929dbeec123cbcbf1e931
using System.ComponentModel.Design;
using Cyotek.ApplicationServices;

namespace Cyotek.Spriter.Addin.ProjectPropertiesEditor
{
  public class ProjectPropertiesEditorAddin : SpriterAddin
  {
    #region  Overriden Properties

    public override string Author
    { get { return "Cyotek"; } }

    public override string AuthorUri
    { get { return "http://cyotek.com/"; } }

    public override string Description
    { get { return "Advanced editor for project properties"; } }

    public override string Title
    { get { return "Project Properties Addin"; } }

    #endregion  Overriden Properties

    #region  Public Overridden Methods

    public override void Initialize(ServiceContainer serviceContainer, StartupMode startupMode)
    {
      base.Initialize(serviceContainer, startupMode);

      if (startupMode != StartupMode.Console)
      {
        ICommandManager commandManager;
        IMenu projectMenu;

        commandManager = ServiceManager.Current.CommandManager;
        commandManager.RegisterAssembly(this.GetType().Assembly);

        projectMenu = ServiceManager.Current.Application.MainMenu.MenuItems["Project"];

        projectMenu.AddSeparator();
        projectMenu.AddMenuItem(commandManager[typeof(ProjectPropertiesCommand)]);
      }
    }

    #endregion  Public Overridden Methods
  }
}

Donate

Donate