private List<RegDataSheet> regDS; //List of all the Parts Data Sheets related to the search query

        #endregion Fields

        #region Constructors

        public Search(string query)
        {
            regDS = new List<RegDataSheet>();

            RegList r = new RegList(query);

            //goes through the links on the results page and creates a RegDataSheet from the pages
            if (r.TitleLinks.Count != 0)
            {

                if (r.TitleLinks[0] != "-1")
                {
                    for (int i = 0; i < r.TitleLinks.Count; i++)
                    {

                        RegDataSheet reg = new RegDataSheet(r.TitleLinks[i]);

                        regDS.Add(reg);
                    }
                }
            }

            if (r.TextLinks.Count != 0)
            {

                if (r.TextLinks[0] != "-1")
                {
                    for (int i = 0; i < r.TextLinks.Count; i++)
                    {

                        RegDataSheet reg = new RegDataSheet(r.TextLinks[i]);
                        regDS.Add(reg);
                        //Console.WriteLine(i + ": " + r.TextLinks[i]);
                    }
                }
            }

            ////Creates a list of PubMed source related to the query
            //PubList p = new PubList(query);
            //pubMedTitles = p.Titles;
            //pubMedLinks = p.Links;
        }
Exemple #2
0
        public Search(string query)
        {
            regDS = new List <RegDataSheet>();

            RegList r = new RegList(query);

            //goes through the links on the results page and creates a RegDataSheet from the pages
            if (r.TitleLinks.Count != 0)
            {
                if (r.TitleLinks[0] != "-1")
                {
                    for (int i = 0; i < r.TitleLinks.Count; i++)
                    {
                        RegDataSheet reg = new RegDataSheet(r.TitleLinks[i]);

                        regDS.Add(reg);
                    }
                }
            }

            if (r.TextLinks.Count != 0)
            {
                if (r.TextLinks[0] != "-1")
                {
                    for (int i = 0; i < r.TextLinks.Count; i++)
                    {
                        RegDataSheet reg = new RegDataSheet(r.TextLinks[i]);
                        regDS.Add(reg);
                        //Console.WriteLine(i + ": " + r.TextLinks[i]);
                    }
                }
            }

            ////Creates a list of PubMed source related to the query
            //PubList p = new PubList(query);
            //pubMedTitles = p.Titles;
            //pubMedLinks = p.Links;
        }