Anabranch.Neo4JConsolePackage.Neo4JConsolePackagePackage.Initialize C# (CSharp) Méthode

Initialize() protected méthode

Initialization of the package; this method is called right after the package is sited, so this is the place where you can put all the initialization code that rely on services provided by VisualStudio.
protected Initialize ( ) : void
Résultat void
        protected override void Initialize()
        {
            Debug.WriteLine("Entering Initialize() of: {0}", ToString());
            base.Initialize();

            // Add our command handlers for menu (commands must exist in the .vsct file)
            var mcs = GetService(typeof (IMenuCommandService)) as OleMenuCommandService;
            if (null != mcs)
            {
                // Create the command for the tool window
                var toolwndCommandID = new CommandID(GuidList.guidNeo4JConsolePackageCmdSet, (int) PkgCmdIDList.cmdIdNeo4jConsole);
                var menuToolWin = new MenuCommand(ShowToolWindow, toolwndCommandID);
                mcs.AddCommand(menuToolWin);
            }
        }