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 YouTrackExplorerWindowRegistrar(Lifetime lifetime, ToolWindowManager toolWindowManager, YouTrackExplorerWindowDescriptor descriptor) { this.lifetime = lifetime; toolWindowClass = toolWindowManager.Classes[descriptor]; toolWindowClass.RegisterEmptyContent( lifetime, lt => { // initialize the default ('empty') content for the tool window var label = new RichTextLabel { BackColor = SystemColors.Control, Dock = DockStyle.Fill }; label.RichTextBlock.Add(new RichText("Nothing Here", new TextStyle(FontStyle.Bold))); label.RichTextBlock.Parameters = new RichTextBlockParameters(8, ContentAlignment.MiddleCenter); return label.BindToLifetime(lt); }); }