/// <summary> /// Add a sidebar component to the right sidebar /// </summary> /// <param name="component">The component to add</param> /// <param name="orderHint"></param> private void Add(ISidebarComponent component, string orderHint) { var sc = new SidebarComponent(component, orderHint); _right.Add(sc); _right = _right.OrderBy(x => x.OrderHint).ToList(); Shell.RightSidebarContainer.Insert(sc.Panel, _right.IndexOf(sc)); }
public SidebarComponent(ISidebarComponent component, string orderHint) { OrderHint = orderHint ?? "T"; Component = component; Panel = new SidebarPanel { Text = component.Title, Name = component.Title, Dock = DockStyle.Fill, Hidden = false, Visible = false, Tag = this }; Panel.AddControl((Control)component.Control); }
public static IClickable <T> DownloadButton <T>(this ISidebarComponent <T> sidebar) where T : WebBlock { return(new Clickable <T>(sidebar, By.CssSelector(".downloadBox a"))); }