Пример #1
0
 void UpdateToolStrip(AbstractProjectBrowserTreeNode node)
 {
     if (toolStrip == null)
     {
         return;
     }
     toolStrip.Items.Clear();
     toolStrip.Items.AddRange(standardItems);
     ToolbarService.UpdateToolbar(toolStrip);
     if (node != null && node.ToolbarAddinTreePath != null)
     {
         toolStrip.Items.Add(new ToolStripSeparator());
         toolStrip.Items.AddRange(ToolbarService.CreateToolStripItems(node.ToolbarAddinTreePath, node, false));
     }
 }
        /// <summary>
        /// Internal use only. Do not invoke directly. Use <see cref="ViewContentManager"/> for that
        /// </summary>
        public SiteExplorer()
        {
            InitializeComponent();
            Application.Idle          += new EventHandler(OnIdle);
            ndResource.ToolTipProvider = new RepositoryItemToolTipProvider();
            ndResource.DrawText       += WeakEventHandler.Wrap <EventHandler <Aga.Controls.Tree.NodeControls.DrawEventArgs> >(OnNodeDrawText, (eh) => ndResource.DrawText -= eh);

            var ts = ToolbarService.CreateToolStripItems("/Maestro/Shell/SiteExplorer/Toolbar", this, true); //NOXLATE

            tsSiteExplorer.Items.AddRange(ts);

            _connManager = ServiceRegistry.GetService <ServerConnectionManager>();

            var omgr = ServiceRegistry.GetService <OpenResourceManager>();
            var clip = ServiceRegistry.GetService <ClipboardService>();

            _model             = new RepositoryTreeModel(_connManager, trvResources, omgr, clip);
            trvResources.Model = _model;

            Workbench wb = Workbench.Instance;

            wb.ActiveDocumentChanged += WeakEventHandler.Wrap(OnActiveDocumentChanged, (eh) => wb.ActiveDocumentChanged -= eh);
        }
Пример #3
0
 public ToolStripItem[] CreateToolStripItems(string path, object parameter, bool throwOnNotFound)
 {
     return(ToolbarService.CreateToolStripItems(path, parameter, throwOnNotFound));
 }