public PageManager(HelpDocWindow window) { InitializeNavigateEvent(); _helpDocWindow = window; _helpDocWindow.BackCommand.Executed += BackCommand_Executed; _helpDocWindow.AheadCommand.Executed += AheadCommand_Executed; _helpDocWindow.BackCommand.CanExecute += BackCommand_CanExecute; _helpDocWindow.AheadCommand.CanExecute += AheadCommand_CanExecute; _helpDocWindow.CollectCommand.Executed += CollectCommand_Executed; _helpDocWindow.CollectCommand.CanExecute += CollectCommand_CanExecute; _helpDocWindow.PrintPage.CanExecute += PrintPage_CanExecute; _helpDocWindow.PrintPage.Executed += PrintPage_Executed; _helpDocWindow.Home.Click += Home_Click; _pageTabControl = window.MainTab; _pageTabControl.PageTabControlStatusChanged += _pageTabControl_PageTabControlStatusChanged; _helpDocTreeView = (HelpDocTreeView)_helpDocWindow.GetView(0); _helpDocFavorite = (HelpDocFavorite)_helpDocWindow.GetView(1); _helpDocSearch = (HelpDocSearch)_helpDocWindow.GetView(2); _helpDocTreeView.MouseDoubleClickEventHandler += _helpDocTreeView_MouseDoubleClickEventHandler; _helpDocTreeView.CollectCommand.Executed += CollectCommand_Executed1; _helpDocTreeView.CollectCommand.CanExecute += CollectCommand_CanExecute1; _helpDocFavorite.DeleteCommand.Executed += DeleteCommand_Executed; _helpDocFavorite.DeleteCommand.CanExecute += DeleteCommand_CanExecute; _helpDocFavorite.DeleteAllCommand.Executed += DeleteAllCommand_Executed; _helpDocFavorite.DeleteAllCommand.CanExecute += DeleteAllCommand_CanExecute; _helpDocFavorite.OpenCommand.Executed += OpenCommand_Executed; _helpDocFavorite.OpenCommand.CanExecute += OpenCommand_CanExecute; _helpDocFavorite.ItemDoubleClick += _helpDocFavorite_ItemDoubleClick; _helpDocSearch.OpenCommand.Executed += OpenCommand_Executed1; _helpDocSearch.OpenCommand.CanExecute += OpenCommand_CanExecute1; _helpDocSearch.ItemDoubleClick += _helpDocSearch_ItemDoubleClick; _helpDocSearch.CollectCommand.Executed += CollectCommand_Executed2; _helpDocSearch.CollectCommand.CanExecute += CollectCommand_CanExecute2; _helpDocTreeView.PrintPageCommand.CanExecute += PrintPage_CanExecute; _helpDocTreeView.PrintPageCommand.Executed += PrintPage_Executed; _helpDocFavorite.PrintPageCommand.CanExecute += PrintPage_CanExecute; _helpDocFavorite.PrintPageCommand.Executed += PrintPage_Executed; _helpDocSearch.PrintPageCommand.CanExecute += PrintPage_CanExecute; _helpDocSearch.PrintPageCommand.Executed += PrintPage_Executed; _browsingHistoryManager = new BrowsingHistoryManager(); _helpDocWindow.Loaded += _helpDocWindow_Loaded; _helpDocWindow.FuncGrid.SizeChanged += FuncGrid_SizeChanged; }
protected SearchableListFilterControl() { RelativeSizeAxes = Axes.X; var controls = CreateSupplementaryControls(); Container controlsContainer; Children = new Drawable[] { filterContainer = new Container { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = BackgroundColour, Alpha = 0.9f, }, tabStrip = new Box { Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft, RelativeSizeAxes = Axes.X, Height = 1, }, new FillFlowContainer { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Padding = new MarginPadding { Top = padding, Horizontal = ContentHorizontalPadding }, Children = new Drawable[] { Search = new FilterSearchTextBox { RelativeSizeAxes = Axes.X, }, controlsContainer = new Container { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Margin = new MarginPadding { Top = controls != null ? padding : 0 }, }, new Container { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Padding = new MarginPadding { Right = 225 }, Child = Tabs = new PageTabControl <TTab> { RelativeSizeAxes = Axes.X, }, }, new Box // keep the tab strip part of autosize, but don't put it in the flow container { RelativeSizeAxes = Axes.X, Height = 1, Colour = Color4.White.Opacity(0), }, }, }, }, }, DisplayStyleControl = new DisplayStyleControl <TCategory> { Anchor = Anchor.TopRight, Origin = Anchor.TopRight, }, }; if (controls != null) { controlsContainer.Children = new[] { controls } } ; Tabs.Current.Value = DefaultTab; Tabs.Current.TriggerChange(); DisplayStyleControl.Dropdown.Current.Value = DefaultCategory; DisplayStyleControl.Dropdown.Current.TriggerChange(); }
protected SearchableListFilterControl() { if (!typeof(T).IsEnum) { throw new InvalidOperationException("SearchableListFilterControl's sort tabs only support enums as the generic type argument"); } RelativeSizeAxes = Axes.X; var controls = CreateSupplementaryControls(); Container controlsContainer; Children = new Drawable[] { filterContainer = new Container { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = BackgroundColour, Alpha = 0.9f, }, tabStrip = new Box { Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft, RelativeSizeAxes = Axes.X, Height = 1, }, new FillFlowContainer { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Padding = new MarginPadding { Top = padding, Horizontal = SearchableListOverlay.WIDTH_PADDING }, Children = new Drawable[] { Search = new FilterSearchTextBox { RelativeSizeAxes = Axes.X, }, controlsContainer = new Container { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Margin = new MarginPadding { Top = controls != null ? padding : 0 }, }, Tabs = new PageTabControl <T> { RelativeSizeAxes = Axes.X, }, new Box //keep the tab strip part of autosize, but don't put it in the flow container { RelativeSizeAxes = Axes.X, Height = 1, Colour = Color4.White.Opacity(0), }, }, }, }, }, DisplayStyleControl = new DisplayStyleControl <U> { Anchor = Anchor.TopRight, Origin = Anchor.TopRight, }, }; if (controls != null) { controlsContainer.Children = new[] { controls } } ; Tabs.Current.Value = DefaultTab; Tabs.Current.TriggerChange(); }