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; }
private void OnHelpButtonClick(object sender, RoutedEventArgs e) { HelpDocWindow helpDocWindow = new HelpDocWindow(); helpDocWindow.Show(); }