示例#1
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.");
        }
示例#2
0
文件: Form1.cs 项目: bencz/OrangeC
        private void Form1_Load(object sender, EventArgs e)
        {
            sourceSplitter.Panel2Collapsed = true;
            //Supertips
            new SuperTip(imageUnrendered, "Unrendered Source (F6)", "Displays the original topic source from the .mshc help file.", "To see the 'rendered' source right-click and 'View Source' the WebBrowser control.");

            //Load the first registered catalog we find
            LoadCatalog();

            //load persistence UI data
            using (UserData userData = new UserData(UIDataStoreKey))
            {
                userData.RestoreFormPos(this);
                splitContainer1.SplitterDistance = userData.ReadInt("NavSplitterPos", splitContainer1.SplitterDistance);
                sourceSplitter.SplitterDistance = userData.ReadInt("SourceSplitterPos", sourceSplitter.SplitterDistance);
                ShowUnrenderedSource(userData.ReadBool("ShowUnrendered", !sourceSplitter.Panel2Collapsed));
            //                SetVSRenderMode(userData.ReadBool("VsRenderer", mnuVSRenderer.Checked));
                autoSyncOption.Checked = userData.ReadBool("AutoSync", autoSyncOption.Checked);
            }

            EnableDisable();
        }