예제 #1
0
        private void Citation_DoWork(object sender, DoWorkEventArgs e)
        {
            Console.WriteLine("Thread started");

            /* data d = (data)e.Argument;
             * BackgroundWorker b = sender as BackgroundWorker;
             * test = new Controller(this);
             *
             *
             * resultList = test.initiateSearch(d);
             *
             * Console.WriteLine("why dis kolaveri");
             * //TabPage tab = new TabPage(mw);
             */
            soid s = (soid)e.Argument;

            int       id    = s.i;
            SortOrder so    = s.sOrder;
            int       start = s.start;

            resultList = test.getMSASCitations(s);

            if (s.c.CancellationPending)
            {
                e.Cancel = true;
            }
        }
예제 #2
0
        public ResultList getMSASCitations(soid s)
        {
            Searcher   searcher   = new Searcher();
            ResultList resultList = new ResultList();

            String URL;

            s.c.ReportProgress(10, null);
            if (s.c.CancellationPending)
            {
                return(null);
            }
            MSASQueryURLBuilder citationBuild = new MSASQueryURLBuilder();

            s.c.ReportProgress(40, null);
            URL = citationBuild.buildCitationUrl(s.i, s.sOrder, s.start);
            if (s.c.CancellationPending)
            {
                return(null);
            }
            s.c.ReportProgress(60, null);
            resultList = searcher.MSASsearchCitationUrl(URL);
            s.c.ReportProgress(90, null);
            if (s.c.CancellationPending)
            {
                return(null);
            }
            return(resultList);
            //tab.setResult(resultList);
        }
예제 #3
0
        public ResultList getMSASCitations(soid s)
       {
           Searcher searcher = new Searcher();
           ResultList resultList = new ResultList();

           String URL;
           s.c.ReportProgress(10, null);
           if (s.c.CancellationPending) return null;
           MSASQueryURLBuilder citationBuild = new MSASQueryURLBuilder();
           s.c.ReportProgress(40, null);
           URL = citationBuild.buildCitationUrl(s.i,s.sOrder,s.start);
           if (s.c.CancellationPending) return null;
           s.c.ReportProgress(60, null);
           resultList = searcher.MSASsearchCitationUrl(URL);
           s.c.ReportProgress(90, null);
           if (s.c.CancellationPending) return null;
           return resultList;
            //tab.setResult(resultList);


       }