Click here to Skip to main content
12,244,103 members (49,718 online)
Click here to Skip to main content

Stats

38.5K views
849 downloads
42 bookmarked
Posted

Visual Studio Add-in Library

, 15 Sep 2010 CPOL
This library allows you to quickly and simply create add-ins for VS2008 and VS2010 (VS2005?).
TestAddin
Resources
1.ico
2.bmp
serviceunknown.ico
TestAddin.AddIn
TestAddin.csproj.user
VisualStudio Add-in Library Sources
Helpers
Menus
Actions
Base
Properties
VisualStudio Add-in Library.csproj.user
using Microsoft.VisualStudio.CommandBars;

namespace VisualStudio.AddInLibrary.Menus
{

  /// <summary>
  /// Describes properties needed for a VS command and it's actions
  /// </summary>
  public class VSCommandInfo
  {
    /// <summary>
    /// default Office bitmap id for menu
    /// </summary>
    int _BitmapResourceId = 59;

    /// <summary>
    /// USe Office "location" for resources ?
    /// </summary>
    bool _UseOfficeResources = true;

    /// <summary>
    /// Command Unique ID
    /// </summary>
    public string UniqueID { get; set; }

    /// <summary>
    /// Object owning this Command
    /// </summary>
    public object Owner { get; set; }

    /// <summary>
    /// Command name 
    /// </summary>
    public string Name { get; set; }

    /// <summary>
    /// Command caption
    /// </summary>
    public string Caption { get; set; }

    /// <summary>
    /// Command tooltip
    /// </summary>
    public string ToolTip { get; set; }

    /// <summary>
    /// Command position inside menus/submenus
    /// </summary>
    public int Position { get; set; }

    /// <summary>
    /// Add separator ?
    /// </summary>
    public bool HaveSeparator { get; set; }

    /// <summary>
    /// Bitmap resource id for this Command
    /// </summary>
    public int BitmapResourceId
    {
      get { return _BitmapResourceId; }
      set { _BitmapResourceId = value; }
    }
    /// <summary>
    /// Yes = use Office, False= use our resources
    /// </summary>
    public bool UseOfficeResources
    {
      get { return _UseOfficeResources; }
      set { _UseOfficeResources = value; }
    }

    /// <summary>
    /// The code that will be run for a command
    /// </summary>
    public PerformActionForVSCommandDelegate Action { get; set; }


    /// <summary>
    /// Visual studio Command Control object
    /// </summary>
    public CommandBarControl Control { get; set; }
  }


}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

KL@DotNet
Program Manager Digitas
France France
No Biography provided

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160426.1 | Last Updated 15 Sep 2010
Article Copyright 2010 by KL@DotNet
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid