Пример #1
0
 internal window_manager(SSMS ssms)
 {
     _ssms = ssms;
     _working_query_window    = new query_window();
     _SSMS_window_collection  = (Windows2)_ssms.DTE2.Windows;
     _addin_window_collection = new System.Collections.Generic.List <Window>();
 }
Пример #2
0
 internal command_manager(SSMS ssms)
 {
     // VSI.ServiceCache.ExtensibilityModel.Commands was NULL when called.
     // _SSMS_commands_collection = (Commands2)VSI.ServiceCache.ExtensibilityModel.Commands;
     _SSMS_commands_collection      = (Commands2)ssms.addin.DTE.Commands;
     _addin_menu_commands_dictonary = new System.Collections.Generic.Dictionary <string, menu_command_handlers>();
     _ssms = ssms;
     _addin_command_bars = new System.Collections.Generic.List <BARS.CommandBar>();
 }
Пример #3
0
 internal command_manager(SSMS ssms)
 {
     // VSI.ServiceCache.ExtensibilityModel.Commands was NULL when called.
     // _SSMS_commands_collection = (Commands2)VSI.ServiceCache.ExtensibilityModel.Commands;
     _SSMS_commands_collection = (Commands2)ssms.addin.DTE.Commands;
     _addin_menu_commands_dictonary = new System.Collections.Generic.Dictionary<string, menu_command_handlers>();
     _ssms = ssms;
     _addin_command_bars = new System.Collections.Generic.List<BARS.CommandBar>();
 }
Пример #4
0
        /// <summary>Implements the OnConnection method of the IDTExtensibility2 interface. Receives notification that the Add-in is being loaded.</summary>
        /// <param name='application'>Root object of the host application.</param>
        /// <param name='connectMode'>Describes how the Add-in is being loaded.</param>
        /// <param name='addInInst'>Object representing this Add-in.</param>
        /// <param name="custom"></param>
        /// <seealso class='IDTExtensibility2' />
        public void OnConnection(object application, ext_ConnectMode connectMode, object addInInst, ref Array custom)
        {
            _ssms = new SSMS(addInInst, @"C:\kiln\SSMS_OpenFile\SSMS_OpenFile\bin");

            if (connectMode == ext_ConnectMode.ext_cm_Startup)
            {
                _ssms.command_manager.create_popup_menu("Tools", HOST_MENU_BAR_NAME, "A tooltip", 0);
                _ssms.command_manager.create_popup_menu_and_context_menu_command(HOST_MENU_BAR_NAME, OPEN_FILE_COMMAND_NAME, SUB_MENU_ITEM, TOOLTIP, 0, null, OpenSelectedFileName, "Global::Ctrl+k, Ctrl+o");
                _ssms.command_manager.create_popup_menu_command(HOST_MENU_BAR_NAME, INVALIDATE_CACHE_COMMAND_NAME, INVALIDATE_CACHE_COMMAND_NAME, TOOLTIP, 0, null, InvalidateFileCache);
            }
        }
Пример #5
0
 internal event_manager(SSMS ssms)
 {
     _ssms = ssms;
     _registered_events = new System.Collections.Generic.List <CommandEvents>();
 }
Пример #6
0
 internal window_manager(SSMS ssms)
 {
     _ssms = ssms;
     _working_query_window = new query_window();
     _SSMS_window_collection = (Windows2)_ssms.DTE2.Windows;
     _addin_window_collection = new System.Collections.Generic.List<Window>();
 }
Пример #7
0
 internal event_manager(SSMS ssms)
 {
     _ssms = ssms;
     _registered_events = new System.Collections.Generic.List<CommandEvents>();
 }