Esempio n. 1
0
        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;
            }
        }
Esempio n. 2
0
        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;
            }
        }
Esempio n. 3
0
 protected void searchImageButton_Click(object sender, ImageClickEventArgs e)
 {
     DocSiteNavigator.NavigateToSearchResults(string.Join(" ", Keywords.ToArray()));
 }
Esempio n. 4
0
 protected void browseImageButton_Click(object sender, ImageClickEventArgs e)
 {
     DocSiteNavigator.NavigateToBrowseIndex(searchTextBox.Text);
 }
Esempio n. 5
0
 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);
            }
        }
Esempio n. 7
0
 protected void browseImageButton_Click(object sender, ImageClickEventArgs e)
 {
     DocSiteNavigator.NavigateToBrowseIndex(Query);
 }