示例#1
0
        public bool CWPluginInit(Version CWVersion, CWLicenseType UserLicenseType, IDEControl ControlObject)
        {
            // We need "Self" to be our current instance so we can be accessed elsewhere.  We also need
            // to set our control object so we can communicate with the IDE
            ClipManagerPlugin.controlObject = ControlObject;
            ClipManagerPlugin.self          = this;

            // Set our version info
            this.cwVersion     = CWVersion;
            this.cwLicenseType = UserLicenseType;

            // Register our tab icon
            workspaceIconHandle = controlObject.AddWorkspaceTabIconResource(global::ClipManagerPlugin.Properties.Resource.clipboard);

            // Register our editor context menu
            controlObject.RegisterCustomEditorContextMenu(editorContext);

            // Register plugin menu item and handler
            controlObject.RegisterCustomPluginMenu(pluginMenu);
            pluginMenu.Click += new EventHandler(pluginMenu_Click);

            // Register our config page
            controlObject.RegisterCustomConfigTab(this, "Clip Manager", clipManagerConfig);

            // Add our handlers to the context menu
            editorContext.DropDownOpening += new EventHandler(editorContext_DropDownOpening);

            // Our "Add" context menu is bound here
            editorContextAdd.Click += new EventHandler(editorContextAdd_Click);

            return(true);
        }
        public bool CWPluginInit(Version CWVersion, CWLicenseType UserLicenseType, IDEControl ControlObject)
        {
            // We need "Self" to be our current instance so we can be accessed elsewhere.  We also need
            // to set our control object so we can communicate with the IDE
            ClipManagerPlugin.controlObject = ControlObject;
            ClipManagerPlugin.self = this;

            // Set our version info
            this.cwVersion = CWVersion;
            this.cwLicenseType = UserLicenseType;

            // Register our tab icon
            workspaceIconHandle = controlObject.AddWorkspaceTabIconResource(global::ClipManagerPlugin.Properties.Resource.clipboard);

            // Register our editor context menu
            controlObject.RegisterCustomEditorContextMenu(editorContext);

            // Register plugin menu item and handler
            controlObject.RegisterCustomPluginMenu(pluginMenu);
            pluginMenu.Click += new EventHandler(pluginMenu_Click);

            // Register our config page
            controlObject.RegisterCustomConfigTab(this, "Clip Manager", clipManagerConfig);

            // Add our handlers to the context menu
            editorContext.DropDownOpening += new EventHandler(editorContext_DropDownOpening);

            // Our "Add" context menu is bound here
            editorContextAdd.Click += new EventHandler(editorContextAdd_Click);

            return true;
        }