Exemple #1
0
        // Constructor
        public Page_TOC()
        {
            InitializeComponent();
            self = this;

            //Panel for to show HelpTopic results
            resultsPanel = new Panel_HelpTopicResults(this, DockStyle.Fill);

            //Toc Select panel
            tocPanel = new Panel_Toc(this, TopicIdCbo, Globals.catalog);

            //Persistence: Load settings
            using (UserData userData = new UserData(Globals.DataRegKey))
            {
                TopicIdCbo.Text = userData.ReadStr("Toc.TopicIdCbo", "");
            }

            //Fill TocReturnDetail Enumeration dropdown
            tocDetailsCbo.Items.Clear();
            foreach (TocReturnDetail value in Enum.GetValues(typeof(TocReturnDetail)))
                tocDetailsCbo.Items.Add(value.ToString());
            tocDetailsCbo.SelectedIndex = 0;

            //SuperTips
            new SuperTip(TopicIDPictureBox, "Topic ID",
                "Enter topic ID or select one from the drop down.",
                "Select the TocReturnDetail you want and click the Get button.",
                "Use an Id=\"-1\" to specify the virtual root page of the catalog");

            new SuperTip(tocDetailsCboTip,  ToolTipIcon.Warning, "Warning", "Using 'TocReturnDetail.TocDescendants' can take a long time to complete",
                      "since a top level node can return many 1000's of child/sub-child items.",
                      "In this case be patient. The call will return eventually.");

            new SuperTip(HlpViewerBtn, "Show in HlpViewer", "Show selected help topic in HlpViewer.exe");
        }
Exemple #2
0
        // Constructor

        public Page_Search()
        {
            InitializeComponent();
            self = this;

            //Panel for to show HelpTopic results
            resultsPanel = new Panel_HelpTopicResults(this, DockStyle.Fill);

            //Search Operator panel
            operatorsPanel = new Panel_SearchOperator(this, SearchCbo);

            //Persistence: Load settings
            using (UserData userData = new UserData(Globals.DataRegKey))
            { 
                SearchCbo.Text = userData.ReadStr("Search.Query", "");
                pageSizeEdit.Value = userData.ReadInt("Search.PageSize", 50);  
            }

            statusLabel.Text = "--";
            UpdateStatus(false);

            //Super Tips
            new SuperTip(tipResultsPerPage, "Results pre Page", 
                "Often many 1000's of search results will be available.",
                "So search calls return just one page of results at a time.",
                "In this demo you can specify the size of a page and use",
                "next and previous links to step through all available pages.");
            new SuperTip(tipMatchHighlighting, "Match Highlighting",
                "When checked search results are wrapped in <span> tags",
                "to highlight search query terms. This would be useful if",
                "you were creating your own HTML page of search results.");
            new SuperTip(tipOrQueryTerms, "OR Query Terms",
                "Normally when you enter 2 or more search query terms, they",
                "are AND'd together. Check this box to 'OR' them instead.");
        }
Exemple #3
0
        // Constructor

        public Page_Search()
        {
            InitializeComponent();
            self = this;

            //Panel for to show HelpTopic results
            resultsPanel = new Panel_HelpTopicResults(this, DockStyle.Fill);

            //Search Operator panel
            operatorsPanel = new Panel_SearchOperator(this, SearchCbo);

            //Persistence: Load settings
            using (UserData userData = new UserData(Globals.DataRegKey))
            {
                SearchCbo.Text     = userData.ReadStr("Search.Query", "");
                pageSizeEdit.Value = userData.ReadInt("Search.PageSize", 50);
            }

            statusLabel.Text = "--";
            UpdateStatus(false);

            //Super Tips
            new SuperTip(tipResultsPerPage, "Results pre Page",
                         "Often many 1000's of search results will be available.",
                         "So search calls return just one page of results at a time.",
                         "In this demo you can specify the size of a page and use",
                         "next and previous links to step through all available pages.");
            new SuperTip(tipMatchHighlighting, "Match Highlighting",
                         "When checked search results are wrapped in <span> tags",
                         "to highlight search query terms. This would be useful if",
                         "you were creating your own HTML page of search results.");
            new SuperTip(tipOrQueryTerms, "OR Query Terms",
                         "Normally when you enter 2 or more search query terms, they",
                         "are AND'd together. Check this box to 'OR' them instead.");
        }
Exemple #4
0
        public Page_Topics()
        {
            InitializeComponent();
            self = this;

            //Panel for to show HelpTopic results
            resultsPanel = new Panel_HelpTopicResults(this, DockStyle.Fill);
            resultsPanel.SetupView(Panel_HelpTopicResults.HelpTopicResultsView.HelpTopic);

            //Toc Select panel
            tocPanel = new Panel_Toc(this, TopicFromIdCbo, Globals.catalog);

            //Persistence: Load settings
            using (UserData userData = new UserData(Globals.DataRegKey))
            {
                TopicFromIdCbo.Text = userData.ReadStr("Keyword.TopicFromIdCbo", "");
                TopicFromF1TextBox.Text = userData.ReadStr("Keyword.TopicFromF1TextBox", "");
            }

            // Super Tips
            new SuperTip(tipFileStreamOnly, "File Stream Only",
                "The raw unrendered topic source from the .mshc help file.",
                "Expect Script errors. Being unrendered it won't be WebBrowser friendly.");

            new SuperTip(TopicFromIdTip, "Get Topic for Topic ID",
                "ITopic = ICatalogRead.GetIndexedTopicDetails()",
                "IStream = ICatalogRead.GetIndexedTopic()",
                "Enter a topic ID for the required topic.",
                "If successful the call returns a topic file ITopic object or topic IStream.",
                "Note that the topic object also contains a convenient method to Fetch the stream.");
            new SuperTip(TopicFromF1Tip, "Get Topic for F1 Keyword(s)",
                "ITopic = ICatalogRead.GetTopicDetailsForF1Keyword()",
                "IStream = ICatalogRead.GetTopicForF1Keyword()",
                "Enter a prioritized list of F1 keywords separated by '|' chars (arbitary).",
                "If successful the call returns a ITopic Object or a topic IStream.",
                "Note that the topic object also contains a convenient method to Fetch the stream.");
            new SuperTip(GetAssetTip, "IStream catalogRead.GetLinkedAsset(catalog, packageName, path, locale)",
                "Example:    ",
                "   Stream stream = catalogRead.GetLinkedAsset(catalog, ",
                "        \"Visual_Studio_21800791_VS_100_en-us_6.mshc\",",
                "        \"\\R583.htm\", \"en-US\");",
                "For the purpose of this quick demo we get an asset path from ",
                "a Topic obj retieved using the specified topic ID.",
                "However this can be used to retrieve any asset file (image, JS, CSS etc).");
        }
Exemple #5
0
        public Page_Topics()
        {
            InitializeComponent();
            self = this;

            //Panel for to show HelpTopic results
            resultsPanel = new Panel_HelpTopicResults(this, DockStyle.Fill);
            resultsPanel.SetupView(Panel_HelpTopicResults.HelpTopicResultsView.HelpTopic);

            //Toc Select panel
            tocPanel = new Panel_Toc(this, TopicFromIdCbo, Globals.catalog);

            //Persistence: Load settings
            using (UserData userData = new UserData(Globals.DataRegKey))
            {
                TopicFromIdCbo.Text     = userData.ReadStr("Keyword.TopicFromIdCbo", "");
                TopicFromF1TextBox.Text = userData.ReadStr("Keyword.TopicFromF1TextBox", "");
            }

            // Super Tips
            new SuperTip(tipFileStreamOnly, "File Stream Only",
                         "The raw unrendered topic source from the .mshc help file.",
                         "Expect Script errors. Being unrendered it won't be WebBrowser friendly.");

            new SuperTip(TopicFromIdTip, "Get Topic for Topic ID",
                         "ITopic = ICatalogRead.GetIndexedTopicDetails()",
                         "IStream = ICatalogRead.GetIndexedTopic()",
                         "Enter a topic ID for the required topic.",
                         "If successful the call returns a topic file ITopic object or topic IStream.",
                         "Note that the topic object also contains a convenient method to Fetch the stream.");
            new SuperTip(TopicFromF1Tip, "Get Topic for F1 Keyword(s)",
                         "ITopic = ICatalogRead.GetTopicDetailsForF1Keyword()",
                         "IStream = ICatalogRead.GetTopicForF1Keyword()",
                         "Enter a prioritized list of F1 keywords separated by '|' chars (arbitary).",
                         "If successful the call returns a ITopic Object or a topic IStream.",
                         "Note that the topic object also contains a convenient method to Fetch the stream.");
            new SuperTip(GetAssetTip, "IStream catalogRead.GetLinkedAsset(catalog, packageName, path, locale)",
                         "Example:    ",
                         "   Stream stream = catalogRead.GetLinkedAsset(catalog, ",
                         "        \"Visual_Studio_21800791_VS_100_en-us_6.mshc\",",
                         "        \"\\R583.htm\", \"en-US\");",
                         "For the purpose of this quick demo we get an asset path from ",
                         "a Topic obj retieved using the specified topic ID.",
                         "However this can be used to retrieve any asset file (image, JS, CSS etc).");
        }
Exemple #6
0
        // Constructor
        public Page_Keywords()
        {
            InitializeComponent();
            self = this;

            //Panel for to show HelpTopic results
            resultsPanel = new Panel_HelpTopicResults(splitContainer1.Panel2, DockStyle.Fill);
            UpdateStatus();

            // our oneshot watchTimer
            oneshotTimer = new System.Windows.Forms.Timer();
            oneshotTimer.Interval = 200;
            oneshotTimer.Tick += new EventHandler(oneshotTimer_Tick);

            // Super Tips
            new SuperTip(GetKeywordsTip, "CatalogRead.GetKeywords()",
                "This call returns a list of all visible keywords.",
                "Try typing into the search box (word-wheel).");
        }
Exemple #7
0
        // Constructor

        public Page_Keywords()
        {
            InitializeComponent();
            self = this;

            //Panel for to show HelpTopic results
            resultsPanel = new Panel_HelpTopicResults(splitContainer1.Panel2, DockStyle.Fill);
            UpdateStatus();

            // our oneshot watchTimer
            oneshotTimer          = new System.Windows.Forms.Timer();
            oneshotTimer.Interval = 200;
            oneshotTimer.Tick    += new EventHandler(oneshotTimer_Tick);

            // Super Tips
            new SuperTip(GetKeywordsTip, "CatalogRead.GetKeywords()",
                         "This call returns a list of all visible keywords.",
                         "Try typing into the search box (word-wheel).");
        }
Exemple #8
0
        // Constructor

        public Page_TOC()
        {
            InitializeComponent();
            self = this;

            //Panel for to show HelpTopic results
            resultsPanel = new Panel_HelpTopicResults(this, DockStyle.Fill);

            //Toc Select panel
            tocPanel = new Panel_Toc(this, TopicIdCbo, Globals.catalog);

            //Persistence: Load settings
            using (UserData userData = new UserData(Globals.DataRegKey))
            {
                TopicIdCbo.Text = userData.ReadStr("Toc.TopicIdCbo", "");
            }

            //Fill TocReturnDetail Enumeration dropdown
            tocDetailsCbo.Items.Clear();
            foreach (TocReturnDetail value in Enum.GetValues(typeof(TocReturnDetail)))
            {
                tocDetailsCbo.Items.Add(value.ToString());
            }
            tocDetailsCbo.SelectedIndex = 0;

            //SuperTips
            new SuperTip(TopicIDPictureBox, "Topic ID",
                         "Enter topic ID or select one from the drop down.",
                         "Select the TocReturnDetail you want and click the Get button.",
                         "Use an Id=\"-1\" to specify the virtual root page of the catalog");

            new SuperTip(tocDetailsCboTip, ToolTipIcon.Warning, "Warning", "Using 'TocReturnDetail.TocDescendants' can take a long time to complete",
                         "since a top level node can return many 1000's of child/sub-child items.",
                         "In this case be patient. The call will return eventually.");

            new SuperTip(HlpViewerBtn, "Show in HlpViewer", "Show selected help topic in HlpViewer.exe");
        }