Click here to Skip to main content
15,886,860 members
Articles / Containers / Virtual Machine

A simple Switch Framework for the Visual Studio prompt and the devenv command

Rate me:
Please Sign up or sign in to vote.
4.78/5 (11 votes)
20 Apr 2007CPOL3 min read 53.1K   313   13  
A library for creating custom switches for the devenv command prompt (extensibility example).
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
using System.Xml;
using Microsoft.VisualStudio.Shell.Interop;

namespace SwitchFramework.Switches
{
    /// <summary>
    /// Manages about massage box.
    /// </summary>
    internal class AboutSwitch : CustomSwitch
    {
        #region Constructors

        /// <summary>
        /// Default contructor.
        /// </summary>
        /// <param name="package">Package that launch command.</param>
        /// <param name="name">Custom switch name.</param>
        /// <param name="parameters">Custom switch parameters.</param>
        public AboutSwitch(ISwitchPackage package, string name, string[] parameters)
            : base(package, name, parameters)
        {
        }

        #endregion

        #region Protected Functions

        /// <summary>
        /// Executes the command.
        /// </summary>
        protected override void Executing()
        {
            System.Windows.Forms.MessageBox.Show("Switch Framework. Created by A.P.");
        }

        #endregion
    }
}

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)


Written By
Software Developer
Italy Italy
I am a biomedical engineer. I work in Genoa as software developer. I developed MFC ActiveX controls for industrial automation for 2 years and packages for Visual Studio 2005 for 1 year. Currently I'm working in .NET 3.5 in biomedical area.

Comments and Discussions