protected void indexControl_SelectedHelpFileChanged(object sender, EventArgs e) { if (!changingSelection) { changingSelection = true; ContentsSelected = false; DocSiteNavigator.NavigateToHelpFile(indexControl.SelectedHelpFile); contentsControl.SelectedTopic = DocSiteNavigator.ResolveHelpFileTopic(indexControl.SelectedHelpFile, false); changingSelection = false; } }
protected void contentsControl_SelectedTopicChanged(object sender, EventArgs e) { if (!changingSelection) { changingSelection = true; ContentsSelected = true; if (DocSiteNavigator.NavigateToTopic(contentsControl.SelectedTopic, false)) { indexControl.SelectedHelpFile = DocSiteNavigator.ResolveTopicHelpFile(contentsControl.SelectedTopic, false); } changingSelection = false; } }
protected void searchImageButton_Click(object sender, ImageClickEventArgs e) { DocSiteNavigator.NavigateToSearchResults(string.Join(" ", Keywords.ToArray())); }
protected void browseImageButton_Click(object sender, ImageClickEventArgs e) { DocSiteNavigator.NavigateToBrowseIndex(searchTextBox.Text); }
protected void searchImageButton_Click(object sender, ImageClickEventArgs e) { DocSiteNavigator.NavigateToSearchResults(searchTextBox.Text); }
private void SyncSidebar() { string topic = null, helpFile = null; if (!Page.IsPostBack) { if (Request.QueryString["filenotfound"] != null) { ContentPath = DocSiteManager.Settings.FileNotFoundPath; } else { topic = Request.QueryString["topic"]; helpFile = Request.QueryString["helpfile"]; if (!string.IsNullOrEmpty(topic)) { topic = DocSiteNavigator.FormatTopic(topic, false); } } } else { string topicPath = ContentUrl.Value; if (!string.IsNullOrEmpty(topicPath)) { Uri topicUri; if (Uri.TryCreate(topicPath, UriKind.RelativeOrAbsolute, out topicUri) && (!topicUri.IsAbsoluteUri || topicUri.Host.Equals(Request.Url.Host, StringComparison.OrdinalIgnoreCase))) { helpFile = (topicUri.IsAbsoluteUri) ? topicUri.AbsolutePath : topicUri.ToString(); if (helpFile.StartsWith("/") || helpFile.StartsWith(@"\")) { helpFile = helpFile.Substring(1); } } } } if (string.IsNullOrEmpty(helpFile)) { helpFile = DocSiteNavigator.ResolveTopicHelpFile(topic, false) ?? DocSiteManager.Settings.HelpFileNotFoundPath; } if (string.IsNullOrEmpty(topic)) { topic = DocSiteNavigator.ResolveHelpFileTopic(helpFile, false); if (topic == null) { helpFile = DocSiteManager.Settings.HelpFileNotFoundPath; } } ContentPath = helpFile; Controls.DocSiteSidebar sidebar = ((DocSite)Page.Master).Sidebar; if (!sidebar.TableOfContents.SelectedTopic.Equals(topic, StringComparison.Ordinal)) { sidebar.Initialize(topic, helpFile); } }
protected void browseImageButton_Click(object sender, ImageClickEventArgs e) { DocSiteNavigator.NavigateToBrowseIndex(Query); }