public TypeInterfaceToolWindowRegistrar(Lifetime lifetime,
                                                ToolWindowManager toolWindowManager,
                                                IShellLocks locks,
                                                ISettingsStore settingsStore,
                                                IActionManager actionManager,
                                                IActionBarManager actionBarManager,
                                                IShortcutManager shortcutManager,
                                                TypeInterfaceToolWindowDescriptor toolWindowDescriptor,
                                                ITheming theming,
                                                IThemedIconManager themedIconManager, IColorThemeManager colorThemeManager)
        {
            myLifetime          = lifetime;
            myLocks             = locks;
            mySettingsStore     = settingsStore;
            myActionBarManager  = actionBarManager;
            myTheming           = theming;
            myThemedIconManager = themedIconManager;
            myColorThemeManager = colorThemeManager;

            myToolWindowClass = toolWindowManager.Classes[toolWindowDescriptor];
            myToolWindowClass.RegisterEmptyContent(
                lifetime,
                lt =>
            {
                var emptyLabel = new RichTextLabel {
                    BackColor = SystemColors.Control, Dock = DockStyle.Fill
                };
                emptyLabel.RichTextBlock.Add(new RichText("No hierarchies open", new TextStyle(FontStyle.Bold)));
                emptyLabel.RichTextBlock.Add(
                    new RichText("Use " + actionManager.GetHowToExecuteAction(shortcutManager, typeof(BrowseTypeHierarchyAction)), TextStyle.Default));
                emptyLabel.RichTextBlock.Add(new RichText("on a type to see hierarchy", TextStyle.Default));
                emptyLabel.RichTextBlock.Parameters = new RichTextBlockParameters(8, ContentAlignment.MiddleCenter);
                return(emptyLabel.BindToLifetime(lt));
            });
        }
    public TypeInterfaceToolWindowRegistrar(Lifetime lifetime,
                                    ToolWindowManager toolWindowManager,
                                    IShellLocks locks,
                                    ISettingsStore settingsStore,
                                    IActionManager actionManager,
                                    IActionBarManager actionBarManager,
                                    IShortcutManager shortcutManager,
                                    TypeInterfaceToolWindowDescriptor toolWindowDescriptor,
                                    ITheming theming,
                                    IThemedIconManager themedIconManager, IColorThemeManager colorThemeManager)
    {
      myLifetime = lifetime;
      myLocks = locks;
      mySettingsStore = settingsStore;
      myActionBarManager = actionBarManager;
      myTheming = theming;
      myThemedIconManager = themedIconManager;
      myColorThemeManager = colorThemeManager;

      myToolWindowClass = toolWindowManager.Classes[toolWindowDescriptor];
      myToolWindowClass.RegisterEmptyContent(
        lifetime,
        lt =>
          {
            var emptyLabel = new RichTextLabel { BackColor = SystemColors.Control, Dock = DockStyle.Fill };
            emptyLabel.RichTextBlock.Add(new RichText("No hierarchies open", new TextStyle(FontStyle.Bold)));
            emptyLabel.RichTextBlock.Add(
              new RichText("Use " + actionManager.GetHowToExecuteAction(shortcutManager, typeof(BrowseTypeHierarchyAction)), TextStyle.Default));
            emptyLabel.RichTextBlock.Add(new RichText("on a type to see hierarchy", TextStyle.Default));
            emptyLabel.RichTextBlock.Parameters = new RichTextBlockParameters(8, ContentAlignment.MiddleCenter);
            return emptyLabel.BindToLifetime(lt);
          });
    }
Пример #3
0
        public TypeInterfaceToolWindowRegistrar(Lifetime lifetime,
                                                ToolWindowManager toolWindowManager,
                                                IActionManager actionManager,
                                                IActionBarManager actionBarManager,
                                                IShortcutManager shortcutManager,
                                                TypeInterfaceToolWindowDescriptor toolWindowDescriptor,
                                                IUIApplication environment,
                                                IWindowsHookManager windowsHookManager)
        {
            _lifetime           = lifetime;
            _actionBarManager   = actionBarManager;
            _environment        = environment;
            _windowsHookManager = windowsHookManager;

            _toolWindowClass = toolWindowManager.Classes[toolWindowDescriptor];
            _toolWindowClass.RegisterEmptyContent(
                lifetime,
                lt =>
            {
                var emptyLabel = new RichTextLabel(environment)
                {
                    BackColor = SystemColors.Control, Dock = DockStyle.Fill
                };
                emptyLabel.RichTextBlock.Add(new RichText("No hierarchies open", new TextStyle(FontStyle.Bold)));
                emptyLabel.RichTextBlock.Add(
                    new RichText("Use " + actionManager.GetHowToExecuteAction(shortcutManager, typeof(BrowseTypeHierarchyAction)), TextStyle.Default));
                emptyLabel.RichTextBlock.Add(new RichText("on a type to see hierarchy", TextStyle.Default));
                emptyLabel.RichTextBlock.Parameters = new RichTextBlockParameters(8, ContentAlignment.MiddleCenter);
                return(emptyLabel.BindToLifetime(lt));
            });
        }