Пример #1
0
 public void TaskThreadFunc(object sender, EventArgs ea)
 {
     if (this._completedIeItem != null)
     {
         this.SendCompleteTask(this._completedIeItem.Task._id, this._completedIeItem.IsCompleted, this._completedIeItem.TaskInfoIndex, this._completedIeItem.ErrorString);
         this._completedIeItem = null;
         this._ieItem = null;
         Application.Exit();
     }
     if ((this._ieItem != null) && this._ieItem.Update(this))
     {
         this.CompleteIeItem(this._ieItem);
     }
 }
Пример #2
0
 public ExtendedTenDayBrowser New(bool navigateHome, IEItem ieItem)
 {
     TabPage page = new TabPage();
     ExtendedTenDayBrowser browser = new ExtendedTenDayBrowser();
     if (ieItem != null)
     {
         ieItem.AddBrowser(browser);
     }
     page.Text = "新建窗口";
     page.Tag = browser;
     browser.Tag = page;
     browser.Dock = DockStyle.Fill;
     browser.DownloadComplete += new EventHandler(this._browser_DownloadComplete);
     browser.StartNavigate += new EventHandler<BrowserExtendedNavigatingEventArgs>(this._browser_StartNavigate);
     browser.StartNewWindow += new EventHandler<BrowserExtendedNavigatingEventArgs>(this._browser_StartNewWindow);
     browser.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(this._browser_DocumentCompleted);
     browser.StatusTextChanged += new EventHandler(this._browser_StatusTextChanged);
     browser.DocumentTitleChanged += new EventHandler(this.TenDayBrowser_DocumentTitleChanged);
     browser.Quit += new EventHandler(this.TenDayBrowser_Quit);
     page.Controls.Add(browser);
     if (navigateHome)
     {
         browser.GoHome();
     }
     this.tabControl.TabPages.Add(page);
     this.tabControl.SelectedTab = page;
     return browser;
 }
Пример #3
0
 public void StartTaskThread(MyTask task)
 {
     this.StopTaskThread();
     this._taskThreadRun = true;
     if (this._ieItem == null)
     {
         this._ieItem = new IEItem(this, task, this._waitFindTime, this._waitDocCompleteTime);
         this.New(true, this._ieItem);
     }
 }
Пример #4
0
 public void CompleteIeItem(IEItem ieItem)
 {
     this._completedIeItem = ieItem;
 }