/[RomCheater]/trunk/RomCheater/Docking/FloatingWebBrowser.cs
ViewVC logotype

Diff of /trunk/RomCheater/Docking/FloatingWebBrowser.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 697 by william, Mon Jun 17 12:03:50 2013 UTC revision 698 by william, Mon Jun 17 12:19:13 2013 UTC
# Line 53  namespace RomCheater.Docking Line 53  namespace RomCheater.Docking
53              this.webBrowser.Navigating += new WebBrowserNavigatingEventHandler(Provider_Navigating);              this.webBrowser.Navigating += new WebBrowserNavigatingEventHandler(Provider_Navigating);
54              this.webBrowser.Navigated += new WebBrowserNavigatedEventHandler(Provider_Navigated);              this.webBrowser.Navigated += new WebBrowserNavigatedEventHandler(Provider_Navigated);
55              this.webBrowser.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(Provider_DocumentCompleted);              this.webBrowser.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(Provider_DocumentCompleted);
56                this.txtWebAddress.KeyDown += new KeyEventHandler(txtWebAddress_KeyDown);
57          }          }
58    
59          
60    
61          #region Provider Events          #region Provider Events
62          void Provider_Navigated(object sender, WebBrowserNavigatedEventArgs e)          void txtWebAddress_KeyDown(object sender, KeyEventArgs e)
63          {          {
64                if (e.KeyCode == Keys.Enter)
65                {
66                    string url = txtWebAddress.Text;
67                    this.Navigate(url);
68                }
69            }
70    
71            void Provider_Navigated(object sender, WebBrowserNavigatedEventArgs e)
72            {
73                logger.Debug.WriteLine("Navigated to Url: {0}", e.Url.ToString());
74                txtWebAddress.Text = e.Url.ToString();
75          }          }
76    
77          void Provider_Navigating(object sender, WebBrowserNavigatingEventArgs e)          void Provider_Navigating(object sender, WebBrowserNavigatingEventArgs e)
78          {          {
79                logger.Debug.WriteLine("Navigating to Url: {0}", e.Url.ToString());
80          }          }
81          void Provider_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)          void Provider_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
82          {          {
83                            logger.Debug.WriteLine("Loaded Document at Url: {0}", e.Url.ToString());
84          }          }
85          #endregion          #endregion
86    
87          #region IWebBrowserInterface Members          #region IWebBrowserInterface Members
88          public void Navigate(string urlString)          public void Navigate(string urlString)
89          {          {
90              this.Provider.Navigate(urlString);              this.Provider.Navigate(urlString);            
         }  
         public void Navigate(Uri url)  
         {  
             this.Provider.Navigate(url);  
91          }          }
92            public void Navigate(Uri url) { Navigate(url.ToString()); }
93          #endregion          #endregion
94    
95          
96      }      }
97  }  }

Legend:
Removed from v.697  
changed lines
  Added in v.698

  ViewVC Help
Powered by ViewVC 1.1.22