Beispiel #1
0
        private void SetSearchParametersComplete(Object sender, DownloadCompleteEventArgs args)
        {
            try
            {
                DappleSearchWebDownload oDSWebDownload = sender as DappleSearchWebDownload;
                if (args.Error != null) throw args.Error;

                // --- If the search indices don't match, it's because a new search was done before this one completed, so discard these results ---
                if (oDSWebDownload.SearchIndex == m_lSearchIndex)
                {
                    XmlDocument oDoc = new XmlDocument();
                    oDoc.Load(args.Response.GetResponseStream());
                    SearchResultSet oPage1 = new SearchResultSet(oDoc);
                    InitSearch(oPage1);
                }
            }
            catch (WebException)
            {
                this.Invoke(new MethodInvoker(SetSearchFailed));
            }
            catch (XmlException)
            {
                this.Invoke(new MethodInvoker(SetSearchFailed));
            }
        }
Beispiel #2
0
 private void ForwardPageComplete(Object sender, DownloadCompleteEventArgs args)
 {
     DappleSearchWebDownload oDSWebDownload = sender as DappleSearchWebDownload;
     // --- If the search indices don't match, it's because a new search was done before this one completed, so discard these results ---
     if (oDSWebDownload.SearchIndex == m_lSearchIndex)
     {
         XmlDocument oDoc = new XmlDocument();
         oDoc.Load(args.Response.GetResponseStream());
         SearchResultSet oPage = new SearchResultSet(oDoc);
         ExtendSearch(oPage, m_iCurrentPage);
     }
 }