private void AddNavigationBar(ILuaIntellisenseDocument document) { if (!UseNavigationBar) { return; } if (document == null) { return; } if (document.SyntaxEditorControl == null) { return; } var se = document.SyntaxEditorControl.As <ActiproSoftware.SyntaxEditor.SyntaxEditor>(); if (se == null) { return; } var panel = se.Parent.As <Control>(); if (panel == null) { return; } if (panel.Controls["NavBar"] != null) { return; } var navBar = new NavigationBar { Width = panel.Width, Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right, Tag = "NavBar", Editor = se }; panel.Controls.Add(navBar); se.Top = navBar.Height; se.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Top; se.Dock = DockStyle.None; se.Width = panel.Width; se.Height = panel.Height - se.Top; }
private void AddNavigationBar(ILuaIntellisenseDocument document) { if (!UseNavigationBar) return; if (document == null) return; if (document.SyntaxEditorControl == null) return; var se = document.SyntaxEditorControl.As<ActiproSoftware.SyntaxEditor.SyntaxEditor>(); if (se == null) return; var panel = se.Parent.As<Control>(); if (panel == null) return; if (panel.Controls["NavBar"] != null) return; var navBar = new NavigationBar { Width = panel.Width, Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right, Tag = "NavBar", Editor = se }; panel.Controls.Add(navBar); se.Top = navBar.Height; se.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Top; se.Dock = DockStyle.None; se.Width = panel.Width; se.Height = panel.Height - se.Top; }