예제 #1
0
        public void OnLoad(ISsmsExtendedFunctionalityProvider provider)
        {
            //MSettings.ReadSettings();
            ManaSQLConfig.Initialise();

            thePlug = (ISsmsFunctionalityProvider6)provider;
            manaSQLCommand = new ManaSQLCommand(thePlug);
            menuCommands = new List<SimpleOeMenuItemBase>();

            thePlug.AddToolbarItem(manaSQLCommand);

            // adding quick compare menu
            var items = new SimpleOeMenuItemBase[ManaSQLConfig.qcm.Count];
            for (int i = 0; i < ManaSQLConfig.qcm.Count; i++)
            {
                items[i] = new QuickCompareSubmenuItem(thePlug, manaSQLCommand, ManaSQLConfig.qcm[i]);
            }
            thePlug.AddTopLevelMenuItem(new QuickCompareSubmenu(items));

            // adding UI to MSSQL
            menuCommands.Add(new MExtract(thePlug, manaSQLCommand));
            menuCommands.Add(new MExtractEnlist(thePlug, manaSQLCommand));
            menuCommands.Add(new MExtractAll(thePlug, manaSQLCommand));
            thePlug.AddTopLevelMenuItem(menuCommands[0]);
            thePlug.AddTopLevelMenuItem(menuCommands[1]);
            thePlug.AddTopLevelMenuItem(menuCommands[2]);

            thePlug.AddTopLevelMenuItem(new MExtractAllProgrammability(thePlug, manaSQLCommand, menuCommands));
            thePlug.AddTopLevelMenuItem(new MSVN.SVNCommitAll(thePlug, manaSQLCommand, menuCommands));
            thePlug.AddTopLevelMenuItem(new MSVN.SVNUpdateAll());

            thePlug.AddTopLevelMenuItem(new MCompareFile1(thePlug, manaSQLCommand));
            thePlug.AddTopLevelMenuItem(new MCompareFile2(thePlug, manaSQLCommand));

            // adding in SVN menu strip
            thePlug.AddTopLevelMenuItem(new MSVN.SVNRepoStatus());
            thePlug.AddTopLevelMenuItem(new MSVN.SVNCommit(thePlug, manaSQLCommand, menuCommands));
            thePlug.AddTopLevelMenuItem(new MSVN.SVNUpdate());
            thePlug.AddTopLevelMenuItem(new MSVN.SVNShowLog());
            thePlug.AddTopLevelMenuItem(new MSVN.SVNDiff());
            thePlug.AddTopLevelMenuItem(new MSVN.SVNMerge());
            thePlug.AddTopLevelMenuItem(new MSVN.SVNBlame());

            thePlug.ObjectExplorerWatcher.ConnectionsChanged += (args) => { OnConnectionsChanged(args); };
            thePlug.ObjectExplorerWatcher.SelectionChanged += (args) => { OnSelectionChanged(args); };
        }
예제 #2
0
 public QuickCompareSubmenu(SimpleOeMenuItemBase[] subMenus)
     : base(subMenus)
 {
 }
 public ObjectExplorerSubmenu(SimpleOeMenuItemBase[] subMenus)
     : base(subMenus)
 {
 }
 private void AddObjectExplorerContextMenu()
 {
     var subMenus = new SimpleOeMenuItemBase[]
     {
         new ObjectExplorerMenuItem("Command 1", m_Provider, LogMessage),
         new ObjectExplorerMenuItem("Command 2", m_Provider, LogMessage),
     };
     m_Provider.AddTopLevelMenuItem(new ObjectExplorerSubmenu(subMenus));
 }